default=False, help= 'use lock file to only enblend (memory intensive part) one at a time') parser.add_argument('--threads', type=int, default=multiprocessing.cpu_count()) parser.add_argument('--log', default='pr0nts', help='Output log file name') args = parser.parse_args() if args.threads < 1: raise Exception('Bad threads') print 'Using %d threads' % args.threads log_dir = args.log out_dir = 'out' _dt = logwt(log_dir, 'main.log', shift_d=True) fn = args.pto[0] auto_size = not (args.stp or args.stm or args.stw or args.sth) print 'Assuming input %s is pto project to be stitched' % args.pto project = PTOProject.from_file_name(args.pto) print 'Creating tiler' stp = None if args.stp: stp = mksize(args.stp) elif args.stm: stp = mem2pix(mksize(args.stm)) print 'Memory %s => %s pix' % (args.stm, size2str(stp)) elif auto_size:
parser.add_argument('--st-dir', default='st', help='store intermediate supertiles to given dir') parser.add_argument('--st-limit', default='inf', help='debug (exit after # supertiles, typically --st-limit 1 --threads 1)') parser.add_argument('--single-dir', default='single', help='folder to put final output composite image') parser.add_argument('--single-fn', default=None, help='file name to write in single dir') parser_add_bool_arg('--enblend-lock', default=False, help='use lock file to only enblend (memory intensive part) one at a time') parser.add_argument('--threads', type=int, default= multiprocessing.cpu_count()) parser.add_argument('--log', default='pr0nts', help='Output log file name') args = parser.parse_args() if args.threads < 1: raise Exception('Bad threads') print 'Using %d threads' % args.threads log_dir = args.log out_dir = 'out' _dt = logwt(log_dir, 'main.log', shift_d=True) fn = args.pto[0] auto_size = not (args.stp or args.stm or args.stw or args.sth) print 'Assuming input %s is pto project to be stitched' % args.pto project = PTOProject.from_file_name(args.pto) print 'Creating tiler' stp = None if args.stp: stp = mksize(args.stp) elif args.stm: stp = mem2pix(mksize(args.stm)) print 'Memory %s => %s pix' % (args.stm, size2str(stp)) elif auto_size: