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?

回答(0 个)

类别

帮助中心File Exchange 中查找有关 Image Filtering and Enhancement 的更多信息

提问:

2015-2-20

Community Treasure Hunt

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

Start Hunting!

Translated by