What is the difference between the 'filter' function and the 'imfilter' function?

I applied filters to cameraman.tif using
h = [2,0,-4,-3,5,19,26,19,5,-3,-4,0,2]/64.
Im1 = filter(h, 1, Im0); Im2 = imfilter(Im0, h);
where Im0 is the image, cameraman.tif.
I expected the results of the filtered image to be the same. But it turns out that it is not the case.
Can anyone enlighten me with an explanation?

Respuestas (0)

Preguntada:

el 20 de Feb. de 2015

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by