Avi video file tracking bright light black background

Hi I have an avi video file which is a recording of a light source (almost circular but flickers) moving along the length of the video. It is recorded in black and white and the background is completely black.
I need to extract data so I can plot it's average movement along the x-axis (box-whisker type plot). Can anyone point me to the right direction? Thank you.

 Accepted Answer

See my Image Segmentation Tutorial http://www.mathworks.com/matlabcentral/fileexchange/?term=authorid%3A31862 for how to get the centroid of a bright object on a dark background. Then see my attached demo for how to process a video file.

3 Comments

You are a genius. This is exactly what I need. Thank you!
I encountered a problem. The flame I have is all over the place. Is this code modifiable so that it measures the movement of the flame edge? I.e. from the right hand side of the image it measures the distance from the edge to where light starts appearing (then keep track of it's movement as the avi file progresses)?
Sure. Be my guest. Modify it all you want.

Sign in to comment.

More Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!