Welcome to AI Vision USB Camera repository
0.Camera preview screen
Camera preview screen
Camera preview screenInstall dockerGot imageOnlineOfflineEnter DockerFor Raspberry Pi and JetsonPreview cameraMultiple terminals: enter the same Docker
Briefly introduce how to enter the container and preview the camera image through the Docker script (for detailed Docker content, please refer to the Docker course).
Install docker
Use the Docker official script to install Docker, which is to install the latest version of Docker.
curl -fsSL https://get.docker.com -o get-docker.sh
xxxxxxxxxxsudo sh get-docker.sh

Got image
Just choose one of the two methods below.
Online
xxxxxxxxxxsudo docker pull yahboomtechnology/ros-melodic:usb_cam
Offline
xxxxxxxxxxsudo docker load -i yahboomtechnology-ros-melodic-usb-cam.tar
Enter Docker
Write Docker script file--DockerRos.sh
xxxxxxxxxxsudo nano DockerRos.sh
For Raspberry Pi and Jetson
Add following content.
xxxxxxxxxx#!/bin/bashxhost +docker run -it \--net=host \--env="DISPLAY" \--env="QT_X11_NO_MITSHM=1" \-v /tmp/.X11-unix:/tmp/.X11-unix \--security-opt apparmor:unconfined \--device=/dev/video0 \yahboomtechnology/ros-melodic:usb_cam /bin/bash
Input following command to add executable permissions
xxxxxxxxxxsudo chmod +x DockerRos.sh
Input following command to run script file
xxxxxxxxxxsudo ./DockerRos.sh
Preview camera
After entering Docker, Input following command to enter the user directory
xxxxxxxxxxcd
xxxxxxxxxxpython3 CameraPreview.py

Multiple terminals: enter the same Docker
Run Docker through a script: If it has been started through a docker script, you do not need to enter this command again.
xxxxxxxxxxsudo ./DockerRos.sh
View running containers
xxxxxxxxxxsudo docker ps
Enter the running container: CONTAINER ID can be the first four digits
xxxxxxxxxxsudo docker exec -it [CONTAINER ID] /bin/bash
