Focus pixels correction in ML Raw Video
While utilizing Magic Lantern (ML) for DSLR filmmaking and still photography, we have to solve some problems with image quality. When we shoot video in RAW, we need to implement focus dots removal algorithm. In other case each frame will be covered with series of pink pixels and this is not good. Not all of Canon cameras with ML firmware have pink dots, but that issue is essential and we can offer a solution.
Methods to suppress pink pixels
- In-camera correction
- Standard algorithm for hot and dead pixel correction
- Maps for focus pixels via FPM files
- Programming model to generate focus pixels positions
- Combination of both fpm files and programming models
- 2-pass or multi-pass focus pixel maps
- Green plane recovery and chroma smoothing for RAW data to discover and to interpolate pink pixels
The latest method is basically an implementation of green plane interpolation, but this is not demosaicing. This is actually an algorithm of local evaluation of green values at pink pixel positions without taking into account adjacent blue and red pixels. Such an approach is viable as soon as focus pixels always reside in red or blue pixels of RAW bayer data. We've implementeed such an algorithm on AVX to ensure fast performance for focus pixels removal. One should admit, that such a method is not applicable for Dual ISO images.
Standard demosaicing algorithm even with quite big sliding window and with high PSNR is useless for that task, because we need interpolate green plane without any knowledge about blue and red pixel values to correct pink pixels. So, we have to implement something different from demosaicing. We've actually done pure green plane interpolation together with adaptive median filtering. This is the key to get better results for focus pixels removal while doing realtime MLV processing.