Edge Methods for Guitar ROI Detection
Based on the work Polyphonic Note Tracking Using Multimodal Retrieval of Musical Events, by Quested et al., from University of Leeds, UK, and using the open source OpenCV Computer Vision library, we are trying to segment the guitar ROI (Region of Interest), which is that part between the bridge and the nut.
This page briefly describes some progress we have made. Some problems are also discuted. This is part of a course in Computer Vision I'm doing at Puc-Rio, with professor Marcelo Gattass.
Hough Transform
The Hough Transform is a widely used algorithm for straight line detection. So we have used it to detect strings, setting its parameters properly (for example, the minimum line length to detect).
The source image must be binary. We have applied the Canny edge detector algorith on the original input to get it.
Rho and Theta Histograms
Smoothed versions of the Rho and Theta histograms are computed. Rho is the inclination parameter of detected lines, and Theta is the distance between the lines and the top-left pixel of the image.
Image Rotation
Image is rotated, making strings direction horizontal. The fretbord height is specified manually as a parameter of the method.
Rough ROI Segmentation
With Rho and Theta histogram peaks we obtain a rough ROI. It has to be mentioned that we are interested in the region between the bridge and the nut, not just the fretboard, because information about rhythm (given by the right hand) is also important.
Horizontal Derivative
The next step is to apply a Sobel x-derivative filter, to somehow highlight the frets.
Along Columns Sum
Summing the Sobel image along columns we get a curve where higher peaks are expected to correspond to frets.
Fretboard Adjustment
Equal temperament properties are used to extrapolate frets location using just 3 of them which are adjacent (obtained as consecutive peaks of the curve showed before).
The presented method is not that stable. We think that is because the Sobel image has some noise, so the along column sum curve doesn't properly maps frets to peaks.
Some information about bridge and nut location gives more stability, so we think special markers must be used.