A sheet music reader that converts sheet music to a machine-readable version!
We Binarize the Image using Savoula with a block size relative to the size of the image then we dilate it to get the bounding rectangle around the image then we crop the image and we start to fix the orientation by rotating using the angle from Hough line transform and we fix the skew by using four-point perspective.
We first dilate the image so that each staff is completely connected and then we calculate the row histogram form which using an iterative way we try different thresholds and calculate some parameters like the average width and standard deviation of widths and then choose the parameters that are best for the threshold and then we segment.
We calculate the thickness and space between lines using a column run length and histogram then we detect the staff line Positions by using the histogram and we remove them from the original image.
We use a structuring element that is in the shape of an ellipse using the same height as the detected from the Lines, then to detect hollow notes we use skeletonization and then filling the outer and opening to and then we use the same structure element again.
Lastly, we segment the notes using their bounding rectangle and pass them to the Classifier to get their value and translate them to the required output and write them to file
Distributed under the MIT License. See LICENSE
for more information.