Thursday, August 18, 2011

Activity 11 – Playing Notes by Image Processing

Its been a week since my last post in here. I think I better do this quickly. In this activity, we were asked to look for music sheet. This music sheet is played with the use of image processing. We need to capture the notes and then convert them into their equivalent tones according to their position in the music sheet. I have chosen the song, London Bridge Is Falling Down shown in figure 1. This was the first image that is short and maybe easy to use.

London Bridge
Figure 1. Original Musical Sheet from www.8notes.com

This image has been cropped and the notes below a quarter/half note were removed also. The cropped version is shown in figure 2.

cropped
Figure 2. Cropped image

When imported in scilab, the black part was converted into white and vice versa. After doing this, a template is produced similar to the notes in the image. A (a) half note and a (b) quarter note was used to capture its position in the image as shown in figure 3.

image
Figure 3. (a) Half-note and (b) quarter note templates

Convolution between the template and the music sheet were done and the resulting image is seen in top row of figure 4 (a and b for half-note and quarter-note templates, respectively). These images were converted into binary images and were added to one another to complete the whole song seen in figure 4(bottom row). The notes were decreased into single point in order to easily distinguish what part of the music line it is seen.

image
Figure 4. (top row) Correlation between the music sheet and (a)half-note template and (b)quarter-note template.(bottom row)Binary image of the images above.

The frequencies for the notes were collected from http://www.phy.mtu.edu/~suits/notefreqs.html. The notes used were G3,A3,B3,C4,D4, and E4. These notes came from the music sheet and the final song can be downloaded in London Bridge.wav.

I will rate myself with 8 points because I passed the required task and uploaded the song that I have created. Thank you for browsing my blog. =)

No comments:

Post a Comment