MATLAB: Low-pass filter

low-pass filterwatermarked

how to add a Low-pass filter the watermarked picture, i.e., replace each pixel by the average of its
NxN pixel neighborhood (for border pixels, you could e.g. extend the picture to the outside
by gray pixels with pixel value 128).
I use my watermarked picture as
wmarked = imread('markedimage.png');

Best Answer

hsize=?? % define
h=fspecial('average',hsize);
filter_wmarked=imfilter(wmarked,h);