Zhang, the difference is that there is a rotation of the kernel by 180 degrees (pi radians) between the two.
So for:
h = [1 2 3
4 5 6
7 8 9];
and
h1 = [9 8 7
6 5 4
3 2 1];
x = randn(20,20);
isequal(imfilter(x,h,'corr'),imfilter(x,h1,'conv'))
returns a 1.
