Distance and Angles Effect in Hough Transform for line detection Qussay A. Salih Abdul Rahman Ramli Faculty of Engineering University Putra Malaysia Faculty of Information Technology Multimedia University Tel:+603-8312-5498 Fax:+603-8312-5264 . Abstract In this paper, we study the Hough transform theory images by generating the peak point from gray scale images, and seek for the effect caused by the distance and the angles. Lines will appear on the edge of images, which has been processed edge detection theorem. The input to a Hough transform is normally an image that has been edge detected with a Robert, Sobel or Canny edge detector, for instance. Problems occur in lines detection due to several reasons. They are noise, low resolution and un-sharp object boundaries. The Hough Transform is a standard tool in image analysis that detects lines in an image, by grouping isolated collinear or almost collinear points into image structures. To simplify the computation, the paprameter can be divbided into distance and angles paprameters where both parameter to achieve the enhancment of straight line detection using Hough Transform. Hough Transform can be regarded as an edge linker since it groups edge pixels together and describes by a higher order entity such as a line equation. However the Hough transform can be used to extract circles and even generalised (perhaps nonsymmetrical) shapes. In this case it is more like a pattern matcher. Even though that the Hough transform is invariant to rotation and translation. Key word: (Auto lines, Hough transform) Detection 1. Introduction Hough Transforms method is useful to find simple shapes straight lines, circles, ellipses in images [2]. Man-made objects, for instance, frequently have shapes with straight and circular edges, which project to straight and elliptical boundaries in an image[3]. One kind of algorithm for identifying these extended image features involves following edges, and linking together edge lets which seem to lie on straight lines or smooth curves [4]. An alternative approach, which is the subject of this teach file, involves accumulating the evidence provided by each edge element for the shape being sought. Since, usually, the shape can be at any position in the image, any orientation and any size as well, the whole set of different possibilities has to be taken into account. The Hough transform used in a variety of related methods for shape detection [1]. The goal of this paper is to study the effect of the distance and angles, to achieve the accurate image detection for straight lines using Hough Transform method. 2. Implementation As a Hough transform method, assume that we have some data points in an image, which are perhaps the result of an edge detection process, or boundary points of a binary. To recognize the points that form a straight line in an image has two ends, for Hough transform finds the infinite straight lines on which the image edges lie. In Figure below a points (x',y') in the image, all lines which pass through that pixel have the form y’=mx’+c (1) for varying values of m and c. See Fig.1. For more accuracy an alternative representation of a line is given by x cosθ + y sinθ =r Where r is the distance of the line from the origin and θ is the angle between this perpendicular and x-axis [8]. Our parameter space is presented now in θ and r, where 0 ≤ θ ≤ 2π and r is limited by the size of the image. x cosθ + y sinθ = r1 Fig. 1 Lines through a point There are infinitely many lines that pass through this point, but they all satisfy the condition [5][6]. If we divide parameter space into a number of discrete accumulator cells we can collect votes in (c, m) space from each data point in (x, y) space. Peaks in (c, m) space will mark the equations of lines of co-linear points in (x, y) space [7]. By Quantise (m,c) space into a twodimensional array A for appropriate steps of m and c. Initialise all elements of A(m,c) to zero, straight line well be detected in an image. For the pixel (x',y') which lies on some edge in the image, we add 1 to all elements of A(m,c) whose indices m and c satisfy y' = mx' + c. Fig. 2 Line Representations (3) According to the equation (3), that a point in (x, y) space is now represented by a curve in (r, θ) space rather than a straight line, the line position in the image has been represented by coordenates corresponding to the coloum and row indices of array elements, the hough transform used the data from edge detector operator, however you need to creat an array and initialize it to zero [8]. And loop scan the edge array, for each non-zero pixel enccunteard, the proposed method appear the effect of the distace and angles [9]. As mentioned befor, Hough transform can be used to detect other shapes in an image as well as straight lines. 3. Methodology The Hough transform is a method that can be used to find features of any shape in an image. To find straight lines accurately we need to find and manipulate the variables that can guide us to best result in the other hand the challenges are where the computational complexity of the method grows rapidly with shapes that are more complex. In this paper we developed a program for straight line detection by employing Hough transfrom method with using MATLAB software. In Figure (3) illustrated, the flow operation and the procedure of the program applied on the image. The following are steps to straight line detection implementation. • Run edge detection operator for the image has been captured. the edge operator will implement some theory such as sobel, prewit and canny. One should choose the right theory for a particuler image to get the best result. • Suggest a suitable values of distaance and angles of the image untill a better result is obtaind. • Detecte the peak point in the image histogram from paramiter space by changing the image from image space to parametter space. • Apply the Hough transfrom for straight line detection as illustrated in Figure (3) to detect the straight lines. 4. Result By using the formulas in the previous section, the Hough transform for image straight line detection was achieved and the study according of effect of distance and angles appear in these two images each containing of a real object inside. The object in the second image appears unclear. By changing the distance and angles during line detection for the image, we can see the effect of the parameters on the line detection. We adjust the distance and angles between pixels from the range 50 to 250 by applying the suitable edge detection theory for the image. The canny edge filter is choused for the images because it gives the best edge detection. 5. Discussion We design this section by summarizing the experimental results of straight line detection using Hough transform method. In this paper, we develop image straight line detection software using MATLAB compiler. We explain these results by highlighting the H.T method, way for line detection, and the important variables, which will effect to detect the object in image. Where there are two different parameters called distance and angles, which applied in parameter space. Consider that directly implementing the Hough transform for lines detection would require a peak point in the parameter space. The peak points are describing all the lines in the image. The more point detected, more lines will appear and hence better the result. The graph of Figure (4) are the results for first image, it shows the number of lines accurately and correctly found, plotted against the number of distance when the angle is fixed at 200o, for the pentagon object, the number of lines and peak point appear in the image space started from 3 until 5, both factors increased in the same way through the graph, the number of 5 indicated the final result of the image detection seems the object being detected is a pentagon. In the same time graph of Figure (4) shows the number of lines accurately and correctly found, plotted against the number of Angles when the distance is fixed at 200o, for the pentagon object, the number of lines and peak point appear in the image space started from 3 until 5, the number of lines detected are change from 6 to 5 where the number of peak points increased from 3 to 5, when the angle a is increasing, from the graph, we can notice that the number of peak point is not moving along with the number of lines. The graph of Figure (5) are the results for second image, it shows the number of lines correctly found, plotted against the number of Angles when the distance is fixed at 200o, 3D object, the number of lines and peak point appear in the image space started from 4 until 20, both factors increased in the same way through the graph, the number of 20 indicated the final result of the 3D object image detection, for Hough transform lines detection. In the same graph of Figure (5) shows the number of lines correctly found, plotted against the number of distance when the angle is fixed at 200o, for the 3D object, the number of lines and peak point appear in the image space started from 4 until 20 in best case, both factors increased in the same way through the graph, the lines appear are not exactly on the edge of the 3D object, when the angles changed, the number of lines changed to. The minimum number of lines detected in the image is 17. These lines give the exact shape of the edge and lied on the edge of the image. The peak points and the lines achieved on the two test images, by using the program illustrated in the tables (1, 2). 6. Conclusion In this paper, we have proposed an algorithm for line detection using the Hough transform. We considered the task of finding the unique lines passing through an n-tuple of pixel in the image. From the result, we can conclude that the larger is the angle, the clearer and accurate the lines will appear. For the unclear image, H T can detect the line for the edge of the object and gives all the possibility of the shape for the object. The object will be detected as several pieces of object by the theory. This is differ from the edge detection which just gives the overall shape of the distance and angles. A good result can be obtained by adjusting the both parameters. The distance will bring the effect on the number of lines where as the angles will effect the accuracy of the lines to the edges illustrated in Figure (6). The larger distance is more number of lines can drawn in image space. The angles will give a best result for an object at a particular value only. 7. References [1] P.R. Bevington and D.K. Robinson. Data Reduction and Error Analysis for the Physical Sciences. McGraw-Hill, second edition, 1992. [2] R.C. Lo and W.H. Tasi, Gray-scale Hough Transform for Thick Line detection in Gray- Scale images, “ pattern recognition, Vol, 28, No.5, pp.647-661,1995. [3] K.Murakami and T.Naruse, High speed Line detection by Hough transform in local area. In proceeding of the internation conference on pattern recognition (ICPR’00), 2000. [4] M .Nakanishi and T.Ogura, Real-Time extraction using a highly parallel Hough Transform board. In proceeding of the International conference on Image processing (ICIP’97)1997. [5] A.L. Kesidis and N. Papamarkos. On the Inverse Hough Transform. In IEEE Transactions on pattern and machine intelligence, Vol 21, No. 12, Dec 1999. [6] D. X. Le, G. Thoma. Document skew angle detection algorithm. Proc. SPIE, 1993 Symposium on Aerospace and Remote Sensing-Visual Information Processing II, Orlando, FL, 14-16, Vol. 1961, pp. 251-262, April 1993 [7] J.Hun Jang and K.Sang Hong. Detection of linear Bands in Gray-Scale Image Based on the Euclidean Distance Transform and the Hough transform. In proceeding oft eh 10’th international conference on image analysis and processing 1998. [8] P.Franti, A. Mednonogov and H. Kaliviainen. Hough transform for Rotation invariant matching of line drawing Image. In proceeding of the International conference on pattern Recognition (ICPR’00), 2000. [9] K.Murakami and T. Naruse. High speed line detection by Hough Transform in local Area In proceeding of the conference on pattern Recognition (ICPR’00) 2000. [10] Dong-Gyu Si and Rae-Hong Park. Two-dimensional object alignment based on the robust oriented Hausdorff similarity measure. Image Processing, IEEE Transactions, 2001. Captured image Edge detection operator Suggested value of angles Suggested value of distance Peak point detector Peak point accumulator Inverse Hough Transform Straight line detected Fig. (3) Flow chart implement the line detection of the Hough transform on 3D images. 6 5 Peak point Disance 4 Line Distance Num ber of Peak 3 Point/Lines Peak point Angles 2 Lines Angles 1 0 50 100 150 Distance/Angles 200 250 30 25 Peak point Distance 20 Fig.Number (4) Distance/Angles vs. number of peak point / lines for pentagonLine image. Distance of Peek Point/Lines 15 Peak point Angles 10 Lines Angles 5 0 50 100 150 200 250 Distance/Angles Fig. (5) Distance/Angles vs. number of peak point / lines for 3D object image. Table .1 Peak points of distance and angles Image No. Image feature Distance Angles 50 100 150 200 250 50 100 150 200 250 Image 1 Pentagon 3 4 5 5 5 3 4 5 5 5 Image 2 3-D object 4 6 14 21 20 24 22 18 21 17 Table .2 Lines detected of distance and angles Image No. Image feature Distance Angles 50 100 150 200 250 50 100 150 200 250 Image 1 Pentagon 3 4 5 5 5 5 5 5 5 5 Image 2 3-D object 4 6 14 21 20 21 17 22 24 18 The pentagon image. The Original image The Edge detection image The peak point for varied distance and lines detected of the pentagon object Distance=250 The 3D object image Distance=250 The Original image The edge detect image The peak point for varied distance and lines detected of the 3D object Distance=250 Distance=250 The peak point for the angles and lines detected for the 3D object . Angles=250o Angles=250o Accuracy Ratio 100 80 60 3 D object 40 Pentagon 20 0 50 100 150 200 250 Lines accuracy, Pear Angles Fig (6) Lines Detected Accuracy Pear Different scale of Angles
© Copyright 2026 Paperzz