ICDAR2013 Competition on Music Scores (from binary images)
This page presents a method to remove staffs from music score images; it has been submitted to this contest. The method is some kind of "exercise in style" since we have chosen to exclusively rely on mathematical morphology operators. This is thus a filtering-only solution.
A permissive hit-or-miss with an horizontal line pattern as structuring element extracts some horizontal chunks from the input image:
An horizontal median cleans up the result of the first filter:
With an horizontal neighborhood, a reconstruction by dilation of the previous image within the input image extends the connected components:
A closing with a rectangular structuring element gives a binary mask:
The contours of this mask are here displayed over the input image (one can see that the mask pretty well fits with the staff lines):
A vertical median applied inside the largest components of this mask removes the staff lines: