opencv - "Strength" of detected blob -
i following tutorial @ http://www.learnopencv.com/blob-detection-using-opencv-python-c/ detect blobs using simpleblobdetector http://docs.opencv.org/master/d0/d7a/classcv_1_1simpleblobdetector.html
from blobs obtained, how keep best blob ? i.e. blob best resembles circle. output of blob detector keypoints response attribute dont think being utilized in blob detector.
i hope can receive on this. in meantime, shall read on source code of blob detector , able figure out what/where edit want. thanks.
in python:
params = cv2.simpleblobdetector_params() # filter circularity params.filterbycircularity = true params.mincircularity = 0.1 detector = cv2.simpleblobdetector_create(params) in c++
// setup simpleblobdetector parameters. simpleblobdetector::params params; // filter circularity params.filterbycircularity = true; params.mincircularity = 0.1; ptr<simpleblobdetector> detector = simpleblobdetector::create(params); in vector keypoints, 1 similar circle last one, since circularity of circle 1 while other shapes have circularity <1
you'll find full tutorial here. this, btw, same page you're looking at... keep scrolling down...
Comments
Post a Comment