Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Professional Discussion / Viewing a Webcam in DarkBasic

Author
Message
Iain
20
Years of Service
User Offline
Joined: 17th Jun 2004
Location: UK
Posted: 4th Dec 2004 05:50
Does anyone know if you can view a webcam in a DarkBasic window.
Its for a robotics project, i have Blue GUI and was wandering if its possible to create a window with that to view the webcam, thats assuming that you could get access to the webcam through DarkBasic.
TKF15H
21
Years of Service
User Offline
Joined: 20th Jul 2003
Location: Rio de Janeiro
Posted: 4th Dec 2004 06:03
You need a plugin. I know Proteus made one that did it, but I'm not sure if he finished. You'll have to do some searching around. Also search in the LLRGT forum, I think I saw it there.

Iain
20
Years of Service
User Offline
Joined: 17th Jun 2004
Location: UK
Posted: 4th Dec 2004 06:14
Cool thanks.
Mobiius
Valued Member
22
Years of Service
User Offline
Joined: 27th Feb 2003
Location: The Cold North
Posted: 5th Dec 2004 05:26
I got the exact code you need (Downloaded it from this very site!)



1800+ XP - GeforceFX 5600 - 256MbDDR - 60Gb Hdd - XP Pro (SP2)
Iain
20
Years of Service
User Offline
Joined: 17th Jun 2004
Location: UK
Posted: 4th Jan 2005 00:40
Thanks for the code Mobiius, sorry it took me so long to post this message, i havnt been on the forums for a while.
Nicholas Thompson
20
Years of Service
User Offline
Joined: 6th Sep 2004
Location: Bognor Regis, UK
Posted: 4th Jan 2005 02:00 Edited at: 4th Jan 2005 02:17
That code works well, if not REEEEEEALLLLLY slowly.. I get about 15fps!! Lol..

I notice the way it works is by deleting a temp file, saving to the Hard disk as a temp file, loading that, texturing and then repeating it...

Is there any way it could be modified to chuck the image into memory and then access that memory as a memblock type thing (maybe from a pointer?) then convert THAT to an image? Then it might be a little faster?

Then again - it could be slow due to my webcam (Genius VideoCAM III)

[EDIT]
Was playing with the code.. Made a very minor tweak to allow the update rate on the camera easier to tweak by using a constant. Also made the movement time base and released the limit of the frame rate.. Not sure if its any better



Manson_NS
21
Years of Service
User Offline
Joined: 4th May 2004
Location: Denmark
Posted: 7th Jan 2005 20:07
well, I'm glad you've found some use for my code!
Hovever I've been playing around with it for the past 6 months, and have got it working much better.

try sending me an email ([email protected]), and I'll throw you the new code - I do not have the code here with me.

if you set the framerate to 2048 it'll have a huch better FPS, but the fps read from the cam will get much lower. 16 seems to be the best.
Other than that, I've tried various stuff, like copying the context of the clipboard to the screen buffer, but I havn't had it blasting away like the windows apps yet.

If anyone out there is interested, I'd love some help with twaking it to go faster, but my main priority is algorithms for analyzation of the images.
David R
21
Years of Service
User Offline
Joined: 9th Sep 2003
Location: 3.14
Posted: 7th Jan 2005 21:13
So, in theory, you could use this code to make a [very slow] chatroom with webcam stuff - how would you do that?

<html>
<img src="http://www.freewebs.com/lightningstudios/lightningstudios_logo.jpg" border=0 />
</html>
Manson_NS
21
Years of Service
User Offline
Joined: 4th May 2004
Location: Denmark
Posted: 8th Jan 2005 06:15
Well, the code I have on my laptop would make it just as easy as sending a memblock.
Yea, webcam communication can easily be done.

Login to post a reply

Server time is: 2025-05-28 05:40:19
Your offset time is: 2025-05-28 05:40:19