Hi, i want to open camera when i boot my jetson.
so i modify rc.local
#!/bin/bash
source ~/.bashrc
sudo -H -u username /usr/bin/python3 /home/username/tensorrt_demos/trt_yolo.py --usb 0
exit 0
so when i reboot, i receive '/tmp/pip-req-build-ofkf3yxb/opencv/modules/videoio/src/cap_v4l.cpp (890) open VIDEOIO(V4L2:/dev/video0): cant’t open camera by index.
so i tried modify cv2.VideoCapture(0) → cv2.VideoCaputre(cv2.CAP_V4L2)
but It was useless.
you’ll need to ensure you’ve usb camera device registered to linux kernel.
please test with some workarounds by adding delay in the script file before execute the video capture,
thanks