From eb00dce78ef74272709a78814f54d509371b2600 Mon Sep 17 00:00:00 2001 From: Ramez Rafla Date: Tue, 29 Jan 2019 16:14:33 -0500 Subject: [PATCH] Merge pull request #13710 from ramezrafla:3.4 * Added DMatch bindings * Added CR which was accidently removed to maintain consistency * Removed trailing white-space --- modules/js/src/core_bindings.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/modules/js/src/core_bindings.cpp b/modules/js/src/core_bindings.cpp index 60679bb96f..da7bebe297 100644 --- a/modules/js/src/core_bindings.cpp +++ b/modules/js/src/core_bindings.cpp @@ -328,6 +328,9 @@ EMSCRIPTEN_BINDINGS(binding_utils) register_vector("MatVector"); register_vector("RectVector"); register_vector("KeyPointVector"); + register_vector("DMatchVector"); + register_vector>("DMatchVectorVector"); + emscripten::class_("Mat") .constructor<>() @@ -481,6 +484,12 @@ EMSCRIPTEN_BINDINGS(binding_utils) .field("response", &cv::KeyPoint::response) .field("size", &cv::KeyPoint::size); + emscripten::value_object("DMatch") + .field("queryIdx", &cv::DMatch::queryIdx) + .field("trainIdx", &cv::DMatch::trainIdx) + .field("imgIdx", &cv::DMatch::imgIdx) + .field("distance", &cv::DMatch::distance); + emscripten::value_array> ("Scalar") .element(index<0>()) .element(index<1>())