-
Open run_mask.m
-
Under
Load the DLT coeffs 7 backgrounds, set video directories
:
2.1root
: the directory where your 'fly_#' is.
2.2fly
: the fly number of the fly is to be analyzed. -
Edit the parameters under
tracking start and end index
-
Under
initialize directory
:
After runninginitialize(root, fly)
:
4.1 Choose 3 videos of the fly needs to be analyzed (from the root and fly number).
4.2 Choose click 3 background videos of the fly needs to be analyzed (from the root and fly number) with the same order when choosing the 3 videos in3.1
4.3 Drag from the center of the body to the end of the pin along the pin 3 hit 'Space' when done (3 times).
4.4 Crop the images and leave enough space for all yaw angles (reach the end of the pin). double click the box when done (3 times).
-
Run until
Initialize voxel range and reconstruction resolution (reduces computational requirement)
:
Click and select the space covers the whole fly and tether. Double click to link end and start points. Double click inside the space to start the next. 3 times (do not click outside of the figures) -
Under
consider turning this into a sep function
&Find the body 3D reconstruction and heading
&Wing 3D reconstruction
:
If the vector is not point out of the head (i.e.: direction from body to head), flip the vector; otherwise, do nothing. There may be some error from5
that rises an error at6
. Just repeat5
until no error happens. (Good luck)
-
Open run_main.m
-
Under
Set mask data directories
: 2.1root
: the directory where your 'fly_#' is.
2.2fly
: the fly number of the fly is to be analyzed. -
Edit
initialized directory and voxel_size
-
Run the code under
Split left and right wing
-
Under
UI error detection
:
If the wing shape is not correct, type 'y' in the command window, hit 'Enter' for the next frame. (normally 'y' for all) -
Run code under
find stroke reversal
-
Under
UI correction for those pesky large wings (important at stroke reversals)
:
7.1 Normally just need to edit the frames inCorrectForLargeWingsV6(init,frames,flag_stroke_reversal,voxel_size)
i.e.:CorrectForLargeWingsV6(init,7101:7120,zeros(length(flag_stroke_reversal),1),voxel_size)
7.2 Select the wings by click the edges of the wings. First 3 figures for the left wing, the next 3 figures for the right wing. Double click to connect the end and start points. Double click for the next. Guess for the hidden parts.
Hints: For frame 1 and 2, higher tip is the higher tip; smaller wing for 1 is the larger wing for 2. For frame 1 and 3, wings are at the same side of the screen.
7.3 Select leading edge: only purple area matters. Leading edge is the front edge of a wing. Double click for the next.
Select trailing edge: only purple area matters. Trailing edge is the rear edge of a wing. Double click for the next.
-
Optional:
verify reconstruction and correction (just for a visual check, does nothing to change data)
:
Just for visual check. -
Run
align the reconstruction with a global reference frame
&convert the hull coordinates to voxel coordinates
-
Under
Analyze the hull
:
This function is to check if the solid chord's direction is from the center of the wing to the leading of the wing.
If it is correct, type '3' and hit 'Enter'.
If it is not correct: a. The chord towards the opposite way: type '1', 'enter', ' then '3', 'enter' if it is corrected.
b. The chord flipped with the alt chord (the dash chord): type '2', 'enter', then '1', 'enter', finally '3', 'enter' -
The
estimates Euler angles
estimates the stroke, rotation, and deviation angles, and thepeform angle corrections and filtering
filters the estimated angles and plot the filtered angles.