title: How can i run CV_DIST_L2 in opencv 3?
body: <p>Code:<a href="https://stackoverflow.com/questions/14184147/detect-lines-opencv-in-object">Detect Lines Opencv in object</a> -> Amid response</p>
  
  <p>Case1:</p>
  
  <pre><code>for xxx in contours:
     [vx,vy,x,y] = cv2.fitLine(xxx,cv2.cv.CV_DIST_L2,0,0.01,0.01)
  </code></pre>
  
  <p>It throws error - </p>
  
  <blockquote>
    <p>AttributeError: module 'cv2' has no attribute 'cv'</p>
  </blockquote>
  
  <p>Case2:</p>
  
  <pre><code>for xxx in contours:
     [vx,vy,x,y] = cv2.fitLine(xxx,cv2.CV_DIST_L2,0,0.01,0.01)
  </code></pre>
  
  <p>It throws error - </p>
  
  <blockquote>
    <p>AttributeError: module 'cv2' has no attribute 'CV_DIST_L2'</p>
  </blockquote>
  
  <p>I have <code>opencv 3</code> installed in my machine. I am not able to debug this error. Please let me know what mistake am I doing?</p>