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.

Work in Progress / Motion Detecting Digital Camera Code

Author
Message
Ilya
21
Years of Service
User Offline
Joined: 10th Aug 2003
Location:
Posted: 21st Dec 2004 11:30 Edited at: 21st Dec 2004 11:31
Edit: Webcam, not digital camera.

The following code enables your digital camera to detect motion. Expect a crash at the end and do not run in exclusive mode unless you like crashing Windows:



Credits:
http://forum.thegamecreators.com/?m=forum_view&t=43257&b=1
|Image Memblock Functions|
http://forum.thegamecreators.com/?m=forum_view&t=37053&b=6
|Digital Camera Code|
http://forum.thegamecreators.com/?m=forum_view&t=38587&b=6
|Menu Code|
(Will probably use it)

Todo:
Detect Weither There Is a Lot of Motion or Not - Easy
Save Image If So - Easy
Allow a Limit to Image Saves - Easy
Allow Modification of How Much a Lot Is - Easy
Option to Greyscale Image - Easy
Modification of Range that diffrence is not significant - Easy
Color Diffrencing Mode - Easy(using greyscale now)
Menu System - Hard(never did it before)
Readme/Help Files(HTML) - Easy to Medium

Quote: "I've seen the word programming and I'm not sure what it means. Anybody please explain?"


Quote: "We shouldn't sacrifice the truth to preserve "balance"."
Wiggett
21
Years of Service
User Offline
Joined: 31st May 2003
Location: Australia
Posted: 21st Dec 2004 14:09
that could be somewhat nifty,i got a webcam and i'd try it out, but you did mention crash and error a lot, so maybe i will let someone else beta test it

Jess T
Retired Moderator
21
Years of Service
User Offline
Joined: 20th Sep 2003
Location: Over There... Kablam!
Posted: 21st Dec 2004 20:08
Ilya,
Nice idea and concept

Two things wrong however;
In the code snippet box here, it has stripped all the "\"'s, so you may want to put it in the code section of the message rather than the box

Next, when I compiled it, it found device 0 with name of nothing ( empty string ), so, I selected 0, and it crashed the app.

My Webcam works fine in MSN Messenger, and it's own little app, so I don't know what's up with it

Jess.


Team EOD :: Programmer/All-Round Nice Guy
Aust. Convention!
Wiggett
21
Years of Service
User Offline
Joined: 31st May 2003
Location: Australia
Posted: 21st Dec 2004 23:23
we all want to see the fine lady jess on cam. (ye si knwo ur not a girl, go change your name)

Ilya
21
Years of Service
User Offline
Joined: 10th Aug 2003
Location:
Posted: 21st Dec 2004 23:44 Edited at: 22nd Dec 2004 00:26
The app only crashes at the end(if you can view the webcam), and you need to use task manager/processes to end it.

Go to Control Panel and then Administrative Tools. Then, Computer Management. Click on Imaging Devices and then doubleclick on the webcam you want to use. The number should be the Location. Probably not because both my webcams are 0.

In a code box:

And does anyone know of a Windows DLL that has a function to get the PID of the function's caller?

Quote: "I've seen the word programming and I'm not sure what it means. Anybody please explain?"


Quote: "We shouldn't sacrifice the truth to preserve "balance"."
Ilya
21
Years of Service
User Offline
Joined: 10th Aug 2003
Location:
Posted: 22nd Dec 2004 01:11 Edited at: 22nd Dec 2004 01:14
And there's a bug with "until path exist(str$(dnum))=0".
DBP claims it to be "sync on" and "dnum=dnum+1".
I don't know why, but it crashes the app.
It's required for directory catigorization.

Quote: "I've seen the word programming and I'm not sure what it means. Anybody please explain?"


Quote: "We shouldn't sacrifice the truth to preserve "balance"."
Jess T
Retired Moderator
21
Years of Service
User Offline
Joined: 20th Sep 2003
Location: Over There... Kablam!
Posted: 22nd Dec 2004 10:04
Uber, what do you expect me to do? Go to the courts and say "I want to change my birth name to something more manly cos some guy I don't know, nor do I care about told me to", eh?

After going into Imaging devices, it appears that my webcam wasn't installed at all ( wtf? ), so I've just installed the new drivers, and next time I restart, I'll give it a whirl

Jess.


Team EOD :: Programmer/All-Round Nice Guy
Aust. Convention!
Wiggett
21
Years of Service
User Offline
Joined: 31st May 2003
Location: Australia
Posted: 22nd Dec 2004 12:10
well actually yeah, that was what I was aiming for.


error : could not determine image width @ "w=image width(1)-1" because i'm retarded.


Login to post a reply

Server time is: 2024-11-22 22:15:28
Your offset time is: 2024-11-22 22:15:28