Can't set exposure on IMX477 with UVC carrier board

1.Which seller did you purchase the product(s) from?
2.The Model number of the product(s) you have purchased?
3.Which Platform are you using the product(s) on?
Ubuntu 20.04 amd64

I am unable to set the absolute exposure on the imx477 camera using the uvc carrier board on ubuntu 20.04 via v4l or opencv.

I’ve tried setting the value using cap.set(cv2.CAP_PROP_EXPOSURE, exposure). as well as with v4l.

the following script works for my built in webcam but does not work for the arducam. any help is appreciated!

the output of the v4l settings is shown here:
cos@cos-thinkpad-yoga:~/projects/camstuff/cam4$ v4l2-ctl -d /dev/video2 -l

User Controls

                 brightness 0x00980900 (int)    : min=-64 max=64 step=1 default=0 value=0
                   contrast 0x00980901 (int)    : min=0 max=64 step=1 default=32 value=32
                 saturation 0x00980902 (int)    : min=0 max=128 step=1 default=64 value=64
                        hue 0x00980903 (int)    : min=-40 max=40 step=1 default=0 value=0
    white_balance_automatic 0x0098090c (bool)   : default=1 value=1
                      gamma 0x00980910 (int)    : min=72 max=500 step=1 default=100 value=100
                       gain 0x00980913 (int)    : min=0 max=100 step=1 default=0 value=0
       power_line_frequency 0x00980918 (menu)   : min=0 max=2 default=2 value=2 (60 Hz)
  white_balance_temperature 0x0098091a (int)    : min=2800 max=6500 step=1 default=4600 value=4600 flags=inactive
                  sharpness 0x0098091b (int)    : min=0 max=6 step=1 default=3 value=3
     backlight_compensation 0x0098091c (int)    : min=0 max=2 step=1 default=1 value=1

Camera Controls

              auto_exposure 0x009a0901 (menu)   : min=0 max=3 default=3 value=1 (Manual Mode)
     exposure_time_absolute 0x009a0902 (int)    : min=1 max=5000 step=1 default=157 value=110
 exposure_dynamic_framerate 0x009a0903 (bool)   : default=0 value=1
 focus_automatic_continuous 0x009a090c (bool)   : default=1 value=0


Here is the python code I am using to build a HDR image:
import cv2
import time
import numpy as np
import subprocess

def merge_hdr(images, exposure_times):
    exposure_times = np.array(exposure_times, dtype=np.float32)
    exposure_times /= 10
    alignMTB = cv2.createAlignMTB()

    # Estimate camera response function (CRF)
    calibrateDebevec = cv2.createCalibrateDebevec()
    responseDebevec = calibrateDebevec.process(images, exposure_times)
    # Merge images into an HDR linear image
    mergeDebevec = cv2.createMergeDebevec()
    hdrDebevec = mergeDebevec.process(images, exposure_times, responseDebevec)

    # Tone map the HDR image to 8-bit channels
    tonemap = cv2.createTonemap(2.2)
    ldr = tonemap.process(hdrDebevec)

    # Convert to 8-bit and save
    ldr_8bit = np.clip(ldr*255, 0, 255).astype('uint8')
    cv2.imwrite('./images/hdr_image.hdr', ldr_8bit)
    merge_mertens = cv2.createMergeMertens()
    fusion = merge_mertens.process(images)
    cv2.imwrite('./images/fusion.png', fusion * 255)

def main():
    cap = cv2.VideoCapture(2)
    #cap.set(cv2.CAP_PROP_AUTO_EXPOSURE, 0.75)
    width = 1920
    height = 1080
    cap.set(cv2.CAP_PROP_FRAME_WIDTH, width)
    cap.set(cv2.CAP_PROP_FRAME_HEIGHT, height)
    exposure = 0.1
    count =0
    cap.set(cv2.CAP_PROP_EXPOSURE, exposure)
    while cap.isOpened():
        # Grab frame
        ret, frame =
        if ret:
            #cv2.imshow('Frame', frame)
            output_path = './images/output_-'+str(exposure)+'-.png'
            cv2.imwrite(output_path, frame)

        # Set exposure manually
        command = "v4l2-ctl -d 2 -c auto_exposure=1 -c exposure_time_absolute="+str(exposure)
        output =, shell=True)
        # Increase exposure for every frame that is displayed
        exposure += 20
        if count >=20:

    # Close everything
    merge_hdr(images, exposures)