Hacker News new | ask | show | jobs
by jgable 3596 days ago
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.
4 comments

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

[1] http://scantailor.org/

I used it for about 1000 pages I photographed with a DSLR. The automatic dewarping rarely worked for me, so I ended up doing it manually.

It likely didn't help that many of the pages were typed carbon copies or hand-written. For the former I had to put another piece of paper behind the page to prevent the next page from bleeding through.

That said, I managed to get the job done, though it took a couple of weeks. Next is to capture the metadata (author, date written, ...). There were a lot of one page letters in the documents I copied.

Would love to try out another tool that could read from the ScanTailor project file to get the page segmentation or even the warping I did manually to improve on the result.

He mentions adding line detection for tables, which should be a good start for sheet music.
Yep, might just work out of the box -- give it a shot!
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.
I built one of these, it's really simple and quick to make. http://www.instructables.com/id/Bargain-Price-Book-Scanner-F...

They still warp, but less than laying flat on the table and it's quicker if you do all the even pages, then all the odd pages. Actually the hardest part is making the camera stable so it doesn't move when you press the button.

Lots of info on different hardware setups and scanning software here that can batch translate into pdf and different formats.

http://www.diybookscanner.org/forum/index.php

With that setup, I'd just find a sheet of glass to press the page flat. Cameras have resolution in the right ball park these days. 600 dpi across 8 inches is, what, 4800 pixels.
I remember when I was in my middle school orchestra, occasionally I'd get a piece of sheet music with this problem. If it was bad enough, it might even make it impossible to read the last few notes. If you could fix this for your wife, I'm sure her students will greatly appreciate it!
Or, someone might play those last few notes ritardando, since they are bunching together. :)
Ah that; it's a major difficulty. A problem is that not only does the shape warp, but any part of the image that is lifted away from the scanner glass, even slightly, gets blurred quite a bit.
You could also try ScanTailor: http://scantailor.org/
Thanks for the suggestion! I'll check it out.