Web Cam Images...

Started by
4 comments, last by Daedalus AI 18 years, 5 months ago
Anyone have much of an idea of how to write (or where to look to see) some code to get a web cam to take a picture and save it to a file in C/C++. I'm not asking anyone to write anything for me, but a point in the right direction would be really appreciated. All the research I've done has led me to existing products and/or descriptions of projects. What I'm ideally looking for is a good old fashioned Readme or some Howto's with some example code. Cheers, Daed.
Advertisement
Well, I think I saw something on codeproject.com about this, but I cannot say for sure. I know you'll have to use TWAIN drivers in order to do so. I have never done it myself, but I am trying to point you in the right direction. =)
:==-_ Why don't the voices just leave me alone?! _-==:
Just as I thought. There is a Win32 TWAIN wrapper on CodeProject. Here is the URL:

CodeProject.com TWAIN Wrapper

Hope that's what you were looking for! =) Need anything else, let me know.
:==-_ Why don't the voices just leave me alone?! _-==:
TWAIN isn't a necessity. Windows (I'm assuming this is what we are interested in), has multiple API's that can be used for capturing images from a webcam. TWAIN is one. WIA is another API that can be used (since MSDN documents this one, its the one I chose to use in my webcam app). DirectShow can also be used to capture images from a webcam.
.
Quote:Original post by Mastaba
TWAIN isn't a necessity. Windows (I'm assuming this is what we are interested in), has multiple API's that can be used for capturing images from a webcam. TWAIN is one. WIA is another API that can be used (since MSDN documents this one, its the one I chose to use in my webcam app). DirectShow can also be used to capture images from a webcam.


How would you rate the speed of the various processes? I'm doing a project involving webcams and sort of a green screen effect. The code was mostly written in java, using JMF to utilize the webcam. Too slow, no matter how much tweaking was done. I've looked into VFW, but it seems that you can't programmatically grab images.. and I figured I'd ask for your advice on speed before I try and implement the alternatives until I find a suitable one.

Thanks,
Falkone
Disclaimer: "I am in no way qualified to present advice on any topic concerning anything and can not be held responsible for any damages that my advice may incurr (due to neither my negligence nor yours)"
Quote:Original post by TFS_Waldo
Just as I thought. There is a Win32 TWAIN wrapper on CodeProject. Here is the URL:

CodeProject.com TWAIN Wrapper

Hope that's what you were looking for! =) Need anything else, let me know.


Ah thanx dude, I scowered the net last night trying to find some readable source code ( inc thecodeproject :S ) so I could understand the whole thing better, and this TWAIN wrapper might just be what I was looking for.

Cheers dude,
Daed.

This topic is closed to new replies.

Advertisement