Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

dllavaneras

macrumors 68000
Original poster
Feb 12, 2005
1,948
2
Caracas, Venezuela
Hey everyone!

I'm setting up a behavior experiment with some insects. The insects are going to be in a 30x20x30 cm glass box, and I'll film them from above. One of the objectives is to register the total distance of the insect's movement during the length of the experiment.

Is there a way I can track the movements of the insect? I was thinking of something along the lines of placing a layer on top of the video, and following the movement with my mouse, which would leave a line. At the end of the video, that would leave me with an image that can be imported into Photoshop and the line measured with the ruler tool. Like this:



1 would be the glass box, 2 would be the insect and the traced route, and 3 would be the image imported into PS CS3 and measured. The scale would be easy to get, since I just input the number of pixels that the 30 cm side measures and set my scale.

BTW, the ruler tool only lets me measure the distance from point A to point B. Is there any way I can measure the whole route in one motion? I'd hate to have to add all the different lengths.

Tools I have available: Photoshop CS3, Final Cut Express.
 
Thanks for the link! I was reading through the descriptions, and it seems that it can track the motion of an object, but not trace its position (and change thereof) for the whole clip.

There's another way to do it, but it's a real pain. It'd be to take the video, see where the motion starts and stops and extract an image from every point where the insect starts, stops or changes direction. I'd then import all those images into Photoshop as different layers and do the motion route thing myself.

It's painstakingly slow, and seeing that I'll have about 60 hours of video to analyze, I'm not a big fan of the idea. :(
 
processing

I dont know if you have any experience programming, but an approach that would fully automate the process is possible using the open source environment called 'Processing'. Its free and java based, and similar projects have been developed using its video and motion tracking libraries. It should be possible to track the ant from frame to frame, whilst calculating distance also.
Its a fair amount of work if you only need to do it once though. :eek:

cheers and new years!
Mart

check these out

http://www.v3ga.net/processing/BlobDetection/
http://processing.org/reference/libraries/video/index.html
http://www.whiteglovetracking.com/
 
I dont know if you have any experience programming

I have less than no experience programming (other than setting the time on the microwave), sadly. :(

One of your examples caught my eye, the video in whiteglovetracking.com. The third example, Flocking Gloves, is kind of what I had in mind. The movements won't overlap so much, and all I need is a simple line that tracks motion.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.