# Object Shape Recognition Using Wavelet Descriptors

Authors: Adnan Abou Nabout
Journal: Journal of Engineering
 (2013)

---

## Abstract

The wavelet transform is a well-known signal analysis method in several engineering disciplines. In image processing and pattern recognition, the wavelet transform is used in many applications for image coding as well as feature extraction purposes. It can be used to describe a given object shape by wavelet descriptors (WD). Thus, it is used to recognize objects according to their contour shape by deriving a number of WD and comparing them with the WD of stored contour patterns. For our method, we use a periodical angle function derived from an extracted object contour. In order to apply the WD, the Mexican Hat can be used as the mother wavelet. In this paper, the method of object shape recognition using wavelet descriptors is described coherently and includes details relating to the method of applying the periodical angle function and the derivation of the formulas for the Haar as well as Mexican Hat wavelet descriptors. To evaluate the results of object recognition when using wavelet descriptors taking into account the dependence on the starting point, the paper describes a sufficient method for the comparison of wavelet descriptors using the minimum distance matrix.


---

## Body

## 1. Introduction

Shape representation is an important step in object recognition tasks and plays a key role in many industrial applications. The recognition of 2D flat objects (e.g., plastic seals or aluminium profiles in the automobile industry) is a prime example of the need to find an appropriate shape representation which guarantees the detection of the objects despite slight object differences. Another example is the recognition of classes of weed species in agricultural applications with the objective of using the appropriate amount and type of pesticides in order to kill the pests. The problem here is that the weeds’ shapes change significantly according to their growing stages. For the above given reasons, it is necessary to find an adequate contour description, which reflects both rough and detailed information about the object shape.In recent years, many methods for shape representation and recognition have been proposed [1–10]. An advanced review of shape representation techniques can be found in [1, 2]. One can distinguish between contour-oriented and region-oriented shape description techniques. The first method describes the object outlines and the second describes the object areas. In both cases, suitable contour and region primitives are first used in order to extract the relevant objects from a given image (e.g., Freeman codes [3], polygon lines [10], and  pixels or image squares [4]). Based on this data, shape description can be performed by applying a feature vector in order to represent the given objects. Using such a feature vector, the recognition task can be solved by comparing the feature vectors of different objects. In this paper, we use contour polygons and apply feature vectors using wavelet descriptors.The most popular method related to the shape description using contour data is described in [9]. The method uses shape presentation by the so-called Fourier descriptors. The classical Fourier transform allows a loss-free transmission of an image signal in the frequency domain, but unfortunately it loses the full spatial resolution. The wavelet transform offers a good solution for this problem and additionally allows the possibility of selecting the appropriate basic functions for the signal to be analyzed. This makes the wavelet transform particularly useful for many image processing problems. The mathematical foundations of the wavelet transform were developed in the early nineties, and the term “Wavelet” was used in the 1980s for functions, which generalize the short-time Fourier transform [11]. The multiresolution analysis (MRA) using the Orthonormal Basis Functions was introduced in 1989 [12, 13]. A comparison between the short-time or windowed Fourier transform and the wavelet transform is discussed in [14]. The wavelet transformation was used in 1996 in order to describe a contour shapes [15] method based on the theory of periodized wavelets and using the MRA in order to apply wavelet descriptors. In [16–18] similar approaches are presented, which use different coordinates to describe a given object shape. One of the unattractive properties of the wavelet transform is the dependency of the WD on the selected starting point. This problem was reported in [19] and several solutions based on fixing the starting point were discussed. Hu et al   report a solution using Zernike moments [19].In this paper, we present the derivation of wavelet descriptors using a periodical angle function on the basis of the Mexican Hat and Haar wavelet. The new method is based on the publications listed in [21–24] and is described in this paper much more coherently and, specifically, provides further details related to the following important points.(i)
Applying the angle function: in some cases, applying angle functions hides some sources of error, for example, concave or convex object shape. Therefore, the paper shows the method of applying the angle function step by step (see (1)–(6)).(ii)
Derivation of the formulas for the Haar wavelet descriptors: equations (10)–(14) show the derivation of the Haar wavelet descriptors. The transition from (13) to (14) is given in Appendix A.(iii)
Derivation of the formulas for the Mexican Hat wavelet descriptors: equations (15)–(22) show the derivation of Mexican Hat wavelet descriptors. The transition from (21) to (22) is given in Appendix B.(iv)
Performance assessment using minimum distance matrix: presented here is an evaluation of the performance of the recognition method when using wavelet descriptors taking into account the dependence on the starting point.(v)
Performance assessment compared to Fourier descriptors: a comparison between wavelet descriptors and Fourier descriptors is performed in this paper using the minimum distance matrix to show the efficiency of the wavelet descriptors as opposed to the Fourier descriptors.To represent a given object shape, we show how to apply a periodical angle function using the polygon data of a given object shape. This angle function must be free from any singularity, which might arise from object rotations. For that reason, the paper shows the derivation of the angle function for a simple geometric object. To obtain a suitable number of WD, we normalize the angle function over the interval[0-2π] and derive a wavelet building set in the same interval. The results are shown on the basis of a simple example to illustrate the different steps of the new method. We also present results related to the recognition of puzzle pieces for two different wavelet type and compare the results of these different implementations in order to find the appropriate wavelet building set for this application.The paper is organized as follows. Section2 addresses the derivation of the angle function and describes the problem of singularity. Section 3 introduces the continuous wavelet transformation. The derivation of the WD using the Mexican Hat as well as the Haar function is presented in Sections 4 and 5. In Section 6, the way of applying suitable wavelet building set is addressed and discussed. In Section 7, the results of using derived WD to recognize object shapes are discussed based on a robot vision system for puzzle composition. In this context, the minimum distance approach is described, which is used to compare two different WD sets. Since objects in real images are affected by noise and image digitization, we discuss the impact of image noises on the angle function and thus on the derived WD in Section 8. For this purpose, we added artificial noise to the image of a puzzle and compared both the angle functions as well as the WD of the puzzle with and without noise. A comparison between the Fourier and wavelet descriptors in recognition tasks is shown in Section 9. In Section 10, the starting point problem is discussed.


