1, 高斯转换
clear
close all;
I = imread('e:/sdsd.bmp');
J = imnoise(I,'gaussian',0.02);
[g1,t] = edge(I,'roberts',[],'both');
[g2,t] = edge(I,'sobel',[],'both');
[g3,t] = edge(I,'Prewitt',[],'both');
[g4,t] = edge(I,'log',[],'both');
subplot(2,3,1);
imshow(J);
title('原始图像');
subplot(2,3,2);
imshow(g1);
title('roberts 算子锐化结果');
subplot(2,3,3);
imshow(g2);
title('sobel 算子锐化结果');
subplot(2,3,4);
imshow(g3);
title('Prewitt 算子锐化结果');
subplot(2,3,5);
imshow(g4);
title('log 算子锐化结果');
imwrite(J,'e:/dsf.bmp');
2, 伪彩色变换
clear;
clc;
I = imread('e:/sdsd.bmp');
G2C = grayslice(I,8);
figure;
subplot(2,2,1);
imshow(I);
figure;
subplot(2,2,2);
imshow(G2C, cool(8));
figure;
subplot(2,2,3);
imshow(G2C, hot(8));
本文介绍了使用MATLAB进行图像处理的方法,包括采用不同的边缘检测算子如Roberts、Sobel、Prewitt和LoG对图像进行锐化处理,并展示了处理后的效果对比。此外,还介绍了如何进行伪彩色变换,通过将灰度图像转换为带有颜色映射的图像来增强视觉效果。
3万+

被折叠的 条评论
为什么被折叠?



