C Board  

Go Back   C Board > General Programming Boards > C Programming

Reply
 
LinkBack Thread Tools Display Modes
Old 12-03-2001, 10:39 AM   #1
Registered User
 
Join Date: Dec 2001
Posts: 1
Question 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.
skyhigh is offline   Reply With Quote
Old 12-04-2001, 01:29 AM   #2
Registered User
 
Join Date: Oct 2001
Posts: 197
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
__________________
When I close my eyes nobody can see me...
klausi is offline   Reply With Quote
Old 12-05-2001, 01:00 AM   #3
train spotter
 
Join Date: Aug 2001
Location: near a computer
Posts: 3,451
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.
__________________
"Man alone suffers so excruciatingly in the world that he was compelled to invent laughter."
Friedrich Nietzsche

"I spent a lot of my money on booze, birds and fast cars......the rest I squandered."
George Best

"If you are going through hell....keep going."
Winston Churchill
novacain is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Drawing a circle with ASCII character bnkslo C Programming 15 04-03-2008 12:56 PM
drawing circle to console golom C Programming 2 12-20-2006 10:57 AM
Drawing circle into a bitmap file brokensail C++ Programming 2 10-30-2006 01:26 AM
Animation not working.... aquinn C Programming 7 02-19-2005 05:37 AM
Drawing a circle using glut... bennyho03 C Programming 6 10-18-2004 10:06 AM


All times are GMT -6. The time now is 01:31 PM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.2

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22