No Camera Available -Jetson Nano with Arducam IMX219

Dear All, I’m new to Jetson Nano Development. I installed OpenCV successfully. I also have GStreamer installed. when I’m trying to preview my camera with GStream, it starts the camera on the /dev/video0 port. But when I try to fix the autofocus on my Arducam IMX219, it crashes and sends the following error:

nvarguscamerasrc ! video/x-raw(memory:NVMM), width=(int)1280, height=(int)720, format=(string)NV12, framerate=(fraction)60/1 ! nvvidconv flip-method=0 ! video/x-raw, width=(int)1280, height=(int)720, format=(string)BGRx ! videoconvert ! video/x-raw, format=(string)BGR ! appsink
Error generated. /dvs/git/dirty/git-master_linux/multimedia/nvgstreamer/gst-nvarguscamera/gstnvarguscamerasrc.cpp, execute:645 No cameras available

(python:9420): GStreamer-CRITICAL **: 14:09:57.263: gst_mini_object_set_qdata: assertion ‘object != NULL’ failed
[ WARN:0] global /home/xxxx/opencv/modules/videoio/src/cap_gstreamer.cpp (1081) open OpenCV | GStreamer warning: Cannot query video position: status=0, value=-1, duration=-1
Traceback (most recent call last):
File “autofocus.py”, line 105, in
show_camera()
File “autofocus.py”, line 59, in show_camera
cv2.imshow(‘CSI Camera’,img)
cv2.error: OpenCV(4.5.2) /home/xxxx/opencv/modules/highgui/src/window.cpp:412: error: (-215:Assertion failed) size.width>0 && size.height>0 in function ‘imshow’

I did the following troubleshooting:

  1. Check CV2 version: 4.5.2
  2. Gstreamer Installed
  3. For setting the autofocus, I’m using the script: Nvidia_Jetson/Autofocus.py at master · ArduCAM/Nvidia_Jetson · GitHub

Any help will be appreciated.

Hi,
Please run this command and check if you can see video preview:

$ gst-launch-1.0 nvarguscamerasrc ! nvoverlaysink

Looks like the sensor driver/device tree is not ready for the camera.

Hello DaneLLL, $ ls /dev/video0 shows the camera at 0. But when I ran the command $ gst-launch-1.0 nvarguscamerasrc ! nvoverlaysink, it shows the following error:

Setting pipeline to PAUSED …
Pipeline is live and does not need PREROLL …
Setting pipeline to PLAYING …
New clock: GstSystemClock
Error generated. /dvs/git/dirty/git-master_linux/multimedia/nvgstreamer/gst-nvarguscamera/gstnvarguscamerasrc.cpp, execute:645 No cameras available

(gst-launch-1.0:7830): GStreamer-CRITICAL **: 02:08:39.760: gst_mini_object_set_qdata: assertion ‘object != NULL’ failed
Got EOS from element “pipeline0”.
Execution ended after 0:00:00.325368781
Setting pipeline to PAUSED …
Setting pipeline to READY …
Setting pipeline to NULL …
Freeing pipeline …

Hi,
If you see device node is present, should be able to do raw capture through v4l2-ctl command. But certain driver/device tree is not ready and it does not work with hardware ISP engine. We would suggest contact Arducam to get further support.

Or you can try Pi camera V2. It is supported by default and can plug and play.

I can capture the video. I’m just facing issue while I try to fix the autofocus.

Sorry to tell current Jetson not support auto focus yet.

Hello, ShaneCCC thanks for the reply. Can you verify me if I can use the following Arducam: https://www.amazon.com/Arducam-Autofocus-Microphone-Computer-Raspberry/dp/B08RHTG845/ref=sr_1_5?dchild=1&keywords=Arducam+IMX219+Auto+Focus&qid=1617120826&sr=8-5 with Jetson nano

Because they advertised it as if it has an autofocus feature. If Jetson doesn’t support the autofocus feature, how can I manually fix the focus, because my videos are coming zoomed up?

You may need to consult with vendor if can get the i2c command to set the focus position by i2c utility.(set the position to infinite)

I solved the autofocus issue contacting the arducam vendor. There is a software called AMCap to adjust the focus. I used it to resolve the issue temporarily. Since, AMCap doesn’t have any linux binary to install, they offer support using UVC camera modules for linux based system. https://www.arducam.com/docs/uvc-camera-module/use-arducam-uvc-cameras-on-linux/

1 Like