make_labels.py
Go to the documentation of this file.
00001 import os
00002 import string
00003 import pipes
00004 
00005 font = 'futura-normal'
00006 
00007 def make_labels(s):
00008     l = string.printable
00009     for word in l:
00010         if word == ' ':
00011             os.system('convert -fill black -background white -bordercolor white -font %s -pointsize %d label:"\ " 32_%d.png'%(font,s,s/12-1))
00012         if word == '@':
00013             os.system('convert -fill black -background white -bordercolor white -font %s -pointsize %d label:"\@" 64_%d.png'%(font,s,s/12-1))
00014         elif word == '\\':
00015             os.system('convert -fill black -background white -bordercolor white -font %s -pointsize %d label:"\\\\\\\\" 92_%d.png'%(font,s,s/12-1))
00016         elif ord(word) in [9,10,11,12,13,14]:
00017             pass
00018         else:
00019             os.system("convert -fill black -background white -bordercolor white -font %s -pointsize %d label:%s \"%d_%d.png\""%(font,s,pipes.quote(word), ord(word),s/12-1))
00020 
00021 for i in [12,24,36,48,60,72,84,96]:
00022     make_labels(i)
00023 


rail_object_detector
Author(s):
autogenerated on Sat Jun 8 2019 20:26:30