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

Merge pull request #26643 from vrabaud:js_clone_fix

js: Rename Mat::clone binding because it is used in Emscripten.
This commit is contained in:
Alexander Smorkalov
2024-12-19 08:20:07 +03:00
committed by GitHub
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -524,7 +524,7 @@ EMSCRIPTEN_BINDINGS(binding_utils)
.function("colRange", select_overload<Mat(int, int)const>(&cv::Mat::colRange))
.function("colRange", select_overload<Mat(const Range&)const>(&cv::Mat::colRange))
.function("step1", select_overload<size_t(int)const>(&cv::Mat::step1))
.function("clone", select_overload<Mat()const>(&cv::Mat::clone))
.function("mat_clone", select_overload<Mat()const>(&cv::Mat::clone))
.function("depth", select_overload<int()const>(&cv::Mat::depth))
.function("col", select_overload<Mat(int)const>(&cv::Mat::col))
.function("dot", select_overload<double(const Mat&, const Mat&)>(&binding_utils::matDot))
+1 -1
View File
@@ -173,7 +173,7 @@ QUnit.test('test_mat_creation', function(assert) {
// clone
{
let mat = cv.Mat.ones(5, 5, cv.CV_8UC1);
let mat2 = mat.clone();
let mat2 = mat.mat_clone();
assert.equal(mat.channels, mat2.channels);
assert.equal(mat.size().height, mat2.size().height);