Matlab 图像灰度变换:三段线性、高低端保持、截取式
以下是代码实现:
% 读入图像
img = imread('pout.tif');
% 三段线性变换
img1 = imadjust(img, [0 0.33 0.5 0.67 1], [0 0.33 0.67 0.33 1]);
% 高低端灰度保持
img2 = imadjust(img, [], [], 2);
% 截取式灰度变换
img3 = imadjust(img, [0.2 0.8], []);
% 显示结果
subplot(2, 2, 1), imshow(img), title('原图像');
subplot(2, 2, 2), imshow(img1), title('三段线性变换');
subplot(2, 2, 3), imshow(img2), title('高低端灰度保持');
subplot(2, 2, 4), imshow(img3), title('截取式灰度变换');
原文地址: https://www.cveoy.top/t/topic/nGo7 著作权归作者所有。请勿转载和采集!