Esempio n. 1
0
	def merge(self, others):
		'''Return a project containing both control points'''
		'''
		Does not allow in place replace, we have to move things around
		
		[mcmaster@gespenst bin]$ pto_merge --help
		pto_merge: merges several project files
		pto_merge version 2010.4.0.854952d82c8f

		Usage:  pto_merge [options] input.pto input2.pto ...

		  Options:
			 -o, --output=file.pto  Output Hugin PTO file.
									Default: <filename>_merge.pto
			 -h, --help			 Shows this help
		'''
		if len(others) == 0:
			print 'WARNING: skipping merge due to no other files'
			raise Exception('Nothing to merge')
			return None
		# Make sure that current project gets included
		# if empty we should still do this so that a merge can happen
		# as "merging" causes panotools project transforms tools may expect
		self.save()
		m = Merger(others)
		m.pto = self
		return m.run()
Esempio n. 2
0
def resave_hugin(pto):
    from pr0ntools.stitch.merger import Merger
    from pr0ntools.stitch.pto.project import PTOProject

    # pto_merge -o converted.pto out.pto out.pto
    blank = PTOProject.from_blank()
    m = Merger([blank])
    m.pto = pto
    new = m.run(to_pto=True)
    if new != pto:
        raise Exception('Expected self merge')
    dbg('Merge into self')
Esempio n. 3
0
def resave_hugin(pto):
	from pr0ntools.stitch.merger import Merger
	from pr0ntools.stitch.pto.project import PTOProject
	
	# pto_merge -o converted.pto out.pto out.pto
	blank = PTOProject.from_blank()
	m = Merger([blank])
	m.pto = pto
	new = m.run(to_pto=True)
	if new != pto:
		raise Exception('Expected self merge')
	print 'Merge into self'