Non-Max suppression on circles

723 Views Asked by At

I have detected objects using bounding circles. How do I perform non-max suppression on them? I have both rectangles and circles and somehow I want to separate circles from circles and rectangles from rectangles. I have already tried using non-max suppression for rectangles but I do not understand how to do the same for circles.

2

There are 2 best solutions below

0
Novak On

I do not think that you can do Non-max suppression on circles. At least, after the non-max suppression, they won't be circles any more, more like ellipses. I don't think this is the way to go.

What you can do is non-max suppression on rectangles and after you find the correct bounding rectangle, you could select the middle point of each of the rectangle sides and draw circle/ellipse inside that rectangle that passes through selected 4 points (you have 2 axes of an ellipse).

1
Aman pradhan On

I have had to solve a similar problem in the recent past. All I did was to draw an imaginary square around the circumference of the circle, and then I applied non-max suppression to the square on the basis of area overlapping. You can find the code at: https://github.com/Amanpradhan/Non-Max-Suppression