Link to home
Start Free TrialLog in
Avatar of cmg05
cmg05

asked on

WEB CAMERAS

does anyone know how to operate web cameras from C code? Working Souce code would be excelent!

Avatar of yz
yz
Flag of China image

Please check the part about Video Capture in MSDN, the functions and messages of capture window can help you control the preview and capture progress of camera.
For example:
capCreateCaptureWindow to create a capture window,
caoDriverConnect to connect to a camera device,
capPreviewRate and capPreviewScale to set the preview preference,
capPreview or capOverlay to begin prview,
capFileSetCaptureFile to set file name for capture.
capCaptureSequence to begin capture and store to a AVI file.

Are you working under Windows platform ad using VC?

http://msdn.microsoft.com/library/psdk/multimed/avicap_8xyd.htm
Avatar of cmg05
cmg05

ASKER

Writing for a PC, on 98 using VC.

should I already have the avi class + h files the site talks off?

can I download them?

are there java equiv.?
Yes, these functions, actrually they are macros, are defined in vfw.h, and use vfw32.lib, these two files were already contained in VC or Platform SDK, so you can use it directly.

Why you talk about java? no idea.

If you need some example, I can show you, good luck.
Maybe I misunderstood something...
Do you want to remotely control/operate a webcam or just grab live images from it ?

In case you're talking of a remote control, let me know.
In case you want to fiddel around with video/images/frames yz's suggestion using VFW is right.

Here's my example on a remote controlled pan/tilt camera:
http://bvlab12.fh-reutlingen.de

Best regards
-Stavi-
Avatar of cmg05

ASKER

yz,  could you post some example code of using the vfw.h to capture an image? and save to a jpg?

Thanks
ASKER CERTIFIED SOLUTION
Avatar of yz
yz
Flag of China image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
If it's useful to have complete source code regarding capturing, grabbing and usage of VfW in general I'd suggest to visit the following site:

http://i.am/shrinkwrapvb

Although it's VB code I'm sure it can help you solve the problem...somehow.
Not to forget that there's an OCX available to include it into C++ projects.

Best regards
-Stavi-
Avatar of cmg05

ASKER

Awsum!

Thanks man!

You got me out of a Jam.
Hi cmg05,

did you solve the JPG saving ?
I would greatly appreciate it if you drop me a note on this.

I would be thankful forever, if you even send me your working project...

mailto: s.mitrakis@caa.de

Best regards
-Stavi-
Hi,
I have a Sony Handycam (DCR-TRV340E); I would like to know how to control/operate this camera through remote. Basically I want to do this through RF. Kindly suggest.

Regards
Ganesh