class StaffFinder_stable_path

Last modified: October 27, 2015

Contents

StaffFinder_stable_path

In module gamera.toolkits.musicstaves.stafffinder_stable_path

Finds staff lines with by the stable path algorithm, as described in
Cardoso, J., A. Capela, A. Rebelo, C. Guedes, and I. Porto (2008): A connected path approach for staff detection on a music score. 15th IEEE International Conference on Image Processing, pp. 1005-8.
Authors:Ian Karp (algorithm) and Christoph Dalitz (wrapper class)

find_staves

Method for finding the staff lines.

Signature:

find_staves(with_trimming=True, with_deletion=True, with_staff_fixing=True, enable_strong_staff_pixels=False)

with

  • with_trimming: Trims staff sets where white space or ornamentations are found.
  • with_deletion: If true, the image will be processed once and will create an image comprised of only found staves and then the code is run again. More accurate for images with a lot of lyrics or ornamentation.
  • with_staff_fixing: Uses the slopes of staff sets to fix staff lines that differ wildly from the slope at specific intervals.
  • enable_strong_staff_pixels: Experimental method that reduces the weights of vertical runs that are the exact width of staffline_height and are exactly staffspace_height away from the closest black pixel.

This method fills the self.linelist attribute for further processing.