Traditional image processing workflows place edge enhancement at the end of the process, after demosaicing, white balancing, and chromatic enhancement steps have been applied. This paper investigates employing the edge enhancement simultaneously with the demosaicing process.
Ted Cooper, "Edge Detection as Part of the Demosaicing Process" in Proc. IS&T 8th Color and Imaging Conf., 2000, pp 228 - 233, https://doi.org/10.2352/CIC.2000.8.1.art00042