当前位置: 首页>>代码示例>>Python>>正文


Python Camera.release方法代码示例

本文整理汇总了Python中Camera.Camera.release方法的典型用法代码示例。如果您正苦于以下问题:Python Camera.release方法的具体用法?Python Camera.release怎么用?Python Camera.release使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Camera.Camera的用法示例。


在下文中一共展示了Camera.release方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: put_scan

# 需要导入模块: from Camera import Camera [as 别名]
# 或者: from Camera.Camera import release [as 别名]
def put_scan():
	global stepper
	
	objString = ""
	stepperThread = threading.Thread(target=stepper.goTop).start() #Start the upwards movement
	scanning = True
	cam = Camera(captureWidth, captureHeight, 120) #Up to 120 images will be held in the cache before discarding images from the cache
	
	#Start image computation threads
	threading.Thread(target=processThread, args=(transformationMatrix, laserThreshold, cam)).start()
	threading.Thread(target=processThread, args=(transformationMatrix, laserThreshold, cam)).start()

	st = time.time()
	while stepperThread.is_alive(): time.sleep(1) #Wait for the scan to finish
	scanning = False #Kill the threads
	f = open("test.obj", "w")
	f.write(objString)
	f.close()
	cam.release()
开发者ID:shackspace,项目名称:body-scanner,代码行数:21,代码来源:captureWeb.py

示例2: process

# 需要导入模块: from Camera import Camera [as 别名]
# 或者: from Camera.Camera import release [as 别名]
		img = cv2.warpPerspective(img, transformationMatrix, (720,720), flags=cv2.INTER_LANCZOS4)
		objString += process(img, sliceNr)
		
s = StepperDriver()
print("Resetting axis...")
s.goUp()
s.goBottom() #Reset the axis

try:
	raw_input("Press Enter to start the scanning process")
	objString = ""
	threading.Thread(target=StepperDriver.goTop) #Move to the top while we scan
	scanning = True
	cam = Camera(captureWidth, captureHeight, 120) #Up to 120 images will be held in the cache before discarding images from the cache
	
	#Start image computation threads
	threading.Thread(target=processThread, args=(transformationMatrix, laserThreshold, cam)).start()
	threading.Thread(target=processThread, args=(transformationMatrix, laserThreshold, cam)).start()

	st = time.time()
	while time.time()-st < 40: time.sleep(1) #Wait for the scan to finish
	scanning = False #Kill the threads
	f = open("test.obj", "w")
	f.write(objString)
	f.close()
	cam.release()

except KeyboardInterrupt:
	try: cam.release()
	except: pass
开发者ID:shackspace,项目名称:body-scanner,代码行数:32,代码来源:capture4.py

示例3: Camera

# 需要导入模块: from Camera import Camera [as 别名]
# 或者: from Camera.Camera import release [as 别名]
from __future__ import print_function

import time, numpy, sys
from Camera import Camera
import cv2
import cv2.cv as cv

captureWidth = 1280 #Width of camera picture
captureHeight = 720 #Height of camera picture

cam = Camera(captureWidth, captureHeight, BUFFERSIZE=1000) 

raw_input("Press Enter to abort")

cam.release()

开发者ID:shackspace,项目名称:body-scanner,代码行数:17,代码来源:ramtest.py


注:本文中的Camera.Camera.release方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。