if algorithm is None: algorithm = ALGORITHM_WANDER print 'post arg' print 'output image: %s' % output_image_file_name print 'output project: %s' % output_project_file_name if algorithm == ALGORITHM_GRID: ''' Probably most intuitive is to have (0, 0) at lower left like its presented in many linear algebra works and XY graph ...but image stuff tends to to upper left, so thats what things use ''' engine = GridStitch.from_file_names(input_image_file_names, flip_col, flip_row, flip_pre_transpose, flip_post_transpose, depth, alt_rows, alt_cols, n_rows, n_cols) if grid_only: print 'Grid only, exiting' sys.exit(0) elif algorithm == ALGORITHM_WANDER: engine = WanderStitch.from_file_names(input_image_file_names) elif algorithm == ALGORITHM_FORTIFY: if len(input_image_file_names) > 0: raise Exception('Cannot use old project and image files') if input_project_file_name is None: raise Exception('Requires input project') engine = ForitfyStitch.from_existing_project_file_name(input_project_file_name) else: raise Exception('need an algorithm / engine') engine.set_output_project_file_name(output_project_file_name)
input_image_file_names.append(arg) else: print 'unrecognized arg: %s' % arg print 'must be pto file, image file, or image dir' sys.exit(1) if len(input_image_file_names) == 0: raise Exception('Requires image file names') print 'post arg' print 'output project: %s' % output_project_file_name if args.threads < 1: raise Exception('Bad threads') if args.algorithm == "grid": engine = GridStitch.from_tagged_file_names(input_image_file_names) print 'Using %d threads' % args.threads engine.threads = args.threads engine.skip_missing = args.skip_missing else: raise Exception('need an algorithm / engine') engine.log_dir = log_dir engine.set_output_project_file_name(output_project_file_name) engine.set_regular(regular) engine.set_dry(args.dry) if args.x_overlap: engine.x_overlap = args.x_overlap if args.y_overlap: