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

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

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();

View File

@ -158,7 +158,8 @@ features2d = {'Feature2D': ['detect', 'compute', 'detectAndCompute', 'descriptor
'FastFeatureDetector': ['create', 'setThreshold', 'getThreshold', 'setNonmaxSuppression', 'getNonmaxSuppression', 'setType', 'getType', 'getDefaultName'],
'AgastFeatureDetector': ['create', 'setThreshold', 'getThreshold', 'setNonmaxSuppression', 'getNonmaxSuppression', 'setType', 'getType', 'getDefaultName'],
'GFTTDetector': ['create', 'setMaxFeatures', 'getMaxFeatures', 'setQualityLevel', 'getQualityLevel', 'setMinDistance', 'getMinDistance', 'setBlockSize', 'getBlockSize', 'setHarrisDetector', 'getHarrisDetector', 'setK', 'getK', 'getDefaultName'],
# 'SimpleBlobDetector': ['create'],
'SimpleBlobDetector': ['create', 'setParams', 'getParams', 'getDefaultName'],
'SimpleBlobDetector_Params': [],
'KAZE': ['create', 'setExtended', 'getExtended', 'setUpright', 'getUpright', 'setThreshold', 'getThreshold', 'setNOctaves', 'getNOctaves', 'setNOctaveLayers', 'getNOctaveLayers', 'setDiffusivity', 'getDiffusivity', 'getDefaultName'],
'AKAZE': ['create', 'setDescriptorType', 'getDescriptorType', 'setDescriptorSize', 'getDescriptorSize', 'setDescriptorChannels', 'getDescriptorChannels', 'setThreshold', 'getThreshold', 'setNOctaves', 'getNOctaves', 'setNOctaveLayers', 'getNOctaveLayers', 'setDiffusivity', 'getDiffusivity', 'getDefaultName'],
'DescriptorMatcher': ['add', 'clear', 'empty', 'isMaskSupported', 'train', 'match', 'knnMatch', 'radiusMatch', 'clone', 'create'],