1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-30 07:43:03 +04:00

Add JavaScript bindings for SimpleBlobDetector.

This commit is contained in:
Alexander Smorkalov
2023-11-01 17:45:04 +03:00
parent c91af16fa7
commit abc4eeb9a7
3 changed files with 15 additions and 1 deletions
+4
View File
@@ -99,6 +99,10 @@ typedef QRCodeDetectorAruco::Params QRCodeDetectorAruco_Params;
using namespace cv::dnn;
#endif
#ifdef HAVE_OPENCV_FEATURES2D
typedef SimpleBlobDetector::Params SimpleBlobDetector_Params;
#endif
#ifdef HAVE_OPENCV_VIDEO
typedef TrackerMIL::Params TrackerMIL_Params;
#endif
+9
View File
@@ -62,6 +62,15 @@ QUnit.test('Detectors', function(assert) {
assert.equal(kp.size(), 53, 'AKAZE');
});
QUnit.test('SimpleBlobDetector', function(assert) {
let image = generateTestFrame();
let kp = new cv.KeyPointVector();
let sbd = new cv.SimpleBlobDetector();
sbd.detect(image, kp);
assert.equal(kp.size(), 0);
});
QUnit.test('BFMatcher', function(assert) {
// Generate key points.
let image = generateTestFrame();