I am trying to detect near-vertical lines in an image using ippiHoughLine_Region_8u32f_C1R.
The documentation doesn't define theta, but it is apparently the angle of the normal to the line, relative to horizontal. So a vertical line in the image would be 0 radians, and as that line rotated counter-clockwise the angle increases.
The function is working for me for lines that are vertical or positive theta. But I can't get the correct angle for a line that is near-vertical but sloped the other way (slighly clockwise of 0), what would normally be negative theta. Regardless of the range parameters I specify (for some reason named dstRoi in the arguments), I cannot get the angle to be found correctly. The angle theta is always small and positive, as if it is reflected about the origin. I expect theta to either be a small negative number, or close to 2*PI.
This seems to be a bug in the function, or am I doing something wrong?
Yes, it should bethe angle of the normal to the line.
Some explanation in manual :
The Hough transform is a general technique that allows to detect the flat curves in the binarised
images [Gon93]. The current version of Intel IPP implements the detecton of the straight lines
that are defined by the parametric equation
r = x*cos( ) + y*sin( ), where r and are the length and angle from the origin of a normal
to the line respectively.
this function performs detection of the straight line defined
by the equation given at the beginning of section Hough Transform. Only lines line
the parameters satisfying the following conditions are detected:
dstRoi. theta line
where n = 0. pLineCount.
You problem looks familir. do you have code to show the problem as the discussion http://software.intel.com/en-us/forums/showthread.php?t=76157and http://software.intel.com/en-us/forums/showthread.php?t=80153?
I would suggest updating the documentation tosay that rhocan be negative andthat it isnot the "length from origin".