Do I need to convert units in the following codes?

1 次查看(过去 30 天)
% Do I need to convert units to do the following image processing?
% Which one is correct? Id1 (OR) Id?
Ia=imread('Fig0343(a)(skeleton_orig).tif'); %Fig. (a)
figure,imshow(Ia),title('Fig.(a) - Original Image');
w1=fspecial('sobel');
w2=w1';
Idx=imfilter(Ia,w1);
Idy=imfilter(Ia,w2);
Id1=Idx+Idy;
% (OR)
Id=im2uint8(mat2gray(double(Ia)+double(Idx)+double(Idy))); % Fig. (d) -> Sobel of Fig. (a)
figure,subplot(1,2,1),imshow(Id1);
subplot(1,2,2),imshow(Id);

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Convert Image Type 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by