Home All Groups Group Topic Archive Search About

Using a Web Cam in .Net

Author
14 Nov 2006 11:34 PM
Chris101
Hi,

I'm trying to work out how to use a Philipps web cam in VB.Net, what I would
like to do is select a web cam, display the image on screen, edit the
properties of the web cam and also capture an image.

Can anyone help with some code examples please?

Thanks




Chris

Author
15 Nov 2006 2:36 AM
Michael C
"Chris101" <Chris***@discussions.microsoft.com> wrote in message
news:2298C5BB-2121-4D2B-94CB-2033B004E0F2@microsoft.com...
> Hi,
>
> I'm trying to work out how to use a Philipps web cam in VB.Net, what I
> would
> like to do is select a web cam, display the image on screen, edit the
> properties of the web cam and also capture an image.
>
> Can anyone help with some code examples please?

This is not an easy task, I spent many an hour doing exactly this (120 hours
at least). You need to use directshow which means creating a whole heap of
com interfaces in code. There is a site that has a lot of this already done
but i'm not sure what it's called. There are also many samples, which is
what I was working from. The other altenative is to use the older Video For
Windows which is much simpler but gives less functionality.

Regards,
Michael
Author
15 Nov 2006 4:19 AM
Tom Leylan
Would one of these work?

http://www.devx.com/dotnet/Article/30375

http://www.planet-source-code.com/vb/scripts/ShowCode.asp?txtCodeId=1339&lngWId=10

http://www.gotdotnet.com/Community/UserSamples/Details.aspx?SampleGuid=daf38a9e-0e33-4777-93d3-c664ae2f91f8

http://www.codeproject.com/dotnet/wiascriptingdotnet.asp


Show quoteHide quote
"Michael C" <nospam@nospam.com> wrote in message
news:uEEvn5FCHHA.4992@TK2MSFTNGP03.phx.gbl...
> "Chris101" <Chris***@discussions.microsoft.com> wrote in message
> news:2298C5BB-2121-4D2B-94CB-2033B004E0F2@microsoft.com...
>> Hi,
>>
>> I'm trying to work out how to use a Philipps web cam in VB.Net, what I
>> would
>> like to do is select a web cam, display the image on screen, edit the
>> properties of the web cam and also capture an image.
>>
>> Can anyone help with some code examples please?
>
> This is not an easy task, I spent many an hour doing exactly this (120
> hours at least). You need to use directshow which means creating a whole
> heap of com interfaces in code. There is a site that has a lot of this
> already done but i'm not sure what it's called. There are also many
> samples, which is what I was working from. The other altenative is to use
> the older Video For Windows which is much simpler but gives less
> functionality.
>
> Regards,
> Michael
>
Author
15 Nov 2006 4:48 AM
Michael C
The first 2 are Video for windows and I believe the third is also. The last
is WIA. VFW is an ok option if the webcam supports it. Most tv tuners and
capture cards don't, or at least not very well but if this is a simple
project then it could be the easiest way to go.

This was more what I was thinking, although using directshow is
significantly more complicated and might not gain any functionality if
nothing advanced is required:

http://www.codeproject.com/cs/media/directshownet.asp

Michael
Author
15 Nov 2006 8:24 AM
Chris101
Thanks for this, I'll have a look and see if the sites will help.

As far as complicated is conscerned, I'm not positive at the moment how far
I need to go, I was going to try to build a telescope autoguider, this would
require the need to identify an object and then work out where it is moving
on screen.  So I suppose it should be a fun thing to do.

Chris

--
Chris


Show quoteHide quote
"Michael C" wrote:

> "Tom Leylan" <gee@iamtiredofspam.com> wrote in message
> news:O0H2D1GCHHA.4472@TK2MSFTNGP03.phx.gbl...
> > Would one of these work?
> >
> > http://www.devx.com/dotnet/Article/30375
> >
> > http://www.planet-source-code.com/vb/scripts/ShowCode.asp?txtCodeId=1339&lngWId=10
> >
> > http://www.gotdotnet.com/Community/UserSamples/Details.aspx?SampleGuid=daf38a9e-0e33-4777-93d3-c664ae2f91f8
> >
> > http://www.codeproject.com/dotnet/wiascriptingdotnet.asp
>
> The first 2 are Video for windows and I believe the third is also. The last
> is WIA. VFW is an ok option if the webcam supports it. Most tv tuners and
> capture cards don't, or at least not very well but if this is a simple
> project then it could be the easiest way to go.
>
> This was more what I was thinking, although using directshow is
> significantly more complicated and might not gain any functionality if
> nothing advanced is required:
>
> http://www.codeproject.com/cs/media/directshownet.asp
>
> Michael
>
>
>