Научная статья на тему 'Detection resistant to affine transformations graphical primitives in the image based on the Hough Transform'

Detection resistant to affine transformations graphical primitives in the image based on the Hough Transform Текст научной статьи по специальности «Математика»

CC BY
89
13
i Надоели баннеры? Вы всегда можете отключить рекламу.
Журнал
European science
Область наук
Ключевые слова
HOUGH TRANSFORM / AFFINE TRANSFORMATION / SHAPE DETECTION / IMAGE PROCESSING / ПРЕОБРАЗОВАНИЕ ХАФА / АФФИННОЕ ПРЕОБРАЗОВАНИЕ / ОБНАРУЖЕНИЕ ФИГУР / ОБРАБОТКА ИЗОБРАЖЕНИЙ

Аннотация научной статьи по математике, автор научной работы — Khazeeva Regina

Detection of the graphical primitives on the image is considered a significant problem connected with the image processing field of study. The Hough Transform (HT) represents one of the most popular, flexible, and easy in implementation algorithm that solves this problem. The work provides an overview of the related works, theoretical basis for the HT, description of the base Hough Transform algorithm, and modifications of the HT algorithm that make it possible to detect transformed shapes.

i Надоели баннеры? Вы всегда можете отключить рекламу.
iНе можете найти то, что вам нужно? Попробуйте сервис подбора литературы.
i Надоели баннеры? Вы всегда можете отключить рекламу.

Текст научной работы на тему «Detection resistant to affine transformations graphical primitives in the image based on the Hough Transform»

Detection resistant to affine transformations graphical primitives in the image based on the Hough transform Khazeeva R. (Russian Federation) Обнаружение устойчивых к аффинным преобразованиям графических примитивов на изображении на основе преобразования Хафа Хазеева Р. Т. (Российская Федерация)

Хазеева Регина Тагировна / Khazeeva Regina - студент, факультет компьютерных наук, департамент программной инженерии, Национальный исследовательский университет Высшая школа экономики, г. Москва

Abstract: detection of the graphical primitives on the image is considered a significant problem connected with the image processing field of study. The Hough Transform (HT) represents one of the most popular, flexible, and easy in implementation algorithm that solves this problem. The work provides an overview of the related works, theoretical basis for the HT, description of the base Hough Transform algorithm, and modifications of the HT algorithm that make it possible to detect transformed shapes.

Аннотация: обнаружение графических примитивов на изображении считается весомой проблемой, относящейся к обработке изображений. Преобразование Хафа (HT) представляет собой один из самых популярных, гибких и простых в реализации алгоритмов, который решает данную проблему. В данной работе представлен обзор сопутствующих работ, теоретический фундамент преобразования Хафа, а также модификации преобразования Хафа, способствующие обнаружению преобразованных фигур.

Keywords: Hough Transform, affine transformation, shape detection, image processing. Ключевые слова: преобразование Хафа, аффинное преобразование, обнаружение фигур, обработка изображений.

I. Introduction.

Detection of the graphical primitives on the image relates to the shape extraction problem that can be described as handling differences between various geometrical objects contours. Affine transformations - invariant detection means processing the shapes undergoing affine transformations that include scaling, rotation, and translation. This case supposes providing additional modifications of the original shape detection algorithm. The Hough Transform algorithm represents well-established and computationally efficient technique, which solves the problem of geometrical objects identification on the image.

The HT algorithm was originally developed to extract only straight lines from the image, but then it was extended for extraction different types of complex curves, such as circles and ellipses. In a broader definition, the Hough Transform algorithm can be extended in the sense of the range of identifiable shapes. In other words, this feature provides functionality to generalize the HT algorithm to detect user-defined geometrical objects on the image and solve specific issues connected with the shape identification.

The main idea of the Hough Transform algorithm is defining a mapping between original image space and final parameter space. Image space is a set of points of the input shape, while parameter space means points, which are contained in the input shape function. The algorithm is based on the voting principle in the parameter space: points of the required shape can be determined by finding the local maxima in the final set of votes.

This paper describes use of the HT algorithm for extraction the shapes under affine transformations. Transformed shapes inject strict constraints into the basic algorithm. The constraints are connected with the correct shape identification in conditions of the

specifically represented view of the geometrical primitive. In particular, support of affine transformations - invariant shapes means implementation of additional preprocessing of the image by reduction the shape to the primary form.

This paper is organized as follows. The main part involves definitions of the basic concepts of the HT. Moreover, main part includes literature review and theoretical basis of the Generalized HT within the particular case of the HT - straight lines. Description of the affine transformations - invariant HT algorithm is also included to the main part of the paper. The last part consists of the conclusions about the HT shape identification performance and summary of the researched information.

