camera.py 文件源码

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

项目:Controller-Hand 作者: ardamavi 项目源码 文件源码
def main():
    # Get Model:
    model_file = open('Data/Model/model.json', 'r')
    model = model_file.read()
    model_file.close()
    model = model_from_json(model)
    model.load_weights("Data/Model/weights.h5")

    # Get camera:
    cap = cv2.VideoCapture(0)

    # Open game in browser:
    open_game(browser='chrome', url='http://apps.thecodepost.org/trex/trex.html')

    while 1:
        # Get image from camera:
        ret, img = cap.read()
        Y = predict(model, img)
        if Y == 0:
            release()
        elif Y == 1:
            press()
    cap.release()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号