title: Find straight line segments in image using OpenCV
body: <p>Using OpenCV's findContours() I have a list of contours in an image.  I'm interested only in the straight lines, so if they are too 'squiggly' they should be rejected.  The question is how to evaluate how straight each contour is?</p>
  
  <p>I looked at fitLine(), but there doesn't appear to be a goodness-of-fit measure returned.  I could evaluate this myself using the returned line.</p>
  
  <p>I looked at arcLength() with the aim to compare this to the bounding rectangle dimensions, but even for somewhat straight lines, the arc length can be relatively long if the contour points are dense.</p>
  
  <p>I could find the convex hull and compare to the bounding rectangle dimensions, but I'd have to analyze the convexity defects.</p>
  
  <p>Is there a moment that would be useful here?</p>