Measuring distance traveled by an object in a video
23 次查看(过去 30 天)
显示 更早的评论
Hello, I'm relatively new to Matlab but I'm working on a project with a friend who has a decent understanding of it. I have collections of images which I use to make into time lapse video of sea urchins moving around over the course of a day(~1440 frames a day). I would like to measure the urchin's movement during each video. Originally, we though of tracking the urchin based on it's color or shape, but the kelp also present in the pictures sometimes blocks out the urchin. Is there any way I could use Matlab to play the images as a video in which I could pause, plot points when the urchin stops moving, and then have the distance connecting the points calculated? Any help regarding this would be greatly appreciated, and we can also convert the images into video with no problems on Quicktime if that is of any help.
1 个评论
Sean de Wolski
2011-8-12
Well you could always make a gui that shows you each frame and you click on it - that would be easy enough to program but a pain to use. However, if you show us some sample images we might be able to help you "Dekelp them." Help2Dekelp!
回答(2 个)
JJ Smith
2011-8-12
2 个评论
Sean de Wolski
2011-8-12
for the day light parts could you just get a blank frame of the container and do a subtraction with perhaps a filter for red? At night I don't know how you're going to find them since they're not really visible to the human eye even.
Image Analyst
2011-8-15
I'd make a scroll bar where you can select a particular frame to display. Then I'd have a button that says "Play all as movie" or something similar and when it does that it goes into a loop where you read the images from disk non-stop. The loop would also set the scroll bar value and a title for the image so you can tell what image you're currently on. Title would say something like "Frame #42 of 789". When you do that non-stop look, you can enable, or make visible, a checkbox that say "Stop movie" which the user can click on to break out of the loop. Check its value at the end of the loop and call "break." If you know the location for each frame, like you keep track of it in an array, I'd call "hold off" then call imread(), then call hold on, and finally call plot() to display the locations. That's how I'd do it.
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!