Weird / non deterministic behavior

  1. Where did you get the camera module(s)?
    Official website
  2. Model number of the product(s)?
    B0264, Stereo ov2311
  3. What hardware/platform were you working on?
    Jetson NX, Linux version 4.9.201-tegra

I have a problem with this camera, for some reason information displayed in “v4l2-ctl -l” is different from information that I can read from registers.
For example from “v4l2-ctl -l” I can read next info: exposure 0x00980911 (int) : min=0 max=65535 step=1 default=1466 value=1000, on the other hand registers show me: Min: 5, Max: 50, Default: 30, Value: 1000.

Code that I use to read from registers:

CTRL_REG_TYPE     = 0x401
CTRL_REG_MIN      = 0x402
CTRL_REG_MAX      = 0x403
CTRL_REG_STEP     = 0x404
CTRL_REG_VALUE    = 0x406

CTRL_REG_GAIN     = 0x980913

arducam_utils = ArducamUtils(0)

arducam_utils.write_dev(CTRL_REG_TYPE, CTRL_REG_EXPOSURE)
Min: {arducam_utils.read_dev(CTRL_REG_MIN)[1]}, \
Max: {arducam_utils.read_dev(CTRL_REG_MAX)[1]}, \
Default: {arducam_utils.read_dev(CTRL_REG_DEFAULT)[1]}, \
Value: {arducam_utils.read_dev(CTRL_REG_VALUE)[1]}, \

I can write exposure beyond 50 using registers and it works.

But after reboot things become way more complicated. After reboot v4l2-ctl shows me that max exposure now is 50 and default is 30, registers show the same. And I am not able to change exposure beyond 50. It can be fixed only by physical power outage.

Also I have problem with not being able to change exposure through opencv. Code below works with other cameras, but not with this stereo camera. The only way to change exposure - is to change registers. Why?

cap = cv2.VideoCapture(0, cv2.CAP_V4L2)
cap.set(cv.CAP_PROP_EXPOSURE, 100)

Thank you for the information,
This seems to be a known problem.
I will conduct related tests recently.
After the problem is fixed, we will send you a firmware upgrade tool.

Hi @addast

Try this:
b0264_firmware_update(ov2311_dual_uc_689).tar.gz (23.0 KB)

What is the correct I2C bus for jetson NX (Cam1)? I tried 10, but it failed:

sudo ./firmware_update -m b0264_ov2311_dual_lanes2_firmware -i 10
[INFO] Write checksum.
[INFO] Write update flag.
[INFO] Sending... |                                                                                                       | ETA: 0h00m00s
[ERROR] Write firmware data failed, ret: -1, block: 0

Oh, sorry, I forgot to mention that this update tool needs to be used on Nano. Do you have Jetson Nano?
If not, I can try to see if I can make it work on NX

Or you can try the following steps:

  1. power off Jetson Xavier NX (need to unplug the power)
  2. Connect to the power supply and turn it on
  3. Execute the following command
    sudo sh -c "echo 50000> /sys/bus/i2c/devices/i2c-2/bus_clk_rate"
  4. Run the update tool program

Thanks. Problem with weird exposure behavior fixed.

But problem with OpenCV exposure control still remains, maybe it’s just a software problem on OpenCV side, I use 4.5.2, both c++ and python have this problem.

cap = cv2.VideoCapture(0, cv2.CAP_V4L2)
cap.get(cv2.CAP_PROP_EXPOSURE) - always returns -1
cap.set(cv2.CAP_PROP_EXPOSURE, 100) - always return False / doesn't work

I currently solve this problem by writing to appropriate registers, but I wish that I will be able to do that through OpenCV (Works with other cameras).

Opencv cannot obtain exposure control normally because of different IDs. What opencv wants is exposure_time but what we provide is exposure