low-pass filter/低通滤波器
blur(image, result, Size(5,5));
- smooth an image by replacing each pixel by the average pixel value computed over a rectangle neighborhood.
GaussianBlur(image, result, Size(5,5), 1.5);
- give more importance to the closer pixels in the neighborhood of a pixel.
中值滤波器
- medianBlur(image, result, 5);
左边是加了椒盐噪声的图片,右边是经过中值滤波处理的图片。