Python cv2.SimpleBlobDetector() Examples
The following are 5
code examples of cv2.SimpleBlobDetector().
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example.
You may also want to check out all available functions/classes of the module
cv2
, or try the search function
.
Example #1
Source File: utils_nms.py From lighttrack with MIT License | 6 votes |
def init_blob_detector(): params = cv2.SimpleBlobDetector_Params() params.minThreshold = 1 params.maxThreshold = 255 params.filterByArea = True params.minArea = 1 params.filterByCircularity = False params.filterByConvexity = False params.filterByInertia = False #detector = cv2.SimpleBlobDetector(params) detector = cv2.SimpleBlobDetector_create(params) return detector
Example #2
Source File: utils_nms.py From cvToolkit with MIT License | 5 votes |
def init_blob_detector(): params = cv2.SimpleBlobDetector_Params() params.minThreshold = 1 params.maxThreshold = 255 params.filterByArea = True params.minArea = 1 params.filterByCircularity = False params.filterByConvexity = False params.filterByInertia = False #detector = cv2.SimpleBlobDetector(params) detector = cv2.SimpleBlobDetector_create(params) return detector
Example #3
Source File: utils_nms.py From cvToolkit with MIT License | 5 votes |
def init_blob_detector(): params = cv2.SimpleBlobDetector_Params() params.minThreshold = 1 params.maxThreshold = 255 params.filterByArea = True params.minArea = 1 params.filterByCircularity = False params.filterByConvexity = False params.filterByInertia = False #detector = cv2.SimpleBlobDetector(params) detector = cv2.SimpleBlobDetector_create(params) return detector
Example #4
Source File: utils_nms.py From video-to-pose3D with MIT License | 5 votes |
def init_blob_detector(): params = cv2.SimpleBlobDetector_Params() params.minThreshold = 1 params.maxThreshold = 255 params.filterByArea = True params.minArea = 1 params.filterByCircularity = False params.filterByConvexity = False params.filterByInertia = False # detector = cv2.SimpleBlobDetector(params) detector = cv2.SimpleBlobDetector_create(params) return detector
Example #5
Source File: BlobDetector.py From openag_cv with GNU General Public License v3.0 | 4 votes |
def __init__(self, args): self.node_name = "cvBridge" rospy.init_node(self.node_name) # What we do during shutdown rospy.on_shutdown(self.cleanup) # Create the cv_bridge object self.bridge = CvBridge() # Subscribe to the camera image topics and set # the appropriate callbacks self.image_sub = rospy.Subscriber(args[1], Image, self.image_callback) self.image_pub = rospy.Publisher( "%s/BlobDetector" % (args[1]), Image, queue_size=10) # Detector # Set up the detector with parameters. # Setup SimpleBlobDetector parameters. params = cv2.SimpleBlobDetector_Params() # Filter by Color. params.filterByColor = rospy.get_param('~FilterByColor') params.blobColor = rospy.get_param('~BlobColor') # Filter by Area. params.filterByArea = rospy.get_param('~FilterByArea') params.minArea = rospy.get_param('~BlobMinArea') params.maxArea = rospy.get_param('~BlobMaxArea') # Filter by Circularity params.filterByCircularity = rospy.get_param('~FilterByCircularity') params.minCircularity = rospy.get_param('~BlobMinCircularity') params.maxCircularity = rospy.get_param('~BlobMaxCircularity') # Filter by Convexity params.filterByConvexity = rospy.get_param('~FilterByConvexity') params.minConvexity = rospy.get_param('~BlobMinConvexity') params.maxConvexity = rospy.get_param('~BlobMaxConvexity') # Filter by Inertia params.filterByInertia = rospy.get_param('~FilterByInertia') params.minInertiaRatio = rospy.get_param('~BlobMinInertia') params.maxInertiaRatio = rospy.get_param('~BlobMaxInertia') self.MaxLeavesSocketA = [0] self.MaxLeavesSocketB = [0] self.MaxLeavesSocketC = [0] self.MaxLeavesSocketD = [0] self.MaxLeavesSocketE = [0] self.MaxLeavesSocketF = [0] self.detector = cv2.SimpleBlobDetector(params) rospy.loginfo("Waiting for image topics...")