Activity 9 Applications Morphological Operations 2 of 3 : Playing Musical Notes though Image Processing
For this activity, we will try to read a sheet music via image processing and play the music using Scilab. A sheet music is basically black and white so it is easy to separate the notes from the background by thresholding and applying morphological operations. The first task for this is to find a sheet music. I used the song Clementine and the sheet music is found in Figure 1. Figure 1. Sheet music for Celementine To make processing easier we divide the sheet into different lines. In this case we have four lines as shown in Figure 2. Figure 2. The 4 lines in the sheet music of Clementine were separated (line 1 to 4 from top to bottom) We then binarize the images with a threshold of 0.95 and invert them such that the background is black and the foreground is white. We disregard the area of the image where the clef is located. Using morphological operations, specifically CloseImage(),OpenImage() and ErodeImage() we reduce the notes into small blobs...