back

by iamflimflam1·9y ago·view on hn ↗
I've got a very old and slightly broken blog post on what I was doing:

https://www.cmgresearch.com/2009/08/14/How-does-it-all-work....

My approach was to adaptive threshold the image and then assume that that the object of interest was the biggest connected region in the image. Then run that though rectangle detection.

Have you tried setting the aspect ratio and minimum width on the Vision rectangle detector? That might filter out any nonsense.

1 comments
The parameters are not very well documented. (Or at least it wasn't when I was coding that part). But yeah I did get those set finally.

Whatever I do though I can't get it to recognize any rectangles here: http://www.telegraph.co.uk/news/science/science-news/9359579...

For our demo video we ended up photoshopping out the horizontal line right above it and that seemed to work.

Just tried it on my old app and it worked well :)

I think you'll have to roll your own rectangle detection and use heuristics to make it better.

So in mine I assume that the connected object in the thresholded image with the largest number of pixels must be the puzzle. That makes it a lot easier.

Good luck!

Cool I'll put that on my todo list. Thanks!