title: Lane detection in a Binary Image (formed by cloud points)
body: <p>I have been trying to detect lanes in Binary Image which I created using point clouds but for some reason I am not able to get it right. Below is the input Image</p>
  
  <p><a href="https://i.stack.imgur.com/T8tER.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/T8tER.jpg" alt="Input Image"></a></p>
  
  <p>This is the image I get after using canny</p>
  
  <p><a href="https://i.stack.imgur.com/Y0NDS.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Y0NDS.jpg" alt="Canny Edges"></a></p>
  
  <p>But the final Image after Hough transform doesn't looks good. I tried changing the parameters but that didn't help much.</p>
  
  <pre><code>img = cv2.imread('cp.jpg')
  gray = cv2.cvtColor(img,cv2.COLOR_BGR2GRAY)
  blurred = cv2.GaussianBlur(gray, (3, 3), 0)
  edges = cv2.Canny(blurred,10,150,apertureSize = 3)
  cv2.imwrite('canny_image.jpg',edges)
  cv2.waitKey(0)
  minLineLength = 1
  maxLineGap = 5
  lines = cv2.HoughLinesP(edges,1,np.pi/180,200,minLineLength,maxLineGap)
  for arr in lines:
   x1,y1,x2,y2 = arr[0]
   cv2.line(img,(x1,y1),(x2,y2),(0,0,255), 4)
  
  cv2.imwrite('hough.jpg',img)
  cv2.waitKey(0)
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/yesu4.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/yesu4.jpg" alt="Final iMAGE"></a></p>