Looking for some advice / input on an approach to implementing a kind of "RGB Channel Clipping" feature.
I want to be able to monitor whether or not I have extreme clipping of either the Red, Green or Blue channel of the liveview image; before it is processed / de-bayered. ( on the RAW image )
Most camera's implement a kind of histogram / zebra's feature to let you know where you are clipping. This kind of feature is gargantuan task at this point given my limited knowledge of OpenGL or any other graphics libraries, let alone implementation on a lower powered SOC like those on Raspberry Pi's.
While researching this, It was brought to my attention that RED has an interesting exposure tool on their camera's, known as "Traffic Lights" where each light is activated when a particular channel has clipped above a set threshold. ( read more here: https://www.red.com/red-101/red-camera-exposure-tools )

This seems far more approachable, and rather simple to add into a GUI.When about 2% of the image pixels for a particular color channel have become clipped, the corresponding traffic light will turn on. This can be particularly helpful in situations where just the red channel has become clipped within a skin tone, for example. In that case, the right goal post would be much lower than it would appear otherwise, since all three channels haven't become clipped.
My application is using a modified version of this example app ( libcamera-raw, https://github.com/raspberrypi/libcamer ... ra_raw.cpp)
I would rather not waste any CPU cycles on a task that is purpose built for a GPU, does anybody know of a good library or way to access the Pi's GPU for compute within an Libcamera-app for a task such as this? Or better yet does libcamera expose per channel image statistics such as # of clipped pixels?
Note: I am aware of the "Post-Processing" Pipeline that is available in libcamera-apps, including a histogram example ( https://github.com/raspberrypi/libcamer ... togram.cpp ); but this applied after the ISP processing which is of no use to me in this case.