Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

How to find round filled circles?

Hello,

I'm trying to create a simple prototype of a car. It should be able to recognize a stop signal, and a semaphore (red/green). I've realized the stop signal detector using haar features but I've a problem with the stop signal, which from distance is recognized as a red semaphore.

I use the following code to detect the red colour:

        Core.inRange(hsv, redColors.get(0).first,
                redColors.get(0).second, mask1);
        Core.inRange(hsv, redColors.get(1).first,
                redColors.get(1).second, mask2);
        Core.bitwise_or(mask1, mask2, hsv);

And then I use the HoguhCircles function in order to find the circles in the image. The main problem is, that hough circles search for round contours, but In principle I can differentiate between a stop with a red traffic light by exploiting the fact that the traffic light is a red round filled circle.

For this reason, I was wondering if there is a way to find a round, filled circle - or if you can suggest an alternative to disambiguize the two.

Thanks