MATLAB Mandible Tracing - PowerPoint PPT Presentation

1 / 49
About This Presentation
Title:

MATLAB Mandible Tracing

Description:

MATLAB Mandible Tracing & Calculations Program Documentation by Antonis Vakis Supplemental Material for: PHYLOGENY, SCALING, AND THE GENERATION OF EXTREME FORCES IN ... – PowerPoint PPT presentation

Number of Views:34
Avg rating:3.0/5.0
Slides: 50
Provided by: Antonis152
Learn more at: https://sib.illinois.edu
Category:

less

Transcript and Presenter's Notes

Title: MATLAB Mandible Tracing


1
MATLAB Mandible Tracing Calculations Program
  • Documentation by Antonis Vakis
  • Supplemental Material for
  • PHYLOGENY, SCALING, AND THE GENERATION OF EXTREME
    FORCES IN TRAP-JAW ANTS
  • JOSEPH C. SPAGNA, ANTONIS I. VAKIS, CHRIS A.
    SCHMIDT, SHEILA N. PATEK,
  • XUDONG ZHANG, and ANDREW V. SUAREZ

2
The images, within their original folders (e.g.
093004as4), need to be placed in a directory
called 'Images,' located in the current working
directory
So far, all captures have been saved as
sequential TIFF files
First, run the tracing program
3
The folder name is saved as a parameter called
filename
4
Specify the number of frames per second (fps)
5
Specify the width of video in pixels (width)
6
Specify the height of video in pixels (height)
7
Specify the image resolution in dots per inch
(dpi)
8
Viewing the image thumbnails, select the range of
images over which the full motion of the
mandibles is captured
9
Viewing the image thumbnails, select the range of
images over which the full motion of the
mandibles is captured
10
Viewing the image thumbnails, select the range of
images over which the full motion of the
mandibles is captured
11
Specify whether the strike involves both or just
one of the mandibles
12
First, select the approximate location of the
mandible base
13
Then, sequentially select the left and right
mandible tips over the selected frames of interest
14
Then, sequentially select the left and right
mandible tips over the selected frames of interest
15
Then, sequentially select the left and right
mandible tips over the selected frames of interest
16
Then, sequentially select the left and right
mandible tips over the selected frames of interest
17
Then, sequentially select the left and right
mandible tips over the selected frames of interest
18
Then, sequentially select the left and right
mandible tips over the selected frames of interest
19
Then, sequentially select the left and right
mandible tips over the selected frames of interest
20
Then, sequentially select the left and right
mandible tips over the selected frames of interest
21
Then, sequentially select the left and right
mandible tips over the selected frames of interest
22
Then, sequentially select the left and right
mandible tips over the selected frames of interest
23
Then, sequentially select the left and right
mandible tips over the selected frames of interest
24
Then, sequentially select the left and right
mandible tips over the selected frames of interest
25
Then, sequentially select the left and right
mandible tips over the selected frames of interest
26
Then, sequentially select the left and right
mandible tips over the selected frames of interest
27
Then, sequentially select the left and right
mandible tips over the selected frames of interest
28
Then, sequentially select the left and right
mandible tips over the selected frames of interest
29
Then, sequentially select the left and right
mandible tips over the selected frames of interest
30
Then, sequentially select the left and right
mandible tips over the selected frames of interest
31
Then, sequentially select the left and right
mandible tips over the selected frames of interest
32
Then, sequentially select the left and right
mandible tips over the selected frames of interest
33
Finally, reselect the approximate location of the
mandible base an average mandible position will
be used for the calculations
34
In the case where it is unknown, the
magnification can be calculated from the average
recorded mandible length for each species
Magnification parameter zoom Default value 10x
35
Finally, run the calculations program
The name of the folder must be specified this is
the same name as the .mat file to be used
36
Calculations Rcrude
Mandible base, A (x1, y1)
Rcrude
Closed position B (x2, y2)
37
Calculations Grid
  • Select number of grid points/ possible positions
    of centers of rotation
  • e.g. 40 intervals, 41 x 41 1,681 grid points
  • Create grid centered around the calculated
    mandible base location
  • cor_values_min_x base_coords(1,1) Rcrude
  • cor_values_max_x base_coords(1,1) Rcrude
  • cor_values_min_y base_coords(1,2) Rcrude
  • cor_values_max_y base_coords(1,2) Rcrude

38
Calculations Grid
  • Create a matrix with grid coordinates using
    values calculated for the minima and maxima in
    the x and y directions, as well as the interval
  • Reshape the resulting 41 x 41 x 2 matrix to a
    matrix of size 1681 x 2 (cor_values matrix)

39
Calculations Rvalues
  • Having established the number of iterations for
    the left and right centers of rotation locations,
    specify the number of iterations for each
    mandible radius (values, e.g. 200)
  • Specify
  • Rmin Rcrude Rcrude/2 (50 smaller)
  • Rmax Rcrude Rcrude/2 (50 larger)
  • Rvalues linspace(Rmin,Rmax,values)

40
Calculations Iterations
  • Using nested for loops, iterate the values of x,
    y and R for the left and right mandibles
  • for of possible radius values (values) (p)
  • for of elements (41 x 41 1,681) (k)
  • for of frames (e.g. 8) (i)
  • to get the RMS_error for each mandible

41
Calculations RMSerror
  • The RMS (Root Mean Square) error is calculated
    from the formula
  • where radius is defined as
  • and 3 is the number of free parameters (x, y, R)
    for each mandible
  • Methodology of circle fitting using RMS error
    adapted from Amara Graps of Stanford Universitys
    Solar Oscillation Investigations
    (http//www.mathcom.com/corpdir/techinfo.mdir/scif
    aq/q230.html)

42
Calculations Minimum RMSerror
  • The resulting matrices of the left and right
    mandible RMS_error values are reshaped into two
    new matrices of size 336,200 x 1, where 336,200
    41 x 41 x 200
  • Using a simple algorithm (min command), the
    minimum values of the RMS_error are found
    (RMSleft_min RMSright_min)
  • These are used to extract the values of x, y and
    R where the error is minimum for each mandible

43
Calculations RMSerror plots
44
Calculations Radii c.o.r.
45
Calculations ? and a
  • To calculate the angular velocities and
    accelerations use the following formulae, based
    on the difference of the slopes in each frame
  • ?(i) atan coords(i,2) x0y0(1,2)
  • coords(i,1) x0y0(1,1)
  • ?(i) ?(i1) ?(i)fps (rad/s)
  • a(j) ?(j1) ?(j)fps (rad/s/s)
  • where ?(i) is the slope of each frame, ?(i) is
    the ang. velocity, a(j) is the ang. acceleration,
    and fps are the frames per sec. For n frames,
    there are n-1 velocity and n-2 acceleration values

46
Calculations u and a
  • In order to convert the angular velocities and
    accelerations into their linear counterparts, the
    radius of each mandible is needed in meters
  • Rnew (R/ dpi/ zoom)0.0254 (m)
  • Then, the linear velocities and accelerations
    are
  • u(i) ?(i)Rnew (m/s)
  • a(j) a(j)Rnew (m/s/s)

47
Calculations Velocity Plots
48
Calculations Acceleration Plots
49
Output of Calculations Program
Write a Comment
User Comments (0)
About PowerShow.com