another way to compute space time gradient is
gradx1 = imfilter(seq,[-1 1] /2,'same');
grady1 = imfilter(seq,[-1 1]'/2,'same');
gradt1 = imfilter(seq,reshape([-1 1],[1 1 2])/2,'same');
seq is a space-time patch (stpatch) from video file around a pixel with size 7*7*3.
But I have problem in gradt1. if you run this filters on simple 3D matrix, you will find out that gradt1(:,:,3) is very different against gradt1(:,:,1) and gradt1(:,:,2).
and it makes me in crazy.
I found this code in net, and nobody answere me on there.
please check this code and analyze this code, and explain to me. I can understand how does it compute temporal gradient(gradt)?
If it need change to compute 7*7*3 volume, please tell me.