remove accumulate pixels and fixed one hough line

asked 2020-07-03 08:09:06 -0500

saeb gravatar image

updated 2020-07-03 08:13:37 -0500

Hello, Please for this probabilistic hough line I have done some filters and detect the edges, but my problem is to remove all accumulated pixels and keep just one line which has the maximum value ! someone have an idea to fix just one line by extracting its maximum pixel value? thanks for all.

my code :

linesP = cv2.HoughLinesP(edges,1,np.pi/180,70,minLineLength=150,maxLineGap=50)
    if linesP is not None:
        for line in linesP: 
            x1,y1,x2,y2=line[0] 
            cv2.line(cdstP,(x1,y1),(x2,y2),(0,255,0),3)

image description

edit retag flag offensive close merge delete

Comments

Can you post original image? Do you wanted one line merely?

supra56 gravatar imagesupra56 ( 2020-07-07 05:09:48 -0500 )edit