From 4ba64e622705fde7e159aafb7fc4c8eb092fdec4 Mon Sep 17 00:00:00 2001 From: 13339479676 Date: Fri, 31 Dec 2021 23:38:11 +0800 Subject: [PATCH] readme docker install method --- README.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/README.md b/README.md index 5cdc79e..402b22b 100644 --- a/README.md +++ b/README.md @@ -55,6 +55,17 @@ webcam_opencv(device_index=0, quit_key='q', is_autoSaveFrame=False, frame_saveDi ``` + +#### :white_check_mark: 方法三:docker image安装(容器版) + +```shell +xhost +local:root # 配置xhost +sudo docker run --ipc=host -it -v /tmp/.X11-unix:/tmp/.X11-unix -e DISPLAY=unix$DISPLAY --device=/dev/video0:/dev/video0 opencv-webcam-script:v0.1 # 进入容器 +python3 opencv_webcam.py # 运行脚本程序 +``` + + +

使用教程