II. Fundamentals.

The Hough Transform represents an algorithm, which is based on the two different space definitions. The first one, image space, simply consists of the input image points; while the second space, which is called parameter space, defines a set of points constructed from the function parameters of the desired shape. Since we need to detect some specific shape, we may assume that «image space» consists of the input shape points, and the «parameter space» is defined as a set of points of the input function parameters. The main idea of the HT approach is to define some specific mapping between these two spaces. This mapping provides a possibility of shape detection on the parameter space and further transferring of the detected shape to the image space. Strictly speaking, detection of the arbitrary shapes can be implemented by counting the number of points that belong to the parameter function. In this paper, we consider that the input image is given under the condition of the affine transformation. This means that the parameter space has to be complicated with the parameters of the given affine transformation. It is important to notice that the main principle of the algorithm remains the same: affine transformation influences only on the dimension of the parameter space and complexity of the calculations.

III. Related Work

Detection of the specific shapes on the image is a very common problem in computer vision disciplines. The HT algorithm provides one of the most suitable solution for solving the problem of the primitive shapes extraction. There are a lot of methods based on the Hough Transform method implementation, and each of them depends on some specific task requirements. Some of these algorithms are also intended to identify shapes undergoing affine transformations, and the approaches to achieve this goal are very different. In this part of the paper, we introduce some of the articles and sources in which these methods are described.

The earliest studies around the Hough Transform connected with improving original algorithm that aimed to detect only straight lines. For example, the HT was extended to detect quadratic curves (e.g. ellipses and circles), which are defined using analytical function [1]. In addition, generalization of the Hough Transform for non-analytical shapes was proposed by Ballard [2]. As it was mentioned earlier, some of the methods that use the HT algorithm are focused on the extraction the shapes, which are modified with the affine transformations. For example, gathering process of the general Hough Transform algorithm was improved for affine transformations by E. Montiel, A. S. Aguado, M. S. Nixon [3]. This approach extends possibilities of the general HT by increasing the number of shapes and its transformation variations. Another example of related work was proposed by Olivier Ecabert and JeanPhilippe Thiran in 2004 [4]. They introduced an adaptive HT algorithm for the detection of shapes undergoing weak affine transformations. Their approach consists of two identification steps and uses Generalized Hough Transform as a base algorithm for the detection. Despite the fact that many detection methods were proposed, some detection issues remain open. For example, the described methods do not suit the situation when we deal with a noisy image as an input data. Another problem is processing the shape, which has blurred bounds. In these cases, it is impossible to detect the shape using the described algorithms. In this paper, we provide a description of the HT algorithm that is invariant to the shapes undergoing the affine transformations and stable for the listed outstanding situations.

IV. Theoretical basis

A. Genaralized Hough Transform (GHT)

The GHT algorithm is based on the classical HT algorithm and generalizes the idea of the classical approach to non-analytically defined shapes. The main feature of the generalized Hough Transform is the use of the image templates as a mechanism for shape search. The central idea of this search is detection of the small parts of the shape that are matching the template image. Any template shape may be described using only three parameters: y - reference origin of the shape (may be arbitrary choice, but it is usually located inside the shape), s is the scale parameter of the shape, and 0 describes the rotation parameter.

The GHT for detection the straight lines.

In this unit, we introduce the use of the GHT algorithm for the detection of straight lines.

The general form of the equation for all straight lines can be defined as

y = kx + b. (1)

Eq. 1 defines an image space for any straight line. According to the theoretical definition of the Hough Transform, we have to move from the (x, y) space (image space) to the parameter space - (k, b). At this step, there is a need to add one important note. Moving to the parameter space means that we may define another equation:

b = y-kx (2)

and plot a straight line using the Eq.2.

However, there are two problems with this equation. The first one is that we obtain unbounded set of possible values for k and b accordingly, and the second problem is connected with the vertical line equation. In that case, we have a situation with the infinite value for k. In order to avoid these problems, we need to use an alternative representation of the parameter space.

In order to exemplify the parameter space for the given equation, we need to replace Eq. 1 with the polar representation of this equation:

x ■ sin(t) + y ■ sin(t) = r, (3)

where r is the length of a perpendicular line segment from the origin point to the defined line, t is the angle between r and X-axis. For any point (x, y) on this line, r and t have constant values. This Eq.3 is called a parametric representation of the line.

