24.11.2014 Views

Elektronika 2009-11.pdf - Instytut Systemów Elektronicznych

Elektronika 2009-11.pdf - Instytut Systemów Elektronicznych

Elektronika 2009-11.pdf - Instytut Systemów Elektronicznych

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Influence of the number of bins on the recognition<br />

results using Point Distance Histogram<br />

(Wpływ liczby przedziałów w histogramie na wyniki rozpoznawania<br />

z użyciem algorytmu Point Distance Histogram)<br />

dr inż. DARIUSZ FREJLICHOWSKI<br />

Zachodniopomorski Uniwersytet Technologiczny w Szczecinie, Wydział Informatyki<br />

The shape is one of the features of an object that can be used<br />

for its recognition. In the template matching approach a shape<br />

has to be properly represented. It means that it has to be described<br />

in a way making the process of recognition easier.<br />

Usually, the shape description algorithm has to be invariant to<br />

some of its deformations, e.g. scaling or rotation. The most desirable<br />

approaches are robust to all shape deformations. However,<br />

there are not many of that kind, because it is really difficult<br />

to construct an algorithm solving so many various problems.<br />

Moreover, in many cases not all shape distortions arise. Sometimes<br />

the invariance to a few selected problems is sufficient.<br />

Nowadays, the number of shape descriptors applied in the<br />

pattern recognition area is innumerable (an exemplary exhaustive<br />

survey on this topic can be found in [1]). There are<br />

several hundreds various algorithms, Point Distance Histogram<br />

(PDH) being one of them. It was proposed in [2] and<br />

it draws benefits from two very useful solutions: polar transformation<br />

and histogram. It was successfully applied e.g. in<br />

recognition of erythrocyte shapes [3]. The polar transform is<br />

particularly effective in description and recognition of binary<br />

images [4,5]. Thanks to this, the most important property of<br />

the described algorithm is the invariance to selection of the<br />

starting point and rotation (thanks to the usage of histogram),<br />

scaling (thanks to the normalisation) and translation (usage<br />

of the particular point inside an object as an origin of the transform).<br />

Moreover, the method is able to indicate small differences<br />

between similar objects.<br />

The combination of polar coordinates and histogram for<br />

recognition of shapes is not new. Two similar to PDH methods<br />

can be mentioned. The first one is the Distance Histogram -<br />

DH [6]. It calculates the Euclidean distance between the centroid<br />

and all pixels within the object. Every distance is normalized<br />

with respect to the maximal one. The algorithm is very<br />

simple, yet quite effective for example for CBIR applications.<br />

The second proposal: Polar Histogram - PH [7] is almost the<br />

same as the previous one. Only the method for deriving it is<br />

different - it uses transformation from Cartesian to polar coordinates<br />

as more important step. The described solutions are<br />

the most similar to PDH. However, they both work on the<br />

whole shape, with its interior. As it is described in literature<br />

[1,8] the second shape representation - the contour - is possible.<br />

In fact, in the Point Distance Histogram the contour is<br />

used, which makes the algorithm much faster.<br />

At one of the stages during derivation of the shape description<br />

using PDH one has to decide how many bins in a histogram<br />

are used. This parameter is denoted as r. The most<br />

important goal of the experiment described in this paper was<br />

the investigation of the influence of this number on the recognition<br />

results. In order to attain that goal, deformed (rotated<br />

and scaled) trademark shapes were explored. Few examples<br />

of shapes and achieved PDH descriptions for them are provided<br />

in Fig.1.<br />

Description of the Point Distance<br />

Histogram algorithm<br />

The original PDH algorithm uses the centroid as the origin of<br />

the calculations [2]. However, the method is not limited to this<br />

one and if it is desirable any point can be used. This selection<br />

should indicate the name of the descriptor, e.g. in the original<br />

method the complete name is centroid-PDH. The centre of an<br />

object is denoted as O and for centroid it is derived using the<br />

formula [2]:<br />

where: n - number of points in a contour, x i , y i - Cartesian coordinates<br />

of the i-th point.<br />

Having the centre of an object derived we can start the<br />

calculation of the polar co-ordinates: Θ i for angles and Ρ i for<br />

radii [2]:<br />

(1)<br />

(2)<br />

(3)<br />

The values in Θ i are converted into nearest integers [2]:<br />

(4)<br />

Fig.1. Exemplary trademark shapes and PDH descriptions<br />

achieved for them<br />

Rys.1. Przykładowe znaki firmowe i wyznaczone dla nich deksryptory<br />

PDH<br />

The elements in Θ i and Ρ i are now rearranged, according to<br />

increasing values in Θ i , and denoted as Θ j , Ρ j . If some elements<br />

in Θ j are equal, only the one with the highest corresponding<br />

value Ρ j is selected. That gives a vector with at most<br />

360 elements, one for each integer angle. For further work<br />

only the vector of radii is needed. We denote it as Ρ k , where<br />

58 ELEKTRONIKA 11/<strong>2009</strong>

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!