Afternoon, All.

Attached is a proggy which allows up to three webcams to be viewed at the same time.

When "Adjust" is clicked, that particular webcams' adjustment dialogs are displayed.
When "Save" is clicked, a BMP is saved.

Cheers,
Scronty

P.S. Is this what you were asking about, Sven?:alright:
Posted on 2003-03-13 17:40:45 by Scronty

Afternoon, All.

Attached is a proggy which allows up to three webcams to be viewed at the same time.

When "Adjust" is clicked, that particular webcams' adjustment dialogs are displayed.
When "Save" is clicked, a BMP is saved.

Cheers,
Scronty

P.S. Is this what you were asking about, Sven?:alright:


Thanks, looks good :)

I just need to test it with three equal cams now... :)
Posted on 2003-03-14 06:34:18 by bazik
Afternoon, Sven.

"...test it with three equal cams..."
No need for equal cams. It's been tested with a Creative webcam and Creative PC-CAM600 at the same time. As long as the webcam is selected *before* the digital camera, it works:alright: (at least,...on my system it works:tongue:

Cheers,
Scronty
Posted on 2003-03-15 00:34:55 by Scronty
Wow great job man...i just got my own webcam 2 weeks ago...

And i allready did not liked its bloatware preview application ...hihi now i have your's perfect one :)) ...
But i do not have 3 webcams yet... :P must work more make more money ...

Thanks again man
Bogdan
Posted on 2003-03-15 03:43:09 by BogdanOntanu

Afternoon, Sven.

"...test it with three equal cams..."
No need for equal cams.


Maybe no need, but I HAVE to use 3 equal Webcams (Logitech Quickcam Pro 4000). I already called the Logitech Technical Support and those morons cant tell me if there driver has problems with 3 equal Cams connected to one PC :/
Posted on 2003-03-15 03:49:03 by bazik
Afternoon, Sven.

There seems to be two types of drivers these webcams use.
One is there own make/model-specifix driver.
The other is the generic "Microsoft WDM Image Capture (Win32)".

When you select "Microsoft WDM Image Capture (Win32)", it first uses whatever was used the last time WDM was used.
When you select "Microsoft WDM Image Capture (Win32)" for another Capture Window, it sees that the "defualt" webcam is already in use and it displays a dislog so that you can choose another.

AFAIK, *all* webcams support a WDM driver. If you click on "Adjust" in that webcam proggy, it displays a dialog where (if you'd selected a webcam from WDM) you can change which webcam to use.

However...as you've mentioned...there's bugger-all info on using more than one of the *same* webcam on a 'puter.

Once you've got at least two webcams of the same make/model, you might want to try this out:


Multiple Webcam installation

Cheers,
Scronty
Posted on 2003-03-15 19:50:18 by Scronty
Very nice, Scronty! PenCam and Mindstorm Vision Command Camera (WinXP sees it as a Logitec Web Cam). Works like a charm and I didn't install any drivers for my cameras - they installed with windows. The Mindstorm kit can be found for $14USD ($99 Retail) and I just bought it for the camera (comes with a 50ft USB cable!). Okay, I do like to play with Legos - I'm a little kid at heart. :)
Posted on 2003-03-15 22:41:39 by bitRAKE
Hello Scronty,

i have just found your webcam program and thought i would have a mess about with the Video Capture calls..

but i fell at the first hurdle!

when i invoke capCreateCaptureWindow and run my program, i get this error message...

"Unable To Locate Component"
"This application has failed to start because vfw32.dll was not found. Re-installing the application may fix this problem" "OK"

Any idea's what im doing wrong?
Posted on 2004-04-20 09:43:49 by Lennon
Afternoon, Lennon.

You're not doing anything wrong (yet :tongue: ).

The vfw32.lib is supposed to be a static library - not a dll export library.

Masm32 version 8 automatically generates its library files from their prototype files:
i.e. it uses vfw32.inc to create vfw32.lib.

As most of the library files are for Dlls (i.e. kernal32.lib), it works fine most of the time.

However...
This means that any static libraries are nolonger static libraries!

I've attached the correct vfw32.lib static library. Replace the one you have in your <masm32 directory>\lib with this one.

The correct filesize for the vfw32.lib file is about 30kb. The incorrect Dll export library is about 70kb.

