title: Why the function cv2.HoughLinesP() has different effects?
body: <p>I learn in this <a href="http://opencv-python-tutroals.readthedocs.io/en/latest/py_tutorials/py_imgproc/py_houghlines/py_houghlines.html?highlight=houghlinesp" rel="nofollow noreferrer">link</a>.</p>
  
  <p><strong>This is the original picture：</strong>
  <a href="https://i.stack.imgur.com/YUSVM.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/YUSVM.png" alt="enter image description here"></a></p>
  
  <p><strong>My test code:</strong></p>
  
  <pre><code>import cv2
  import numpy as np
  
  img = cv2.imread( 'E:/image/sudoku.png' )
  gray = cv2.cvtColor( img,cv2.COLOR_BGR2GRAY )
  edges = cv2.Canny( gray,50,150,apertureSize = 3 )
  minLineLength = 100
  maxLineGap = 10
  lines = cv2.HoughLinesP( edges,1,np.pi/180,100,minLineLength,maxLineGap )
  for line in lines:
      for x1,y1,x2,y2 in line:
          cv2.line( img,( x1,y1 ),( x2,y2 ),( 0,255,0 ),2 )
  cv2.imwrite( 'E:/image/myhoughlinesp.jpg',img )
  cv2.imshow( '1',img )
  cv2.waitKey(0)
  </code></pre>
  
  <p><strong>The result of my code running：</strong>
  <a href="https://i.stack.imgur.com/WaMDm.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/WaMDm.jpg" alt="enter image description here"></a></p>
  
  <p><strong>But the picture generated by the official website is like this：</strong>
  <a href="https://i.stack.imgur.com/PDlUo.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/PDlUo.jpg" alt="enter image description here"></a></p>
  
  <p><strong>If you don't change the code.(Use that link's code),the generated picture is like this:</strong>
  <a href="https://i.stack.imgur.com/ct0gH.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ct0gH.jpg" alt="enter image description here"></a></p>
  
  <p>When I change the code, although there are a lot of green lines,but doesn't have the official website's good effect.</p>
  
  <p>Why do I have a different picture from the official website?</p>