sheet music & tiff

Don't know where to start, or stuck on a certain problem? Drop by and tell us about it. Feel like helping others? Start here.

Moderator: peterZ

Post Reply
bartvaes
Posts: 4
Joined: 18 May 2016, 12:34
Number of books owned: 0
Country: Belgium

sheet music & tiff

Post by bartvaes »

Hello everybody,

I want to ask a question about a project I'm about to start.

I'm a musician in several concert / wind bands and for one of them I'm about to start digitizing their sheet music library.
We're talking several 100ths of paper sheet music with varying sizes (mostly A4 & A3, with the occasional A5 or US Letter).

My initial idea was to treat them as text and to scan @ 300dpi black & white, 600dpi grayscale for the occasional cover image.
I'm using openSUSE 42.1 Linux so the scanning program is xsane, and file format = TIFF (compressionless).

Now here comes the problem: my scans should be re-printable, meaning I should be able to make small corrections with tools like unpaper & ImageMagick etc... or manually. After modifying I'd like to have a printable file much like the original.
Instead, the resulting .tiff's are very blurry and unusable.

Now this only happens with TIFF files. When using PNM, PBM, PDF, DJVU or any other format they're OK.
The reason for using TIFF is ScanTailor, but I'm looking into gscan2pdf as alternative.

Feel free to share any insights or suggestions. :)

Thanks,
Bart.
BruceG
Posts: 99
Joined: 14 May 2014, 23:17
Number of books owned: 500
Country: Australia

Re: sheet music & tiff

Post by BruceG »

Bart

https://en.wikipedia.org/wiki/Music_OCR

may give you a few ideas

It is unclear ( from your post) if it is Scan Tailor that is producing the 'blurry and unusable' file or unpaper/ImageMagick.
I am not familiar with these programs. Though I would expect there would be options as to the quality of the file being saved. Not always easily seen.
The file size would be a good indication that something happened.
bartvaes
Posts: 4
Joined: 18 May 2016, 12:34
Number of books owned: 0
Country: Belgium

Re: sheet music & tiff

Post by bartvaes »

Thanks for your reply.
BruceG wrote:...It is unclear ( from your post) if it is Scan Tailor that is producing the 'blurry and unusable' file or unpaper/ImageMagick...
To clarify: I want to start using those tools for my project, but I haven't yet. The image (tiff) is blurry without any tampering with said tools.

I've attached 2 files taken with my mobile phone, where you can see the difference in quality.

Original sheet :
Original.jpg
Scanned tiff :
Tiff.jpg
So Original.jpg is the sheet music I wanted to scan. Tiff.jpg is the scanned paper, directly printed without any conversion or alteration (printer on 600dpi).

And trust me, I wasn't 'shaky' when taking the 2nd photo :) That's actually how it looks.
Keep in mind that these pages are standing a meter away from you when playing, so this is not very useable.

I was wondering if this is a bug in libtiff package for Linux, but Google doesn't find much in that direction so far (and would surprise me - I can't be the only one).

Bart.
duerig
Posts: 388
Joined: 01 Jun 2014, 17:04
Number of books owned: 1000
Country: United States of America

Re: sheet music & tiff

Post by duerig »

The issue with the TIFF format is very odd and I'm not sure what the solution is. But there is a simple workaround.

Neither ImageMagick nor Scan Tailor require input files to be in the form of TIFF. Both accept JPEGs. Scan Tailor produces TIFF output (hopefully without the issue you are seeing) while ImageMagick can produce any format of output you want.

-D
cday
Posts: 451
Joined: 19 Mar 2013, 14:55
Number of books owned: 0
Country: UK

Re: sheet music & tiff

Post by cday »

An uncompressed file TIFF is generally enormous but TIFF supports a number of compression options, most of which are lossless and so will not be blurry.

There is, however, also a JPEG compression option which if it is applied with too low a quality setting would produce a blurry image, along normally with a small file size. Are you able to upload an example blurry TIFF file for inspection?

Black and white originals that can be scanned at high enough resolution to reproduce well as 1-bit depth (black and white) images can be compressed using 'fax' CCITT G4 compression, which is lossless and also results in very small file sizes. Equivalent compression can also be applied to images in a PDF file, which might be a suitable format for a multi-page document.
bartvaes
Posts: 4
Joined: 18 May 2016, 12:34
Number of books owned: 0
Country: Belgium

