In article <6b**********************************@a1g2000hsb.g ooglegroups.com>,
frakie <fr*******@gmail.comwrote:
>I need a simple and stupid few line source code to access my webcam.
I found lots of huge projects (c++ c and other) which are so big that
they are impossible to be used.
Does somebody know how to manage a webcam from it's basic functions?
Where can i find a SIMPLE, VERY SIMPLE example project?
Doesn't matter the what is the OS or the language, i just need it is
easy portable source code...
You will not be able to find "easy portable source code", as
not all systems provide enough functionality to be able to control
webcams, or provide the functionality in very different ways.
For example on the system I am using right now, it is possible to
add a webcam... if you add in a digital I/O board, the webcam
for which uses a 75 pin connector and transfers data in parallel.
Meanwhile there are ethernet based webcams and USB based webcams
and probably serial and parallel based webcams as well, all of which
need to be controlled in very different ways.
The most common webcams these days are ethernet based or USB based.
The ethernet based ones are often accessible via TCP -- which requires
that the system you are working on has a TCP stack, which is by no
means guaranteed (though it is getting increasingly common except in
some kinds of embedded systems.) The access to such systems is via
an HTTP transaction; that does not require a full HTTP library, but
does require an HTTP framework, complete with some MIME parsing.
Typically to get an image, you would issue an HTTP GET against
a particular file on the system and it would return it in encoded
form. But controlling the camera would generally require HTTP POST
transactions.
The USB cameras... well, those require a USB interface library,
which is going to be operating system dependant.
You might find that someone has written Perl modules and posted
them at cpan.org and you might find that those modules work
for all of the kinds of systems you are interested in. But then
you face the problem that installing Perl itself can be a bear of
a job if you have to install it from source.
--
"Any sufficiently advanced bug is indistinguishable from a feature."
-- Rich Kulawiec