How to apply imfilter function in 3d
Afficher commentaires plus anciens
oh = [-1 9 -45 0 45 -9 1] / 60;
V_x = imfilter( V, oh, 'corr', 'replicate', 'same' );
V_y = imfilter( V, oh', 'corr', 'replicate', 'same' );
Now, for applying imfilter with respect to z direction, I made this:
function V_z = central_diff_wrt_z( V )
[nRow, nCol, nDep] = size(V);
idx = 2:nDep-1;
V_z = zeros( size(V) );
V_z(:,:,2:end-1) = ( V(:,:,idx+1) - V(:,:,idx-1) ) / 2;
V_z(:,:,1) = ( V(:,:,2) - V(:,:,1) ) / 2;
V_z(:,:,end) = ( V(:,:,end) - V(:,:,end-1) ) / 2;
end
However, I want to use imfilter in z-direction. How to use it?
Réponses (0)
Catégories
En savoir plus sur Simulink 3D Animation 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!