I am looking to identify the circles in an image. The circles are the tyres of a vehicle that is present in the image. However, using Hough's transformation, many circles are appearing in the image, but not the ones around the tyres. Not sure if there is a better approach to the same.
Also, is there a way to identify the biggest rectangle in the image i.e. the vehicle's storage container.
Any pointers would be of great help.
Regards Vijay
I think you need to play with the parameters to filter out the unwanted circles.
void HoughCircles(InputArray image, OutputArray circles, int method, double dp, double minDist, double param1=100, double param2=100, int minRadius=0, int maxRadius=0 )
minDist – Minimum distance between the centers of the detected circles. If the parameter is too small, multiple neighbor circles may be falsely detected in addition to a true one. If it is too large, some circles may be missed.
param1 – First method-specific parameter. In case of CV_HOUGH_GRADIENT , it is the higher threshold of the two passed to the Canny() edge detector (the lower one is twice smaller).
param2 – Second method-specific parameter. In case of CV_HOUGH_GRADIENT , it is the accumulator threshold for the circle centers at the detection stage. The smaller it is, the more false circles may be detected. Circles, corresponding to the larger accumulator values, will be returned first.
minRadius – Minimum circle radius. maxRadius – Maximum circle radius