[libcamera-devel] AE -- what is the goal was Re: Software gathering of image statistics for libcamera on Librem 5
David Plowman
david.plowman at raspberrypi.com
Mon Dec 12 11:15:09 CET 2022
Hi Pavel
On Sat, 10 Dec 2022 at 21:51, Pavel Machek via libcamera-devel
<libcamera-devel at lists.libcamera.org> wrote:
>
> Hi!
>
> > > Closest I could get is Image class (src/apps/common/image.h) used by
> > > file sinks in cam application. Would it be acceptable to move that
> > > into libcamera and use it to peek at the pixels?
> >
> > You can peek at pixels with the MappedFrameBuffer class.
> >
> > include/libcamera/internal/mapped_framebuffer.h
> > src/libcamera/mapped_framebuffer.cpp
> >
> > If we only need 200 pixels to process, I'd be very happy to see a CPU
> > based implementation that could be used on 'any' platform without an
> > ISP.
>
> For millipixels, I was using:
>
> bright pixel is at least 200/255.
>
> too bright pixel is 240/255.
>
> I want not more than 8% too bright pixels, and as long as I have that,
> I'd like at least 1% bright pixels.
>
> Is there consensus what the goal of AE should be?
There are a number of common techniques and features of such
algorithms. though many vendors do their own thing and may even have
"secret sauce" so I wouldn't go so far as to say there's any
consensus. Increasingly sophisticated image analysis techniques like
face detectors and machine learning are involved, and there is the
whole question as to how to meter best for HDR too.
Raspberry Pi's implementation, for example, I would describe as
straightforward and not worrying about any of these complications.
It's documented here:
https://datasheets.raspberrypi.com/camera/raspberry-pi-camera-guide.pdf
(section 5.8). If you want something really simple you can do worse
than use a trivial centre-weighted scheme.
Hope that helps!
David
>
> Does someone have information on what average brightness of nicely
> exposed photograph looks like? Knowing that would allow me to speed up
> AE convergence significantly.
>
> Best regards,
>
> Pavel
> --
> People of Russia, stop Putin before his war on Ukraine escalates.
More information about the libcamera-devel
mailing list