Manual Settings for CSI-USB Adapter + IMX477

Hi everyone,

I am currently using over 50 sets of the following setup and planning to deploy more soon:

  • Camera B0279 (IMX477 for Jetson) with a lens
  • Adapter B0278 (CSI-USB)
  • Connected to a PC running Windows 10/11

For my application, this solution is nearly perfect. However, there’s one issue that’s starting to cause problems at this scale…

The problem lies in setting the camera parameters. Currently, I use manual settings. I have written a custom program for the camera, which we use to take photos. During the startup, the program sends the desired camera settings to the adapter.

The most crucial parameter is exposure. I have disabled the automatic mode and manually set the exposure to a specific value, such as -4.

(I’ve had some adventures with this, but luckily @Dion was quick to help me out…)

However, setting this parameter doesn’t always yield the same image. Sometimes the photos are brighter, and sometimes darker, with the deviations occurring randomly – I haven’t identified any pattern that would explain why an image would be lighter or darker.

This is becoming a significant problem. As the number of devices increases, so do the complaints about my product. I should mention that these photos are taken under studio conditions (consistent lighting values), so every photo should be identical. Yet, the differences are quite noticeable.

Therefore, my question is, do we have an expert here who can help with this issue? From my perspective, it seems necessary to write new firmware for the B0278 (CSI-USB) adapter, which would fix certain values such as white balance, ISO sensitivity, exposure time, etc. (or simply all settings).

I am willing to pay for the development of such firmware.

Thank you!

I need some information to further judge the problem:

  1. Can you send me this difference comparison chart?
  2. Can you check that the board numbers on the back of the camera are the same (e.g. UC-698 revD)

In addition, I would like to add that the factors that affect brightness are not only exposure, but also gain, analog gain, and digital gain.

I use gstreamer as an example.
You can use the following command to view the controls supported by the nvarguscamerasrc component
gst-inspect-1.0 nvarguscamerasrc

It can be found that exposuretimerange gainrange ispdigitalgainrange three parameters can be controlled (eg: exposuretimerange=“34000 358733000”). After each parameter, set the two values ​​to the same fixed value, which is not affected by isp.

Sample

gst-launch-1.0 nvarguscamerasrc ispdigitalgainrange="0 0" gainrange="4 4" exposuretimerange="1000000 1000000" sensor_id=0 ! 'video/x-raw(memory:NVMM),width=1920, height=1080, framerate=30/1, format=NV12' ! nvvidconv flip-method=0 ! nvvidconv flip-method=0 ! nvvidconv ! fpsdisplaysink -e

The components may differ due to version issues, so they can be replaced according to the actual components.

Hi @Edward, thanks for the suggestions, but unfortunately, they won’t work for me.

The keyword here is Windows + CSI-USB adapter Arducam B0278.

When the camera is connected directly to the CSI port (e.g., in RPI or Jetson) and controlled from Linux, it is possible (as you mentioned) to fully control the parameters…

However, I am using this camera on Windows (via USB) connected through an Arducam B0278 (CSI-USB) adapter, and here the adapter handles all the magic settings, while the user only has access to standard parameters, which even in (pseudo) manual settings have wide ranges and this ultimately results in differences in the image.

There is no way to precisely enforce fixed parameters from Windows.
I think the solution is custom firmware for the adapter… and ideally, a firmware generator where I can input the target parameters, and it generates the firmware.

I have already had some problems with this adapter (e.g., it would not accept parameter changes, or at other times parameter changes would occur in a different range) – @Dion helped me with these issues by organizing new firmware, and it was clear that this firmware directly affected the camera parameters. Hence, my assumption that fixing the parameters in the firmware would help… (previously it was a problem because the parameters were fixed at the wrong values, but if they were set to the correct values, it would solve my problem).

I assume that fixing my problem goes beyond standard methods, so I am willing to pay for the preparation of a solution…

@MateuszL

I’m sorry, Dion is my colleague. He told me about your situation. I mistakenly thought that the problem was still on Jetson. I’m glad to hear that you have no problem on Jetson.

For the problem you mentioned on Windows, the firmware contains many control algorithm source programs. If there is a problem with the algorithm, it will indeed affect the effect. If a certain control effect is not smooth enough or cannot be controlled, then the algorithm logic in the firmware does need to be updated.

I discussed this with Dion this morning, and I will help him investigate this issue.

1 Like

Hi @MateuszL
I know it is an urgent matter.
We are checking the problem internally. Hopefully, we can get it resolved asap.

1 Like

Hi @MateuszL
Our setup:

  • B0278 UVC-CSI adapter board

  • B0240

We tried the Python code in the link below and captured 100 images. All of them look good without overexposure or underexposure problems. You can check the Python code and 100 pictures here.

When I take photos in a series, I also didn’t notice this issue.

I will try to extract only the part responsible for the camera from my code and prepare an application to reproduce this problem.

Note that the exposure time changes with the frame rate. The general maximum exposure time calculation formula is:
1

Opencv correspondence table