How do I convert a native grey scale image to binary using simpleblob. For me, it doesn't appear so simple.
My camera pulls in gray scale images named rawImage. Then a few operations are formed in finding the blobs - no big deal. I've used the threshold fx buy it doesn't have any effect on the current frame:
thread (about) entry-->
vector keypoints;
// Set up detector with params
Ptr detector = SimpleBlobDetector::create(params); //leave here!! otherwise keypoint drawing breaks
params.minThreshold = 50;
params.maxThreshold = 150;
// Detect blobs
detector->detect(rawImage, keypoints);
Mat im_with_keypoints;// belongs below; trying here; create it once & reuse it;
//scalar is BGR
drawKeypoints(rawImage, keypoints, im_with_keypoints, Scalar(gui_v->valueBlue, gui_v->valueGreen, gui_v->valueRed), DrawMatchesFlags::DRAW_RICH_KEYPOINTS);
// Show blobs
imshow("keypoints", im_with_keypoints);




↧