|
-
Aug 8th, 2003, 05:45 AM
#1
Thread Starter
Banned
Getting image from Webcam
Hi,
Does anyone know if there are (standard) controls to capture the images of my webcam?
It comes with special software that does it, but it's also possible in Windows itself.
When I select my webcam in "My Computer" it shows the output of my webcam, and I have the possibility to take a picture...
So does that mean there is a function for that in Windows?
I heard something about using WIA, but I have no idea how that works...
I'm using XP Pro, and my webcam is using USB...
Cheers,
CJ
-
Aug 8th, 2003, 06:09 AM
#2
Thread Starter
Banned
-
Sep 24th, 2012, 09:11 AM
#3
New Member
Re: Getting image from Webcam
-
Sep 24th, 2012, 09:31 AM
#4
Re: Getting image from Webcam
There are four basic ways to get at webcams:
- API provided by the manufacturer through a specific SDK.
- DirectX.
- WIA before Windows 6.0 (Vista).
- Video for Windows (AviCap before Win95, AviCap32 since).
WIA had this ripped out, supposedly due to some DRM issues. Since it was fairly short-lived for this purpose (XP only, or perhaps later Win2K SP levels) there are fewer examples.
DirectX can be a monster to work with, though many programmers will say it's "the way to go." VB6 support is thin past XP though and there is no supported DirectX SDK version with a VB6-friendly API past WinXP. Thus for most purposes it can be considerd dead.
The Video for Windows API is old and crusty, and battles a little with the newer webcam driver model in Windows. It can be a struggle on systems with multiple webcams snce thy all end up mapped to a single VfW pseudo-device (" Microsoft WDM Image Capture (Win32)").
However if you have just one webcam connected to the machine at a time VfW can be far less grief to work with than the alternatives. There are also lots of sample programs and code snippets around just because VfW has lived so long. It existed on old 16-bit Windows (certainly it was in Win3.1) and still lives on in Win8 - though i have not personally tested it there.
My suggestion would be to go do a search here within the VB6 CodeBank. You ought to find a few working examples just searching on "webcam" as a keyword.
-
Sep 24th, 2012, 05:00 PM
#5
Junior Member
Re: Getting image from Webcam
If the webcam is DirectShow-compatible, that's probably the easiest way to go. It lets you enumerate the capture devices on your machine and select one as the source. You can then either preview the video or grab bitmaps from it. Geraint Davies, Microsoft's original ActiveMovie lead developer, has some useful examples/wrappers in the VB section of his site (http://www.gdcl.co.uk/vb.htm).
-
Sep 24th, 2012, 06:21 PM
#6
Lively Member
Re: Getting image from Webcam
Examine this. It uses AviCap32.dll, which should be fairly standard. I'm no expert, but the code seemed sound.
http://www.vbforums.com/showthread.p...-view-(VB-5-6)
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|