houghlinesp python stackoverflow 1

houghlinesp python stackoverflow

lines = cv2.HoughLinesP(E,rho = 1,theta = 1*np.pi/180,threshold = 100,minLineLength = 100,maxLineGap = 50)

Here is what the above code is Doing:
1. We are using the HoughLinesP function to detect lines in the image.
2. The first parameter is the image we want to detect lines in.
3. The second parameter is the rho value. This is the distance resolution of our accumulator in pixels.
4. The third parameter is the theta value. This is the angle resolution of our accumulator in radians.
5. The fourth parameter is the threshold. This is the minimum number of intersections to “detect” a line.
6. The fifth parameter is the minimum line length. Line segments shorter than this are rejected.
7. The sixth parameter is the maximum line gap. Line segments longer than this are rejected.

Similar Posts