raspberrypi / picamera2

New libcamera based python library
BSD 2-Clause "Simplified" License
894 stars 188 forks source link

[OTHER] HDR Imaging #462

Closed Bra1nsen closed 1 year ago

Bra1nsen commented 1 year ago

The problem occurs because exposure and analogue gain changes take a few frames to happen (the sensor can't apply them instantly, and there is also some pipe-lining going on the software stack, so it's "a few frames").

The AGC algorithm unfortunately only remembers its current state, not the state it was in "a few frames ago". This means it may apply the wrong digital gain to the image. As I implied earlier, digital gain affects only the processed image, not the raw Bayer image which is why those would be OK.

As I also said earlier, there are patches under review for this in libcamera, I would hope they'll get merged in a week or two, but I can't give any guarantees.

REFERENCE ISSUE#399 (12th comment or so)

Any Updates here?


Moreover I saw a hdr function got implemented, how satisfied are you with the results? Maybe I can help further:

https://www.youtube.com/watch?v=rdib2wja9W8&t=2s&ab_channel=ColumbiaComputerVision

Cheers, Paul (RaspberrySkyCam)

Bra1nsen commented 1 year ago

I found QE also for Sony IMX178, they claim that the monochrom sensor gets down to 320nm. Do you think thats possible?

image

https://thinklucid.com/product/phoenix-6-mp-imx178/

I found also datasheet were it stopped at 400nm, but Iam not sure..

image

cgobat commented 1 year ago

Being (at least somewhat) sensitive at 320 nm is entirely plausible. Just because some plots don't show wavelengths <400 nm doesn't mean there's actually a sharp cutoff there (similarly, just because the former only shows down to 320, doesn't mean it goes to 0 at 319).

It looks like the wavelengths of the peaks in those two plots don't quite align, though (~480 in the first, >500 in the second). Other than that they look pretty compatible.

cgobat commented 1 year ago

Here's a quick comparison I did by digitizing those two plots:

plot_comparison