tve
Posts: 12
Joined: Mon Sep 13, 2021 11:33 pm

libcamera-vid exposure info?

Thu Sep 23, 2021 8:03 pm

I'm struggling with the exposure produced by libcamera-vid (this is using an arducam imx462 camera) and have a bunch of questions:
- Is there a way to get exposure info out of libcamera-vid other than the title bar, e.g., some method that works for remote headless cameras?
- Is there a way to tune the exposure while libcamera-vid is running?
- Is `--ev -2` supposed to work? I can't see it do anything when passed negative ev values (I can hack --shutter and --gain to produce darker images, so I'm not at the end of the range)

NB: not having any python bindings for libcamera makes it such a steep learning curve to dev anything custom...

therealdavidp
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 304
Joined: Tue Jan 07, 2020 9:15 am

Re: libcamera-vid exposure info?

Fri Sep 24, 2021 5:49 am

Hi, thanks for your question. Are you using the pre-compiled binaries for libcamera and libcamera-apps supplied by Arducam? Unfortunately these are heavily modified proprietary bits of code that Arducam produce so as to by-pass all the open source and published algorithms that we provide, so there is nothing we can do to help you. You will have to ask Arducam for support. Sorry not be be able to give better news.

tve
Posts: 12
Joined: Mon Sep 13, 2021 11:33 pm

Re: libcamera-vid exposure info?

Sun Sep 26, 2021 8:59 pm

therealdavidp wrote:
Fri Sep 24, 2021 5:49 am
Are you using the pre-compiled binaries for libcamera and libcamera-apps supplied by Arducam?
To be honest, I'm not sure anymore. I went through numerous permutations 'cause I was having trouble due to what turns out to be a camera HW malfunction. This adds one more question: how do I find out which version of libcamera and libcamera-vid I have? The libcamers-xxx apps helpfully don't seem to have any --version option...
Unfortunately these are heavily modified proprietary bits of code that Arducam produce so as to by-pass all the open source and published algorithms that we provide, so there is nothing we can do to help you.
Are you sure? As far as I can tell, other than the V4L2 driver the only modified piece is ipa_rpi.so and I can't easily figure out what that piece does.

In any case, I posted 3 questions. I verified that the third question (about `--ev -2` working) is answered by checking that it indeed works with an official V2 camera, so I will ask arducam about that. But the first two questions pertain just as much to the official camera...

naushir
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 127
Joined: Mon Apr 25, 2016 10:21 am

Re: libcamera-vid exposure info?

Mon Sep 27, 2021 7:36 am

tve wrote:
Sun Sep 26, 2021 8:59 pm
Are you sure? As far as I can tell, other than the V4L2 driver the only modified piece is ipa_rpi.so and I can't easily figure out what that piece does.
The IPA is the library that handles all the 3A, sets up the various imaging configuration parameters in the ISP, and sets up the sensor gain/exposure values. As such, it is responsible for handling all user controls (like manual shutter, gain, ev, etc.). Even though the V4L2 driver may be open sourced, all of the real smarts live in the IPA.

Arducam have taken our open source libraries, modified them to match their products, and provided closed source binaries of the IPA. So we cannot help with any queries on their work.

therealdavidp
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 304
Joined: Tue Jan 07, 2020 9:15 am

Re: libcamera-vid exposure info?

Mon Sep 27, 2021 9:11 am

tve wrote:
Sun Sep 26, 2021 8:59 pm
The libcamers-xxx apps helpfully don't seem to have any --version option...
We haven't previously supplied pre-built versions so the "version" is simply the git commit id that you build from. However, this is going to be changing soon and so we'll look into this, it seems like it might be helpful. As regards the Arducam imx462, it must be the case that you're using their pre-compiled versions because there simply isn't any support for this module in mainline libcamera.
Unfortunately these are heavily modified proprietary bits of code ...
Are you sure? As far as I can tell, other than the V4L2 driver the only modified piece is ipa_rpi.so and I can't easily figure out what that piece does.
So far as I know, Arducam run an entire proprietary camera system on their camera boards, complete with a custom processor and ISP. The "v4l2 driver" is an adaptation layer that drives this closed camera system. But they don't publish any source nor share any information so in truth we have no idea what it is doing.
In any case, I posted 3 questions. I verified that the third question (about `--ev -2` working) is answered by checking that it indeed works with an official V2 camera, so I will ask arducam about that. But the first two questions pertain just as much to the official camera...
We'd love to be able to help you with libcamera but as the previous reply explains, there's really nothing we can do and all questions need to go to Arducam. If you have any questions about mainline libcamera/libcamera-apps, then we're of course delighted to try and help.

tve
Posts: 12
Joined: Mon Sep 13, 2021 11:33 pm

Re: libcamera-vid exposure info?

Mon Sep 27, 2021 4:11 pm

naushir wrote:
Mon Sep 27, 2021 7:36 am
tve wrote:
Sun Sep 26, 2021 8:59 pm
Are you sure? As far as I can tell, other than the V4L2 driver the only modified piece is ipa_rpi.so and I can't easily figure out what that piece does.
Arducam have taken our open source libraries, modified them to match their products, and provided closed source binaries of the IPA. So we cannot help with any queries on their work.
Thanks for your help! I wasn't expecting for you to support arducam products. When I use libcamera-vid with the IMX462 there's code from libcamera.org, from raspberrypi, and from arducam in the stack. The libcamera stack doesn't have a whole lot of high level architectural documentation. That makes it really challenging to determine where a fault lies. You reply clarifies quite a bit. I must admit that the more I learn the less I like the way Arducam operates... It's a shame 'cause their products do really round out the camera offerings quite a bit.

Return to “Camera board”