Developed with Giuseppe Marino
The fast radial symmetry algorithm highligths the central points of circles in an image.
Each pixel is interpreted as if it was part of a circumference. The angle of the pixel's gradient is used to calculate where, for a given radius, the theoretical center of the circle would fall. This point is registered in a separate matrix. The same happens for the angle in the opposite direction (rotated by pi radians), but it's marked in a different way. Then, a series of normalizations and filters are used to combine the results obtained with different radii.
The implementation works on grayscale images. The second parameter is the list of radii to use. The output is a single image, where a dark spot indicate a circle that's surrounded by a darker area, and where a bright spot indicates a circle that's surrounded by a brighter area.
frs = fastradialsymmetry(img, [10:4:26 40:10:90]);
figure; imshow(frs, []);
![]() Original |
![]() Fast radial symmetry |
---|