Give it another go and tell us if it works, or whatever other problem comes up.

Cheers,
Scronty
Posted on 2004-04-21 18:26:38 by Scronty
Howdy Scronty,

Thank you very very much it works like a charm now :alright:

I was thinking a while back about adding webcam support to my chat program but i didnt know where to start...now i do!

I think i found another thread where you were able to get the raw webcam image in memory, which would be perfect for sending it over LAN/internet ... of course it will probably have to be compressed in some way...

I should stop thinking out loud and have a propper read of the board!

Thank you very much again scronty.

Cheers,
Lennon

P.S. The preview feature is VERY slow, is there any way around this?
Posted on 2004-04-22 13:49:17 by Lennon
Afternoon, Lennon.

I guess you're meaning the preview rate? At the moment it's set at a 1000 msecs (1 second) update.

Look through the sourcecode until you find a SendMessage call for WM_CAP_SET_PREVIEWRATE. Change the 1000 to whatever milliseconds you want.

Just realize that the amount of data being transferred via your webcams USB port is quite large (it's raw image data, after all ).
This means that if you have two or three webcams running with all of them trying to update every 5 msecs, you may find your PC sluggish.

For a single webcam, 5 millisecs gives the equivalent of a realtime preview ( == to 20 frames-per-second which is usually the minimum fps to give the effect of smooth animation).

I think I posted a basic webcam-emailer quite some time ago. It allowed the user to attach a snapshot from their webcam to their email. It's very basic and doesn't compress the image at all (in fact, it saved a small bmp to HDD then just attached the bmp image).
This is why MSN Messenger only has a small window for displaying the webcam images. Images and sound take up quite a bit of data compared to anything else.

Cheers,
Scronty
Posted on 2004-04-22 19:09:34 by Scronty
Hi Scronty,

sorry i should have explained myself better, i didnt mean the preview rate...

the problem was the amount of CPU time was taken when preview mode was enabled with

invoke SendMessage, hWndCap1, WM_CAP_SET_PREVIEW, TRUE, 0

i have discoverd that this takes so much CPU time because it isnt displaying the video using hardware overlay mode... but! there is a call that can enable overlay mode...

invoke SendMessage,hWndCap1,WM_CAP_SET_OVERLAY,TRUE,0

just make sure the device is capable first using the fHasOverlay member of the CAPDRIVERCAPS structure

sending WM_CAP_SET_OVERLAY actually disables preview mode

this gives me far better results...

at the moment i am just writing file transfer routines for my chat...then i will concentrate on the webcam stuff, probably modifying the file transfer routines to send the webcam images, to be honest the only thing im worried about is compressing the picture....i have no idea where to start on that...

Cheers,
Lennon
Posted on 2004-04-28 14:17:45 by Lennon
Hi Scronty!

May I ask you to attach again the webcam sourcecode? It seems, that the attachments did not survived the forum hacking. I would like to capture some image from my webcam, and I would realy like to see your source code if you don't mind, and if it possible.
Thanks in advance for your help.
Posted on 2005-05-11 12:49:54 by bszente
Afternoon, bszente.

http://www.scrontsoft.com/win32asm/webcamapp.zip

Cheers,
Scronty
Posted on 2005-05-12 08:10:44 by Scronty
Thank you very much, Scronty.
Posted on 2005-05-12 08:23:30 by bszente
Hi Scronty,

Could I also trouble you to link/attach the correct vfw32 static lib?

Thank you.
Posted on 2005-08-23 13:57:53 by lostcauz
bluesmon, get the PlatformSDK unless you're on dialup? There's plenty of problems with the libs from the MASM32 project, since they only contain imports and no static code/data.
Posted on 2005-08-23 16:03:21 by f0dder
Unfortunately I am on dialup.
Posted on 2005-08-26 13:07:32 by lostcauz
Ouch, that sucks :( - iirc you can get the PlatformSDK shipped to you from Microsoft just for the price of shipping, this could be a good idea.

I'll attach vfw32.lib, let me know if there's anything more you need.
Attachments:
Posted on 2005-08-26 15:45:29 by f0dder
Thanks f0dder.
Posted on 2005-08-26 21:09:24 by lostcauz