mirror of
https://github.com/opencv/opencv.git
synced 2024-11-29 13:47:32 +08:00
Fix JavaScript bindings for features2d module
This commit is contained in:
parent
0492301e76
commit
7649e537b7
@ -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…
Reference in New Issue
Block a user