树莓派摄像头预览

运行以下python脚本预览树莓派的摄像头,Ctrl+C退出预览

import picamera
import picamera.array
import time

with picamera.PiCamera() as camera:
    camera.resolution = (640,480)	# resolution
    camera.framerate = 30			# frame rate
    print ("start preview direct from GPU")
    camera.start_preview() 	# the start_preview() function 
    while(1):
        a = 1				# dead loop

猜你喜欢

转载自blog.csdn.net/da_kao_la/article/details/81428472