Calculating a partial derivative in an 3D image

6 vues (au cours des 30 derniers jours)
Felippe Trigueiro Angelo
Felippe Trigueiro Angelo le 8 Avr 2019
I have a 3D image (I) and I want to calculate the partial derivatives d(I)/dxdy, d(I)/dxdz, d(I)/dydz. I know that matlab has the functions imgradient, but I don't know how to calculate this.
Thanks for all the support.

Réponse acceptée

Matt J
Matt J le 8 Avr 2019
Modifié(e) : Matt J le 8 Avr 2019
You could use diff, e.g.,
dIdxdy = diff( diff(I,1,1), 1,2);
Or, for maximum flexibility, you could use convolution. For example, if you want central differences,
dx=[1;0;-1];
dy=dx.';
dIdxdy=convn( convn(I,dx,'same') ,dy,'same');

Plus de réponses (0)

Community Treasure Hunt

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

Start Hunting!

Translated by