718c41634f
1.项目后端整体迁移至PaddleOCR-NCNN算法,已通过基本的兼容性测试 2.工程改为使用CMake组织,后续为了更好地兼容第三方库,不再提供QMake工程 3.重整权利声明文件,重整代码工程,确保最小化侵权风险 Log: 切换后端至PaddleOCR-NCNN,切换工程为CMake Change-Id: I4d5d2c5d37505a4a24b389b1a4c5d12f17bfa38c
38 lines
837 B
JavaScript
38 lines
837 B
JavaScript
if (typeof window === 'undefined') {
|
|
var cv = require("../opencv");
|
|
if (cv instanceof Promise) {
|
|
loadOpenCV();
|
|
} else {
|
|
cv.onRuntimeInitialized = perf;
|
|
}
|
|
}
|
|
|
|
let gCvSize;
|
|
|
|
function getCvSize() {
|
|
if (gCvSize === undefined) {
|
|
gCvSize = {
|
|
szODD: new cv.Size(127, 61),
|
|
szQVGA: new cv.Size(320, 240),
|
|
szVGA: new cv.Size(640, 480),
|
|
szSVGA: new cv.Size(800, 600),
|
|
szqHD: new cv.Size(960, 540),
|
|
szXGA: new cv.Size(1024, 768),
|
|
sz720p: new cv.Size(1280, 720),
|
|
szSXGA: new cv.Size(1280, 1024),
|
|
sz1080p: new cv.Size(1920, 1080),
|
|
sz130x60: new cv.Size(130, 60),
|
|
sz213x120: new cv.Size(120 * 1280 / 720, 120),
|
|
};
|
|
}
|
|
|
|
return gCvSize;
|
|
}
|
|
|
|
async function loadOpenCV() {
|
|
cv = await cv;
|
|
}
|
|
|
|
if (typeof window === 'undefined') {
|
|
exports.getCvSize = getCvSize;
|
|
} |