Change register in IMX219 sensor

Hi everyone,

I have a LI-IMX219-MIPI-FF-NANO-H90 from leopard imaging on a Jetson Nano 4GB. I want to capture an image at 120fps using the full sensor. When I try to use the full sensor I get an image which is about 4k, but at 30FPS.

I can open a video stream in OpenCV with gstreamer at 720p at 120 FPS the problem however is that it isn’t the full sensor. I open the camera in C++ with OpenCV the same way as C++ example on the JetsonHacks Github.
I get the following modes back if I use the example command on the main JetsonHacks CSI-Camera github page:

jetson@nano:~$ gst-launch-1.0 nvarguscamerasrc sensor_id=0 !    'video/x-raw(memory:NVMM),width=1280, height=720, framerate=120/1, format=NV12' !    nvvidconv flip-method=0 ! 'video/x-raw,width=1280, height=720' !    nvvidconv ! nvegltransform ! nveglglessink -e
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: 1640 x 1232 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  = 5 
   Output Stream W = 1280 H = 720 
   seconds to Run    = 0 
   Frame Rate = 120,000005 

I have read that you can edit the register in the IMX219 sensor through I2C to change the binning to for eg. 4x4, but I can’t figure out how to do it. I understand that the register address is a 16-bit address. I tried to read the register using the command:

sudo i2ctransfer -f -y 6 w2@0x50 0x01 0x74 r1

Which should read the address at 0x174 from the register which default should be 0 according to this datasheet. however I get 0x2d back which is the same as the value at 0x02 i2cdump:

jetson@nano:~$ i2cdump -y 6 0x50
No size specified (using byte-data access)
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f    0123456789abcdef
00: 4c 49 2d 49 4d 58 32 31 39 2d 4d 49 50 49 2d 46    LI-IMX219-MIPI-F
10: 46 2d 4e 41 4e 4f 2d 48 39 30 ff ff ff ff ff ff    F-NANO-H90......
20: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff    ................
30: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff    ................
40: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff    ................
50: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff    ................
60: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff    ................
70: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff    ................
80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff    ................
90: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff    ................
a0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff    ................
b0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff    ................
c0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff    ................
d0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff    ................
e0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff    ................
f0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff    ................

Is it possible to capture with the full sensor at 720@120FPS there seems to be alot of conflicting information about this and I can’t figure it out.

Thanks in advance.

It could be the display don’t support 120fps to limit the pipeline. Have a check below command.
Also check by v4l2-ctl to confirm the sensor cap.

v4l2-ctl -d /dev/video0 --set-fmt-video=width=1280,height=720,pixelformat=RG10 --set-ctrl bypass_mode=0 --stream-mmap

gst-launch-1.0 nvarguscamerasrc sensor_id=0 !    'video/x-raw(memory:NVMM),width=1280, height=720, framerate=120/1, format=NV12' !    nvvidconv !  fpsdisplaysink video-sink=fakesink --verbose

Thanks for the reply. I tried both commands through an SSH connection and they seem to be very conflicting and I don’t know what is happening.
The output of the v4l2-ctl command yields:

<<<<<<<<<<<<<<<<<<<<<<< 21.35 fps
<<<<<<<<<<<<<<<<<<<<< 21.18 fps
<<<<<<<<<<<<<<<<<<<<< 21.19 fps
<<<<<<<<<<<<<<<<<<<<< 21.19 fps
<<<<<<<<<<<<<<<<<<<<< 21.20 fps
<<<<<<<<<<<<<<<<<<<<<< 21.19 fps

So the sensor cap seems to be at 21.20 fps which is weird because I could clearly see in previous viewing it was atleast 60 fps with the monitor attached using GST_ARGUS

Running the gst-launch command yields the following output

GST_ARGUS: Running with following settings:
   Camera index = 0 
   Camera mode  = 5 
   Output Stream W = 1280 H = 720 
   seconds to Run    = 0 
   Frame Rate = 120,000005 
GST_ARGUS: Setup Complete, Starting captures for 0 seconds
GST_ARGUS: Starting repeat capture requests.
CONSUMER: Producer has connected; continuing.
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0/GstFakeSink:fakesink0: sync = true
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0/GstTextOverlay:fps-display-text-overlay: text = rendered: 32, dropped: 0, current: 63,89, average: 63,89
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0: last-message = rendered: 32, dropped: 0, current: 63,89, average: 63,89
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0/GstTextOverlay:fps-display-text-overlay: text = rendered: 59, dropped: 0, current: 52,47, average: 58,10
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0: last-message = rendered: 59, dropped: 0, current: 52,47, average: 58,10
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0/GstTextOverlay:fps-display-text-overlay: text = rendered: 89, dropped: 0, current: 59,79, average: 58,66
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0: last-message = rendered: 89, dropped: 0, current: 59,79, average: 58,66
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0/GstTextOverlay:fps-display-text-overlay: text = rendered: 117, dropped: 0, current: 54,61, average: 57,64
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0: last-message = rendered: 117, dropped: 0, current: 54,61, average: 57,64
...

It seems it runs at 60 fps which is weird since it is selecting 120fps mode.
Can anyone explain what is happening?

It’s must be the sensor driver issue. Have the check the frame rate control function to confirm it.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.