DrawCircle

Draw a hollow circle in the image.

 

function call:

[out_img1]=vsg('DrawCircle',in_img1,p1,rad,col,thickness);

 

Arguments:

in_img1 input image, can be 3 channel RGB, single channel greyscale, or binary image.

p1 – centre of the circle to be drawn. Should be specified as a 2 vector e.g. [100;100].

rad – radius of the circle to be drawn. Can be specified as an integer or a double.

col - the colour of the circle to be drawn. This should be specified as a 3-vector e.g. [50;100;200].

thickness - the thickness of the line used to draw the circle, specified as an integer number of pixels.

 

Description:

[out_img1]=vsg('DrawCircle',in_img1,p1,rad,col,thickness) – out_img1 is an image of the same dimensions and number of colour planes as the input image, with a circle drawn at the specified location, with the specified radius, colour and thickness.

 

Example:

img1 = openimage('lake.jpg');

[out_img1]=vsg('DrawCircle',img1,[50,50],30,[255,0,0],1);

figure, image(uint8(out_img1));
Home       Functions       Back