Skip to content Skip to sidebar Skip to footer

Circle Detection In Noisy A Image

I have the following image of a bubble raft Here's the code I'm using to detect the circles: import cv2 import numpy as np import sys img = cv2.imread(sys.argv[1],0) img = cv2.m

Solution 1:

I'm not clear what your question is, I assume you want more of the circles to be detected?

The documentation for HoughCircles can be found here:

https://docs.opencv.org/2.4/modules/imgproc/doc/feature_detection.html?highlight=houghcircles

Based on the documentation, I would say that your thresholds aren't ideal in the call circles = cv2.HoughCircles(img,cv2.HOUGH_GRADIENT,1,20, param1=50,param2=30,minRadius=5,maxRadius=25)

I would first try lowering param2 and also play with the value of param1 if that doesn't work for you.

Post a Comment for "Circle Detection In Noisy A Image"