Research Article

Normalization of Active Appearance Models for Fish Species Identification

Algorithm 2

Computation of the normalized shapes internal points, basic approach. The term β€œspecies” designates the species manually chosen for the creation of the UAAM.
(1) Define the Unified mean shape as the mean shape computed over all the species using new external shapes (Algorithm 1)
(2) for species 𝑖 = 1 to N do {N: number of species}
(3)  Define temporary shapes by adding the original shapes’ internal feature points to newly sampled external feature points
    of the current species 𝑖
(4)  Compute the Delaunay triangulation on the mean computed over the temporary shapes’ external feature points
(5)  for 𝑝 = 1 to P do { 𝑝 : internal feature point of species 𝑖 , P: number of internal feature points for the species 𝑖 }
(6)   Find in which triangle of the step 4’s triangulation 𝑝 lies
(7)   Compute the position of 𝑝 in the corresponding triangle of the Unified mean shape (step 1) using an affine interpolation
(8)  end for
(9)  Define the current species Frame as the Unified mean shape and the species specific internal points expressed in the Unified
    mean shape (step 5)
(10) end for
(11) for species 𝑖 = 1 to N do {N: number of species}
(12)   for π‘˜ = 1 to M{M number of shapes for the current species 𝑖 }
(13)   Add the original internal feature points of the shape π‘˜ to the newly sampled external feature points of shape π‘˜
     (Algorithm 1)
(14)   end for
(15)  for species 𝑗 = 1 to N, 𝑖 β‰  𝑗   do {N number of species}
(16)    for 𝑝 = 1 to P do { 𝑝 : species 𝑖 internal feature point, P: number of internal feature points for the species 𝑖 }
(17)    Find in which triangle of the species 𝑗 frame 𝑝 lies
(18)     for π‘˜ = 1 to M do {M: number of shapes for the current species 𝑗 }
(19)     Compute the position of 𝑝 in the corresponding triangle of the newly sampled external feature points of shape π‘˜
       using an affine interpolation
(20)     end for
(21)    end for
(22)   end for
(23) end for