Пример #1
0
    def capture(self, image_name):
        currentDir = os.getcwd()

        img_path = "%s/%s.jpg" % (currentDir, image_name)
        print("image path:" + img_path)
        self.camera.capture(img_path, use_video_port=True)
        image = util.process(img_path, assemble.get_height_each())
        self.session_images.append(image)
Пример #2
0
    def capture(self, image_name):
        currentDir = os.getcwd()

        img_path = "%s/%s.jpg" % (currentDir, image_name)
        print('image path:' + img_path)
        self.camera.capture(img_path, use_video_port=True)
        image = util.process(img_path, assemble.get_height_each())
        self.session_images.append(image)
Пример #3
0
def run():
	camera.warmup(width, height)
	images = []
	for i in range(takes):			
		pic_paths = camera.take(1, width, height)
		start = time.time()
		image1 = util.process(pic_paths[0], assemble.get_height_each())
		end = time.time()
		diff = end - start
		images.append(image1)
		print "took in: " + str(diff) + "ms"
		if(diff < PAUSE_MAX and i < takes - 1):
			sleep_time = PAUSE_MAX - diff
			print "sleeping for another: " + str(sleep_time) + "ms"
			time.sleep(diff)

	assemble.assemble(images)
Пример #4
0
def run():
    camera.warmup(width, height)
    images = []
    for i in range(takes):
        pic_paths = camera.take(1, width, height)
        start = time.time()
        image1 = util.process(pic_paths[0], assemble.get_height_each())
        end = time.time()
        diff = end - start
        images.append(image1)
        print "took in: " + str(diff) + "ms"
        if (diff < PAUSE_MAX and i < takes - 1):
            sleep_time = PAUSE_MAX - diff
            print "sleeping for another: " + str(sleep_time) + "ms"
            time.sleep(diff)

    assemble.assemble(images)