Demosaic is the key algorithm to interpolate Bayer image into RGB image, the quality of this algorithm is directly related to ISP pipeline. Ispforfun will spend some effort on this module. Ispforfun First notice the implementation of the AHD algorithm in Dcraw, but the AHD algorithm is not suitable for the direct use of hardware implementation, so the necessary modifications to AHD, a hardware-based AHD scheme is obtained. The image below is the effect diagram of the AHD algorithm.
The renderings above have not been processed artifacts removal, so there is also a noticeable false color.
The second algorithm implemented is a direction-based algorithm, the implementation of the algorithm is less expensive. Using this algorithm, the same output effect graph is obtained.
We can find this direction-based algorithm, the output effect has not yet reached modified AHD effect. Ispforfun still needs to be explored.
So please keep your eye on it.