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:
@@ -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}")
|
||||
|
||||
@@ -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();
|
||||
});
|
||||
});
|
||||
}
|
||||
@@ -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) {
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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) {
|
||||
{
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user