diff Preprocessing/ossia.py @ 2:46fb79167a61 tip

Main Code
author Victor Padilla <victor.padilla.mc@gmail.com>
date Mon, 04 May 2015 22:56:18 +0200
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Preprocessing/ossia.py	Mon May 04 22:56:18 2015 +0200
@@ -0,0 +1,33 @@
+#!/home/alex/anaconda/bin/python
+
+import sys, getopt
+import preomr
+
+def usage():
+    print "Please provide input and output filenames."
+
+def main(argv):
+    if len(argv) < 2:
+        usage()
+        sys.exit(2)
+    infile = argv[0]
+    outfile = argv[1]
+
+    process(infile, outfile)
+
+
+def process(infile, outfile):
+    po = preomr.PreOMR(infile)
+    #po.staffline_removal()
+    po.remove_ossia()
+    po.save(outfile)
+
+# Commandline parameter processing
+# Make working folder
+# Explode PDFs into PNGs?
+# Deskew (optional)
+# Find staves
+# Print output image(s)
+
+if __name__ == "__main__":
+   main(sys.argv[1:])
\ No newline at end of file