Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>I'm Martin's friend who was working on this earlier this year. This was my first ever coding project, and kinda ended in a bit of a rush, so the code needs some errr...decoding... I'll give a few tips from what I've seen you doing already, and then sort my code on my day off tomorrow.</p> <p>First tip, <code>OpenCV</code> and <code>python</code> are awesome, move to them as soon as possible. :D</p> <p>Instead of removing small objects and or noise, lower the canny restraints, so it accepts more edges, and then find the largest closed contour (in OpenCV use <code>findcontour()</code> with some simple parameters, I think I used <code>CV_RETR_LIST</code>). might still struggle when it's on a white piece of paper, but was definitely providing best results. </p> <p>For the <code>Houghline2()</code> Transform, try with the <code>CV_HOUGH_STANDARD</code> as opposed to the <code>CV_HOUGH_PROBABILISTIC</code>, it'll give <em>rho</em> and <em>theta</em> values, defining the line in polar coordinates, and then you can group the lines within a certain tolerance to those. </p> <p>My grouping worked as a look up table, for each line outputted from the hough transform it would give a rho and theta pair. If these values were within, say 5% of a pair of values in the table, they were discarded, if they were outside that 5%, a new entry was added to the table.</p> <p>You can then do analysis of parallel lines or distance between lines much more easily.</p> <p>Hope this helps.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload