Optical Medieval Music Recognition Using Background Knowledge