analyze this code for spatio temporal gradients

조회 수: 1 (최근 30일)
shab shekan
shab shekan 2011년 8월 12일
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.

답변 (2개)

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

tani ya
tani ya 2013년 4월 8일
send me code? kindly

Community Treasure Hunt

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

Start Hunting!

Translated by