Edge Detection as Part of the Demosaicing Process