Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Problem implementing blob detector

I'm tyring to implement a blob detector.... However, I keep getting this error

"OpenCV Error: The function/feature is not implemented () in cv::Feature2D::detectAndCompute, file C:\build\master_winpack-build-win64-vc14\opencv\modules\features2d\src\feature2d.cpp, line 154"

// Read image
Mat im = imread("blob.jpg", IMREAD_GRAYSCALE);

// Set up the detector with default parameters.
SimpleBlobDetector detector;

// Detect blobs.
std::vector<KeyPoint> keypoints;
detector.detect(im, keypoints);

// Draw detected blobs as red circles.
// DrawMatchesFlags::DRAW_RICH_KEYPOINTS flag ensures the size of the circle corresponds to the size of blob
Mat im_with_keypoints;
drawKeypoints(im, keypoints, im_with_keypoints, Scalar(0, 0, 255), DrawMatchesFlags::DRAW_RICH_KEYPOINTS);

// Show blobs
imshow("keypoints", im_with_keypoints);