Alleen in .: articulations.pyc
Alleen in .: chord.pyc
Alleen in .: classify.pyc
Alleen in .: debugger_color_by.pyc
Alleen in .: debugger.pyc
diff -purE /home/janneke/usr/src/aomr2-CVS/gamera/toolkits/omr/duration.py ./duration.py
--- /home/janneke/usr/src/aomr2-CVS/gamera/toolkits/omr/duration.py	2005-09-27 20:34:57 +0200
+++ ./duration.py	2005-09-29 10:02:16 +0200
@@ -167,6 +167,9 @@ beams at that point.
    for beam in glyphs.iter_type(Beam):
       if beam.image.ncols > beam.staff.half_staff_space:
          histogram.add(beam.image.most_frequent_run('black', 'vertical'))
+   if not histogram.get_max ():
+      return
+      
    beam_width = histogram.get_max()[0]
 
    # Step 2:
@@ -426,6 +429,8 @@ the ``find_vertical_articulations`` and 
    for dot_obj in glyphs.iter_type(dot):
       avg_dot_size += dot_obj.image.black_area()[0]
       num_dots += 1
+   if not num_dots:
+      return
    avg_dot_size /= num_dots
 
    # Calculate average distance between all "Dottables"
@@ -459,6 +464,8 @@ the ``find_vertical_articulations`` and 
 
       chunks = GlyphList(last_last_chunk + last_chunk + chunk)
       for dot_obj in chunk.iter_type(dot):
+         if not dot_obj.original_staff_line:
+            dot_obj.original_staff_line = 0
          dot_size = dot_obj.image.black_area()[0]
          if dot_size > avg_dot_size / 2:
             for dottable in chunks.iter_type(Dottable):
Alleen in .: duration.py~
Alleen in .: duration.pyc
diff -purE /home/janneke/usr/src/aomr2-CVS/gamera/toolkits/omr/flow.py ./flow.py
--- /home/janneke/usr/src/aomr2-CVS/gamera/toolkits/omr/flow.py	2005-06-14 02:28:20 +0200
+++ ./flow.py	2005-09-29 10:02:16 +0200
@@ -42,6 +42,8 @@ def find_repeats(state, glyphs):
       if len(dots) >= 2:
          top_dot = None
          for dot in dots:
+            if not dot.original_staff_line:
+               dot.original_staff_line = 0
             if range_eq(dot.original_staff_line, 3.0, 0.9):
                top_dot = dot
                break
Alleen in .: flow.py~
Alleen in .: flow.pyc
diff -purE /home/janneke/usr/src/aomr2-CVS/gamera/toolkits/omr/glyph_iterators.py ./glyph_iterators.py
--- /home/janneke/usr/src/aomr2-CVS/gamera/toolkits/omr/glyph_iterators.py	2005-09-27 20:34:57 +0200
+++ ./glyph_iterators.py	2005-09-29 10:02:16 +0200
@@ -239,6 +239,8 @@ contains vertically aligned glyphs withi
       # use iter_verticals which is a lot faster
       if len(part_indices) == 1:
          for x in self.iter_verticals(t):
+            if not len (x):
+               break
             w = GlyphList()
             w.append(x)
             x.active = True
Alleen in .: glyph_iterators.pyc
diff -purE /home/janneke/usr/src/aomr2-CVS/gamera/toolkits/omr/glyphs_abstract.py ./glyphs_abstract.py
--- /home/janneke/usr/src/aomr2-CVS/gamera/toolkits/omr/glyphs_abstract.py	2005-09-27 20:34:57 +0200
+++ ./glyphs_abstract.py	2005-09-29 10:02:16 +0200
@@ -460,7 +460,9 @@ class WPitched(OnStaffLine):
          top_line_wpitch = self.clef.top_line_wpitch
       else:
          top_line_wpitch = F_WPITCH
-      return int(top_line_wpitch - self.staff_line) % 7
+      if top_line_wpitch and self.staff_line:
+         return int(top_line_wpitch - self.staff_line) % 7
+      return 0
    wpitch = property(wpitch)
 
    def octave(self):
@@ -472,7 +474,9 @@ class WPitched(OnStaffLine):
       else:
          top_line_wpitch = F_WPITCH
          top_line_octave = 2
-      return int(top_line_wpitch - self.staff_line) / 7 + top_line_octave
+      if top_line_wpitch and self.staff_line:
+         return int(top_line_wpitch - self.staff_line) / 7 + top_line_octave
+      return 0
    octave = property(octave)
 
    def abs_wpitch(self):
