Live data from Hacker News

Page Dewarping

mzucker.github.io

11–20 of 75 posts

Re: Page Dewarping

#11
post #2

This problem is fundamentally different with stereo images; there is a hope of reconstructing the exact 3D geometry of the page before flattening, rather than inferring from content. An iPhone app that did this would do well.

That sounds like a good idea and pretty straightforward to implement -- now I almost wanna try it...

Re: Page Dewarping

#12
post #7

I wonder if someone has tried to dewarp whole book from a video when flipping through it. I imagine that could be handy way to copy the whole book.

Page warp becomes but a tiny part of the problem with a page-flip video – now you have motion blur, varying exposure, resolution, noise, and depth of field to worry about. Maybe if you had a camera capable of recording extremely high frame rates at high resolution (probably north of 120fps @ 1440p), a high-intensity, diffuse light source, and a lens with a tight aperture / narrow focal length, you’d at least have something to work with.

Re: Page Dewarping

#13
post #8

This is great! My wife is a music teacher and often scans sheet music so that it's more portable. She has been asking me for a while for something exactly like this. I'll have to tweak it to work on sheet music, since I imagine his methods to identify lines of text won't work for the music staff out of the box.

He mentions adding line detection for tables, which should be a good start for sheet music.

Re: Page Dewarping

#14
post #7

I wonder if someone has tried to dewarp whole book from a video when flipping through it. I imagine that could be handy way to copy the whole book.

Page warp becomes but a tiny part of the problem with a page-flip video – now you have motion blur, varying exposure, resolution, noise, and depth of field to worry about. Maybe if you had a camera capable of recording extremely high frame rates at high resolution (probably north of 120fps @ 1440p), a high-intensity, diffuse light source, and a lens with a tight aperture / narrow focal length, you’d at least have som…

Doesn't that describe most modern cell phone cameras?

Re: Page Dewarping

#15
I use Microsoft's "Office Lens" app on my Android phone all the time, like a "smart camera" which automatically squares off and white-balances each photo of a page (usually mail or forms filled in by hand). It can't handle warped pages though, so I hope they add something like this!

Re: Page Dewarping

#17
post #10

Thanks for the feedback, everyone -- happy to answer questions here or in the Disqus comments on my blog.

This is really interesting, thanks!

If you decide to try to make this faster, check out ceres[0] a non-linear least squares optimisation framework that does automatic differentiation using a clever C++ template hack.

I've used it a few times to solve these kind of problems and found it to be very good!

[0] http://ceres-solver.org/

Re: Page Dewarping

#18
post #8

This is great! My wife is a music teacher and often scans sheet music so that it's more portable. She has been asking me for a while for something exactly like this. I'll have to tweak it to work on sheet music, since I imagine his methods to identify lines of text won't work for the music staff out of the box.

You could also try ScanTailor: http://scantailor.org/

Re: Page Dewarping

#19
post #8

This is great! My wife is a music teacher and often scans sheet music so that it's more portable. She has been asking me for a while for something exactly like this. I'll have to tweak it to work on sheet music, since I imagine his methods to identify lines of text won't work for the music staff out of the box.

ScanTailor [1] also implements automatic dewarping and is overall great for scan postprocessing.

[1] http://scantailor.org/

Re: Page Dewarping

#20
post #14

Earlier quoted context omitted.

Page warp becomes but a tiny part of the problem with a page-flip video – now you have motion blur, varying exposure, resolution, noise, and depth of field to worry about. Maybe if you had a camera capable of recording extremely high frame rates at high resolution (probably north of 120fps @ 1440p), a high-intensity, diffuse light source, and a lens with a tight aperture / narrow focal length, you’d at least have som…

Doesn't that describe most modern cell phone cameras?

I haven't heard of a phone camera that can do video at 120fps, they're usually 30, maybe 60 fps. The S7 has some high framerate slow-mo option, but it's limited to a 720p resolution.
Post reply on HN