2019-09-24 21:30:42 +08:00
|
|
|
if (typeof window === 'undefined') {
|
|
|
|
var cv = require("../opencv");
|
|
|
|
}
|
|
|
|
|
2020-10-19 04:30:36 +08:00
|
|
|
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;
|
2019-09-24 21:30:42 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
if (typeof window === 'undefined') {
|
2020-10-19 04:30:36 +08:00
|
|
|
exports.getCvSize = getCvSize;
|
2019-09-24 21:30:42 +08:00
|
|
|
}
|