mirror of
https://github.com/opencv/opencv.git
synced 2024-11-30 14:29:49 +08:00
c82417697a
[GSoC] OpenCV.js: WASM SIMD optimization 2.0 * gsoc_2020_simd Add perf test for filter2d * add perf test for kernel scharr and kernel gaussianBlur * add perf test for blur, medianBlur, erode, dilate * fix the errors for the opencv PR robot fix the trailing whitespace. * add perf tests for kernel remap, warpAffine, warpPersepective, pyrDown * fix a bug in modules/js/perf/perf_imgproc/perf_remap.js * add function smoothBorder in helpfun.js and remove replicated function in perf test of warpAffine and warpPrespective * fix the trailing white space issues * add OpenCV.js loader * Implement the Loader with help of WebAssembly Feature Detection, remove trailing whitespaces * modify the explantion for loader in js_setup.markdown and fix bug in loader.js
29 lines
687 B
JavaScript
29 lines
687 B
JavaScript
if (typeof window === 'undefined') {
|
|
var cv = require("../opencv");
|
|
}
|
|
|
|
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;
|
|
}
|
|
|
|
if (typeof window === 'undefined') {
|
|
exports.getCvSize = getCvSize;
|
|
} |