Reading images from WebCam

Hi, I am starting a project wich involves taking pictures of the web-cam and
analyzing it in realtime (or the most near to it I can get), I would really
like to use SDL on this project, so here are some questions before I begin:

Is there anyway to get the images from a “windows” web-cam using sdl? If it
works on linux and mac it better, but not necessary.

Is it a simples/easy way?

What so you think would be the best way to do it? I need speed because
images will be analyzed in realtime.

Sorry if this is posted twice, I don’t know if it worked the last time.
Thanks in advance.

A friend of mine had started working on a small (pornographic, shhh)
website that was supposed to include webcams for public/private
viewing. In his design, the webcam just takes a number of shots
(images) and puts them on the disk, his tool then take them from there
and do whatever it wants with the newly created image. I’ll ask him
how he got to make the camera output image files on disk, and it was
on windows, not sure if it would be a portable way of dealing with
webcams.

I’m also interested in webcams, not for building entertainment
websites, but rather for image analysis. I’m also developping a
device that will gather the distance-to-image from some sort of robot,
applied to the realtime image it could yield a 3D view of what the
robot sees. Anyway, haven’t got a clue how to talk to webcams but
I’ll be working on it. I’ll post anything I find here, can you do the
same?

Thanks,
SimonOn 4/12/06, Romulo Gnomo wrote:

Hi, I am starting a project wich involves taking pictures of the web-cam and
analyzing it in realtime (or the most near to it I can get), I would really
like to use SDL on this project, so here are some questions before I begin:

Is there anyway to get the images from a “windows” web-cam using sdl? If it
works on linux and mac it better, but not necessary.

Is it a simples/easy way?

What so you think would be the best way to do it? I need speed because
images will be analyzed in realtime.

Sorry if this is posted twice, I don’t know if it worked the last time.
Thanks in advance.

Yes, of course! I trying somethings with image processing too. If I discover
something I’ll post here for sure. So this is our deal, let’s share
knowledge and work togheter, if it is ok to you I think we should even share
code or develop together. Thanks in advance, you are the fisrt person to
show some interest in this subject when I exposed it.

Yes, of course! I trying somethings with image processing too. If I discover
something I’ll post here for sure. So this is our deal, let’s share
knowledge and work togheter, if it is ok to you I think we should even share
code or develop together. Thanks in advance, you are the fisrt person to
show some interest in this subject when I exposed it.

As this is not exactly related to SDL, we’ll continue by email…
however, we may come back with a brand new “SDL_webcam.h” include for
you guys! :wink:

Romulo, I’ll ask my friend what he has found so far and I’ll share
that with you later by email…

Simon

Hey there,

Just before this conversation goes private, you might want to check this:

http://www.iua.upf.es/mtg/reacTable/?portvideo

It is a cross-platform SDL based video capture lib. I’ve had success with it
in OS X and Windows, but I can’t vouch for its Linux talents.

Hope that helps,

c.On 4/13/06 12:00 AM, “Simon” <simon.xhz at gmail.com> wrote:

Yes, of course! I trying somethings with image processing too. If I discover
something I’ll post here for sure. So this is our deal, let’s share
knowledge and work togheter, if it is ok to you I think we should even share
code or develop together. Thanks in advance, you are the fisrt person to
show some interest in this subject when I exposed it.

As this is not exactly related to SDL, we’ll continue by email…
however, we may come back with a brand new “SDL_webcam.h” include for
you guys! :wink:

Romulo, I’ll ask my friend what he has found so far and I’ll share
that with you later by email…

Simon


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl

Thanks a lot man! I think this should solve most of our problems. Your help
will be very usefull.

Yes, of course! I trying somethings with image processing too. If I
discover something I’ll post here for sure. So this is our deal, let’s
share knowledge and work togheter, if it is ok to you I think we should
even share code or develop together. Thanks in advance, you are the
fisrt person to show some interest in this subject when I exposed it.

There isn’t a cross-platform way to get webcam data. You’ll need to use
the v4l2 API on Linux, and (uh…) something else on other platforms.

Mac, Linux, and Windows all have ways to get this info, just no unified way.

–ryan.

Mac, Linux, and Windows all have ways to get this info, just no unified way.

(Except for portVideo, which I wasn’t aware of…thanks for pointing
this out, Chris!)

–ryan.