Keywords

1 Introduction

The spur-thighed tortoise population in Mediterranean decreases as their natural environment dwindles and they are simultaneously collected for the illegal pet trade [6]. As other endangered species, the spur-thighed tortoise is listed on the EC Council regulation No. 338/97, Annex A and on the Appendix II of the Convention on International Trade in Endangered Species of Wild Fauna and Flora (CITES II), which classifies it as being directly threatened with extinction in the wild. It may become so unless the trade in its specimens is subject to a strict regulation. Several tortoise species are thus bred in captivity and only captive born animals can be sold and kept as pets. European countries try to curb the illegal pet trade by identifying and monitoring tortoises in captivity so that the illegally collected and imported specimens could be intercepted, returned to the wild and the poachers prosecuted. Therefore all spur-thighed tortoises held in captivity must be registered and their owners cannot trade them unless they obtain exemption from the prohibition of trade. We propose an automatic system for the recognition of individual tortoises from low and unconstrained quality plastron photographs required for their official registration. To our knowledge this is the first attempt of the automatic tortoise specimen recognition.

2 Discriminative Tortoise Features

The primary problem for a tortoise recognition is that there are not know any time-steady discriminative visual features for such longevous animal [3, 4]. However, without such time-invariant features we cannot hope to uniquely identify a tortoise specimen anytime during its lifetime, if the possible time span between an acquired registration photograph and the corresponding living animal validation can be several decades.

Features such as the angles between plastron seams, areas of plastron scutes and color or texture of the plastron are all highly variable during a tortoise life. Based on the work of biologists, we hypothesize, that the discriminative features might be the normalized lengths of the segments of the central seam on the plastron [2, 5, 7]. Using marginal seams, as proposed in [7], is not possible in our case as the sides of the plastron are not always well visible due to uneven lightning or a rotated position of the plastron.

We choose as the discriminative features the lengths of the segments on the central seam that are bounded by connections of two consecutive side seams, one on the left side and the other one on the right side of the central seam, respectively (see Fig. 1-left). These features \(l_i = \frac{L_i}{L}\) and \(r_i = \frac{R_i}{L} \qquad i = 1,\dots ,6\) are normalized by the total length \(L~=~\sum _{k=1}^{6}L_k = \sum _{k=1}^{6}R_k\) of the central seam to eliminate plastron size changes due to the growth of the tortoise and variable resolution of the tortoise database images.

Fig. 1.
figure 1

The individual left and right central seam segments are marked in red and in blue (left). The differences between connections of the side seams on the left and right of the central seam are marked in red (right). (Color figure online)

Additional selected normalized features \( d_i = \frac{D_i}{L} \qquad i = 1,\dots ,5 \) are the differences between connection nodes of the lateral left and right seam branches for the five inner junctions on the central seam (see Fig. 1-right).

The complete feature vector for a given i-th plastron image has seventeen features

$$\begin{aligned} \mathbf {f}^i = [l_1^i, \dots , l_6^i, r_1^i, \dots , r_6^i, d_1^i, \dots , d_5^i ]^{T} \in \mathbb {R}^{17}. \end{aligned}$$
(1)

If the plastron is clean, then the central seams are well visible on all tortoise images in our database. Our feature hypothesis was successfully verified on manually-measured proposed features. This proves that the chosen features are sufficiently discriminative provided we are able to automatically localize them with sufficient precision.

3 Automatic Detection of Tortoise Features

The positions of all seam junctions on the central seam have to be detected in order to measure the lengths of individual central seam segments. This junctions localization has to be done with the highest possible precision because it directly influences the final tortoise recognition accuracy.

3.1 Plastron Localization

The first step is the plastron localization. The position and the orientation of the plastron is detected using the generalized Hough transform [1] applied to the general plastron template shown in Fig. 2.

Fig. 2.
figure 2

Plastron template for the generalized Hough transformation.

3.2 Central Seam Junctions Localization

The central seam junctions are approximately localized one by one using a graph algorithm for finding the positions of the side seams and the central seam. As can be seen on the close-ups of a plastron image and its corresponding edge image in Fig. 3, the plastron seams create almost continuous long edge curves, which is not the case for other parts of the plastron.

Fig. 3.
figure 3

The side seams as well as the central seam of the plastron image (left) form almost continuous curves of edges in the corresponding edge image (right).

To locate left and right side seams, the edges of the plastron area were evaluated one by one from the left, resp. the right, end side of the plastron, respectively, towards the central seam. We assign a value to each edge pixel, which is the minimum from the sums of the distances to the edge pixels to the left, resp. to the right, and the already assigned values to those pixels. Therefore, each pixel is assigned the shortest “path” to the left, reps. to the right, side of the plastron. The distance between two edges is calculated as

