1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-29 23:33:05 +04:00

Merge pull request #13710 from ramezrafla:3.4

* Added DMatch bindings

* Added CR which was accidently removed to maintain consistency

* Removed trailing white-space
This commit is contained in:
Ramez Rafla
2019-01-29 16:14:33 -05:00
committed by Alexander Alekhin
parent 268d73165e
commit eb00dce78e
+9
View File
@@ -328,6 +328,9 @@ EMSCRIPTEN_BINDINGS(binding_utils)
register_vector<cv::Mat>("MatVector");
register_vector<cv::Rect>("RectVector");
register_vector<cv::KeyPoint>("KeyPointVector");
register_vector<cv::DMatch>("DMatchVector");
register_vector<std::vector<cv::DMatch>>("DMatchVectorVector");
emscripten::class_<cv::Mat>("Mat")
.constructor<>()
@@ -481,6 +484,12 @@ EMSCRIPTEN_BINDINGS(binding_utils)
.field("response", &cv::KeyPoint::response)
.field("size", &cv::KeyPoint::size);
emscripten::value_object<cv::DMatch>("DMatch")
.field("queryIdx", &cv::DMatch::queryIdx)
.field("trainIdx", &cv::DMatch::trainIdx)
.field("imgIdx", &cv::DMatch::imgIdx)
.field("distance", &cv::DMatch::distance);
emscripten::value_array<cv::Scalar_<double>> ("Scalar")
.element(index<0>())
.element(index<1>())