camera_image.py 文件源码

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

项目:SmartCap 作者: TusharChugh 项目源码 文件源码
def run_main():
    # First initialize the camera capture object with the cv2.VideoCapture class.
    camera = cv2.VideoCapture(camera_port)

    #To create a new window for display
    #Disabled it for now as we can't see the image on the cap
    #cv2.namedWindow(display, cv2.WINDOW_NORMAL)    

    # Discard the first few frame to adjust the camera light levels
    for i in xrange(ramp_frames):
        temp = get_image(camera)

    #Now take the image and save it after every 1 second
    while(1):
        try:
            time.sleep(1)
            take_save_image(camera)
        except Exception, e:
            print "Exception occured \n"
            print e
            pass
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号