analyze this code for spatio temporal gradients

6 views (last 30 days)
shab shekan
shab shekan on 12 Aug 2011
I found this code in net.one 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).
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't understand how does it compute the temporal gradient(gradt)? If it need some changes to compute 7*7*3 volume, please tell me.

Answers (2)

tani ya
tani ya on 8 Apr 2013
i am also working on same project.is this command works on all frames of YUV file?

tani ya
tani ya on 8 Apr 2013
send me code? kindly

Community Treasure Hunt

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

Start Hunting!