This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

SK-AM62A-LP: Controls over Exposure in High Resolution - imx219

Part Number: SK-AM62A-LP

Hello,

I am just trying to control the exposure indoor and outdoor.

I am following this thread 
https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1303303/faq-am62a7-how-to-set-the-minimum-maximum-exposure-time-and-analog-gain-for-2a-algorithm?tisearch=e2e-sitesearch&keymatch=exposure#

  1 . How to control the manual exposure setting?

   if i set any value exposure it is not affecting anything at all
   

   

v4l2-ctl -d /dev/v4l-subdev2 -L         

User Controls

                       exposure 0x00980911 (int)    : min=4 max=3522 step=1 default=1600 value=1600
                horizontal_flip 0x00980914 (bool)   : default=0 value=0 flags=modify-layout
                  vertical_flip 0x00980915 (bool)   : default=0 value=0 flags=modify-layout

Image Source Controls

              vertical_blanking 0x009e0901 (int)    : min=4 max=63071 step=1 default=1062 value=1062
            horizontal_blanking 0x009e0902 (int)    : min=168 max=168 step=1 default=168 value=168 flags=read-only
                  analogue_gain 0x009e0903 (int)    : min=0 max=232 step=1 default=0 value=0
                red_pixel_value 0x009e0904 (int)    : min=0 max=1023 step=1 default=1023 value=1023
          green_red_pixel_value 0x009e0905 (int)    : min=0 max=1023 step=1 default=1023 value=1023
               blue_pixel_value 0x009e0906 (int)    : min=0 max=1023 step=1 default=1023 value=1023
         green_blue_pixel_value 0x009e0907 (int)    : min=0 max=1023 step=1 default=1023 value=1023

Image Processing Controls

                 link_frequency 0x009f0901 (intmenu): min=0 max=0 default=0 value=0 (456000000 0x1b2e0200) flags=read-only
				0: 456000000 (0x1b2e0200)
                     pixel_rate 0x009f0902 (int64)  : min=182400000 max=182400000 step=1 default=182400000 value=182400000 flags=read-only
                   test_pattern 0x009f0903 (menu)   : min=0 max=4 default=0 value=0 (Disabled)
				0: Disabled
				1: Color Bars
				2: Solid Color
				3: Grey Color Bars
				4: PN9
                   digital_gain 0x009f0905 (int)    : min=256 max=4095 step=1 default=256 value=256


2. Whenever I am streaming at 8MP resolution, it flickers.
   
   



   

  • 1 . How to control the manual exposure setting?

       if i set any value exposure it is not affecting anything at all

    How did you set the exposure manually?

    Whenever I am streaming at 8MP resolution, it flickers.
       

    Did you follow the ISP tuning guide to add GStreamer plugin and exposure setting?

    Regards,

    Jianzhong

  • How did you set the exposure manually?

    using v4l2-ctl -d /dev/v4l-subdev2 -c exposure=100 but there is no provision of setting manual exposure

    Did you follow the ISP tuning guide to add GStreamer plugin and exposure setting?

    Yes, I have followed the ISP tuning guide, and in gsttiovxisp.c, specifically on lines 1845 and 1986, I'm performing calculations according to the guidelines. However, the exposure time is exceeding 2 seconds, whereas we aim for it to be less than 0.33 microseconds

    Regards,

    Udhayamoorthi Ramasamy

  • You can try to change gsttiovxisp.c, setting both min and max of exposure and analog gain to be the same. For example:

      p_ae_dynPrms->exposureTimeRange[count].min = <desired exposure time>;
      p_ae_dynPrms->exposureTimeRange[count].max = <desired exposure time>;
      p_ae_dynPrms->analogGainRange[count].min = <desired gain>;
      p_ae_dynPrms->analogGainRange[count].max = <desired gain>;
    

  • I am using the RPI-IMX219 sensor , but I'm unsure about the appropriate values for exposure and gain settings

  • I have followed this, but I will need to adjust it according to the light conditions. If I change anything, it goes into auto exposure mode or turns off exposure entirely, but I cannot manually increase the exposure value based on that.

    Regards,
    Udhayamoorthi Ramasamy

  • 2. Whenever I am streaming at 8MP resolution, it flickers.

    Is this still the issue? Can you share the Gstreamer pipeline you're using?


  • gst-launch-1.0 v4l2src device=/dev/video-rpi-cam0 io-mode=5 ! queue leaky=2 ! video/x-bayer, width=3280, height=2464,format=rggb ! tiovxisp sink_0::device=/dev/v4l-rpi-subdev0 sensor-name="SENSOR_SONY_IMX219_RPI" dcc-isp-file=/opt/imaging/imx219/linear/dcc_viss.bin sink_0::dcc-2a-file=/opt/imaging/imx219/linear/dcc_2a.bin format-msb=7 ! tiovxmultiscaler ! video/x-raw, format=NV12, width=1920, height=1080 ! kmssink driver-name=tidss sync=false


    1. Can you please what value i need to set for imx219 RPI in night/dark time?
    2. why using v4l2-ctl is not setting the exposure value?
     
    root@am62axx-evm:/opt/edgeai-gst-apps/scripts# v4l2-ctl -d /dev/v4l-subdev2 -L                 
    
    User Controls
    
                           exposure 0x00980911 (int)    : min=4 max=1759 step=1 default=1600 value=1759
                    horizontal_flip 0x00980914 (bool)   : default=0 value=0 flags=modify-layout
                      vertical_flip 0x00980915 (bool)   : default=0 value=0 flags=modify-layout
    
    Image Source Controls
    
                  vertical_blanking 0x009e0901 (int)    : min=4 max=64455 step=1 default=683 value=683
                horizontal_blanking 0x009e0902 (int)    : min=1528 max=1528 step=1 default=1528 value=1528 flags=read-only
                      analogue_gain 0x009e0903 (int)    : min=0 max=232 step=1 default=0 value=0
                    red_pixel_value 0x009e0904 (int)    : min=0 max=1023 step=1 default=1023 value=1023
              green_red_pixel_value 0x009e0905 (int)    : min=0 max=1023 step=1 default=1023 value=1023
                   blue_pixel_value 0x009e0906 (int)    : min=0 max=1023 step=1 default=1023 value=1023
             green_blue_pixel_value 0x009e0907 (int)    : min=0 max=1023 step=1 default=1023 value=1023
    
    Image Processing Controls
    
                     link_frequency 0x009f0901 (intmenu): min=0 max=0 default=0 value=0 (456000000 0x1b2e0200) flags=read-only
    				0: 456000000 (0x1b2e0200)
                         pixel_rate 0x009f0902 (int64)  : min=182400000 max=182400000 step=1 default=182400000 value=182400000 flags=read-only
                       test_pattern 0x009f0903 (menu)   : min=0 max=4 default=0 value=0 (Disabled)
    				0: Disabled
    				1: Color Bars
    				2: Solid Color
    				3: Grey Color Bars
    				4: PN9
                       digital_gain 0x009f0905 (int)    : min=256 max=4095 step=1 default=256 value=256
    root@am62axx-evm:/opt/edgeai-gst-apps/scripts# v4l2-ctl -d /dev/v4l-subdev2 -c exposure=1759
    


  • 1. Can you please what value i need to set for imx219 RPI in night/dark time?

    You shouldn't need to set the exposure manually. The auto-exposure algorithm should take care of that. Please note that the SDK doesn't have DCC binaries for resolution 3280x2464.

    2. why using v4l2-ctl is not setting the exposure value?

    This can be either a sensor driver issue. Please check the imx219 driver which we do not support. This could also be because the auto-exposure algorithm overwrites the exposure you set manually.