In the parameter space, coordinates of the points in the image space (x, y) have constant values, while r and t are unknown variables. If we plot all possible (r, t) values with known (x, y), the resulting plot represents a sinusoid. This transformation from line to curve that is used in the HT as the preprocessing step before the voting process is implemented.

Affine transformations-invariant HT (ATHT)

The HT algorithm that is stable for affine transformations includes several steps in implementation:

• Reference-table (R-table) generation

This step represents processing of the template image. This includes generation of the look-up table, which contains the data about the boundary points in terms of the angle and distance (gradient value) from the selected reference point. Reference point is an arbitrary point, which is usually located inside the input shape. In this work, it was decided to use pair-edge approach to create reference table. It means that the points with the equal gradient values are collected together.

An example of the R-table is shown below (see TABLE I). The first column contains point pairs numbers of the template shape. The second and the third columns include gradient value (which is also index of the point) and points that have this gradient value respectively. After that, we have to find a middle point of the line, which passes through the each point of the listed pair. Then we may draw a line (L) from the found middle point to the direction of the gradient from the second column. «Intersected points» header means that there are contained the points that are located in the intersection points of the L and the input shape. The last column represents the list of the gradient values of the IP.

№ index (p) points intersected points (IP) indexes of IP

1 <Pi Pl,P2 Pl,P2,~

2 <P2 Ps.PA q3,q4,... P3.P4.-

n <Pn pk.pl Ra.Rb.- Pa.Pb.-

• Edge points processing

This step almost repeats the step of creating R-table. The difference is that we process the image in which template shape has to be found. As it was made in the previous step, we create a table (edge table) where we put the paired points of the input shape and the tangent values of these point pairs.

• Voting process

At this step, we have to fill the accumulator array, which represents potential values of the detectable shape. The procedure is the following:

• loop through all the possible values of the gradient: [ 0 , n] :

• extract from the edge table the record with the obtained value of the gradient;

• find IP for this gradient value as it was made at the step of R-table generation - we obtained gradient value for IP;

• select from the R-table the record, which goes under the equal gradient value;

• calculate parameters for the affine transformation:

P = A p + t, (4)

where P is a point of edge table, p is a point of the reference table, A defines a matrix for parameters of linear transformation, and t is a translation vector:

A =

(A and t are both parameters of the affine transformation);

• it should be taken into account that we obtained 3 pairs of values that go under some value of the gradient (see Table 1) - there are 3 equations that are included in the calculation of the parameters for the previous step;

• calculate coordinates for two points using indexes of IP from the reference and edge table: the pair of values (x, y) for each point is multiplication of A matrix and vector that is defined as sin- and cos- values of the IP index;

• increment counter of the accumulative array at the position [ t x, t y] ;

• potential coordinates of the shape bounds are represented as a local maxima of the accumulative array.

V. Conclusion

The development of computer vision area leads to the necessity of the stable image processing algorithms that have useful applications in a real life. Adaptable method for the detection of the user-defined objects is one of the well-known issues in this industry. The ATHT provides quite appropriate and flexible solution for the mentioned problem. Moreover, there are a lot of application cases for this algorithm. For example, medical examinations and car DVRs may be very suitable use cases for the ATHT. The result of this work will be a desktop application that uses template approach as a shape detection method. Invariance to the affine transformations makes this method more efficient in detection quality in comparing with the other approaches.

References

1. Illingworth J. and Kittler J. The Adaptive Hough Transform. IEEE Trans. Pattern

Analysis and Machine Intelligence, 1987.

2. Ballard D. H. Generalizing the Hough transform to detect arbitrary shapes. Pattern Recognition, 13 (2):111-122, 1981.

3. Montiel E., Aguado A. S., Nixon M. S. Improving the Hough Transform gathering process for affine transformations. Pattern Recognition, 22:959-969, 2001.

4. Ecabert O., Thiran J. P. Adaptive Hough transform for the detection of natural shapes under weak affine transformations. Pattern Recognition, 25:1411-1419, 2004.

5. Kimura T. Watanabe. An Extension of the Generalized Hough Transform to Realize Affine-Invariant Two-dimensional (2D) Shape Detection. Electron. Comm. Jpn. Pt. II, 87(6), pp.58-68, 2004.

6. Montiel E., Aguado A. S., Nixon M. S. Invariant characterisation of the Hough transform for pose estimation of arbitrary shapes. Pattern Recognition, 35:1083-1097, 2002.

7. Ser P. K., Siu W. C. A new generalized Hough transform for the detection of irregular objects. Journal of Visual Communication and Image Representation, 6 (3):256-264, 1995.

i Надоели баннеры? Вы всегда можете отключить рекламу.