Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Use clean new lines by drawing them from the corners of the contour

Use clean new Make sure your parameters aren't giving you excess lines. After this to find corners, there's a whole complex manual method of running all the lines by drawing them from the corners of the contourthrough many while loops and calculating their slopes to detect whether they are horizontal or vertical. check your vertical lines separately for highest and lowest y values. Make sure you do this separately for vertical lines on specific x ranges to differentiate between right line and left line

Make sure your parameters aren't giving you excess lines. lines by calling OpenCV's convexHull function found here: http://docs.opencv.org/doc/tutorials/imgproc/shapedescriptors/hull/hull.html

After this to find corners, there's a whole complex manual method of running all the lines through many while loops and calculating their slopes to detect whether they are horizontal or vertical. check your vertical lines separately for highest and lowest y values. Make sure you do this separately for vertical lines on specific x ranges to differentiate between right line and left line