Home
Monday, December 11, 2017
11:18:30 AM
Users online: 0   You are here >> Home > Programming

Forums | Programming Forums search
Forum FAQ
   
  1  
motion tracking
battlefield_gir 
9/7/08 7:10:52 PM
Guru

on a scale of 1 to 10 how dificult would it be to program this

http://hackedgadgets.com/2008/06/27/paintball-sentry-gun/

i want somthing to do in my gap year and start to become a decent programer. want to do somthing similar to this but with out the firing. i would use it for photography mainly. but i just want smothe tracking.

he says he has had no prior experience.

-----
Minister for Education, Innovation, Science & Research.
"There is no problem which cannot be solved by suitable application of blunt force" Unknown
http://tinyurl.com/5mc6nc


R.I.P Josh Woods

kikz 
9/7/08 7:44:00 PM
Immortal

Difficulty depends on the API of the motion sensor.

I'd say if the motion sensor raised an event MotionDetected, for example, and the Event had data in it contianing the distance to the target and the angle from '0' of the target, it'd be piss easy.

Piss easy being a 1. I really don't think it'd be challenging at all.
If it didn't have such helpfull events, I'd start coding ones to get some decent abstraction.

-----
Q6600 | 4Gb PC6400 | 2 x 500Gb RAID 0 | 19" Benq FP591 + 24" Samsung 245B + 19" Dell | 8800GTS 640 Mb + 8400GS 256 Mb | Gigabyte GA-P35-DS3P | Antec P182 | Corsair HX-620 | Thermalright 120 Extreme | Vista x64

tmccoy 
9/7/08 9:07:59 PM
Champion

I've been involved in a similar project, one that tracked a moving robot and reported it's position via RF to the robot, rather than camped out waiting for victims/test subjects.

The image processing is someone basic... sample input images from a source every half second or so, if something majorly changes in the image, then you try to lock onto that, and possibly up your samples rates to something in the order of 5 to 10 frames per second.

You core routine would probably involve entering a "sample" mode for a few seconds after being turned on, then getting working out some method to store your baseline image. From there, you would track your laser pointer to it's target, constantly adjusting it with the motor control commands until the target was centered at your object.

It's suggest that this project is probably about a 5/10 in difficulty, but could combine some excellent cross-section skills, such as image processing, robotics control and real-time reactions to real world events.

-----
http://penguinpusher.cjb.net

zephyr 
13/7/08 9:21:35 AM
Hero
Titan


motion detection is a piece of cake, imagine the before and after frames as two bitfields, you xor them together and whatever you have left is where motion has occurred. You can then pass the result through something like an edge filter to eliminate background noise induced through small variations in light and shadow, etc. Alternatively, you could use a simple block quantization algorithm to filter out noise and determine your "hotspots" where a change has occurred.

Motion tracking is somewhat harder, you need to be able to infer from very few frames the direction that the target is moving in, and adjust accordingly, in time to capture the next sequence of frames, which means your code has to produce results quickly.

-----
The most likely way for the world to be destroyed, most experts agree, is by accident. That's where we come in. We're computer professionals. We cause accidents. (N. Borenstein)

slimdog360 
13/7/08 12:01:15 PM
Overlord

fucking. cool.

-----
Quote by Sir_Substance
engineering<---------------width of universe-------------->philosophy



robzy 
13/7/08 1:20:34 PM
Hero
Immortal


I really dont know much about motion tracking, but I'd guess that if you wanted projects to improve your programming skills you should start elsewhere.

I would guess that motion tracking would be more algorithmic problem solving, rather than allowing you to really thinking about the programming.

Of course, I could also be very wrong :P

Rob.

-----
&#1506;&#1501; &#1497;&#1513;&#1512;&#1488;&#1500; &#1495;&#1497;

battlefield_gir 
15/7/08 10:17:40 AM
Guru

what language should i do it in?

-----
Minister for Education, Innovation, Science & Research.
"There is no problem which cannot be solved by suitable application of blunt force" Unknown
http://tinyurl.com/5mc6nc


R.I.P Josh Woods

superfireydave 
15/7/08 11:56:52 AM
Titan

Quote by battlefield_gir
what language should i do it in?


What language has a good API for the motion sensor?

-----
Mreow?
http://www.atomicmpc.com.au/forums.asp?s=2&c=9&t=17306

pwarren 
16/7/08 10:38:32 AM
Overlord

I had a project similar to this for a 3rd year Comp Sci course in embedded systems. We had a laser scanner set up on a corner of a building, and had to write software (in ada95) that used it's data feed to track objects moving through it's field of view, with the idea to be able to tell the difference between cars and pedestrians. The point of the project wasn't the tracking part, it was doing it with minimal resources, so it could be embedded onto a low power device.

but yeah, basically what tmccoy and zephyr said. You need to get a background image, with no targets in, and compare that to the current image to get your objects, ignoring things that are just noise.

There's an easier way to do motion tracking, using two IR light sensors and an electronic feedback loop, but it doesn't involve programming. :)


Edited by pwarren: 16/7/2008 10:46:43 AM

-----
“Money is a powerful aphrodisiac. But flowers work almost as well.”
-- Lazarus Long

freespace 
18/7/08 12:47:43 AM
Hero
Titan


Quote by pwarren
I had a project similar to this for a 3rd year Comp Sci course in embedded systems. We had a laser scanner set up on a corner of a building, and had to write software (in ada95) that used it's data feed to track objects moving through it's field of view, with the idea to be able to tell the difference between cars and pedestrians. The point of the project wasn't the tracking part, it was doing it with minimal resources, so it could be embedded onto a low power device.

but yeah, basically what tmccoy and zephyr said. You need to get a background image, with no targets in, and compare that to the current image to get your objects, ignoring things that are just noise.

There's an easier way to do motion tracking, using two IR light sensors and an electronic feedback loop, but it doesn't involve programming. :)


Edited by pwarren: 16/7/2008 10:46:43 AM

Of course it does, its called analogue programming :D

-----
By perseverance the snail reached the ark.

http://www.shuningbian.net - blog
http://anonshare.pictorii.com - share files anonymously
http://dailydiscovery.b3ta.org - learn something new
its f reespace damn it!

Oxirane 
25/7/08 6:07:45 PM
Learner

I have little programming experience, but I've been trying to do pretty much the same thing using processing and my arduino. Only over the last few days though.

I have kinda got motion tracking using the Myron (WebCamXtra) libraries.
I haven't got any good servos atm but I'm sure my crappy program won't track anywhere near smooth. Too bad they don't teach this stuff in chem units .

-----

  1  
Forums | Programming