# Drawing a circle in a video captured frame

• 12-03-2001
skyhigh
Drawing a circle in a video captured frame
Greetings to all, a newbie here to this forum.

Recently I have been encountered a problem in drawing a circle on a video captured image. It was part of a video capture/face recognition project I was doing.

I have a copy of a video capture source code but is really unsure on how to go about doing it.

Basically, the video capture code captures an image from an analog camera and thru a video capture card, converted into an image file. I have no problem on fixing up the video capture code. It's just that I have no idea on how to code the part which draws the circle onto the image and output it together.

The idea of the video capture code is to first capture the image and store it into a temp buffer. A pointer will be then assigned to point to this buffer. (Finding the correct pointer would be a problem too. ^^) The image would be then output onto the screen. However, the end result was to have a circle together with the image output onto the screen.

My initial guess would be that it would require the trigo libraries in order to draw a circle.

Can anyone enlighten me on my question ?

Thank you.
• 12-04-2001
klausi
You can draw a circle with the formula y-coordinate=squareroot(x-coordinate^2+r^2)

r is the range between the circle and his middle-point.
Sorry I donīt know that special words in english!

klausi
• 12-05-2001
novacain
Unless your camera is taking very high res images circles are very hard to draw. This is due to the rectangular pixcel's.
That is you will get an elipse not a circle. Draw a grid of rectangles, approx y=3x/4 and try to draw a circle, see what I mean.

And if your res is not high enough you will not get the detail you need to pull any data from the image.