Quantifying shape similarity between prey and uninteresting models to study animal masquerade

Masquerade occurs when an organism resembles an inedible or uninteresting object (model), such as a leaf, stick, or stone. The shapes of many species are described as similar to those of models in their microhabitats, but these similarities have not been quantiﬁed effectively. To describe the shape similarity between an animal and a model, we applied a shape description method in a ﬁeld study of the four-eyed turtle ( Sacalia quadriocellata ). Our results showed that shape similarity between turtles and stones in the Hezonggou River was signiﬁcantly higher midstream than that upstream and downstream. In line with these ﬁndings, masquerade efﬁciency was highest for turtles in the midstream area, with both inexperienced and experienced human ‘predators’. Masquerade efﬁciency was positively correlated with shape similarity in all stream sections. Shape similarity ranged from 0 to 1, with < 0.65 indicating low masquerade efﬁciency and > 0.80 indicating high masquerade efﬁciency. Our quantitative method was able to provide data that could be used to form an ecologically plausible argument; thus, shape similarity can be used to assess animal’s masquerade efﬁciency. This method will be of considerable use in future animal masquerade research.

branches, fallen leaves, or bird droppings (Endler, 1981;Stevens & Merilaita, 2009;Skelhorn et al., 2010a;Liu et al., 2015;Auko et al., 2015;Rowland, 2017). Prey may resemble models in color and size (Skelhorn et al., 2010b, c;Skelhorn & Ruxton, 2013;Valkonen et al., 2014) and shape and posture (Skelhorn, 2015;Suzuki & Sakurai, 2015). Many species use this strategy, including stick insects resembling plant branches (Cott, 1940), butterfly and moth larvae that are similar to twigs (Pough, 1988;Skelhorn et al., 2010a;Skelhorn, 2015), and turtles that resemble stones in their habitat (Bonnet et al., 2001;Willemsen & Hailey, 2003;Nafus et al., 2015). However, even though Wallace (1867) proposed that the leaf butterfly resembled leaves, the degree of similarity between the butterflies' shape and leaf shapes has never been quantified. Over the past decade, some researchers have investigated the relationship between the size of animals and the size of objects in their habitats. Skelhorn et al. (2010c) compared moth larvae with branch models and found that larvae with the greatest similarity to the size and length of nearby branches performed best in masquerade; however, shape similarity between moth larvae and branches was not quantified. Similarly, Nafus et al. (2015) only quantified the size of tortoises and stone models when studying masquerade in desert tortoises (Gopherus agasssizii). Therefore, shape similarity between animals and models remains to be tested in masquerade research.
Colour and shape are key elements of masquerade, for example body colour and shape of the leaf butterfly resembles dead leaves (Wallace, 1867). Quantitative colour-matching technology is sufficiently mature to measure these elements in background matching studies (CIE, 1986;Troscianko et al., 2015;Xiao et al., 2016;van den Berg et al., 2019). Some studies have attempted to quantify the pattern shape similarity between animals (Lee et al., 2018). Moreover, Chan et al. (2019) quantified pattern shape and performed a principal component analysis on the average elliptical Fourier descriptors of crabs and their backgrounds. They found a close match between crabs' pattern shapes and their respective backgrounds, however, this study did not quantify shape similarity to establish a direct relationship between the pattern and the background substrate (i.e. how similar are they). Various tools for quantifying the shape or volume of an object have been proposed and verified (Hoyt 1979;Altuhafi et al., 2013;Troscianko & Marsden, 2014;Barros et al., 2019), but studies on shape similarity between objects and animal bodies are lacking (except for O'Hanlon et al., 2014). Therefore, developing a method to quantify shape similarity of a prey animal's body and its model (object) in masquerade research is necessary.
The initial recognition of prey by predators may be based on the body size and shape of the prey (Magurran & Girling, 1986;Hall et al., 2013Hall et al., , 2017. In computer vision and model recognition, shape is a two-dimensional representation of the region of interest, which can be regarded as the contour of the target (Tari et al., 1997;Paquet et al., 2000). Shape is also an important feature for target recognition by an effective predator that always approaches its prey item from the same relative position. Objective measurements of appearance provide important information in many areas of biology, such as human and non-human vision, palaeontology, and applied fields such as forensic medicine and medical diagnosis (Stevens et al., 2007;Cuthill, 2019). The ability to rigorously analyse shape features is essential for understanding the function of masquerade behaviour.
Early shape quantification of organisms used morphometry, where multivariate statistical analysis was used to quantify morphological variables that could be measured directly, such as length, width, and height. However, differences in appearance are often due to overall change, and this traditional approach cannot explain the variation of biological morphology well. To overcome this, Rohlf (1986), Rohlf & Slice (1990) and Bookstein (1986Bookstein ( , 1991 established geometric morphometrics based on mathematical morphology. In geometric morphometry, the outline of biological morphology is used as a calculation method, mainly including the outline (Rohlf & Bookstein, 1992) and landmark methods (Bookstein, 1991;Zelditch et al. 2012). However, it is difficult to quantify the shapes of objects such as rocks and twigs with geometric morphology, since these objects have no typical landmarks (except for flowers, see O'Hanlon et al., 2014).
Technological approaches for shape description applied to subsequent analyses such as shape matching, recognition, classification, and retrieval have become generally accepted in recent years (Cem & Mark, 2011;Lee et al., 2018;Chan et al., 2019). Classical geometric features such as area, perimeter, long axis, short axis, spindle direction, concave-convex area, density, solids, and eccentricity are widely used (Ang et al., 1995;Cervantes & Gomez, 2019). The use of these features is based on computer vision and pattern recognition methods to generate numerical descriptors to describe shapes. These shape descriptors are based on global geometric features such as area. The shape description method is used to quantify the degree of differ-ence between two shapes based on data within an image. When the difference is small, the degree of similarity is large; thus, it can be calculated by standardizing the degree of difference calculation and taking the complement (Samal et al., 2004). In the present study, we used shape description methods to quantify the shape similarity between a prey species and model shapes using different shape descriptors in the Image J software during a survey of the four-eyed turtle (Sacalia quadriocellata). We hypothesized that the shape similarity between the four-eyed turtle and stones in its habitat was positively correlated with masquerade efficiency, thereby shape similarity could be used to evaluate turtle's masquerade efficiency.

Ethics statement
All fieldwork and the recognition experiments were carried out in strict accordance with the guidelines of the Animal Research Ethics Committee of Hainan Provincial Education Centre for Ecology and Environment, Hainan Normal University (HNECEE-2011-003), which conforms to the Law of People's Republic of China. Additionally, oral consent was obtained from each human participant (all 18 years) prior to the recognition experiment.

Photography
Fieldwork was conducted in a stream called  in Wanling town, Qiongzhong county, Hainan province, China, from April to October 2013. A number of four-eyed turtles inhabit this stream and they can swim from downstream to upstream, but the highest and lowest densities were found midstream (21.5/km) and upstream (0.91/km), respectively; downstream had 3.5 individuals per km (Xiao et al., 2016). We randomly selected adult turtles from different sections of this stream for the field experiment. We selected 78 substrate quadrats measuring approximately 1 × 1 m using systematic sampling of the sections of the Hezonggou stream, based on sampling methods and stream conditions detailed by Xiao et al. (2016). In the upstream, midstream, and downstream sections, 30, 30 and 18 quadrats were sampled, respectively, at regular intervals of 30 m from the lower to the upper reach. The downstream quadrats did not include 12 quadrats with only sediment and silt. Therefore, the first quadrat for each section was its lower bound-ary. Nine adult four-eyed turtles were used in the study, and each turtle was photographed in all 78 quadrats. The turtles were placed in the respective quadrats and photographed using a Canon EOS 20D camera with a Canon lens (EF-S24-70 mm f/2.8, 8.2 megapixels) between 11:00 a.m. and 5:00 p.m., when natural light allowed for suitable visualization. A tripod was used to keep the lens perpendicular to the quadrat. We used the camera to generate an original image of a selected quadrat with scale included. The camera was set to manual mode, and photographs were saved in uncompressed RAW format to keep parameters consistent. In total, we collected 702 digital images from 78 quadrats.

Shape descriptor measurement
Photographs were imported into ImageJ and converted into TIFF format. Scales were selected based on actual measurement values for area (A) and perimeter (P ). Four further descriptors were selected: aspect ratio (AR), where AR is the aspect ratio of the object's fitted ellipse, i.e., large axis (L)/minor axis (M); roundness (R), where R = 4A/π L 2 or the inverse of AR; circularity (C), where C = 4πA/P 2 with a value of 1 indicating a perfect circle and values approaching 0, indicating an increasingly elongated shape; and solidity (S), where S is defined as the ratio of actual area to the convex hull area (A/convex A) (Ferreira & Rasband, 2011). For regular convex objects, for example, circle, square, rectangle, triangle, trapezoid, and ellipse, the convex hull area coincides with the actual area, yielding solidity values of 1. When objects resemble a regular convex object, the solidity value is close to 1, whereas the boundary shape with more significant convexities have lower solidity values. These descriptors were used to quantify the turtles and objects in terms of their size (A and P ), concavity (S), and the degree of closeness to a circle (C) and ellipse (AR and R). Next, the edge of the target to be measured was selected and measured. For turtles, we measured the turtles' carapace only, excluding any protruding heads, tails, or legs.

Shape similarity calculation
According to the similarity algorithm (Samal et al., 2004), descriptor similarity is obtained by standardizing differences between the prey and the model, as follows: where sim(X, Y ) is the similarity function of elements X and Y , and dis(X, Y ) is a measure of the difference between elements X and Y . In ecological morphology, this is generally Euclidean distance. U is a normalization factor, and its value is generally the maximum distance between the corresponding features of the two elements in the dataset. By calculating the weighted average of the similarity of shape descriptors of X and Y , the similarity of the two was obtained according to the following formula: where i is the ith (i = 1, . . . , q) shape descriptor, σ i is the similarity of the ith shape descriptor between X and Y , and ω i is a weighting factor for the similarity of the ith shape descriptor attribute. ω i is determined by the coefficient of variation (v) method: where v i is the ratio of the standard deviation (SD) of the similarity of the ith shape descriptor to its mean. In this study, stones were randomly selected from the background next to photographed turtles in a quadrat. Turtles have regular and similar carapace shapes, whereas stones are irregular and highly variable, thus, the average value for carapaces (N = 9) was considered to represent the shape of the turtles in all quadrats. The similarity between a stone in each quadrat and the average value of carapaces was then calculated based on equation (1): Perimeter similarity: Roundness similarity: where t is the average of the turtles' carapaces and s is each stone.
The shape similarity between turtles and stones was then calculated based on equations (2) and (3), with q = 6, as six shape descriptors were considered in this study. The values of shape similarity ranged from 0 to 1.

Recognition experiment of masquerade efficiency
The masquerade efficiency index is the misidentification rate by humans as predators. The recognition experiment was double blind. Prior to the recognition task, a third party (F. Zhao and Z. Lin) randomly chose 55 electronic photographs from the above 604 photographs in which no protruding heads, tails, or legs were visible; 20, 20, and 15 photographs were used for the upstream (7 turtles in 17 quadrats), midstream (7 turtles in 16 quadrats), and downstream (7 turtles in 13 quadrats), respectively. These 55 photographs were numbered based on randomly generated numbers in EXCEL. The third party then presented this photo to 53 participants (6 male and 47 female) aged 18 to 21 years old from a university in Haikou, Hainan Province, China, using a laptop with a 387 × 259 mm screen. No participant was colourblind and 14 individuals had normal vision and 39 individuals used corrective lenses. Inexperienced and experienced experiments were then conducted. In the first experiment, participants with no turtle experience answered questions about whether three objects (two stones and one turtle) in each photo randomly pointed at by a third party were stones; they had to answer Yes or No. The response time for each object was standardized to 5 s to control the effect of time. The implication of this experiment was that the participants then had an impression of stones and turtle but did not know exactly what the stones and turtles were. The second experiment involved the same participants and procedures, except that participants were shown photos of four-eyed turtles and stones in the stream habitat before the recognition task. A third party recorded the number of times a turtle was misidentified as a stone in each photo, and divided it by the total number of times to calculate the misidentification rate. The higher the rate of misidentification, the more efficient the masquerade.

Statistical analysis
All statistical procedures and graphing were performed in SPSS 16.0 (SPSS, Chicago, IL, USA) and Sigma Plot 12.5, with normal data expressed as means ± SE (range) and non-normal data expressed as medians (25%, 75%). P values less than 0.05 were considered statistically significant. Shape descriptors and shape similarities were compared among the three stream sections using Kruskal-Wallis one-way analysis of variance on ranks (ANOVA on ranks), followed by Dunn's method to compare the results of different groups. For recognition experiments, an ANOVA on ranks was also used to compare masquerade efficiency, but multiple comparisons among means of the stream sections were performed by Tukey's test. In addition, we compared masquerade efficiency between the inexperienced and experienced groups using Wilcoxon signed rank test (non-normal data) and paired t-test (normal data), and tested their correlations in all stream sections and midstream alone using Spearman correlation (non-normal data) and linear regression (normal data), respectively. Finally, Spearman correlation was used to determine the correlations between shape similarity and masquerade efficiency in all stream sections and midstream alone. It is worth noting that shape similarity in this correlation study was calculated using the same method as described above, but here a turtle in the quadrat corresponds to multiple stones (2-5). The average value of these similarities (2-5) represents the shape similarity between the turtle and the stones in the quadrat. The photos used to calculate shape similarity were the ones used for the recognition experiment.

Shape similarity
The area and perimeter of stones differed significantly among the three stream sections. Stones were larger than the turtle carapace in the upstream section, whereas they were smaller in the downstream section ( Figure 1A and B). Stones in the midstream, were similar in size (area and perimeter) to the turtle carapace ( Figure 1A and B). Moreover, the aspect ratio of stones in the midstream was greater than that in the upstream and downstream sections; however, roundness showed the opposite trend ( Figure 1C and D). These results show that the stone was an ellipse with a smaller long axis in the midstream. Although the aspect ratio and roundness of the turtle carapace and the stones did not differ significantly between any stream sections, stones were similar to the turtle carapace in the midstream ( Figure 1C and D). The circularity of the stones in the midstream and downstream sections was higher than that upstream ( Figure 1E), suggesting that the stones were more circular midstream and downstream. Although the circularity of the turtle carapace was higher than that of the stones in any stream section, it was closest to that of the stones in the midstream section ( Figure 1E). The solidity of the turtle carapace was similar to that of the midstream and downstream stones; however, it was lower than that of the upstream stones ( Figure  1F).
The results showed that area and perimeter had the greatest influence on shape similarity, whereas aspect ratio, solidity, circularity, and roundness The coefficient of variation (v) is the ratio of the standard deviation (SD) to mean. Weight (ω) is determined by the coefficient of variation method. N s and N q are the sample size of stone and quadrat, respectively. were found to have high similarity among stream sections (Table 1). There were significant differences in shape similarity between turtles and stones in different sections of the Hezonggou River (ANOVA on ranks, H = 423.984, df = 2, p < 0.001); shape similarity in the midstream (0.79 (0.73, 0.87)) was significantly higher than that in the upstream (0.64 (0.55, 0.76); Dunn's method, p < 0.05), and shape similarity in the upstream was significantly higher than that in the downstream (0.48 (0.37, 0.58); Dunn's method, p < 0.05; Figure 2).

The relationship between shape similarity and masquerade efficiency
Overall, shape similarity was positively correlated with misidentification rate in both inexperienced (correlation: N = 55, Spearman's r = 0.505, p < 0.001) and experienced experiments (N = 55, Spearman's r = 0.32, p = 0.017; Figure 4A). In the midstream section alone, however, there was no correlation between shape similarity and misidentification rate in either the inexperienced (N = 20, Spearman's r = −0.334, p = 0.15) or experienced experiments (N = 20, Spearman's r = 0.133, p = 0.577). In the experienced experiment, the misidentification rate was 0.13 and 0.25 when the shape similarity was 0.67 and 0.81, respectively ( Figure 4A), and rates Red arrows indicate that, in the experienced experiment, the misidentification rate was 0.13 and 0.25 when the shape similarity was 0.67 and 0.81, respectively. higher than 0.20 were associated with a shape similarity of 0.80 to 0.85 (Figure 4B). Therefore, these results suggest that turtle masquerade could play a masquerade role when the misidentification rate is greater than 0.1, and turtles have high masquerade efficiency when misidentification rates are greater than 0.2. At these points, the shape similarities were greater than 0.65 and 0.80, respectively.

Discussion
Our results demonstrate that this method is sufficiently standardized for scientific purposes, and we were able to successfully quantify shape in foureyed turtles and stones, and their shape similarities. In the similarity analysis, area and perimeter similarities had the highest weights (adding up to more than 0.5) in all stream sections, indicating that they are the main determinants of shape similarity. Chiao & Hanlon (2001) found that cuttlefish (Sepia pharaonis) body markings are based on the area of a substrate rather than on aspect ratio or roundness. In addition, perimeter was also found to reflect the size of an object. Skelhorn & Ruxton (2013) found that the size of moth larvae determines masquerade efficiency. However, Suzuki & Sakurai (2015) found that despite having the same size and area, changing posture and shape can alter masquerade efficiency. In addition to area and perimeter, four other shape descriptors were found to have high similarity in all stream sections, indicating that the shape of the stones was similar to the oval and less convex hulled turtle carapace. Therefore, the six shape descriptors selected in this study can adequately quantify the overall shape of prey and model, providing an integrated method for their study.
Our results showed that the similarities of the six shape descriptors for the stones to those of turtle carapaces were higher in the midstream than in the upstream or downstream sections, and total shape similarity was also significantly higher in the midstream section. This could primarily be attributed to stone size and shape among stream sections. In the upstream section, the stones were larger and had an ellipse with a longer long axis, whereas downstream stones were smaller. In contrast, the midstream section contained many cobbles and pebbles (Xiao et al., 2016), which were more similar in size and shape to the turtle carapace. Consistent with these findings, the masquerade efficiency was highest for the turtles that inhabited the midstream when tested by both inexperienced and experienced participants.
Moreover, masquerade efficiency was positively correlated between inexperienced and experienced "predators" in all sections and the midstream alone. We also found that shape similarity was positively correlated with masquerade efficiency in both experiments. Taken together, these results demonstrate that masquerade by the four-eyed turtle is based on shape matching, which partly explains the higher turtle population density in the midstream (Xiao et al., 2016). Our findings demonstrate the ecological plausibility of our method for evaluating masquerade efficiency in an experienced human predator using shape similarity. We conclude that shape similarity <0.65 indicates a low level of masquerade and >0.80 indicates high masquerade efficiency. Shape similarity in the midstream section, however, was not related to masquerade efficiency, which highlights the additional effect of colour matching on masquerade. If there were still no correlation after excluding the influence of colour, this would indicate a recognition threshold of shape similarity in predator vision. When the threshold (0.80) is exceeded, most predators will misjudge turtles for stones.
This method can also be applied to other types of ecological study. Morphological description is often applied to taxonomy, where animal body size, shape, and appearance are often the basis of classification (Liu et al., 2008;Andrade & Pablo, 2020). This method can eliminate subjective judgment by quantifying shapes to describe the classification characteristics of different species. Moreover, this method can be used to study nest parasitism through quantifying egg's shape similarity. For instance, the study of nestparasitic cuckoos based on host egg and cuckoo egg shape characteristics is of particular interest for understanding coevolution (Guigueno & Sealy, 2011;Guigueno et al., 2014;Yang et al., 2019).
In conclusion, our method constitutes a simple, accurate, and flexible approach that researchers can choose to input different shape descriptors into the calculation of overall similarity between prey and models. Moreover, it represents the first application of the concept and method of shape similarity to the study of animal masquerade. We used classical and global geometric description to quantify the shapes of turtles and stones and examine their similarity to provide a basis for hypotheses of turtle's masquerade efficiency. This method is highly effective for studying masquerade in two-dimensional prey and models, for example leaf butterflies and freshwater turtles with flat shells. However, this method has an inherent limitation: the process is based on character descriptors extracted from two-dimensional images, whereas predators may use three-dimensional cues to detect and identify prey. Therefore, a method to quantify the similarity of prey and objects using threedimensional cameras should be developed for future studies on masquerade.