News for hackers. Stuff that matters.
Re:Fast and Accurate Document Detection for Scanning by Omnipresent on Tuesday August 09, 2016 @01:47PM (#12256369)
Can someone shed some further light on the hough transform image used in the article [0]. I can't seem to make sense of why the hough transform of the canny edged image looks like that. Are they using an adaptive hough transform?

[0] https://blogs.dropbox.com/tech/2016/08/fast-and-accurate-doc...

Re:Fast and Accurate Document Detection for Scanning by yxiongdropbox on Tuesday August 09, 2016 @01:56PM (#12256464)
Very good question. As stated in the blog post (one line above that figure), we actually used a polar parametrization r=x·sinθ+y·cosθ than the slope-intercept version y=mx+b.

If we were to use y=mx+b, then the hough transform image would look like many straight lines intercepting at a few points, which makes most intuitive sense. The issue with this form is it gets ill-formed when the line becomes near vertical (m goes to infinity).

The polar parametrization r=x·sinθ+y·cosθ solves this problem, and in the hough space, the axes will be r and θ. A point in image space maps to a sinusoid in hough space, which is why the transformed image looks like that.

Re:Fast and Accurate Document Detection for Scanning by Omnipresent on Tuesday August 09, 2016 @02:23PM (#12256692)
Thanks for the additional input. This is really fascinating. Now I remember having seen this in the HoughTransform function in OpenCV [0] but could never make sense to how it relates to the real world

[0]: http://docs.opencv.org/2.4/doc/tutorials/imgproc/imgtrans/ho...