Beispiel #1
0
		sys.exit(2)
		

if __name__ == '__main__':
	process_args()

	if display:
		# deternamine screen size
		p = subprocess.Popen("xrandr | grep '*'",shell=True, stdin=subprocess.PIPE, stdout=subprocess.PIPE, close_fds=True)
		screen = shlex.split(p.stdout.read())[0].split("x")

	# init slitscanner
	slitscanner = SlitScanner()
	slitscanner.setFileType("JPEG")
	slitscanner.setPath(output + "/")
	slitscanner.setSize(out_w,out_h)

	if flag_calibration:
		if darkframe:
			df_im = Image.open(darkframe)
			df = np.asarray(df_im)
						
		# apply gamma to gray frame
		#gf_gamma = 0.89
		#gf_im = imageGamma(gf_im, (gf_gamma,gf_gamma,gf_gamma))
						
		#normalize whiteframe
		#gf_im.load()
		#gf_im = normalizeImage(gf_im)
		#gf_im.load()
		#gf_im2 = gf_im.copy()
Beispiel #2
0
    track = TrackWalker()

    imgloader = TileLoader()
    imgloader.setSource(source)
    imgloader.setZoom(zoom)
    imgloader.setFileType(format)
    print "loading images from", source, "at zoom level", zoom

    scan_path = output + "/" + name + "/" + str(interval) + "m/" + str(zoom)
    print "scan to", scan_path

    slitscanner = SlitScanner(lh)
    slitscanner.setFileType(format)
    slitscanner.setPath(scan_path + "/" + source)
    slitscanner.setSize(size[0], size[1])

    if write_log_files:
        log_file = slitscanner.getFileDirectory() + "scan.log"
        myutils.createPath(log_file)
        print "log to:", log_file
        f = open(log_file, "w")

    for trackfile in trackfiles:

        print "loading track", trackfile
        track.load(trackfile)
        print "track points: %d, length: %0.2fkm" % (track.getPointNumber(), track.getTotalDistance())

        if interval > 0:
            print "interpolating points at", interval, "meters ..."