You are here : matlabImage Processingviscircles

viscircles() - Image Processing

viscircles(centers,radii) draws
circles with specified centers and radii onto
the current axes.viscircles(ax,centers,radii) draws
circles onto the axes specified by ax.h = viscircles(ax,centers,radii) draws
circles and returns a handle to the circles created. This handle is
an hggroup object that is a
child of the axes object, ax.exampleh = viscircles(___,Name,Value) specifies
additional options with one or more Name,Value pair
arguments, using any of the previous syntaxes. Parameter names can
be abbreviated.


viscircles(centers,radii) exampleviscircles(ax,centers,radii)h = viscircles(ax,centers,radii)h = viscircles(___,Name,Value) example


Draw Lines Around Bright and Dark Circles in ImageOpen This Example
This example shows how to draw lines around both bight and dark circles in an image.
Read the image into the workspace and display it.A = imread('circlesBrightDark.png');

Define the radius range.Rmin = 30;
Rmax = 65;
Find all the bright circles in the image within the radius range.[centersBright, radiiBright] = imfindcircles(A,[Rmin Rmax],'ObjectPolarity','bright');
Find all the dark circles in the image within the radius range.[centersDark, radiiDark] = imfindcircles(A,[Rmin Rmax],'ObjectPolarity','dark');
Draw blue lines around the edges of the bright circles.viscircles(centersBright, radiiBright,'Color','b');

Draw red dashed lines around the edges of the dark cirles.viscircles(centersDark, radiiDark,'LineStyle','--');

Output / Return Value


Alternatives / See Also