Fix JavaScript bindings for features2d module

pull/12767/head
Dmitry Kurtaev 6 years ago
parent 0492301e76
commit 7649e537b7
  1. 9
      modules/js/src/core_bindings.cpp

@ -327,6 +327,7 @@ EMSCRIPTEN_BINDINGS(binding_utils)
register_vector<cv::Point>("PointVector");
register_vector<cv::Mat>("MatVector");
register_vector<cv::Rect>("RectVector");
register_vector<cv::KeyPoint>("KeyPointVector");
emscripten::class_<cv::Mat>("Mat")
.constructor<>()
@ -472,6 +473,14 @@ EMSCRIPTEN_BINDINGS(binding_utils)
function("rotatedRectBoundingRect", select_overload<Rect(const cv::RotatedRect&)>(&binding_utils::rotatedRectBoundingRect));
function("rotatedRectBoundingRect2f", select_overload<Rect2f(const cv::RotatedRect&)>(&binding_utils::rotatedRectBoundingRect2f));
emscripten::value_object<cv::KeyPoint>("KeyPoint")
.field("angle", &cv::KeyPoint::angle)
.field("class_id", &cv::KeyPoint::class_id)
.field("octave", &cv::KeyPoint::octave)
.field("pt", &cv::KeyPoint::pt)
.field("response", &cv::KeyPoint::response)
.field("size", &cv::KeyPoint::size);
emscripten::value_array<cv::Scalar_<double>> ("Scalar")
.element(index<0>())
.element(index<1>())

Loading…
Cancel
Save