Ejemplo n.º 1
0
	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)