hi...
I am new with c++. I need help to retrieve image from my usb webcam. I used codegear compiler.

The idea is I need to capture image 10 times per second( or more) from my webcam. So, it will display at the screen some sort like video image (at TImage).


If anyone can help me with some source code to capture the image from the usb webcam, I really appreciate that.

Problem :
1. I don't know the function to capture image from my webcam.
2. The coding used in codegear compiler is something new for me.
3. I need help...

THANK YOU!

Recommended Answers

All 7 Replies

There is no standard functions to do this. You will need a library like OpenCV (or possibly something in DirectX, though I'm not sure of that). If you are just starting in C++, it may be too complicated to dive right into getting something like that to work with your compiler (unless you have experience using them in another language). Just trying to be realistic here.

Thank you for your reply. I've heard about OpenCV. This is some kind of additional library to the compiler right.

Did you mean it is impossible to do that just with C++ languages it self? That would give me a real shock here.

Thank you for your reply. I've heard about OpenCV. This is some kind of additional library to the compiler right.

Yes.

Did you mean it is impossible to do that just with C++ languages it self? That would give me a real shock here.

Without using outside libraries, you'd have to be able to do some very low level (with respect to the machine, not ability level) calls to get the information off of the USB, organize all of the information, etc., so it's theoretically possible, but in practice you wouldn't do it that way.

Thank you jonsca. I am sorry if I'm slow learner. Do you mean with codegear compiler cannot do anything to help me out?

The compiler looks like GUI that make thing simple. If only OpenCV can help me. I would like to try it out.

Thank you jonsca. I am sorry if I'm slow learner. Do you mean with codegear compiler cannot do anything to help me out?

It sounds to me like you are just getting started with C++, period. While this seems like a good starter project, it's not going to be possible without a library. If you know how to incorporate libraries into Codegear and make projects with them, then certainly go for it.

The compiler looks like GUI that make thing simple. If only OpenCV can help me. I would like to try it out.

Again, if you are just starting out, start at the beginning. Find some basic tutorials and work through them.

I have already connected it using some software that is called TVidGrab. By using this component i can easily connect it. =)

tq for your help jonsca...

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.