Program to recognize music notation
I wrote program to recognize music notation (exactly tabulature). In the main there are digits on the lines. After preprocessing (global binarization) I remove lines. I'd like to ask about preprocessing. My program works fine where lines and digits have the same color. But lines are often lighter than digits. When I use binarization with small threshold lines disapear when I use binarization with bigger threshold there are too many noises and digits are thick.
What kind of binarization (in OpenCV) can you recommend? What to do? Is there any solution for this problem?
I'll add some example.
My preprocessing looks like that:
1) Reading image in gray colors:
2) GLobal binarization:
cv::threshold (for example 127)
Characters are not beautiful... :( But main problem is that lines disappeared.
3) cv::threshold (230)
I can see lines but charackters are thick and ugly. For example 'a' character sometimes does not have empty space in the middle and so on. And there are a lot of noises. :(
And there is one more problem... I have to set threshold value for every file....
Do you have any suggestion for preprocesssing???
I'd like to have "nice" lines and characters...
(I don't ask about code, just some suggestions and advices)
Can you take a look at this? It is a new sample created by @theodore, based on this Q&A topic. Due to the large amount of these music sheet questions lately, I am guessing somewhere a computer vision professor gave this as homework :D
actually if I got it correctly what you are looking for is how to refine your input image. If that is your case then I would suggest to try some filtering and sharpening techniques (if you search you will find plenty, including code, both here in this forum as well in the web in general) as pre-processing procedures. @StevenPuttemans most likely I ruined the plans of some professor somewhere .:evil:. :-p
Is it possible to recognize music from a youtube song video? link text
@fibra, please do not post answers here, if you have a question or a comment, thank you.