Closed uyrusali closed 3 years ago
You can update your camera id in line 92 of this file: https://github.com/vietanhdev/open-adas/blob/master/src/ui/main_window.cpp. Replace 0
with your camera id.
cv::VideoCapture video;
if (!video.open(0)) {
QMessageBox::critical(
nullptr, "Camera Error",
"Could not read from camera");
return;
}
You can update your camera id in line 92 of this file: https://github.com/vietanhdev/open-adas/blob/master/src/ui/main_window.cpp. Replace
0
with your camera id.cv::VideoCapture video; if (!video.open(0)) { QMessageBox::critical( nullptr, "Camera Error", "Could not read from camera"); return; }
Thans for quick response. I replaced 0 with 1 and it worked.
/dev/video0
on Jetson TX2 dev kit corresponds to on-board CSI camera. There might be some additional settings for creating a pipeline and using that camera. However, By replacing 0 with 1 I was able to capture video from USB camera.
You can add another parameter for camera id here: https://github.com/vietanhdev/open-adas/blob/master/src/main.cpp. However, I think the better way is to select the camera based on product id or serial number because the camera id is not a stable number to depend on.
Sure, I will look for a better solution for the selection of the camera such as product id or serial number for more stability. Thanks again.
Hello,
I succesfully built and installed the project on Jetson TX2.
When I run open-ADAS with:
I receive below error:
However, the camera works fine when I check if my Logitech USB Camera works OK command:
It looks like open-ADAS tries to grab video from
v4l2src0
where I could reach the camera with IDv4l2src
Any idea on how to solve this problem?
Thanks.