How to resolve issues with light grey colours in PDF or TIFF files at conversion to binary #703
Replies: 14 comments 3 replies
-
I just tried to process your example. The binarization uses an adaptive model, whereby the pixel threshold applied at a given location depends of the main and standard deviation of pixels values in the neighborhood of the location. We can change the coefficients for main and std dev. This is low level stuff, use the These values gave me rather good results: The GRID step suffers at the start of the staff, but this is something you can easily fix manually (via staff editing) |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
I took another PDF, which happens to be the Double Bass part of Mercy, the same song as above by Duffy. I printed that PDF in A3, at very large scale. Then put it in. Here is one of the pages from the PDF (most of the Bass goes on like this in this song): I made some changes to the Book Parameters: Then ran the transcription of this page. The binary looks very good! Transcription worked very well, also the beams are recognised correctly this way. Only thing not recognised in one go are the augentation dots behind and above the heads of some of the notes: This would be very time-consuming to correct so would be great if you have some suggestions how to get these recognised automatically somehow. Thanks again, this is could become a major time saver for me. |
Beta Was this translation helpful? Give feedback.
-
Running 5.3.1 on your example (still using the GLOBAL binarization with a 225 threshold), I got the following results (read at the end of the LINKS step): Obviously, all augmentation and staccato dots have been correctly recognized and linked to their related heads. Are you sure you did not stop before the LINKS step? |
Beta Was this translation helpful? Give feedback.
-
Hi Hbitteur, Tried again but same result. Seems I am doing something wrong. I think I have not set the GLOBAL binarization value as you mentioned but I can't find it... (I did find and set the meanCoeff and stdDevCoef ratio's to 0.95 and .0.25 respectively which worked very well but it does not recognise the augmentation dots). I can't find it the GLOBAL binarization in the book parameters as you suggested: Nor under Options, but I do find 4 parameters with 'binarization' in it: Should I set the last one to value 225? Maybe I can't find it becuase you showed a setting that is only available in version 5.4.1? Hope you can help, there are so many parameters I'm a bit worried to just go about and play with them. Regards, Bert |
Beta Was this translation helpful? Give feedback.
-
Oops! My mistake, sorry. In 5.3.1 version (the one you are using), binarization papameters are still present but reserved for the "advanced" user.
|
Beta Was this translation helpful? Give feedback.
-
Hi Hbitteur, Thanks! I finally had some time to try again. I found the parameter and set that to GLOBAL and tested using various values. This is what my default book parameters look like: Everything below binarization level 225 did not work very well. 225 itself worked but still have the same issue with the augmentation dots as before and it seems to have a hard time recognising most of the rests on a more complicated sheet. See examples below. Binary at GLOBAL 225: Recognised result: Higher binarization settings do not seem to improve things, as the binary results get more 'rough' or 'grainy'. For instance, binary at GLOBAL 240: Recognised result: Maybe there are more parameters I can tweak, as it seems you get different results than I. Would be great as manually setting all the rests and aug dots is going to be tedious :) (in reality I had to because this project could not wait but there will be many more music sheets of other songs I would like to process so no waste of time at all having this conversation :) Thanks again! |
Beta Was this translation helpful? Give feedback.
-
@BertMatser |
Beta Was this translation helpful? Give feedback.
-
Here you go! |
Beta Was this translation helpful? Give feedback.
-
I'm having problems with your double bass input file. The scale step there gives two values for interline:
This is the direct consequence of the so-called "combo histograms", where we can see two peaks instead of one expected. And indeed, in the missing staves, the interline between lines is not constant, while a staff is expected to exhibit lines regularly spaced vertically. Consequently, the staff gets discarded. I think the root cause is the too high value of interline. Audiveris expects an interline value around 20 pixels; Here we are at 44 and 47 pixels. |
Beta Was this translation helpful? Give feedback.
-
Hi hbitteur, Here is the original sized file (100%). When I use this one, it gets stuck during 'grid' step and goes into 'invalid' status. Mercy - Double Bass - normal size.pdf I also tried a file at 150%. Worked better, as it gave a valid result, but ran into issues with the measures: Mercy - Double Bass - size 150%.pdf Trace: The used a file at 130%. Same as 100% it went into error during 'grid' step: Mercy - Double Bass - size 130%.pdf Then tried 140%. This gave decent results, comparable to the really big sized file I gave you earlier, but same issue with augmentations. Mercy - Double Bass - size 140%.pdf Just for the record I tried 160% up to 200% as well. These are the files if you want to test with them. 160%, 170% and 180% did yield results but not as good as the 140% sized file. 190% and 200% worked pretty decent by the way. Similar results as 140%. Mercy - Double Bass - size 160%.pdf Again thanks a lot for your time and effort! |
Beta Was this translation helpful? Give feedback.
-
I checked the "normal size 100%" image.
And indeed, when visually checking the sheet 1 image we can see them. Since Audiveris engine expects the staff lines to be regularly spaced within the same staff, none of the staves here get recognized. In other words, the initial image violates the assumption on a staff geometry. I have no clear solution for that (except getting a better image of course). Could you further scale down your image (90%, 80%, 70%, ...) and test the result of the SCALE step, until it gives you a single value. |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
Note on your input image, that the staccato dots are abnormally close to the staff line and to the note head below. Other staccato dots on other staves may be less lucky... |
Beta Was this translation helpful? Give feedback.
-
Hi there!
New on GitHub and new to Audiveris. Installed everything yesterday and working fine (version 5.3.1). Also read the manual and tried to convert my PDF score.
It seems grey tones do not convert very well into binary. More specifically, I have grey beams in my PDF thet seem to be invisible when turned into binary:
I have tried a lot of things to get the grey beams into a darker tone or plain black but this turns out to be an enormous hassle (so anything to help me do that for an entire PDF at once is welcome!).
PS: The origin of this PDF is a website that I have a paid subscription for. What I ultimately would like to do is turn this score into MIDI via MusicXML.
Is there any setting in Audiveris that influences the Grey to Binary process in such a way that grey tones are properly recognised and turned into binary?
Or is there anything else I can do to make this work?
Much appreciated!
Beta Was this translation helpful? Give feedback.
All reactions