Upcoming SlideShare
×

# Linear Hough TRansform

2,180 views
1,878 views

Published on

Hough transform has vital role in curve fitting and lines detecting.this ppt is focused on linear Hough transform and its implementation using MATLAB,education

0 Likes
Statistics
Notes
• Full Name
Comment goes here.

Are you sure you want to Yes No
• Be the first to comment

• Be the first to like this

Views
Total views
2,180
On SlideShare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
102
0
Likes
0
Embeds 0
No embeds

No notes for slide

### Linear Hough TRansform

1. 1. LINEAR HOUGH TRANSFORM 1 VISHWAKARMA INSTITUTE OF TECHNOLOGY,PUNE P A T I L V A I B H A V V . G R . N O . : - 1 2 2 0 3 7 R O L L N O . : - 1 8 D I V - N
2. 2. What is HT? Q. What is this? It is an image consist of lines in some sort of fashion 2 VISHWAKARMA INSTITUTE OF TECHNOLOGY,PUNE
3. 3. Introduction:  It is invented by Paul Hough.  The Hough transform was patented in 1962 with name ‘method and means for detecting complex patterns ’ the patent uses slope intercept model for straight lines.  It is redefined by R. O. Duda and P.E. Hart in 1972 and known as ‘GENERALIZED HOUGH TRANSFORM’. 3 VISHWAKARMA INSTITUTE OF TECHNOLOGY,PUNE
4. 4. Basics of Image Processing:  Image: image is two dimensional matrix. The elements of matrix represent intensity levels.  Types of image: 1)Binary image. 2)Grayscale image. 3)True Colour image. 4)Indexed image. grayscale image binary image 4 VISHWAKARMA INSTITUTE OF TECHNOLOGY,PUNE
5. 5. Basics of Image Processing:  Edge: edge is high frequency content in image. It is the portion of image where intensity changes significantly. %matlab command im=imread('C:Documents and Settingsvaibhav patilDesktopprintoutscharlie_grayscale.jpg'); Im1=rgb2gray(im); im2 = im2bw(im,level); im3= edge(Im); 5 VISHWAKARMA INSTITUTE OF TECHNOLOGY,PUNE
6. 6. Basics of Image Processing  Hough space: Hough space is same as Cartesian co- ordanate system except,  it’s x-axis represent angles in accumulator.  It’s y-axis represent distance of line from agreed origin. Ө=0 Ө=180 ρ =0 ρ =100 6 VISHWAKARMA INSTITUTE OF TECHNOLOGY,PUNE
7. 7. Linear Hough Transform  The linear Hough transform is popularly used for detecting lines.  The dimension of accumulator equals to number of unknown parameters i.e. 2  One dimension of this matrix is quantized angle ө and other is distance ρ.  Each element of matrix has a value equal to number of points that are positioned on line represented by quantized parameters. Edge detection LHT Image o/p Accumulator 7 VISHWAKARMA INSTITUTE OF TECHNOLOGY,PUNE
8. 8. Algorithm  For each data point, a number of lines are plotted going through it, all at different angles.  For each solid line a line is plotted which s perpendicular to it and which intersects the origin these.  The length and angle of each perpendicular is measured and saved in accumulator.  This is repeated for each point.  A graph of the line lengths for each angle, known as a Hough space graph, is then created. 8 VISHWAKARMA INSTITUTE OF TECHNOLOGY,PUNE
9. 9. Let see how it works? Angle Distance 0 40 30 69.6 60 81.2 90 70 120 40.6 9 VISHWAKARMA INSTITUTE OF TECHNOLOGY,PUNE
10. 10. Continued…. 10 VISHWAKARMA INSTITUTE OF TECHNOLOGY,PUNE
11. 11. Accumulator plotted in Hough space VISHWAKARMA INSTITUTE OF TECHNOLOGY,PUNE 11
12. 12. Example: bit map image image edge detected image (degrees) x R (x ) 0 20 40 60 80 100 120 140 160 180 -150 -100 -50 0 50 100 150 12 VISHWAKARMA INSTITUTE OF TECHNOLOGY,PUNE
13. 13. Matlab program:  %haugh transform  t= imread('C:Documents and Settingsvaibhav patilDesktopuntitled.bmp');  v=rgb2gray(t);  I=imresize(v,[255,255]);  %convert image into edge image  BW = edge(I);  subplot(2,1,1);  imshow(I);  title('bit map image image');  subplot(2,1,2);  imshow(BW);  title('edge detected image');  %calculate hough transform  theta = 0:180;  [R,xp] = radon(BW,theta);  figure;  imagesc(theta, xp, R);  xlabel('theta (degrees)');  ylabel('xprime');  title('R_{theta} (xprime)'); 13 VISHWAKARMA INSTITUTE OF TECHNOLOGY,PUNE
14. 14. Advantages & Disadvantages  Advantages: 1)Conceptually simple technique. 2)Handles missing occluded data gracefully. 3) Can be adapted for many other forms.  Disadvantages: 1)Large storage space required. 2)Checks for only one type of object. 14 VISHWAKARMA INSTITUTE OF TECHNOLOGY,PUNE
15. 15. Conclusion Although it is the commonly preferred method for lines & circle detection, the HT in general has several limitations making it challenging to detect anything other than lines and circles. This is especially the case when more parameters are needed to describe shapes, this add more complexity. 15 VISHWAKARMA INSTITUTE OF TECHNOLOGY,PUNE
16. 16. THANK YOU 16 VISHWAKARMA INSTITUTE OF TECHNOLOGY,PUNE
17. 17. Questions VISHWAKARMA INSTITUTE OF TECHNOLOGY,PUNE 17