Skip to content

Digitizefish

tytell edited this page Mar 12, 2013 · 1 revision

Very rough instructions for using digitizeFish.

Basically, you click the head and tail locations, and the digitizeFish fills in the rest. It works best with high contrast silhouettes - either a dark fish on a light background or a light fish on a dark background.

>> digitizeFish

Follow the menu through in order.

Under Calibrate, use Click calibration points. Click successive points along an image of a ruler in the AVI. The more points, the better the calibration -- but they have to be in order.

For Click head position and Click tail position, you don't need to click every frame - since the movement is steady, it can interpolate between them. Frame skip lets you set the skip between frames. For the head, 5 is usually good, and for the tail, 2 is good. You can use the arrow keys to move around between frames or go back and redo a point (which will be shown in red).

Smooth head and tail positions: This does a spline based smoothing algorithm to minimize the effective error on your digitized points, while maximizing the smoothness. You probably want joint X and Y smoothing, with a mean squared error around 0.5.

Plot head velocity and acceleration is just for testing.

Digitize midline requires an estimate of the fish width, scaled by the fish length, but it's not very sensitive. A sample width.mat is in the repository. It's an eel width file that works just fine for lampreys. It also requires a maximum angular change per segment (the default of 30deg works pretty well - you might need to increase it for ammocoetes) and the length of the fish (approximately -- give or take 10% is fine).

Smooth midline is much like smooth head and tail, except that it smooths jointly over space and time. I usually use a spatial smoothing value of around 0.05 and a temporal smoothing value of 0.5.

Generate kinematic parameters does what it sounds like and saves them in the .mat file. You can also save out the parameters as a CSV file (which Excel can read) using the save CVS file option.

At any point you can quit or return to a previous step -- the program keeps track of everything in the data file you select at the beginning.

Clone this wiki locally