## 2. Shape Description Using an Angle Function

To derive an angle function, we use the polygon information of a given object shape derived after contour extraction and approximation [10]. Figure 1 shows the example of an object shape with five edges; its derived angle f (green colored) and the periodical angle function f* (blue colored) are shown in Figure 2. The red point in Figure 1 indicates the starting point. The order of the polygon vertices is given here in a clockwise direction. This order is used for outer contours. For inner contours, the order is counter-clockwise.Figure 1
Object shape with 5 edges.Figure 2
The angle and periodical angle function of the shape from Figure1.Thex-axis in the diagram of the angle function f represents the measured length between the starting point and a considered point on the contour given in pixels. In the diagram of the periodical angle function f*, the x-axis represents the normalized length within the interval [0,2π]. The y-axis represents in both diagrams an angle given in radiant.To obtain the angle function of the given shape, we first calculate the length (li) and angles (φi) of every edge with respect to the x-axis according to the following:
(1)φi=atan(|yi+1-yi||xi+1-xi|),li=(yi+1-yi)2+(xi+1-xi)2i=1,2,…,N is the number of polygon edges and (xi,yi) and (xi+1,yi+1) are the coordinates of the polygon corners Pi,  Pi+1, respectively. We define the absolute angle ωi of the polygon edge PiPi+1¯ as follows:if (xi+1!=xi)
if (yi+1!=yi){
if (xi+1<xi)ωi=φi+πelse if (yi+1<yi)ωi=φi+2π}else if (xi+1>xi)ωi=0,elseωi=πelse if (yi+1>yi)ωi=π/2,elseωi=3π/2.Figure3 shows the calculated values. Here, the angles are given in radian. As shown in this figure, the absolute angles ωi are always positive. To obtain the angle function, we calculate the angle differences fi between every polygon edge PiPi+1¯ and the first polygon edge P1P2¯ by the following taking into consideration that differences higher than 2π and smaller than -2π must be corrected in order to fulfill the condition of modulo 2π:
(2)fi=ωi-ω1|mod2π.
For the above given example we obtain the following values:
(3)fi:0,-1.31,0.85,-1.69,-3.91.
The angle function f(l) is defined as follows:
(4)f(l)={f1=0if0<l≤l1fk,{k=2,…,N}if∑j=1k-1lj<l≤∑j=1klj.Figure 3
The absolute anglesωi of the polygon edges relative to the x-axis.The lengthl=∑j=1ilj represents the accumulated length beginning from the given starting point.The derived angle function is defined within the interval[0,L], where L is the total length (circumference) of the given contour polygon and can be scaled in the interval [0,2π] using the following parameter transformation:
(5)l⟶t,t=2πlL.Using the following normalization:(6)f*(t)=f(Lt2π)±t,
where the positive sign is given for outer and negative sign for inner contours. f*(t) is a periodical function with a period of 2π (see Figure 2). We will use this function to execute the continuous wavelet transform and apply the wavelet descriptors. The periodical angle function is better suited than the initial angle function because the recognition can be performed independent of the sizes of the considered objects. This is important since the object size changes in the camera image according to the distance between camera and object. In this paper we consider outer contours. For inner contours only the negative sign in (6) must be simply used instead of the positive sign.


## 3. Wavelet Transformation

Similar to the FT, the WT uses elementary functions, called wavelets, to describe a given signal. In contrast to the FT, which uses harmonic functions with different frequencies, the WT uses only one basis wavelet (mother wavelet) to derive the reconstruction signals [14]. Through dilatation, compression, and shifting of the mother wavelet, we can derive new variants of this signal, which together constitute the so-called wavelet building set. The general derivation formula of wavelets Ψa,b(t) from the mother wavelet Ψ(t) is given as follows:
(7)Ψa,b(t)=|a|-1/2Ψ(t-ba),wherea is the compression or dilatation parameter and b is the shifting parameter. Figure 4 shows the mother wavelet based on the Haar function and some derived variants resulting from compression, dilatation, and shifting using (7). Figure 5 shows the equivalent Mexican Hat wavelets. The function Ψ can be scaled over the interval [0,2π] similar to the periodic angle function.Figure 4
Wavelet building set based on Haar function.Figure 5
Wavelet building set based on Mexican Hat function.Based on (7), (8) shows the coefficients of the continuous wavelet transform WΨf*(a,b) for the derived angle function f*(t) given in (6). We will call these coefficients wavelet descriptors (WD) similar to the name of the Fourier descriptors (FD). Based on the MRA, we receive the approximate signal for a>1 and detail signal for a<1,
(8)WΨf*(a,b)=|a|-1/2∫-∞∞f*(t)Ψ(t-ba)dt.Since the wavelets are time-limited variants of the basis function, we can limit the integration in (8) to the definition interval [0,2π] and finally receive the following:
(9)WΨf*(a,b)=|a|-1/2∫02πf*(t)Ψ(t-ba)dt.


## 4. Haar Wavelet Descriptors (HWD)

To calculate the Haar Wavelet descriptors, we just replace the functionΨ in (9) by the scaled Haar function and set the integration limits to the interval [b,b+a], which represents the nonzero value between the left and right border of the Haar Wavelet. We thus obtain the following expression:
(10)WHf*(a,b)=|a|-1/2[∫bb+a/2f*(t)dt-∫b+a/2b+af*(t)dt].If we replace the functionf*(t) by f(l) according to (6), we obtain
(11)WHf(a,b)=|a|-1/2[∫bb+a/2f(Lt2π)dtnnnnnnnnn-∫b+a/2b+af(Lt2π)dt+a24].If we now replace the parametert by l according to (5), we receive the final expression of the Haar Wavelet descriptors:
(12)WHf(a,b)=|a|-1/2[2πL∫Lb/2πL(b+(a/2))/2πf(l)dlnnnnnnnnn-2πL∫L(b+(a/2))/2πL(b+a)/2πf(l)dl+a24].The integration in (12) depends on the positions of the low-high and high-low edges of the Haar Wavelet as shown in Figure 6. To execute the integration, we divide the first integral in (12) into three subintegrals T1, T2, and T3 and the second integral into T4, T5, and T6 according to the location of the Haar Wavelet within the defined interval of the angle function (see Figure 6). We thus obtain (13). The integration outside of the interval [b,b+a] is always equal to zero,
(13)WHf(a,b)=|a|-1/2[2πL∑k=16Tk+a24].Figure 6
Definition of the subintegralsT1–T6.After solving the integralsT1 to T6, we receive the final expression of the HWD as given in the following:
(14)HWD=|a|-1/2[∑m=jk-1lmαm-bf(li)+2(b+2a)f(lj)-(b+a)f(lk)nnnnnnnnnnn+a24-2πL∑m=ij-1lmαm+2πL∑m=jk-1lmαm].
The first four terms of (14) depend only on the polygon starting point and the parameters a and b and do not include any shape information. Only the last two terms include the angle differences αm between every two consecutive edges and therefore information about the contour shape.


## 5. Mexican Hat Wavelet Descriptors (MWD)

Similar to the Haar Wavelet descriptors, we can calculate the Mexican Hat wavelet descriptors as given below. Using the Mexican Hat function as basis wavelet we receive the wavelet building setΨ((t-b)/a) as given in the following:
(15)Ψ(t-ba)=[1-(t-ba)2]e-((t-b)/a)2/2.
The corresponding wavelet descriptors are expressed as
(16)WMf*(a,b)=|a|-1/2∫02πf*(t)[1-(t-ba)2]e-((t-b)/a)2/2dt.
Using the parameter transformation in (5) and the normalization in (6), we obtain the following:
(17)WMf(a,b)=|a|-1/2∫0L[f(l)+2πlL]nnnnnnnnn×[1-((2πl/L)-ba)2]e-(((2πl/L)-b)/a)2/22πLdl.
After small modification, we receive the following:
(18)WMf(a,b)=2πL|a|-1/2∫0L[f(l)+2πlL]nnnnnnnnnnn×[1-2(2πl-bL2aL)2]e-((2πl-bL)/2aL)2dl.
Multiplying the terms in (18) then yields the following:
(19)WMf(a,b)=2πL|a|-1/2∫0L[f(l)+2πlL-2f(l)(2πl-bL2aL)2nnnnnnnnnnnnnnnn-4πlL(2πl-bL2aL)2]e-((2πl-bL)/2aL)2dl.
The above given integration includes the following four terms:
(20)T1=∫0Lf(l)e-((2πl-bL)/2aL)2dl,T2=∫0L2πlLe-((2πl-bL)/2aL)2dl,T3=-∫0L2f(l)(2πl-bL2aL)2e-((2πl-bL)/2aL)2dl,T4=-∫0L4πlL(2πl-bL2aL)2e-((2πl-bL)/2aL)2dl.
Equation (20) can be expressed as follows:
(21)WMf(a,b)=2πL|a|-1/2∑k=14Tk.
After solving the integrals in (21), we receive the final expression of the MWD as given in the following:
(22)MWD=-2|a|1/2∑m=1nzme-zm2αm+|a|3/2[e-zn2-e-z02]+2b|a|1/2[zne-zn2-z0e-z02]+2|a|3/2[zn2e-zn2-z02e-z02]-22π|a|1/2zne-zn2.In (22) only the first term includes shape information, since it includes αm. All other terms depend on the parameters a and b and are constant for a given Mexican Hat wavelet. For this reason, these terms do not need to be considered in the comparison of the wavelet descriptors given in (22).


## 6. Derivation of Wavelet Descriptors

The used waveletsΨa,b(t) in (7) can be seen as a filterbank with high and low frequency signals. With the increase in scale a>1, the function is dilated in time to focus on long-time behavior of the associated signal f*(t). In general, large-scale (a>1) allowed a global view of the signal while small-scale (a<1) shows a detailed view of the signal. To take this into account and to obtain suitable WD for representing a given object shape we vary the values of the compression or dilatation parameter a and the shifting parameter b according to the following equations:
(23)a=r2πm;b=k2πm
with m=log2(n);  n: number of WD and
(24)r∈{1,2,…,m};k∈{0,1,…,m-1}.As shown in (23) the parameters a and b are always positive. By changing the parameters  r and  k in this equation, we obtain a sufficient wavelet building set, which covers the complete definition interval [0,2π] of the angle function. Similar to the MRA [14], we can vary the parameters r, k, and m to construct a wavelet building set with different low- and high-frequency signals to obtain components from the approximation as well as detail signal. This is important, since the components of the approximation signal are needed to describe the rough shape and the detailed signal components to describe small shape changes of the object. For a given value of m≤6 and depending on r∈{1,2,…,m}, we receive values a>1. For all these values we use the wavelets Ψa,b(t) as scaling functions. All other wavelets, for which a<1, are used as approximation functions. To receive components from the detail signal, which corresponds to the wavelet signals with high-frequency a<1, we can choose the higher values of m(m>6) with the appropriate values of r(r<m/2π). A better alternative, however, is to use the reciprocal values of a, which are used to receive components from the approximation signal. Generally, only a small number of WD (e.g., 32 or 64) is needed in practical recognition applications to describe different object shapes. In this case, the parameter m can be set to 4 if we use the reciprocal value of a to include components of the detail signal. For m=4, Figure 7 shows a part of the Haar as well as Mexican Hat wavelet functions.Figure 7
Part of the Haar and Mexican Hat wavelet building set derived within the interval[0,2π].As shown in this figure, small values of the parameterr produce compressed variants and large values and, on the other hand, create dilated variants of the mother wavelet. In both cases, we receive an approximation signal of the wavelet transformation, since a>1. To receive components of the detail signal, which describes small details of the contour shape, we can use 1/a in combination with the same values of b. For such values we obtain WD, which are qualified to describe small matches between the compared shapes.


## 7. Experimental Results

Figure8 shows the overall procedure of the proposed shape description and recognition approach using WD. The implementation was carried out as part of a robot vision system for puzzle composition. The WD comparison is done here using the minim distance matrix (MDM).Figure 8
Overall procedure of the shape description and recognition.This chapter presents some results of the above-described method. For better illustration, we apply the wavelet descriptor method within a robot vision system environment to enable the robot to compose a puzzle of size 20× 30 cm. The puzzle is made of wood and includes 10 different puzzle pieces. The size of the puzzle pieces varies between 3 × 3 and 13 × 7 cm. Here, the robot has to recognize the pieces based on their shapes and place them into the correct slots of the puzzle board. The pieces are distributed on a flat surface near to the puzzle board so that a CCD camera can acquire a grey level image of the puzzle. The location and orientation of the puzzle pieces and puzzle board can be chosen arbitrarily. The recognition of the pieces is made by comparing the wavelet descriptors using the minimum distance method. The overall procedure of the proposed shape description and recognition approach is given in Table 1.Table 1
The Euclidean distance matrix of MWD calculated from the approximation signal.
Hippo (1)
Snail (2)
Bear (3)
Horse (4)
Insect (5)
Duck (6)
Dog (7)
Turtle (8)
Cat (9)
Giraffe (10)
Cat
0,68
0,59
0,13
0,42
1,36
0,55
0,53
0,43
0,09
0,65
Snail
0,23
0,07
0,39
0,50
1,00
0,19
0,51
0,36
0,23
0,89
Hippo
0,12
0,17
0,50
0,34
1,15
0,29
0,37
0,32
0,51
0,76
Turtle
0,32
0,36
0,48
0,27
1,10
0,13
0,58
0,07
0,51
0,71
Bear
0,50
0,39
0,03
0,27
1,38
0,24
0,44
0,40
0,37
0,97
Horse
0,34
0,50
0,42
0,09
1,01
0,30
0,34
0,27
0,21
0,72
Duck
0,29
0,19
0,24
0,26
0,88
0,09
0,36
0,18
0,56
0,59
Giraffe
0,76
0,89
0,97
0,71
0,80
0,63
0,67
0,97
0,68
0,07
Dog
0,37
0,51
0,44
0,43
0,70
0,58
0,12
0,70
0,48
0,97
Insect
1,15
1,00
1,38
0,92
0,15
1,07
0,83
1,13
1,12
0,90Figure9 shows the camera image. The figures enclosed within the blue rectangle are the figure slots in the puzzle board. The three crosses serve as reference points with known robot coordinates and are used to transform pixel coordinates into robot coordinates. The crosses do not impact on the presented results. Figure 10 shows the extracted and approximated contours of the puzzle pieces as polygons. Here the calculated polygon vertices of every contour are marked by a red point; the starting points are marked on each contour by a circle. The number of the polygon vertices in this image varies between 10 and 23 points. The chosen approximation method [10] takes into account the curvature along the given contour so that contour parts with high curvature are mapped by a higher number of polygon vertices than contour parts with slight curvature. It is important to mention that the number as well as positions of the polygon vertices varies for the same shape in different images slightly due to the quantization and binarization noises. Thus, the angles between the polygon edges of an extracted contour will also vary accordingly. A separate assessment of the impact of noise on the angle functions and hence the wavelet descriptors is shown in Section 9 based on an artificial noisy image of a puzzle piece. For every contour of the puzzle pieces we determined 25 WD from the approximation and another 25 WD from the detail signal. The WD are used to identify the puzzle pieces by calculating the minimum distance matrix as shown below. Figures 11 and 12 show the first 16 MWD and HWD obtained from the approximation (a) and the detail signal (b) for the giraffe as well as horse shaped puzzle pieces given in Figure 9. The used starting points of the derived angle functions are marked in Figure 9 in green color. The dilatation or compress parameter a and shifting parameter b are calculated as given in (23) for r∈{1,2,3,4} and k∈{0,1,2,3}. The reported experimental results are calculated in all cases using the described strategy in Section 10 to ensure starting point independence.Figure 9
Example of an image with different puzzle pieces.Figure 10
Extracted and approximated contours of the puzzle pieces.The first 16 MWD of the approximation and detail signal for “Horse” and “Giraffe.”
(a)
(b)The first 16 HWD of the approximation and detail signal for “Horse” and “Giraffe”.
(a)
(b)To measure the similarity between two object shapes we can calculate the differences between the WD of the different shapes using the following Euclidean distanced:
(25)d=∑i=1n(WDi′-WDi)2,
where WDi′ and WDi are the WD of the two compared shapes and n is the number of WD taken from the approximation and/or detail signal. Table 1 shows the Euclidean distance matrix calculated from the MWD approximation signal for the shapes of Figure 8 for n=25. In this matrix, every cell value represents the smallest Euclidean distance between the two puzzle shapes given in the row and column of the selected cell calculated by varying the starting points as described in Section 10. To explain the results in Table 1, Figure 13 shows the Euclidean distance values of MWD between the puzzle piece “Horse” (sixth row of Table 1), “Giraffe” (eighth row of Table 1), and the ten figure shapes within the puzzle board (column 1 till 10 of Table 1) in a bar chart calculated for n=25 from the approximation signal.The Euclidean distances values of MWD calculated from the approximation signal.
(a)
(b)As can be seen from Figure13, the Euclidean distances are small for the same shapes and relatively large for different shapes. Thus, these values are adequate for recognizing the given shapes “Horse” and “Giraffe.” This fact applies to all shapes of Figure 9 (see green bar in Figure 13). Similar results are obtained using HWD instead of MWD with the difference that the values are higher. Comparable results were also obtained for MWD and HWD of the detail signals as well. By combining the 25 WD from the approximation and 25 WD from the detail signal, we receive the final MWD and HWD components, which represent the different puzzle shapes.


## 8. Impact of Image Noises

To study the impact of image noises on the angle function and thus on the derived WD we added artificial noise to the image of  “Giraffe.” Figure14 shows the image with and without noise as well as the extracted and approximated contours of both images.The shape “Giraffe” with and without noise: (a) grey image, (b) binary image, and (c) contour polygon.
(a)
(b)
(c)As shown in Figure14, the contour polygons of “Giraffe” show large differences because of noise. The number of polygon vertices for the shape without noise is 22 and with noise only 18. The positions of the polygon vertices differ slightly. The main inertial axes show, however, large differences. Figure 15 shows the periodical angle function compared for both cases for the same starting point. As shown in this figure, the differences are relatively small despite the changes of the number and positions of the polygon vertices. The differences between the WD are marginal (Figure 16). Here 25 MWD from the approximation and 25 MWD from the detail signal were calculated. Here, the minimum distance between the WD is 0,6.Figure 15
The periodical angle function of the shape “Giraffe” with and without artificial noises.Figure 16
The MWD of the shape “Giraffe” with and without artificial noises.It should be noted that the individual values​​of the WD have marginal differences, despite the relatively large minimum distance of 0,6. The evaluation of the WD by comparing the individual values, for example, using a Fuzzy method [8], can deliver better results.


## 9. Comparison between FD and WD

To compare the wavelet descriptors with the Fourier descriptors, we first calculate 50 FD of all given shapes of Figure9. Figure 17 shows the first 16 values of the calculated FD for both considered shapes “Horse” and “Giraffe.” The Euclidean distance matrix is given in Table 2, where all 50 FD were considered. The Euclidean distance values between the puzzle piece “Horse” and “Giraffe” and the ten figure shapes within the puzzle board are drawn in Figure 18. The diagrams show that the minimum distance values of the FD are also qualified, similar to the WD, to recognize both shapes, since the values of the minimum distances between the same shapes represent the smallest distances. The only difference is the relatively small values of the minimum distance in comparison with the values of Table 1, respectively, Figure 13. This can cause confusion in recognition tasks, when the images are afflicted with noises. In order to assess the influence of image noise on the values of the FD, we calculated the FD for the shape “Giraffe” with artificial noise (see Figure 14). Figure 19 shows the values of this shape with and without noise compared. As seen in this figure, the individual values differ only slightly, similar to the WD. The minimum distance between the same shapes is 0,43.Table 2
The Euclidean distance matrix of FD.
Hippo (1)
Snail (2)
Bear (3)
Horse (4)
Insect (5)
Duck (6)
Dog (7)
Turtle (8)
Cat (9)
Giraffe (10)
Cat
0,38
0,43
0,48
0,51
0,66
0,32
0,43
0,37
0,14
0,62
Snail
0,36
0,15
0,40
0,57
0,74
0,16
0,56
0,31
0,43
0,78
Hippo
0,12
0,34
0,49
0,51
0,71
0,30
0,53
0,25
0,42
0,74
Turtle
0,28
0,30
0,41
0,55
0,66
0,27
0,53
0,17
0,44
0,71
Bear
0,44
0,42
0,15
0,42
0,67
0,36
0,43
0,44
0,51
0,72
Horse
0,45
0,57
0,39
0,14
0,66
0,49
0,37
0,54
0,50
0,63
Duck
0,30
0,20
0,38
0,54
0,67
0,13
0,50
0,24
0,34
0,71
Giraffe
0,72
0,77
0,70
0,64
0,45
0,71
0,55
0,69
0,60
0,15
Dog
0,50
0,58
0,37
0,37
0,65
0,49
0,19
0,51
0,45
0,57
Insect
0,71
0,73
0,69
0,71
0,15
0,68
0,69
0,67
0,66
0,43Figure 17
The first 16 FD for “Horse” and “Giraffe.”The Euclidean distance values of FD.
(a)
(b)Figure 19
The FD of the shape “Giraffe” with and without artificial noise.As shown above, using the approximation and/or detail signal, it is very easy to recognize object shapes using few numbers of MWD or HWD by calculating the Euclidean distance given in (25). For the example in Figure 9, the results show that the recognition can be achieved using either the approximation signal, detail signal, or the combination of both signals. In addition, the recognition is comparable if we use the MWD or HWD with the difference that the values of HWD are higher than the values of MWD. The minimum distance is a simple way to evaluate WD. This method has the disadvantage of losing the information about the local WD differences. For this reason, the comparison of each WD can deliver better results in some cases, requiring though a higher computational calculation effort.Compared to the recognition using the FD, the recognition using WD is more adequate because the differences between the minimum distance values are significantly higher. This is important for recognition tasks in which not only known but also unknown objects are present. In this case, it is necessary to define a threshold for the minimum distance value to distinguish known and unknown objects. The disadvantage of the WD is the dependency of the WD from the starting point on the contour. This problem can be solved by calculating the WD for every possible starting point. This will be explained below in Section10.


## 10. Solving the Problem of Starting Point

The results in Section5 are obtained under the condition of starting point equality. If the starting points change, the angle functions will also change and with them the corresponding WD. If we change the starting point of “Horse,” for instance, from the green colored position to the red one, we receive the MWD as shown in Figure 20. Here both approximation (MWD 1–25) and detail signals (MWD 26–50) are shown in the same diagram.Figure 20
The MWD of “Giraffe” for the two different staring points given in Figure9 derived from the approximation and detail signal.As shown in Figure20, the change of the starting point leads to large changes in the WD. The Euclidean distances between the MWD of the same object with different starting points are 4,8 for the approximation and 6,1 for the detail signal. This is due to the change of the angle function within the interval [0-2π] according to the change of the starting point. Figure 21 shows the periodical angle functions of the example shape “Giraffe” for the two different starting points of Figure 9.Figure 21
The periodical angle functions of the “Giraffe” for two different starting points.Since the position of the starting point as well as number of polygon corners for a given object in real applications depends on several parameters, which cannot be fixed, such as position and rotation of the objects in the image, number of objects, and extraction and approximation method, the above-mentioned issue can cause confusion in recognition tasks because it is not explicitly clear whether large values of the Euclidean distance are related to shape differences or to different starting points. The recognition process using the minimum distance method will fail. To solve this problem it is either necessary to specify a striking point as a starting position on the contour and to calculate the WD for this point or to calculate the WD for all found polygon corners as shown below.The first strategy can be carried out using the inertial axes of the given objects if these do not show large changes across different images. A striking point could be an intersection point between one of these axes and the considered contour. In Figure22 the inertial axes for the example of Figure 9 are drawn in red colour. As shown in this figure the axes of inertia have small as well as large deviations despite the low image noise. The large deviations occur in many cases due to existing object symmetries as this is the case for some of the puzzle pieces. Due to this fact we solve the problem of the starting point using the second strategy as follows.Figure 22
Extracted and approximated contours of the puzzle figures.Suppose we have a number of object samplesOj and an unknown object O, which must be classified according to one of the given object classes, the procedure can then be performed as follows.(i)
Calculate the WD of all objectsOj for an arbitrary starting point and store them in a database.(ii)
Calculate the WD sets (e.g., 25 WD from the approximation and 25 WD from the detail signal) for all possible starting points (i) of the unknown object O. This can be done easily if we use the polygon description of the object contour and change the starting point from one polygon corner to the next by shifting the length and corresponding angles of the contour polygon.(iii)
Compare the WD sets of the unknown object with the stored WD of the object samplesOj using the Euclidean distance method. We receive a number of Euclidean distances di,j; i=1,2,…n; j=1,2,…m according to the number of different starting points n used in step (ii) and the number of object samples m given in step (i).(iv)
Find the minimum value ofdij. The stored object sample related to this minimum value j represents the recognized object.The strategy given above allows for a wholly owned recognition. This feature constitutes an important condition for use in industrial application. The method needs higher computational effort. This is, however, negligible relative to image acquisition and preprocessing time. For the example in Figure9 with 23 objects (including the three reference crosses) and a total number of polygon corners for all objects of 333, we calculated 50 WD for every object and every polygon corner (this means 50*333 WD). The total time needed for all WD was 48 ms using a standard PC with 3 GHz frequency. For an object with, for example, 20 polygon vertices, this means that the time needed to calculate the WD according to (14) and (22) is smaller than 3 ms. Compared with the image acquisition time of 40 ms (European CCIR norm) the effort is reasonable.


## 11. Conclusion

The representation of object contours using wavelet descriptors is more efficient than Fourier descriptors in object recognition tasks, since the differences between the WD for different objects are significantly larger than between the FD. In particular, the Mexican Hat as well as Haar functions are qualified for use as mother wavelets to obtain a sufficient number of WD, which can be used in recognition tasks. The WD can be calculated very easily using (14) for the HWD and (22) for MWD. The number of WD needed to recognize a given object increases according to the complexity of the object shapes and must be set according to the given application. It is possible in some cases to use only the components of the approximation signal in order to recognize an unknown object using the minimum distance method, but generally the use of the detail signal will include detail information about small contour changes between the compared objects. The starting point on the contour has a large influence on the recognition process because the values of the WD depend strongly on it. The paper describes one possible solution, in which not only one set of WD is computed and compared with the stored WD of the object samples but also several sets of WD according to the different starting points. This will increase the time consumption of the recognition process compared with the time consumption needed using FD. However, this is no longer a problem due to speed of the current generation of computers.



---

*Source: 435628-2013-05-16.xml*