Recent Posts



No tags yet.

Image Processing for Behavior Study Video

I've never thought of analyzing videos of behavior experiments until yesterday, when my big boss and a graduate student were talking about a problem of matlab software developed by other lab. I started investigating the procedures involved. For a simple task like tracking position, draw a trajectory, and compute the heat map indicating the position/duration, it is relatively simple process. I did this by combination of Matlab and ImageJ.

Here is the procedure.

1. Covert .vmv video into .AVI using matlab code - mmread and mmwrite - available from mathworks community page.

2. Convert to gray scale.

3. Subtract baseline (without subject)

4. Median filter, then threshold to create binary images.

5. Combination of remove outlier, despeckle, erode, dilate, Gaussian blur, to clean up the binary movie.

6. Sum Stack to make a heat map. Calibrate intensity to time.

7. From 4, Analyze Particles to detect object, and record in ROI tool box.

8. Measure centroid, save the result as text or excel.

9. Plot graph in graph software, and overlay it on the heatmap with line transparency setting.

This is much simpler than fluorescence imaging, automatic cell boy identification. Not bad!