1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-30 07:43:03 +04:00

Merge branch '4.x' into '5.x'

This commit is contained in:
Maksim Shabunin
2024-06-11 19:38:59 +03:00
573 changed files with 72922 additions and 7355 deletions
+1 -1
View File
@@ -69,7 +69,7 @@ if(COMPILE_FLAGS)
set_target_properties(${the_module} PROPERTIES COMPILE_FLAGS ${COMPILE_FLAGS})
endif()
set(EMSCRIPTEN_LINK_FLAGS "${EMSCRIPTEN_LINK_FLAGS} --memory-init-file 0 -s TOTAL_MEMORY=128MB -s WASM_MEM_MAX=1GB -s ALLOW_MEMORY_GROWTH=1")
set(EMSCRIPTEN_LINK_FLAGS "${EMSCRIPTEN_LINK_FLAGS} -s TOTAL_MEMORY=128MB -s WASM_MEM_MAX=1GB -s ALLOW_MEMORY_GROWTH=1")
set(EMSCRIPTEN_LINK_FLAGS "${EMSCRIPTEN_LINK_FLAGS} -s MODULARIZE=1")
set(EMSCRIPTEN_LINK_FLAGS "${EMSCRIPTEN_LINK_FLAGS} -s EXPORT_NAME=\"'cv'\" -s DEMANGLE_SUPPORT=1")
set(EMSCRIPTEN_LINK_FLAGS "${EMSCRIPTEN_LINK_FLAGS} -s FORCE_FILESYSTEM=1 --use-preload-plugins --bind --post-js ${JS_HELPER} ${COMPILE_FLAGS}")
+14
View File
@@ -0,0 +1,14 @@
// This file is part of OpenCV project.
// It is subject to the license terms in the LICENSE file found in the top-level directory
// of this distribution and at http://opencv.org/license.html.
if (cv instanceof Promise) {
QUnit.test("init_cv", (assert) => {
const done = assert.async();
assert.ok(true);
cv.then((ready_cv) => {
cv = ready_cv;
done();
});
});
}
-5
View File
@@ -2,11 +2,6 @@
// It is subject to the license terms in the LICENSE file found in the top-level directory
// of this distribution and at http://opencv.org/license.html.
if (typeof module !== 'undefined' && module.exports) {
// The environment is Node.js
var cv = require('./opencv.js'); // eslint-disable-line no-var
}
QUnit.module('Camera Calibration and 3D Reconstruction', {});
QUnit.test('constants', function(assert) {
-5
View File
@@ -2,11 +2,6 @@
// It is subject to the license terms in the LICENSE file found in the top-level directory
// of this distribution and at http://opencv.org/license.html.
if (typeof module !== 'undefined' && module.exports) {
// The environment is Node.js
var cv = require('./opencv.js'); // eslint-disable-line no-var
}
QUnit.module('Core', {});
QUnit.test('test_LUT', function(assert) {
-5
View File
@@ -2,11 +2,6 @@
// It is subject to the license terms in the LICENSE file found in the top-level directory
// of this distribution and at http://opencv.org/license.html.
if (typeof module !== 'undefined' && module.exports) {
// The environment is Node.js
var cv = require('./opencv.js'); // eslint-disable-line no-var
}
function generateTestFrame(width, height) {
let w = width || 200;
let h = height || 200;
-5
View File
@@ -68,11 +68,6 @@
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
if (typeof module !== 'undefined' && module.exports) {
// The environment is Node.js
var cv = require('./opencv.js'); // eslint-disable-line no-var
}
QUnit.module('Image Processing', {});
QUnit.test('test_imgProc', function(assert) {
-5
View File
@@ -68,11 +68,6 @@
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
if (typeof module !== 'undefined' && module.exports) {
// The environment is Node.js
var cv = require('./opencv.js'); // eslint-disable-line no-var
}
QUnit.module('CoreMat', {});
QUnit.test('test_mat_creation', function(assert) {
-6
View File
@@ -40,12 +40,6 @@
// Author : Rijubrata Bhaumik, Intel Corporation. rijubrata.bhaumik[at]intel[dot]com
if (typeof module !== 'undefined' && module.exports) {
// The environment is Node.js
var cv = require('./opencv.js'); // eslint-disable-line no-var
}
QUnit.module('Photo', {});
QUnit.test('test_photo', function(assert) {
-4
View File
@@ -67,10 +67,6 @@
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
if (typeof module !== 'undefined' && module.exports) {
// The environment is Node.js
var cv = require('./opencv.js'); // eslint-disable-line no-var
}
QUnit.module('Utils', {});
QUnit.test('Test vectors', function(assert) {
{
-5
View File
@@ -67,11 +67,6 @@
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
if (typeof module !== 'undefined' && module.exports) {
// The environment is Node.js
var cv = require('./opencv.js'); // eslint-disable-line no-var
}
QUnit.module('Video', {});
QUnit.test('Background Segmentation', function(assert) {
// BackgroundSubtractorMOG2
+7 -3
View File
@@ -43,8 +43,9 @@ testrunner.options.maxBlockDuration = 20000; // cause opencv_js.js need time to
testrunner.run(
{
code: 'opencv.js',
tests: ['test_mat.js',
code: {path: "opencv.js", namespace: "cv"},
tests: ['init_cv.js',
'test_mat.js',
'test_utils.js',
'test_core.js',
'test_imgproc.js',
@@ -57,7 +58,10 @@ testrunner.run(
},
function(err, report) {
console.log(report.failed + ' failed, ' + report.passed + ' passed');
if (report.failed) {
if (report.failed || err) {
if (err) {
console.log(err);
}
process.on('exit', function() {
process.exit(1);
});