histequal.asv

来自「is a matlab program for image processing」· ASV 代码 · 共 36 行

ASV
36
字号
% egalizarea histogramei
f=imread('im_1_cameraman.tif');
g=histeq(f,256);
figure(1);
subplot(2,2,1), imshow(f);
subplot(2,2,2), imhist(f);
subplot(2,2,3), imshow(g);
subplot(2,2,4), imhist(g);

%modificarea contrast

I2 = imadjust(g);
level = graythresh(I2);
bw = im2bw(I2,level);
bw = bwareaopen(bw,50);

figure(2);
subplot(2,1,1), imshow(f);
subplot(2,1,2), imshow(bw);

%iluminare slaba
background = imopen(I,strel('disk',15));
figure(2);
surf(double(background(1:8:end,1:8:end))),zlim([0 255]);
set(gca,'ydir','reverse');
I2 = I - background;
imshow(I2)


%iluminare puternica
background = imopen(I,strel('disk',10));
figure(3);
surf(double(background(1:8:end,1:8:end))),zlim([0 255]);
set(gca,'ydir','reverse');
I3 = I + background;
imshow(I3)

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?