Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Introducing dual demosaicing (#7981)
* Introducing dual demosaicing **rationale** In some images we have areas that would be best demosaiced with an algorithm preserving high frequency information (like amaze or rcd) and other areas that might profit from another demosaicer better suited for low frequency content like vng4. This implementation follows the way @heckflosse has been doing this for rt and took the idea and some code from there. **How does it work?** 1) the sensor data is demosaiced twice - first by rcd, amaze or markesteijn 3-pass and - second by vng. 2) - analyse the demosaiced data from the high frequency demosaicer for local data change, - transform this by a sigmoid function using a user defined threshold - blur last by gaussian approximation into a blending mask. 3) The ouput image is written pixel by pixel for each channel using both demosaiced images weighed by content of the mask. **How to select the threshold?** A calculated automatic threshold is difficult to do in dt. Instead there is a button activating display of the mask instead of the image. It takes a few images to get used to it but i think it's fine this way. **performance** So far there is only cpu code but that is pretty good already. (No sse specific code) Testing on two systems suggests rcd+vng4 demosaicing is just ~20% slower than amaze alone. Please note: the demosaic.c module version has changed so presets for that module might be updated. * Support fast pixelpipe mode In case the DT_DEV_PIXELPIPE_FAST is set the dual demosaicing only executes the first step. * Start dual demosaic with a plausible threshold As Ingo tested elsewere a value of 0.15 for threshold is likely to almost correct.
- Loading branch information