Severely disabled children controlling the mouse

Anything beyond the basics in using the LiveCode language. Share your handlers, functions and magic here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
petero
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 59
Joined: Sat Jan 20, 2007 4:09 am

Severely disabled children controlling the mouse

Post by petero » Wed Oct 17, 2007 3:36 am

I am co-inventor of EagleEyes, a Discover Award winning system that allows severely disabled children to move the cursor with their eyes (in one version) or with a feature of their face (or their toe) that we can lock onto with a camera (version 2). The application is currently only pc based and also not easily ported or improved upon in its current state. I am considering redoing the application in Revolution. The existing application currently captures live video from an attached web cam. First, a 25x25 pixel area of a prominent feature is "grabbed". This rect is tracked by the mouse. At present, that rect is compared to all the other 25x25 rects in the image and the match with the highest correlation is where the mouse location moves to. I'd like to do something similar in Revolution.

Now my question. Can anyone suggest ways in which to use Revolution to analyze each frame in a captured camera image by dividing it up into a bunch of 25x25 rects? I have investigated the revvideo transcript commands but have no experience with them.

Thanks in advance for any suggestions, help or alternate approaches.

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Post by Mark » Wed Oct 17, 2007 9:57 am

Hi Petero,

When you capture video in a player object, you can make a snapshot of that player object. Display the snapshot in an image object. Now, you can analayse the imagedata of the image object. It should be eay to find the blocks of 25x25 pixels and find correlations.

Best,

Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode

petero
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 59
Joined: Sat Jan 20, 2007 4:09 am

Still trying

Post by petero » Wed Oct 17, 2007 3:54 pm

I have started to analyze an extracted video image by attempting to capture a smaller rectangle within the image. I have looped through the imagedata trying to extract portions. The documentation says that the imagedata format has pixels that start in the "top left corner of the image, left to right, then top to bottom". When I set repeat parameters to try and extract a portion, the extraction does not look like a piece of the original (it's somewhat scrambled so the pixel order mist be messed up). I'll keep at it.

Again, any suggestions would be welcome.

Thanks in advance.

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Post by Mark » Wed Oct 17, 2007 4:32 pm

Petero,

Only suggestion I have now is to post the relevant part of your script.

Best,

Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode

Post Reply

Return to “Talking LiveCode”