Alleen in .: glyphs_abstract.pyc
Alleen in .: glyphs_concrete.pyc
Alleen in .: __init__.pyc
diff -purE /home/janneke/usr/src/aomr2-CVS/gamera/toolkits/omr/main.py ./main.py
--- /home/janneke/usr/src/aomr2-CVS/gamera/toolkits/omr/main.py	2005-05-24 21:54:00 +0200
+++ ./main.py	2005-09-29 10:55:48 +0200
@@ -108,8 +108,8 @@ class OMR:
       midi_filename = splitext(filename)[0] + ".mid"
       guido_filename = splitext(filename)[0] + ".gmn"
       modules = [pyScore.Guido.convert, pyScore.MusicXML.convert, pyScore.MIDI.convert]
-##       console.info("Converting to GUIDO")
-##       convert(modules, 'MusicXML_tree', 'Guido_file', tree, filename=guido_filename)
+      console.info("Converting to GUIDO")
+      convert(modules, 'MusicXML_tree', 'Guido_file', tree, filename=guido_filename)
       console.start("Converting to MIDI")
       convert(modules, 'MusicXML_tree', 'MIDI_file', tree, filename=midi_filename)
       console.end()
Alleen in .: main.py~
Alleen in .: main.pyc
Alleen in .: metric_correction_original.pyc
Alleen in .: metric_correction.pyc
Alleen in .: metric_correction_second.pyc
Alleen in .: musical_constants.pyc
Alleen in .: music_xml.pyc
diff -purE /home/janneke/usr/src/aomr2-CVS/gamera/toolkits/omr/notehead_cluster.py ./notehead_cluster.py
--- /home/janneke/usr/src/aomr2-CVS/gamera/toolkits/omr/notehead_cluster.py	2005-09-27 20:34:57 +0200
+++ ./notehead_cluster.py	2005-09-29 10:02:16 +0200
@@ -64,6 +64,13 @@ CC, it's classification is downgraded to
       height_histogram.add(g.image.nrows)
    width = int(average(width_histogram.get_max()) + 0.5)
    height = int(average(height_histogram.get_max()) + 0.5)
+   print 'staff_space: ' + `state.staff_space`
+   print 'height: ' + `height`
+   print 'width: ' + `width`
+   if not height:
+      height = state.staff_space
+   if not width:
+      width = height*1.15
    notehead_templates = get_notehead_templates(height, width)
    
    for g in clusters:
@@ -96,8 +103,16 @@ are resized to be equal to staff space h
    if not _notehead_template_scaled.has_key(size):
       scaled = []
       for template, cls, invert in _notehead_template:
-         scaled_template = template.resize(
-            Dim(int(width), int(height)), 1)
+         print 'template:' + `template`
+         print 'nrows:' + `template.nrows`
+         print 'height:' + `height`
+         scaling = height / template.nrows
+         if scaling > 1.0:
+            scaled_template = template.resize(
+               Dim(int(width), int(height)), 1)
+         else:
+            scaled_template = template.resize(
+               Dim(int(width), int(height)), 0)
          area = scaled_template.black_area()[0]
          scaled.append((scaled_template, area, cls, invert))
       _notehead_template_scaled[size] = scaled
Alleen in .: notehead_cluster.pyc
Alleen in /home/janneke/usr/src/aomr2-CVS/gamera/toolkits/omr: notehead_cluster.py.orig
Alleen in .: omr_icons.pyc
diff -purE /home/janneke/usr/src/aomr2-CVS/gamera/toolkits/omr/page.py ./page.py
--- /home/janneke/usr/src/aomr2-CVS/gamera/toolkits/omr/page.py	2005-09-27 20:34:57 +0200
+++ ./page.py	2005-09-29 10:02:16 +0200
@@ -90,6 +90,8 @@ def find_staves(state, page):
       staff_image = page.image.subimage(staff.staffrect)
       staff_image.classify_heuristic("Staff")
       staves.append(staff_image)
+      for index, y in enumerate(staff.yposlist):
+         print "    %d. line at y-position:" % (index+1), y
    console.end(len(staves))
    return staves, image_wo_staves
 
Alleen in .: page.pyc
Alleen in .: pitch.py~
Alleen in .: pitch.pyc
Alleen in ./plugins: __init__.pyc
Alleen in ./plugins: preprocess.pyc
Alleen in ./plugins: staff_removal_fujinaga.pyc
Alleen in ./plugins: _staff_removal_fujinaga.so
Alleen in .: repair.pyc
Alleen in .: score.pyc
Alleen in .: sort.pyc
Alleen in .: system_staff.pyc
Alleen in ./util: console.pyc
Alleen in ./util: constraint.pyc
Alleen in ./util: crat.so
Alleen in ./util: __init__.pyc
Alleen in ./util: metaclasses.pyc
Alleen in ./util: sets.pyc
Alleen in ./util: structures.pyc
Alleen in ./util: test_framework.pyc

