Code covered by the BSD License  

Highlights from
Detect lines in grayscale image using Hough Transform

4.0
4.0 | 18 ratings Rate this file 110 Downloads (last 30 days) File Size: 423 KB File ID: #9226
image thumbnail

Detect lines in grayscale image using Hough Transform

by

Tao Peng

 

02 Dec 2005 (Updated )

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   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (25)
30 Dec 2013 hao

hao

xcxx

Comment only
08 Jun 2013 Perig Vennetier

Perig Vennetier

 
02 May 2013 Lucia Morales-Rivas

Lucia Morales-Rivas

I think matlab R2010b fails importing the image as an argument of your function, I used "imread" instead. Nice results, thanks.

20 Apr 2013 xin

xin

Great code !The author show us with the parameter
domain with the color image.It's vivid!The result is very fantastic!

14 Feb 2013 Sid

Sid

 
26 Sep 2012 Gintautas

Gintautas

 
06 Jul 2012 Ryan

Ryan

 
14 Feb 2012 Nitin

Nitin

 
17 Dec 2011 majid

majid

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

12 Dec 2011 ole andersen

ole andersen

:)

13 Nov 2011 Manuel

Manuel

;)

03 Nov 2011 György Kovács

György Kovács

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

Comment only
31 Aug 2011 James Kerns

James Kerns

 
08 Aug 2011 Paul Johnson

Paul Johnson

doesnt work

20 Jul 2010 m f

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?

Comment only
05 Mar 2009 zhiyang

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.

Comment only
25 Nov 2008 Fady Soliman

Fady Soliman

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

20 Jun 2008 Mona Carlos  
03 May 2008 Vinh Nguyen  
28 Apr 2008 yuan xinzhe  
15 Dec 2007 venkatesh sathyanaayaa  
01 Nov 2007 K K

ok

Comment only
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.

Comment only
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), ...

Comment only
27 May 2006 David Holden  

Contact us