How the exposure works in CIRAWFilter()

70 views Asked by At

I am working on an application for processing photos and videos. When processing raw photos, I use CIRAWFilter(), including the built-in exposure value. And when working with video, the CIExposureAdjust filter is used to control exposure. But the visual effect of applying these filters is very different.

The exposure in CIRAWFilter() works more accurately, especially in the bright parts of the image, and sometimes it is possible to restore strongly overexposed areas well, which does not happen when using CIExposureAdjust.

The client really wants the same effect when processing video, but I can't solve this puzzle in any way. I understand that the difference is somehow related to raw photos, but I don't understand how. I have already tried ways to control exposure using YCbCr and CIELab color models, but I have not achieved any results.

I will be grateful for any help. Even a hint can push me on the right path.

1

There are 1 answers

3
Duncan C On

I don't know about CIRAWFilter specifically, but I can tell you that raw images from digital cameras typically have more information than the finished images that come out of the camera, including greater dynamic range. Converting a raw image to even a TIFF is destructive, and converting it to an 8-bit-per-channel image throws away quite a bit of data.

CIRAWFilter is likely able to use that extra information to do things like recover details from deep shadows or seemingly over-exposed areas. (Note that if the over-exposed area is fully "blown out" in one or more color channels then there is an unrecoverable loss of data.)

Video won't have the extra information that's in raw camera images, and so the CIExposureAdjust filter has less data to work with. It's likely that what you want to do is impossible.

(Saving a full camera raw image for every frame is beyond the data throughput of most/all digital cameras, and would result in insanely huge video files. Even high quality video is pretty heavily compressed.)