Ask Your Question
0

Parameters in Hough Transform

asked 2017-05-02 08:06:56 -0600

Kenny Karnama gravatar image

Hi guys, i have read a journal about text line extraction using hough transform. Basically, there are 6 steps before we process to text line extraction using hough transform. I have done three previous steps : grayscale conversion, binarization and edge detection with sobel masks. And in the fourth step, we have to use hough transform in image generated from edge detection to detect text line. There are four parameters mentioned in the journal : deltaRo, deltaTheta, startTheta, endTheta, connectDistance and pixelCount.

I have read in opencv documentation that there is hough transform function --> void HoughLines(InputArray image, OutputArray lines, double rho, double theta, int threshold, double srn=0, double stn=0 )

I want to ask, where should i set parameter startTheta, endTheta, connectDistance and pixelCount ? Should i implement it manually ? Thanks

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
1

answered 2017-05-02 18:28:27 -0600

Tetragramm gravatar image

The HoughLines function also has the optional parameters min_theta = 0 and max_theta = CV_PI, which is the start and end theta.

The pixelCount parameter from the paper is the same as threshold.

And connectDistance sounds more like something for HoughLinesP, not HoughLines. That would be the maxLineGap parameter.

Make sure you're using the correct function, the two are very similar.

edit flag offensive delete link more

Comments

thanks for the answer.

Kenny Karnama gravatar imageKenny Karnama ( 2017-05-02 21:24:40 -0600 )edit

Question Tools

2 followers

Stats

Asked: 2017-05-02 08:06:56 -0600

Seen: 725 times

Last updated: May 02 '17