Re: sheet music & tiff

Post by bartvaes »

cday wrote:An uncompressed file TIFF is generally enormous but TIFF supports a number of compression options, most of which are lossless and so will not be blurry.

There is, however, also a JPEG compression option which if it is applied with too low a quality setting would produce a blurry image, along normally with a small file size. Are you able to upload an example blurry TIFF file for inspection?...
Certainly, I've attached the file which printed out blurry. And I deliberately said "printed" because it looks ok on screen... so this still might be a printer problem.

If anyone could check if it prints out fine on their machine I'd be very much obliged :)
My printer is Brother DCP-7040.

TIA
Bart.
Attachments
part-600dpi-bw.tiff
cday
Posts: 451
Joined: 19 Mar 2013, 14:55
Number of books owned: 0
Country: UK

Re: sheet music & tiff

Post by cday »

Your uploaded file, as I think you already know, is an uncompressed 600DPI 1-bit TIFF file with no sign of blurryness even when zoomed in, so likely a printing issue, possibly due to printing at a lower resolution such as 300DPI?

The Brother DCP-7040 spec shows the print resolution as being 'Up to 2400 x 600 dpi', so could you have a lower resolution set, or is there possibly some other factor in play??

Edit:

If you apply the 'Fax' compression I mentioned above to your TIFF the file size reduces from 4167KB to 171KB, with absolutely no loss of quality as the compression is lossless, if that is any help...
Attachments
part-600dpi-bw-1_CCITT_G4.tif
(170.02 KiB) Not downloaded yet
bartvaes
Posts: 4
Joined: 18 May 2016, 12:34
Number of books owned: 0
Country: Belgium

Re: sheet music & tiff

Post by bartvaes »

Yes, I was also under the impression the file itself wasn't the problem.
Printer is also OK (default print setting = 600dpi) and the fuzzyness only happens with TIFF files.

So today I did some trial & error with the image viewer applications and guess what ?
The blurry output only occurs when I use Okular (default viewer in KDE on my distribution). There even is a bug report about it from 2010 but doesn't get a lot of attention :(
Printing from other apps like Gwenview, GIMP or even command line produces correct output.

So, I thank you all for looking into this and help searching for a solution.
Also thanks for the tip about compression, hadn't looked into that yet ;)

Bart.
L.Willms
Posts: 134
Joined: 21 Sep 2016, 10:51
E-book readers owned: Tolino Shine
Country: Germany
Location: Frankfurt/Main, Germany

Re: sheet music & tiff

Post by L.Willms »

bartvaes wrote: I'm a musician in several concert / wind bands and for one of them I'm about to start digitizing their sheet music library.
We're talking several 100ths of paper sheet music with varying sizes (mostly A4 & A3, with the occasional A5 or US Letter).

My initial idea was to treat them as text and to scan @ 300dpi black & white, 600dpi grayscale for the occasional cover image.
I'm using openSUSE 42.1 Linux so the scanning program is xsane, and file format = TIFF (compressionless).

Now here comes the problem: my scans should be re-printable, meaning I should be able to make small corrections
Why don't you use a musical score recognition program like capella Scan? [sorry for the German version of the web site - the english language seems to be in maintenenace mode at this moment in time, since it only displays an error message]

Capella scan is, of course, a companion to the score writer capella, which then allows reformatting, parts extraction (or hiding selected parts), playing the music, transposing the key, and many more. The free capella Reader which runs not only on Windows but also on Mac, and on touch sensitive tablets (not yet with Android or Apple's iOS).

But the result of capella Scan can also exported as MusicXML and then used in Finale, Sibelius, and many other score writers. capella Scan uses the ABBYY recognition engine for text, including text set in "Fraktur" (gothic type).

Youtube video on "capella Reader": https://www.youtube.com/watch?v=3G513N2DR9M
11 videos on "From scanning to karaoke CD" https://www.youtube.com/watch?v=ChBUu3PcOro
Last edited by L.Willms on 08 Oct 2016, 01:33, edited 1 time in total.
Post Reply