How to make webcam shot with console application?

Maybe somebody know the code, not show but just capture. (not Opencv)
Last edited on
That's an interesting question I dont know the answer too. But can help you along the way to find some clues. A quick google brought me to something called WinUSB, WIA (Windows Image Acquisition) and WPD (Windows Portable Devices). I dont know wether or not there are different api's for integrated hardware or usb hardware. I would guess so.

Since your webcam probably allready has driver installed (comes with Windows, it detects etc.). There is probably some format/protocol to communicate via any of the devices (with recieve and send), which one this is I dont know, since I havent done much programming against hardware devices.

Oh and btw, I suddenly just found something using DirectShow, I probably think that would be the first and easiest attempt to do something like this

http://www.rohitab.com/discuss/topic/34389-directshow-webcam-capture-class-c/

1
2
VideoCapture* vc        = new VideoCapture(callback);
VideoDevice* devices    = vc->GetDevices();

etc...
> That's an interesting question I don't know the answer too.
Me too.
Count me in :)
thanx for answer but
1
2
3
c:\program files (x86)\microsoft sdks\windows\v7.0a\include\objidl.h(11280): error C2061: syntax error : identifier '__RPC__out_xcount_part'
1>c:\program files (x86)\microsoft sdks\windows\v7.0a\include\objidl.h(11281): error C2059: syntax error : ')'
1>c:\program files (x86)\microsoft sdks\windows\v7.0a\include\objidl.h(11281): fatal error C1903: unable to recover from previous error(s); stopping compilation
Upgrade your Win7 SDK or the DirectX SDK.
Her's someone who had similar issue:
https://social.msdn.microsoft.com/Forums/windowsdesktop/en-US/9779c9ad-e20c-4d73-9703-a1a308775e4b/

Good luck!
Last edited on
Yes, I saw this post twice before you replied, but http://imgur.com/a/DKQG6 . I don't know what to do.
Follow the white, ehrm, green rabbit...
?
Topic archived. No new replies allowed.