vision.py 文件源码

python
阅读 26 收藏 0 点赞 0 评论 0

项目:2016-Vision 作者: Team4761 项目源码 文件源码
def capture_images():
    global count
    global frame
    global camera_resolution
    with picamera.PiCamera() as camera:
        camera_resolution = camera.resolution
        camera.shutter_speed = 100
        time.sleep(0.5) #Shutter speed is not set instantly. This wait allows time for changes to take effect.
        log.info("Initialized camera")
        max_frames = args.max_frames
        with picamera.array.PiRGBArray(camera) as stream:
            for index, foo in enumerate(camera.capture_continuous(stream, format="bgr", use_video_port=True)):
                if stopped is True:
                    return
                count = index
                log.info("Captured image. Starting to process...")
                stream.seek(0)
                stream.truncate()
                frame = stream.array
                log.debug("Converted data to array")
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号