Demosaicing is the process of reconstructing the full dimension representation of an image captured by a digital camera with a color filter array. The color filter array allows for only one color measuring for each pixel and the missing two colors have to be estimated. In literature many demosaicing techniques have been proposed but the reconstructed images are affected by some visible and annoying artifacts. In this paper we propose a new effective algorithm to reduce these artifacts. This algorithm improves the performances of the demosaicing reconstruction, increasing the visual quality of the resulting images. It can be applied directly after the color interpolation, or as an off-line post-processing to improve the image provided by the digital camera.