circlecv

Draws a circle on the image.

Syntax

circlecv(handle, center, radius, color...)

circlecv(handle, center, radius, color, thickness, type, shift)

Inputs

handle
Handle of the image.
Type: integer
center
Two-element vector of integers representing the center of the circle to be drawn.
Type: vector
radius
Radius of the circle. The value must be a positive integer.
Type: integer
color
Three element vector of integers representing red, green blue (RGB) colors that the circle will be drawn in.
Type: vector
thickness
Optional parameter specifying the thickness of the circle. Default value of thickness is 1.
Type: integer
type
Optional parameter specifying the line type. Default value is 8 and valid values are:
1
Filled line.
4
Line is drawn using 4-connected Bresenham algorithm.
8(default)
Line is drawn using 8-connected Bresenham algorithm.
16
Antialiased line.
Type: integer
shift
Optional parameter specifying number of fractional bits. Default value is 0.
Type: integer

Example

Draw a red circle with thickness 12 in an image :

handle = imreadcv('1.jpg');
circlecv(handle, [300, 150], 51, [255 0 0], 12);
Figure 1. Original image


Figure 2. Modified image after executing circlecv