Code covered by the BSD License  

Highlights from
Detect lines in grayscale image using Hough Transform

4.0

4.0 | 12 ratings Rate this file 124 Downloads (last 30 days) File Size: 422.9 KB File ID: #9226
image thumbnail

Detect lines in grayscale image using Hough Transform

by Tao Peng

 

02 Dec 2005 (Updated 06 Dec 2005)

Detection of lines (line segments) in a grayscale image using gradient-based Hough Transform.

| Watch this File

File Information
Description

Hough transform for line detection based on image's gradient field.

1. Operates on grayscale images, NOT B/W bitmaps.
2. NO loops involved in the implementation of Hough transform, which makes the operation fast.
3. Able to detect the two ends of line segments.

Required Products Image Processing Toolbox
MATLAB release MATLAB 7.0.4 (R14SP2)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (18)
27 May 2006 David Holden  
10 Mar 2007 Eugene Kon

Exanples no works!!!!

error message:
??? Undefined function or variable 'accumarray'.

??? Undefined function or variable 'accumarray'.
Error in ==> Hough_Grd.m
On line 260 ==> accum = accumarray( sub2ind(prm_accumsize, sub_rho, sub_theta), ...
 

12 Mar 2007 Tao Peng

Hi, Eugene: "accumarray" is a Matlab function available from versions 7.0 (R14). If you are using an older version of Matlab, that is the problem.

01 Nov 2007 K K

ok

15 Dec 2007 venkatesh sathyanaayaa  
28 Apr 2008 yuan xinzhe  
03 May 2008 Vinh Nguyen  
20 Jun 2008 Mona Carlos  
25 Nov 2008 Fady Soliman

Satisfiable results, was looking for the resulting line coordinates and at last i found it here, thank you very much

05 Mar 2009 zhiyang

Hi, I'm a 3rd year university student doing an individual project on digital image processing. I need to detect the needle of a dial gauge. I'm new to MATLAB and would like to ask a few questions.

1. I've loaded the Hough_Grd file on to the editor, and loaded it with my image. But how do I view the final resulting image after the line detection? All I see is the matrix numbers.

2. Is there a way to detect specific lines that go through a point?

Sorry if posting my questions here is not appropriate, and thank you for your time.

20 Jul 2010 m f

Hey, I was wondering, is it possible to move the point that rho is measured from from the top left corner of the image to the center of the image?

08 Aug 2011 Paul Johnson

doesnt work

31 Aug 2011 James  
03 Nov 2011 György Kovács

Unfortunately the comments are not synchronized with the new input and output parameters. What is 'varargin' and 'varargout'?

13 Nov 2011 Manuel

;)

12 Dec 2011 ole andersen

:)

17 Dec 2011 majid

this m code works so well.
but is there any paper ,journal or web page that describe this algorithm?
thanks

14 Feb 2012 Nitin Kumar  
Please login to add a comment or rating.
Updates
06 Dec 2005

Updated on Dec. 05, 2005.

Tag Activity for this File
Tag Applied By Date/Time
image analysis Tao Peng 22 Oct 2008 08:08:17
line detection hough transform segment gradient grayscale Tao Peng 22 Oct 2008 08:08:18
image analysis halit 22 Jun 2011 09:57:45
image analysis Stephan Walter 28 Sep 2011 09:13:33
image analysis manoranjan kachhap 07 Nov 2011 09:38:59
line detection hough transform segment gradient grayscale manoranjan kachhap 07 Nov 2011 09:39:05
image analysis rijdzuan sampoerna 21 Dec 2011 08:47:40
line detection hough transform segment gradient grayscale Aparajita 21 Jan 2012 22:08:22

Contact us at files@mathworks.com