Hi,

I want to know how to capture and store images using a webcam in C? I searched this many places I did not get it.If somebody knows it please tell me.

what are you trying to do exactly?

start and stop a webcam, or engage some of its other functions, just in an automated fashion?

or will this also involve interpreting the image files in some manner?


.

Not to be an asshole but poster says he wants to capture and store image data from a webcam. That's pretty specific, not?

commented: haha +2

if you're just trying to send commands to blindly operate it, then the easiest (as in "hackiest" and least-portable) way to do this is to send the camera system() commands

this requires that you know the command line interface to the webcam... and that it even has one.

Not to be an asshole but poster says he wants to capture and store image data from a webcam. That's pretty specific, not?

the surest way to know when someones going to be an ass, is that they preface their statement, "not to be an ass, but ...."

Okay, here's the deal, ass: I've learned in my short time here that new posters tend to trickle out details of their requirements, little by little.

Y'see, ass, im trying to shorten the process a bit. Does he really just want to blindly snap pictures, ass? Or is there going to be some sort of dynamic feedback control?

Either way is fine, ass, but before i go too far in looking for a solution, I want to understand the full problem.

.

I actually have a robort on which a camera mounted.I need to write a C code in that robort's embeded system so that it will be able to capture an image autonomously when a condition is satisfied.And then I will store the image , compress it and transmit.

I actually have a robort on which a camera mounted.I need to write a C code in that robort's embeded system so that it will be able to capture an image autonomously when a condition is satisfied.And then I will store the image , compress it and transmit.

that sounds pretty cool

i'm going to first admit, i have never done anything involving this, so i'm making some semi-informed guesses.

what is the make and model of the web cam? is it a COTS device? do you have latitude in choosing which device to use, or are there a few devices that have been spec'd?

I can actually choose any device I want. but I already got a logitech quick cam

okay, first thing you should do is look for "command line interface" in the documentation for your cam. once you find that, then look into the C command, "system()" ... if your cam has no command line interface you may want to consider getting your money back and finding one that does.

i am leaving soon and will not be able to follow up with this until later tonight.

im sure there will be a solution. just keep plugging at it.

k fin

okay, apparently most webcams do not have a command line interface, and this will not be as easy as i assumed.

im still lookin

this is actually quite an involved project. As interesting as this is, i must apologize, I just don't have time to commit to this right now. it's really going to be a lot of work

here is something that may help you: C program ("streamer") written for linux that allow commandline interface for controlling webcams.

http://www.linux.com/base/ldp/howto/Webcam-HOWTO/framegrabbers.html

but being a linux app, it presumes you have the drivers installed.

http://qce-ga.sourceforge.net/

there are similar windows apps, but they involve drivers and the Windows API.

i hope you didnt put this project off to the last minute.

.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.