Use JetCam1. JetCam installation2. JetCam use2.1, CSI cameraMain code explanationCall the cameraGet the camera image2.1.1, single-channel camera2.1.2, multi-channel camera2.2, USB cameraReferences
JetCam is an easy-to-use Python library developed by NVIDIA for the Jetson platform, which is used to integrate and operate USB cameras or CSI cameras
git clone https://github.com/NVIDIA-AI-IOT/jetcam
xxxxxxxxxx
cd jetcam
xxxxxxxxxx
sudo python3 setup.py install
xxxxxxxxxx
sudo pip3 install ipywidgets
JetCam provides typical sample programs to demonstrate the calling of CSI and USB cameras to users.
xxxxxxxxxx
The example needs to be run using Jupyter Lab. Using our factory image system, you can directly access it through the motherboard IP: 8888!
Enter the folder where the CSI camera is located on the Jupyter Lab web page and open the corresponding folder:
xxxxxxxxxx
/home/jetson/jetcam/notebooks/csi_camera
Note: If you are not familiar with Jupyter Lab, you can read the Jupyter Lab tutorial to learn basic operations!
width: image output width
height: image output height
xxxxxxxxxx
from jetcam.csi_camera import CSICamera
camera = CSICamera(width=224, height=224)
xxxxxxxxxx
image = camera.read()
Source code path
xxxxxxxxxx
/home/jetson/jetcam/notebooks/csi_camera/csi_camera.ipynb
Running phenomenon
After opening the program file, a single unit block runs from top to bottom:
Source code path
xxxxxxxxxx
/home/jetson/jetcam/notebooks/csi_camera/multi_csi_camera.ipynb
Running phenomenon
After opening the program file, a single unit block runs from top to bottom:
Jupyter Lab enters the folder where the USB camera is located and opens the file. The factory image system folder path is:
xxxxxxxxxx
/home/jetson/jetcam/notebooks/usb_camera