You are on page 1of 1

Partial Matching for Livestock Brand Image Recognition

Waldemar Villamayor-Venialbo and Horacio Legal-Ayala Laboratorio de Computacin Cient o ca y Aplicada Universidad Nacional de Asuncin, Campus Universitario, San Lorenzo, Paraguay o
wvenialbo@pol.una.py, hlegal@pol.una.py

Abstract This work introduces a novel approach to perform partial matching of digital images. The method was devised to help measuring shape similarity for a Cattle Brand Registration System we developed the past year. The main contribution is twofold. First we present a technique that allows the use of methods designed for the extraction of global invariants to generate local invariant features. After decomposing a shape in their basic elements, local features are obtained from components formed by taking account the relative spatial distribution of the shapes elements. The set of these local features determines a unique identier for a given shape. Second, the formulation of a exclusion measure function depending on those sets of local shape features. This exclusion measure helps to determine if a shape could be considered a subset of another given shape. Experimental results have shown the accuracy of the methodology. Using Global Invariants as Local Shape Descriptors

Problem Formulation and Challenges The correct registration of cattle brands is a major issue in countries with an old ranching tradition due to large brand image databases. Brand inspector ocers must prevent frauds ensuring that a particular brand cannot be converted in another brand by adding some extra components to its design. The challenge consists in identifying candidate brands that may include or be included in existing brand designs, i.e., retrieve from the database any registered brand that could be converted in the candidate brand, or vice-versa. The method should be ecient to manage large number of livestock brands. The proposed partial matching scheme is based on a set exclusion measure function, and its formulation relies on the comparison of descriptors, obtained by decomposing the brand in characterizing components.
Figure 1: Cattle Brand Registration System.

Partial Matching using Set Exclusion Criteria Set exclusion criteria: To determine if a brand contains, or it is contained in another brand, an exclusion measure M : R2 R2 [0, 1] is formulated. Let m and n be the number of elements in SF and SG, respectively, we dene: 1 M (F, G) := 1 r
r

Figure 2: Matching brand components.

To perform the decomposition, a natural choice is to consider the primitive strokes forming the cattle brand as the working elements. However, matching brands by only taking account each individual stroke, separately, is not enough to distinguish two brands with similar design.

i ,
i=1

r = min(m, n) ,

(5)

where the characteristic operator i is: i : = 1, if xi yi , 0, otherwise , (xi, yi) QF G , (6)

The adopted solution consists in using pairs of strokes as brand components. Descriptor values computed from the union of two strokes, preserving their position relative to each other, will be enough to distinguish both brands in Fig. 2. Set of descriptors of a brand: Considering a brand F R2, let fi F represents the i-th stroke in that brand. The set of descriptors of F is dened as:
N 1 N

SF : =
i=1 j=i+1

I(fi fj ) ,

N > 1,

(1)

where I : F Rn is some global shape feature extractor operator and N is the number of strokes in F . Best association: Let SF and SG represent the descriptor sets of brands F and G. Consider the collection PF G of injective correspondences with the form: PF G = { (x, y) | x SF , y SG } . (2) If is some norm (e.g., the L2 norm) in the descriptor space Rn, the linear combination of the distances between each pair (x, y) PF G given by d(PF G) :=
(x,y)PF G

is as in (3), and 0 is a parameter determining the threshold to consider similar two corresponding components. Measuring exclusion: The set exclusion measuring function (5) can yield Figure 4: Values of M (F, G) in various scenarios. any value from Table 2.
Table 2: Contingency of the set exclusion measure M (F, G)

Exclusion value Relation M (F, G) = 0 F G F G 0 < M (F, G) 1 F G F G

xy ,

(3)

Example Results

will be minimum for the best pairing of members in SF and SG. I.e., if QF G PF G contains the best pairing of members in SF and SG, then, d(QF G) = min d(P ) . (4)
P PF G
We do not consider here the trivial case when N = 1, i.e., a brand composed uniquely of one isolated stroke.

Experimental Results
Table 1: Intraclass retrieval performance
1.0
= 0.008 = 0.01 rr
u e e

Alteration A. Displacement Rotation Scaling Stretching Shearing Combined B. Add-in Add-on Partial Rejection

P 0.971 0.977 0.946 0.988 0.992 0.973 0.980 1.000 1.000 1.000

R 0.971 0.970 0.902 0.952 0.992 0.954 0.918 1.000 1.000 1.000

S.E. 13.3% 18.1% 13.7% 14.9% 16.2% 16.5% 3.7% 0.0% 12.4% N.A.

= 0.006


e rr e

Figure 5: Identifying brands elements.

Figure 6: Real working example.

= 0.02

Precision

0.9

= 0.03 = 0.04 = 0.05

= 0.004

Bibliography
Chen, J., Sato, Y., Tamura, S.: Orientation space ltering for multiple orientation line segmentation. IEEE Transactions on Pattern Analysis and Machine Intelligence 22(5) (2000) 311317 Rahtu, E., Salo, M., Heikkil, J.: a Ane invariant pattern recognition using multi-scale autoconvolution. IEEE Transactions on Pattern Analysis and Machine Intelligence 27(6) (2005) 908918

0.8 0.8

= 0.1

0.9 Recall

1.0

Villamayor-Venialbo, W., Legal-Ayala, H.: Stroke segmentation from livestock brand images. In: Proceedings of the 35th Latin American Conference on Informatics. (2009) Villamayor-Venialbo, W., Legal-Ayala, H., Justino, E., Facon, J.: Partial matching using set exclusion criteria: Applied to livestock brand retrieval. In: Proceedings of the 23rd Brazilian Conference on Graphics, Patterns and Images. (2010) 178185

Figure 3: Overall retrieval performance.

LCCA Facultad Politcnica Universidad Nacional de Asuncin, Campus Universitario, San Lorenzo, Paraguay e o

http://www.fpuna.edu.py/

You might also like