comparison 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
comparison
equal deleted inserted replaced
1:0f7f611deca4 2:46fb79167a61
1 #!/home/alex/anaconda/bin/python
2
3 import sys, getopt
4 import preomr
5
6 def usage():
7 print "Please provide input and output filenames."
8
9 def main(argv):
10 if len(argv) < 2:
11 usage()
12 sys.exit(2)
13 infile = argv[0]
14 outfile = argv[1]
15
16 process(infile, outfile)
17
18
19 def process(infile, outfile):
20 po = preomr.PreOMR(infile)
21 #po.staffline_removal()
22 po.remove_ossia()
23 po.save(outfile)
24
25 # Commandline parameter processing
26 # Make working folder
27 # Explode PDFs into PNGs?
28 # Deskew (optional)
29 # Find staves
30 # Print output image(s)
31
32 if __name__ == "__main__":
33 main(sys.argv[1:])