樹莓派攝像頭預覽

da_kao_la發表於2018-08-05

執行以下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

 

相關文章