IMX477 with USB UVC Adapter images are way too dark

Hello,

I have a problem with the IMX477 Arducam in combination with the USB UVC adapter board, where the resulting images are way too dark to be usable.

Sorry, in advance, if this results in a double post. But my previous post for some reason got hidden/removed from Akismet bot and I am not sure, if it will come back?

Now onto the problem itself:

  1. Where did you get the camera module(s)?
    https://robotshop.com

  2. Model number of the product(s)?

  • B0278: IMX477 USB UVC adapter board
  • B0262: IMX477 12MP Arducam module
  1. What hardware/platform were you working on?
    Mac

  2. Instructions you have followed. (link/manual/etc.)
    Using the open source app CameraController (GitHub - Itaybre/CameraController: đź“· Control USB Cameras from an app) on a Mac to adjust the image settings.
    Also tried on an Android device with several USB webcam apps.

  3. Problems you were having?
    When using the USB UVC adapter board, the images are way too dark to be usable, even if I increase the exposure and gain values. Additionally, the frame rate then suffers a lot, due to increased exposure time.
    The problem does not occur, if I plug in the camera directly into the CSI port of a Raspberry Pi and use it with raspivid. There the exposure, gain and frame rate look perfectly fine, as I would expect.

My problem seems pretty much similar to the one mentioned in this thread, just using the above mentioned hardware configuration: HQ cam + 16 mm lens + Arducam UVC adaptor gives black picture - #4 by lomsdalen

  1. The dmesg log from your hardware?

  2. Troubleshooting attempts you’ve made?

  • Exchanged ribbon cables
  • Tried different lenses
  • Used on a Raspberry Pi without the UVC adapter board (problem not present in this configuration)
  • Tested on Android and MacOS with different apps
  1. What help do you need?
    Any help is appreciated to resolve this dark image problem! It seems there was a firmware update available for the UVC adapter board, if I understood the posts in the linked thread correctly. So I would love to get my hands on updates firmware(s) for my camera and UVC adapter board too. Plus instructions on how to update those on a Mac (or a Linux VM, if that’s possible).

Thanks in advance :slight_smile:

@pomfried

Do you mean it has no effect? Can you take pictures with maximum and minimum exposure and gain?

@pomfried

I have reconsidered your question and believe that the issue may be caused by outdated firmware. I have sent you a private message with my email address. Please contact me and I will provide you with the latest firmware for updating purposes.

It has an effect, but not enough to be usable, sadly. And image quality gets worse, the more I increase the gain the value.

Thank you! I will contact you immediately :slight_smile:

Hello,

I seem to have the same problem with my IMX477 12MP arducam camera (model B0240) and an USB UVC adapter board (B0278) marked UC-733 rev.B on the pcb.
The camera works fine when connected directly to the CSI interface on a raspberry pi but when connected to the UVC usb adapter board in windows 10 i get a black screen and only when i point it directly at a bright light it shows up vaguely.

both the camera and the UVC usb adapter were bought from UCtronics.com in december 2020. They were used briefly but have been stored in the closet since now.
Can you please send me the firmware update for this problem.

Thnx

@denvanz

Certainly.
Please check your inbox and feel free to send me an email.

Hello!

So I updated the firmware of the UVC adapter board, but I am not sure if anything changed in regards to the image brightness.
Actually I am a bit confused, if the problem is a bit random too maybe. Because while testing some more the last days, before I updated, I actually was able to get some good images, but only during daylight. It seems like the image quality gets exponentially worse, as daylight gets a bit dimmer.

For example:
On a cloudy day, inside, with no room lights turned on → Image quality seems very good!
As soon as the sunset begins, the image gets darker very quickly. Trying to use the camera in a room with lights turned on at night is pretty much unusable! Even with the updated firmware I can just barely see the light sources when pointing at them. Everything else is basically darkness. The weird thing is, even pointing the camera at the laptop screen results in a rather dark image, even though the entire image is covered by a bright screen, which under daylight conditions was perfectly readable.
In comparison the integrated webcam of the MacBook has no issues whatsoever under these conditions: Normal frame rate and good image brightness.

I am a bit at a loss here, what could be causing this strange behavior. Is there any reference pictures I could compare against under these lighting conditions? Or is there any open source app I could check out, which is known to be working properly, just to make sure it is not a software issue (even though I tried multiple programs already)? Do you have any other ideas what I could do?

Additionally I will conduct some more testing, to see, if I can find out anything else on my own.

Thanks for your support :slight_smile:

Edit:
Okay, I just tested the camera via CSI interface on a Raspberry Pi again and besides an odd auto white balance, the image is so much brighter and usable. Here’s the command output:

$ libcamera-still -t 0

Made X/EGL preview window
[0:20:56.414879267] [9790]  INFO Camera camera_manager.cpp:293 libcamera v0.0.0+3866-0c55e522
[0:20:56.453786979] [9791]  INFO RPI raspberrypi.cpp:1374 Registered camera /base/soc/i2c0mux/[email protected]/[email protected] to Unicam device /dev/media1 and ISP device /dev/media0
[0:20:56.462819604] [9790]  INFO Camera camera.cpp:1035 configuring streams: (0) 2028x1520-YUV420
[0:20:56.465938349] [9791]  INFO RPI raspberrypi.cpp:761 Sensor: /base/soc/i2c0mux/[email protected]/[email protected] - Selected sensor format: 2028x1520-SBGGR12_1X12 - Selected unicam format: 2028x1520-pBCC

And the window title reads “(30.01 fps) exp 32987.00 ag 8.00 dg 1.00”.

Edit 2:
Another test with using the USB UVC adapter on the Raspberry Pi shows similar results as on Mac and also seems much more finnicky to get working, compared to the CSI interface. For example the app “Cheese” doesn’t detect the camera at all via USB, “libcamera-still” also is unable to use it, even though it can list it via “libcamera-still --list-devices”. And in VLC opening it as a capture device seems to work, but with the known issues of bad exposure/gain/frame rate (and it seems the settings there don’t seem to affect the output at all, except resolution?). I am beginning to feel, that there might be an issue with the way gain is handled when using the UVC board. Or is it a limitation of the UVC standard?

Hi,

Thnx for your reply. I checked my inbox and i did not receive anything yet. maybe i am missing something?

@denvanz

I have checked with the relevant team, and they have confirmed that they received your email. They will respond to you as soon as possible. Thank you for your patience.

Hi @Edward,

do you have any other suggestions for me, regarding my last post? I really have no ideas what could be causing it, but it still seems weird to me, that using the CSI interface gives such a different result compared to the UVC USB adapter board, even with the latest firmware.
And I am not sure how the firmware interacts differently with the sensor than using something like libcamera and if there are any restrictions imposed by the UVC protocol?

Thanks!

@denvanz

Please note that libcamera can only run cameras with MIPI protocol. As your camera already uses UVC protocol, it will not be compatible with libcamera.

The reason for this difference is that the Raspberry Pi has a set of isp for optimization.
Of course, uvc also has corresponding hardware isp. This happens because the default effect is used without deep optimization