This strikes close to home for me, because I've done this "by hand" quite a number of times, using some interactive Gimp filters, with very good results. I've been able to take a perspective photo of a curved page lying on a desk, get it almost perfectly straight, and threshold it to clean black and white or sharp gray scale. Here is my very quick and dirty manual job of the same example page: http://www.kylheku.com/…
Page Dewarping
51–60 of 75 posts
Re: Page Dewarping
#52This strikes close to home for me, because I've done this "by hand" quite a number of times, using some interactive Gimp filters, with very good results. I've been able to take a perspective photo of a curved page lying on a desk, get it almost perfectly straight, and threshold it to clean black and white or sharp gray scale. Here is my very quick and dirty manual job of the same example page: http://www.kylheku.com/…
Hence the tagline on the blog: "Why do it by hand if you can code it in just quadruple the time?" :)
Re: Page Dewarping
#53Re: Page Dewarping
#54Earlier quoted context omitted.
If she literally scans it with a scanner, why would it need dewarping? This is for when you use a digital camera on pages not lying flat. If you have the option go for scanning. Scans still benefit from cleanup, such as rotation and adjusting the levels (making everything near white perfectly white) and possibly manual cleanup (removal of specks of dust or the odd hair that was on the scanner).
She scans it in a scanner, but the music is often in large books that don't lay completely flat, so you still see the warping near the binding.
Re: Page Dewarping
#55This strikes close to home for me, because I've done this "by hand" quite a number of times, using some interactive Gimp filters, with very good results. I've been able to take a perspective photo of a curved page lying on a desk, get it almost perfectly straight, and threshold it to clean black and white or sharp gray scale. Here is my very quick and dirty manual job of the same example page: http://www.kylheku.com/…
Hence the tagline on the blog: "Why do it by hand if you can code it in just quadruple the time?" :)
Re: Page Dewarping
#56Most phone cameras these days have good resolutions, and you could technically take a 6x4 photo, divvy it to 3x3 grid and take close up photos, and have smart algorithms interpolate the pixels to form a single image with high res. I'd even bet you'd results equal to or better than a flat bed scanner.
For better us, just open the camera preview and slowly pan over the image.
Has someone tried something like this? With FOSS apps like mosaic, hdr tools and imagemagick, it should be possible. I'm guessing opencv would be needed for interpolation and noise removal..
Re: Page Dewarping
#57Re: Page Dewarping
#58This strikes close to home for me, because I've done this "by hand" quite a number of times, using some interactive Gimp filters, with very good results. I've been able to take a perspective photo of a curved page lying on a desk, get it almost perfectly straight, and threshold it to clean black and white or sharp gray scale. Here is my very quick and dirty manual job of the same example page: http://www.kylheku.com/…
Divide by blur is very crafty. Will have to give that a shot next time I have a similar need in Photoshop.
[1] https://fstoppers.com/post-production/ultimate-guide-frequen...
Re: Page Dewarping
#59it came in handy whenever a student emailed me their homework as a pile of JPEGs. Gotta admire this guy's resourcefulness—and patience. If I were a professor, I'd probably just reject the assignment outright if a student sent me a bunch of photos from their smartphone in lieu of a PDF or a "proper" scan. :)
Re: Page Dewarping
#60Those are small optmization problems. These types of problems are solved in computer vision for hundreds of thousands of variables. His problem can be solved in real-time, not tens of seconds.