Webcam/capture device access (Windows only)

BlitzMax Forums/BlitzMax Programming/Webcam/capture device access (Windows only)

BlitzSupport(Posted 2007) [#1]
Anyone with a webcam, TV input or whatever fancy trying this?

http://www.blitzmax.com/codearcs/codearcs.php?code=1899

Please note: if it doesn't work for you, there's not much I can do, as it uses the ESCAPI library for access! I'd be interested to find out the results, though.


GregBUG(Posted 2007) [#2]
yes works perfect here (Notebook ASUS A7D With WebCam 1.3mPix)


LarsG(Posted 2007) [#3]
works great here too..

another Asus laptop; A7J with integrated BisonCam)


Mark Tiffany(Posted 2007) [#4]
Yup, works perfectly here - Logitech Quickcam.


po(Posted 2007) [#5]
Works here as well... desktop with Creative Live! webcam.


Difference(Posted 2007) [#6]
Works great on

Capture device [1] name: Conexant 2388x Video Capture
Capture device [2] name: Logitech QuickCam Pro 5000

but not on

Capture device [0] name: ATI Rage Theater Video Capture
but that might just be the machine, so no worry.

Now how to but this on a MiniB3D texture? :D


TomToad(Posted 2007) [#7]
Works fine with my Creative Webcam pro


Beaker(Posted 2007) [#8]
What are the advantages of using this over normal windows webcam commands? Like here.


SebHoll(Posted 2007) [#9]
Fine on my Sony Laptop's built in "Motion Eye" webcam. This DLL seems really easy to use - it's a pity though that getting a webcam to work cross-platform is so hard in BlitzMax!


degac(Posted 2007) [#10]
Works perfectly on my Logitech Quickcam Express 2...(Athlon x2 3800, 1Gb RAM)


TomToad(Posted 2007) [#11]
One problem with the escapi.dll. I tried loading the pixmap into a TImage to do some effects, but it didn't work. AFter much fiddling around, I noticed that the escapi.dll set the alpha chanel to 0. Is there any way to tell escapi to set the alpha to $FF or any way to automatically set the alpha with LoadImage? Right now, I need to loop through the pixmap and set the alpha of each pixel to $FF.


fredborg(Posted 2007) [#12]
Works fine with my Logitech Quickcam thing-of-a-bob


Grey Alien(Posted 2007) [#13]
cool, works on my cheap as chips chinese crap webcam.

Q. My webcam isn't great, plus it has lag AND poor framerate. Will another webcam improve this or is it some kind of USB or driver issue?


BlitzSupport(Posted 2007) [#14]
TomToad: not sure what's up there -- this works for me:



Grey: It's probably just your webcam -- mine's crap too (it's slow and very dark). Apparently the EyeToy webcam works with Windows and it's built for low light/high speed operation. My local GameStation often sells them for a tenner or so, so I intend to pick one up and try it...


it's a pity though that getting a webcam to work cross-platform is so hard in BlitzMax!


I think that's really just dependent on the capture APIs available from the OS and how easy they are to implement.


SebHoll(Posted 2007) [#15]
Just to have a play around I slightly adapted the above example so you can spin around if you scroll the mouse. I'm feeling dizzy!




BlitzSupport(Posted 2007) [#16]
Seb: nice!

I noticed that the escapi.dll set the alpha chanel to 0

I mentioned this to Jari, the developer, and he's going to [try and remember to] change this in the next update so it's solid instead.


TomToad(Posted 2007) [#17]
Didn't think of using GrabImage(). Probably be a bit faster than writing to each individual pixel of the pixmap. Still would be better if the captured image originally had a solid alpha to begin with. :)
This is basically what I was trying to do. :)

edit:To change device# to 0 since I orginally had it set to 1 because that's what my webcam is on. :)

edit again :This is pure madness. :)



xlsior(Posted 2007) [#18]
Works great with my Creative WebCam NX Ultra, both in 'standard' mode and through its VFW interface.


xlsior(Posted 2007) [#19]
(Hm... How to freak out a user -- take a snapshot with their webcam if they have one, and use it somewhere in your background art. :-? )

Beaker:
What are the advantages of using this over normal windows webcam commands? Like here.


Never got that one to work on my system....


BlitzSupport(Posted 2007) [#20]
Sorry to bump my own thread, but I just tried this with my brother's Sony EyeToy camera using these drivers (unarchive, plug camera into USB port, tell Windows to install from the folder you unarchived into when it prompts for drivers). The difference is amazing when compared to my crappy webcam (excuse the decor):

CrapCam:


EyeToy:


The crappy webcam is very jerky, slow and laggy (maybe 10 frames per second at a guess, with perhaps a quarter second lag), while the EyeToy updates very nicely, pretty much in real time, maybe 25-30 FPS (with a very small lag indeed). My local GameStation gets EyeToy cameras in from time to time, for around £12 ($20?), so I'll be picking one of these up... they're great!

BTW TomToad -- that second example is very trippy!


Panno(Posted 2007) [#21]
well the eytoy cameras much better as the most webcam for the pc .

new webcams offer 30 fps @ 640/480 on usb 2.0 but i never
got 30 fps with this picturesize , only on 320/200.

i will checkout the software next time hope its better than mine.