analyze this code for spatio temporal gradients
Afficher commentaires plus anciens
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.
Réponses (2)
Catégories
En savoir plus sur Image Transforms dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!