diff --git a/modules/js/src/core_bindings.cpp b/modules/js/src/core_bindings.cpp index e8f0ee7f85..60679bb96f 100644 --- a/modules/js/src/core_bindings.cpp +++ b/modules/js/src/core_bindings.cpp @@ -327,6 +327,7 @@ EMSCRIPTEN_BINDINGS(binding_utils) register_vector("PointVector"); register_vector("MatVector"); register_vector("RectVector"); + register_vector("KeyPointVector"); emscripten::class_("Mat") .constructor<>() @@ -472,6 +473,14 @@ EMSCRIPTEN_BINDINGS(binding_utils) function("rotatedRectBoundingRect", select_overload(&binding_utils::rotatedRectBoundingRect)); function("rotatedRectBoundingRect2f", select_overload(&binding_utils::rotatedRectBoundingRect2f)); + emscripten::value_object("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> ("Scalar") .element(index<0>()) .element(index<1>())