Ask Your Question
0

Opencv cvcircle x and y

asked 2013-08-28 02:18:04 -0600

opencv1234 gravatar image

Where should I enter the x and y in cvcircle?

Thanks

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
2

answered 2013-08-28 02:27:02 -0600

Actually please keep yourself from using the cvWhatever functions, which are the old C-style API. You should just use the up to date C++ - API.

This code snippet should help you out, the x and y coordinate are fixed in the center point parameter.

// Long explicit code sample
Mat image = imread("location_of_image");
int x = value_x;
int y = value_y;
int radius = value_radius;
// Draw circle
// The scalar gives you the color depending on the values for the BGR color channels
circle(image, Point(x,y), radius, Scalar(255,0,0));
// Show the cirle on image
imshow("result", image);
edit flag offensive delete link more

Question Tools

Stats

Asked: 2013-08-28 02:18:04 -0600

Seen: 480 times

Last updated: Aug 28 '13

Related questions