Oriented Hough Transform
- From: "Mittal" <mittalgbhatt@xxxxxxxxx>
- Date: 23 Aug 2005 08:20:24 -0700
Hi,
I am trying to detect lines in a grayscale image by using the
Hough-Transformation.
I am trying to use the direction of edges as an input to the Hough
transform, not only the position of edges.
I found, however, that the direction has to be very accurate,
otherwise I get garbage. I am using a slight variation of the canny
edge detector for getting my edge image and the edge direction image by
the direction definition as
direction = atan2(dy,dx)
dy,dx from canny detector ( I have also tried using sobel
operator just for the edge direction)
I checked the edge-direction values in the matrix and although they
fall in considerable range of what they should be, they are not yet
accurate enough to be used as the sole input to the transform (like in
oriented HT).
So instead of relying solely on the direction of the edge to create a
vote in the hough matrix for the given edge-point, I simply add more
weight to the (r,theta) pair in HoughMatrix corresponding to the edge
direction of that particular edge-point.
And instead of adding extra weight just to this parameter space cell, I
also add equal weight to a range of cells around the corresponding
(r,theta) cell.
So, lets say I have an edge point at I(x,y) with edge direction of phi.
I calculate
theta_xy = phi + pi (since edge direction is perpendicular to the line
orientation)
and then i take a range of theta_xy
theta_range = theta_xy -+ error
where
error = step of theta (in my case right now it is pi/360=0.0087)
and i find corresponding range of r_xy
then i add more weight to the cells in this range for this edge-point
and less weight to the other cells filled in the Hough matrix by this
edge-point.
Although this is not faster than original Hough Transform (infact a bit
slower), I can get the most prominent edge lines with this method. But
what I was trying to achieve was not just to have the lines with most
edge-points on it but rather lines that have more pixels having same
edge direction. Essentially, to achieve what oriented-fast hough
transform could achieve if the edge-orientation was really very
accurate.
Has any one tried something like this or has an idea of how to get very
accurate edge-orientation for given image so that I can use the actual
oriented-fast hough transform algorithm? Any ideas, suggestions or tips
will be much appreciated.
Thanks in advance.
-Mittal
.
- Follow-Ups:
- Re: Oriented Hough Transform
- From: Bob Alvarez
- Re: Oriented Hough Transform
- Prev by Date: Diffing between 2 images.
- Next by Date: Re: Oriented Hough Transform
- Previous by thread: Diffing between 2 images.
- Next by thread: Re: Oriented Hough Transform
- Index(es):