title: Find Line in skeleton Images OpenCV python
body: <p>I have the following picture:</p>
  
  <p><img src="https://i.stack.imgur.com/Y1Yq9.png" alt=""></p>
  
  <p>and I want to find the lines to do some calculations, average length etc ...
  I tried to use <code>HoughLinesP</code>, but it doesn't find the lines. How can I do?</p>
  
  <p>This is my code:</p>
  
  <pre><code>sk=skeleton(mask);
  rows, cols = sk.shape
  imgOut=np.zeros((rows,cols,3),np.uint8)
  imgOut[:,:,0]=0
  imgOut[:,:,1]=0
  imgOut[:,:,2]=0
  
  
  minLineLength = 0
  maxLineGap = 0
  
  lines = cv2.HoughLinesP(sk,1,np.pi/180,100,minLineLength,maxLineGap)
  for x1,y1,x2,y2 in lines[0]:
      cv2.line(imgOut,(x1,y1),(x2,y2),(0,255,0),2)
  
  print len(lines[0])
  
  cv2.imshow('skel',sk)
  cv2.imshow('Line',imgOut)
  cv2.imwrite('Out.bmp',imgOut)
  </code></pre>
  
  <p>Output:</p>
  
  <p><img src="https://i.stack.imgur.com/XbRhA.png" alt=""></p>
  
  <p>If i change the parameters of <code>HoughLinesP</code> I only get fragments of line, not a solid line.</p>