Staff Line Removal Toolkit for Gamera
|
|
|
Removing staff lines
The most characteristic feature of sheet music are groups of parallel
horizontal lines, the staff lines. For a human reader these are
necessary in order to determine the note pitch. In Optical Music
Recognition (OMR) however, these hinder the segmentation of the
symbols and thus usually need to be removed:
In order to determine the pitch of the remaining symbols it is
also necessary to remember the position where the staff lines have been.
There is a great variety of possible methods for staff line removal and
not all are appropriate for all circumstances. Not all images are as
perfect as the example above and staff line removal can also be applied
to something different than common music notation (eg. lute tablature or
text documents with underlined sections).
What is this toolkit?
This toolkit is a python library for experimenting with different
methods for staff removal from digital images of sheet music. It is based
on and requires the
Gamera document
image analysis framework.
It provides
- methods for removing staff lines and querying their position afterwards
- a plugin mechanism for adding own staff line removal algorithm
Documentation
You can browse the docs here online.
Moreover html documentation is
included in the doc/html subdirectory of the MusicStaves toolkit
source distribution.
For experimental results and a qualitative comparison of the different
algorithms, see the experimental results and test images
below.
Authors
Software
The source code of our software is available under the terms of the GNU
General Public License. File releases of stable versions are available below.
Moreover you can get a development snapshot via CVS access from the
MusicStaves SourceForge site.
In short, you obtain the source code with the following two commands:
cvs -d:pserver:anonymous@music-staves.cvs.sourceforge.net:/cvsroot/music-staves login
cvs -z3 -d:pserver:anonymous@music-staves.cvs.sourceforge.net:/cvsroot/music-staves co -P music-staves
When asked for a password by the first command (login), just press
ENTER. Note that the login command does not perform a login and
start a session. It will instead store login information somewhere in your
home directory and return immediately. Future checkouts will then no longer
require the login command.
Note that all releases are source code releases and require a working
installation of a sufficiently recent Gamera CVS version. See the
documentation how to build and install from the sources.
Prerequisites
The recognition system requires a working installation of the Gamera framework
for document analysis and recognition. See the
Gamera homepage
for information how to obtain and install Gamera. The GUI part of the toolkit
requires wxPython 2.5 or later (preferably 2.6 or 2.8).
Downloads
On MacOS X and Linux, download the source code package and install it with
python setup.py build && sudo python setup.py install. See the
documentation for more information on building
and installing this toolkit from the sources. On Windows, you can either
use the source package or the binary installer.
Source code:
- MusicStaves-1.3.4.tar.gz
(Apr 17 2009)
Binary installer for Windows:
- musicstaves-1.3.4.win32-py2.5.exe
for Python 2.5 (Apr 17 2009)
The documentation is included in the source package, but not in the binary
installer. If you use the binary installer, you can
download it as a .tar.gz archive.
Experimental results and test images
We have written this toolkit within a research project for the quantitative
performance evaluation of different staff removal algorithms. The results
of this project are summarised in the paper
- C. Dalitz, M. Droettboom, B. Pranzas, I. Fujinaga:
A Comparative
Study of Staff Removal Algorithms. IEEE Transactions on Pattern
Analysis and Machine Intelligence, vol. 30, no. 5, pp. 753-766, May 2008.
The above link requires subscription; there is also a
selfarchived version
of this paper available.
Here are the test images used in this paper:
- testset.tar.gz
All images have been either created by ourselves or have been taken from
sources which explicitly allow their use under a sufficiently free license
(like Mutopia).
See the files Readme and License for details.