Captured CFA data by image sensors like CCD/or CMOS are often corrupted by noises. To produce high quality images acquired by CCD/CMOS digital cameras, the problem of noise needs addressing. In this paper, we propose a novel demosaicking algorithm with the ability to handle noisy CFA data directly. By utilizing the proposed spatial filter which can characterize the similarity likelihood in local structure accurately, the noisy pixel is then filtered depending on the degree of similarity between the current pixel and a weighted average of its neighboring pixels. Therefore the edge information can be preserved without the blurring artifacts while the capacity of noise reduction can be adjusted to the maximum degree in the smooth region. Our algorithm is the first one that can accomplish the demosaicking processing and noise removal simultaneously, which contributes to the reduction of hardware cost since one module can achieve two functions efficiently at the same time.