How to create volume sobel filter

1 vue (au cours des 30 derniers jours)
sunday nwokolo
sunday nwokolo le 27 Août 2014
I am working on volume image colorisation and i will like to create volume sobel filter, this is what i did but i kept getting errors %Gx=[[-1 0 1; -2 0 2; -1 0 1];[-2 0 2; -4 0 4; -2 0 2];[-1 0 1;-2 0 2;-1 0 1]]; Gx(1,:,:)=[-1 0 1; -2 0 2; -1 0 1]; Gx(2,:,:)=[-2 0 2; -4 0 4; -2 0 2]; Gx(3,:,:)=[-1 0 1;-2 0 2;-1 0 1]; %Gy=[[1 2 1; 0 0 0; -1 -2 -1];[2 4 2;0 0 0;-2 -4 -2];[1 2 1;0 0 0; -1 -2 -1]]; Gy(:,1,:)=[1 2 1; 0 0 0; -1 -2 -1]; Gy(:,2,:)=[2 4 2;0 0 0;-2 -4 -2]; Gy(:,3,:)=[1 2 1;0 0 0; -1 -2 -1]; %Gz=[[1 2 1; 2 4 2; 1 2 1];[0 0 0;0 0 0;0 0 0];[-1 -2 -1,-2 -4 -2,-1 -2 -1]]; Gz(:,:,1)=[1 2 1; 2 4 2; 1 2 1]; Gz(:,:,2)=[0 0 0;0 0 0;0 0 0]; Gz(:,:,3)=[-1 -2 -1,-2 -4 -2,-1 -2 -1]; % convolve the image Mx=convn(double(gy), double(Gx)); My=convn(double(gy), double(Gy)); Mz=convn(double(gy), double(Gz));

Réponses (0)

Catégories

En savoir plus sur 3-D Volumetric Image Processing dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by