Capture an image from a webcam

Just starting out? Need help? Post your questions and find answers here.
Arcturus
User
User
Posts: 14
Joined: Tue Jan 26, 2010 11:23 am
Location: Australia
Contact:

Capture an image from a webcam

Post by Arcturus »

Is there any way I can do this in PB? All the examples I have found are either outdated or don't work. Using Windows.
Give a man fire and he's warm for a day; set a man on fire and he's warm for the rest of his life
User avatar
JackWebb
Enthusiast
Enthusiast
Posts: 109
Joined: Wed Dec 16, 2009 1:42 pm
Location: Tampa Florida

Re: Capture an image from a webcam

Post by JackWebb »

Arcturus wrote:Is there any way I can do this in PB? All the examples I have found are either outdated or don't work. Using Windows.
Do a google search for escapi.dll there is an excellent example in there by Freak, it's what I've been using and it works well. Also do a search on webcam here in the forum it should turn up quite a few examples to almost complete programs.

Jack

EDIT: escapi21.zip can be found here http://sol.gfxile.net/code.html

Also check out this from Sparkie

viewtopic.php?f=13&t=32446&p=245304&hil ... 94#p245304
Make everything as simple as possible, but not simpler. ~Albert Einstein
Arcturus
User
User
Posts: 14
Joined: Tue Jan 26, 2010 11:23 am
Location: Australia
Contact:

Re: Capture an image from a webcam

Post by Arcturus »

The debug output window pops up with the message "int: 0". I have narrowed it down to escapi.dll not loading, how do I fix this?
Give a man fire and he's warm for a day; set a man on fire and he's warm for the rest of his life
User avatar
JackWebb
Enthusiast
Enthusiast
Posts: 109
Joined: Wed Dec 16, 2009 1:42 pm
Location: Tampa Florida

Re: Capture an image from a webcam

Post by JackWebb »

It worked for me straight away. I don't remember having to fix anything. Is the DLL where it needs to be? (path)
Make everything as simple as possible, but not simpler. ~Albert Einstein
Arcturus
User
User
Posts: 14
Joined: Tue Jan 26, 2010 11:23 am
Location: Australia
Contact:

Re: Capture an image from a webcam

Post by Arcturus »

I tried it as is, and I also tried putting the DLL in the same path as the examples. I have tried both relative and full paths as well.
Give a man fire and he's warm for a day; set a man on fire and he's warm for the rest of his life
User avatar
JackWebb
Enthusiast
Enthusiast
Posts: 109
Joined: Wed Dec 16, 2009 1:42 pm
Location: Tampa Florida

Re: Capture an image from a webcam

Post by JackWebb »

Just to make sure, I unzipped the original and ran it after copying the 2 source code files to where escapi.dll is and it ran without a hitch. I'm on WinXP SP3 and PB4.40. Maybe it's an issue with your hardware/drivers? I would say goto the authors site and see if someone there can shine a light on it.

Jack
Make everything as simple as possible, but not simpler. ~Albert Einstein
Post Reply