Adaptive homogeneity-directed demosaicing algorithm | Synapse