Waveshare IMX219-160IR not working with Jetson Nano

I have a new Jetson Nano and I am trying tio get it working with some software I wrote on my PC.

The camera seems to work with the following command:
DISPLAY=:0.0 gst-launch-1.0 nvarguscamerasrc ! 'video/x-raw(memory:NVMM), width=3280, height=2464, format=(string)NV12, framerate=(fraction)20/1' ! nvoverlaysink -e
I can see the image.

When I try to use cheese or any other program, I get an error:

(cheese:24829): Gtk-WARNING **: 23:10:10.755: Theme parsing error: cheese.css:7:35: The style property GtkScrollbar:min-slider-length is deprecated and shouldn't be used anymore. It will be removed in a future version
** Message: 23:10:10.933: cheese-application.vala:211: Error during camera setup: No device found

(cheese:24829): cheese-CRITICAL **: 23:10:10.972: cheese_camera_device_get_name: assertion 'CHEESE_IS_CAMERA_DEVICE (device)' failed

(cheese:24829): GLib-CRITICAL **: 23:10:10.972: g_variant_new_string: assertion 'string != NULL' failed

(cheese:24829): GLib-CRITICAL **: 23:10:10.972: g_variant_ref_sink: assertion 'value != NULL' failed

(cheese:24829): GLib-GIO-CRITICAL **: 23:10:10.972: g_settings_schema_key_type_check: assertion 'value != NULL' failed

(cheese:24829): GLib-CRITICAL **: 23:10:10.972: g_variant_get_type_string: assertion 'value != NULL' failed

(cheese:24829): GLib-GIO-CRITICAL **: 23:10:10.972: g_settings_set_value: key 'camera' in 'org.gnome.Cheese' expects type 's', but a GVariant of type '(null)' was given

(cheese:24829): GLib-CRITICAL **: 23:10:10.972: g_variant_unref: assertion 'value != NULL' failed

** (cheese:24829): CRITICAL **: 23:10:10.972: cheese_preferences_dialog_setup_resolutions_for_device: assertion 'device != NULL' failed

In Opencv for python i get:

ret, frame = video_capture.read()
cv2.error: /home/nvidia/build_opencv/opencv/modules/core/include/opencv2/core/mat.inl.hpp:500: error: (-215) total() == 0 || data != __null in function Mat

Can someone who has this or similar unit working please help me figure out what is happening?

hello fakhan6602,

could you please upgrade to the latest release version, since we had kernel changes to correct some imx219 known issues.
you’ll found imx219 full resolution has update to 3264x2464 for the release l4t-r32.2.
thanks

I update to jetpack 4.2.2. The results are the same.

hello fakhan6602,

this should be cheese-application issue since you’re able to stream with nvarguscamerasrc,
may I know what’s your use-case, please share some information for reference.
thanks

No other camera application works. I’ve tried webcamoid, guvcview, and more. Not of them are able to detect the camera. Open CV is also not working when I try to convert the yuv format to rgb. The program is for facial and image recognition and it works on my Ubuntu 19.04 pc.

The imx219 should be supported, and should work with something other than the one program. That indicates an os or settings problem when most software don’t work.

hello fakhan6602,

could you please double confirm that camera streaming is workable with below two approaches.

# v4l2 standard controls
$ v4l2-ctl -d /dev/video0 --set-fmt-video=width=3264,height=2464,pixelformat=RG10 --set-ctrl bypass_mode=0 --stream-mmap --stream-count=100

# nvarguscamerasrc
$ gst-launch-1.0 nvarguscamerasrc ! 'video/x-raw(memory:NVMM), width=3264, height=2464, format=(string)NV12, framerate=(fraction)21/1' ! nvoverlaysink -e`

you may also check Multimedia API Sample Applications, and you’re able to get the Multimedia API sources to have implementation.
thanks

initially v4l2-ctl was not found. I install v4l-utils and here is the response:

<<<<<<<<<<<<<<<<<<<<<< 21.00 fps
<<<<<<<<<<<<<<<<<<<<<< 21.07 fps
<<<<<<<<<<<<<<<<<<<<< 21.05 fps
<<<<<<<<<<<<<<<<<<<<< 21.03 fps
gst-launch-1.0 nvarguscamerasrc ! 'video/x-raw(memory:NVMM), width=3264, height=2464, format=(string)NV12, framerate=(fraction)21/1' ! nvoverlaysink -e
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
GST_ARGUS: Creating output stream
CONSUMER: Waiting until producer is connected...
GST_ARGUS: Available Sensor modes :
GST_ARGUS: 3264 x 2464 FR = 21.000000 fps Duration = 47619048 ; Analog Gain range min 1.000000, max 10.625000; Exposure Range min 13000, max 683709000;

GST_ARGUS: 3264 x 1848 FR = 28.000001 fps Duration = 35714284 ; Analog Gain range min 1.000000, max 10.625000; Exposure Range min 13000, max 683709000;

GST_ARGUS: 1920 x 1080 FR = 29.999999 fps Duration = 33333334 ; Analog Gain range min 1.000000, max 10.625000; Exposure Range min 13000, max 683709000;

GST_ARGUS: 1280 x 720 FR = 59.999999 fps Duration = 16666667 ; Analog Gain range min 1.000000, max 10.625000; Exposure Range min 13000, max 683709000;

GST_ARGUS: 1280 x 720 FR = 120.000005 fps Duration = 8333333 ; Analog Gain range min 1.000000, max 10.625000; Exposure Range min 13000, max 683709000;

GST_ARGUS: Running with following settings:
   Camera index = 0 
   Camera mode  = 0 
   Output Stream W = 3264 H = 2464 
   seconds to Run    = 0 
   Frame Rate = 21.000000 
GST_ARGUS: PowerService: requested_clock_Hz=36945216
GST_ARGUS: Setup Complete, Starting captures for 0 seconds
GST_ARGUS: Starting repeat capture requests.
CONSUMER: Producer has connected; continuing.
^Chandling interrupt.
Interrupt: Stopping pipeline ...
EOS on shutdown enabled -- Forcing EOS on the pipeline
Waiting for EOS...
Got EOS from element "pipeline0".
EOS received - stopping pipeline...
Execution ended after 0:00:06.281910710
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
GST_ARGUS: Cleaning up
CONSUMER: Done Success
GST_ARGUS: Done Success
Setting pipeline to NULL ...
Freeing pipeline ...
GST_ARGUS: 
PowerServiceHwVic::cleanupResources

To add to this, I was not able to use the sdk to install because I am running Ubuntu 19.04 and only 16 and 18 are supported. I used the image for JetPack 4.2.2. There may be an issue with the image if v4l-utils should be installed by default. Or I am missing a step.

Running OpenCV after v4l-utils install resulted in a green screen instead of an image and no errors.

hello fakhan6602,

your messages in comment #7 has confirmed the camera sensor functionality .
may I know what’s your use-case with OpenCV, which OpenCV release version you’re using?
thanks

I think I need to convert color space from yuv to rgb. I think the issue was just v4l-utils. Now that I have an image, I got it from here. Thank you.