A Fast Algorithm for the Demosaicing Problem Concerning the Bayer Pattern