$$\begin{aligned} d(e_1,e_2) = |e_{1_y} - e_{2_y}| + (|e_{1_x} - e_{2_x} |+1)^2. \end{aligned}$$
(2)

Since the difference in absolute value of the x coordinates in (2) is squared, the edge values are smaller where there is a close succession of vertices along the x axis direction (i.e. the direction of the side seams). The local minima of the edge values near the position of the central seam give the position of the seam junctions. Similarly, the precise position of the central seam can be found using this method in the direction of the central seam (along y axis). Given the positions of the central seam junctions, the sought features can be calculated.

4 Tortoise Classification

The classification whether two tortoise images belong to a same specimen or not is done using the kNN classifier based on the absolute differences vector of the measured features from the two images (the classification feature vectors) \( \mathbf {\Delta }\mathbf {f}^{ij}=|\mathbf f ^i - \mathbf f ^j|, \ i\ne j. \) The feature vectors set is divided into two classes. The class 1 with feature (difference) vectors of identical animal plastrons and the class 2 with plastron feature vectors from distinct animals. It was known beforehand which plastron images in the database belong to which specific tortoise.

Fig. 4.
figure 4

Four plastron examples illustrating the CEI dataset diversity.

Fig. 5.
figure 5

Examples of plastron images from the Bender’s dataset. Photographs of a tortoise at the age of 6 days (left), 272 days (middle) and 3 years 59 days (right).

5 Experimental Results

The plastron image database, on which the suitability of the features and the successfulness of the automatic recognition was tested, consists of 276 varied and mostly low-quality plastron images with a variable scene set-up (CEI dataset), see Fig. 4, and of 982 moderate-quality plastron images with a constant scene set-up (Bender’s dataset), see Fig. 5. The Bender’s dataset [2] contains also several series of the same animals recorder in different age steps (up to 16 images).

5.1 Feature Discriminability Validation

The discriminability hypothesis of our selected tortoise features (1) is verified on the manually-measured features on the complete tortoise database. A set of 5204 class 1 feature vectors and a set of 5203 class 2 feature vectors are calculated and both sets are equally divided into a training and test sub-sets. The kNN classification is done for two different \(k=5\) and \(k=30\) values, which were estimated experimentally as giving the best results. These results are presented in Table 1-manual where single columns denotes, true positive (class 1, class 2), false negative (FN), and false positive (FP) values, respectively. High true positive values in Table 1-manual suggest acceptable discriminability of the selected features. These results are obviously relative to available tortoise data, where only limited aging measurements for single individuals are available.

Table 1. The classification results for the manually or automatically measured features. The settings and the results for the smallest achieved false negative (FN) error are highlighted.

5.2 Classification of Automatically Measured Features

The overall success rates of the automatic localization of the junctions composed of the plastron detection and the localization of the individual branch junctions was obtained by counting all images, where none of these methods failed (see Table 2).

Table 2. Overall results of the automatic junction localization.

The results of the success/error rate for the hold-out rate estimation (disjunct training and test sets) based on the automatically measured features are given in Table 1 - automatic. The test set was composed of 4182 class 1 feature vectors and 4183 class 2 feature vectors, which are calculated from the automatically measured features on all plastron images from the database where the automatic feature extraction was successful. The training set is composed of 5204 class 1 and 5203 class 2 manually-measured feature vectors. The classification was not carried out separately for the CEI dataset and the Bender’s dataset as the CEI dataset contained only few time-lagged photographs of the same tortoises and therefore the results of the class 1 feature vectors classification would not be reliable. The overall success rates of the proposed tortoise recognition (see Table 3) were obtained by multiplying the success rates of the automatic approximate junction localization (Table 2) with the success rates of the feature classification based on the automatically measured features (Table 1-automatic).

Table 3. Overall success rates of the automatic tortoise recognition for the CEI and Bender’s data-sets.

The results deterioration (18–23%) between Bender’s and CEI databases is due to uneven and mostly lower quality of the CEI images. Comparison between the best achievable recognition results (Table 1-manual) suggests a need for further research to improve the salient points detection accuracy especially for the identical animal detection class.

6 Conclusion

We have proposed a set of discriminative features for the individual tortoise identification. These features compose of the normalized lengths of segments of the central seam on the plastron. Using a classification of these manually-measured features, it was experimentally verified that these chosen features are stable relative to our limited tortoise aging test set. We were able to reach correct individual animal detection with 0.99 probability for any time-lagged plastron image of a specific tortoise, which is essential for the task of inspection, i.e., to check whether a tortoise has a time-lagged image in the database thus it is a registered animal. Similarly, two images of different tortoises were classified correctly as not belonging to a same tortoise with 0.88 probability. Thus these features can be used for individual tortoise recognition. Fully automatic tortoise recognition has lower recognition rate for both classes due to imprecise salient points localization, which is the topic for our further research.