Jump to content
  • Advertisement
Sign in to follow this  
Daedalus AI

Web Cam Images...

This topic is 4868 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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.

Share this post


Link to post
Share on other sites
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. =)

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!