picamera.PiCamera() //相当于打开相机
camera.start_preview() //全屏显示
camera.resolution = (1024, 768) //索或设置捕获图像捕获,视频录制和预览的分辨率
camera.capture('foo.jpg') | camera.capture(my_stream, 'jpeg') //保存图片
camera.capture('foo.jpg', resize=(320, 240)) //保存图片
camera.framerate = 30 //检索或设置帧速率 ,默认为30
camera.shutter_speed = camera.exposure_speed //以微秒为单位检索或设置相机的快门速度 ,默认为0,自动
camera.exposure_mode = 'off' //曝光模式, 默认为自动
g = camera.awb_gains // 白平衡增益, awb_mode为off时才起作用
camera.awb_mode = 'off'
camera.awb_gains = g // 模拟增益
camera.capture_sequence(['image%02d.jpg' % i for i in range(10)]) //连续拍摄10张图片
camera.capture_continuous('img{counter:03d}.jpg'):
camera.start_recording('my_video.h264') //开始拍视频
camera.wait_recording(60) //延时60s
camera.stop_recording() //关闭拍视频