1 / 2
文档名称:

图像锐化matlab算法.docx

格式:docx   大小:11KB   页数:2页
下载后只包含 1 个 DOCX 格式的文档,没有任何的图纸或源代码,查看文件列表

如果您已付费下载过本站文档,您可以点这里二次下载

分享

预览

图像锐化matlab算法.docx

上传人:brnpnu31 2021/12/3 文件大小:11 KB

下载得到文件列表

图像锐化matlab算法.docx

文档介绍

文档介绍:精品文档,仅供学习与交流,如有侵权请联系网站删除
【精品文档】第 1 页
%常用图像锐化算法
clc
clear
close all
ima=imread('');%读入图像
ima=rgb2gray(ima);%转为灰度图像
ima=double(ima);
bw1 = edge(ima,'sobel'); %sobel算子锐化
figure;subplot(121);imshow(uint8(ima));title('原始图像');%图像显示
subplot(122);imshow(bw1);title('sobel算子锐化');
bw2 = edge(ima,'prewitt');%prewitt算子锐化
figure;subplot(121);imshow(uint8(ima));title('原始图像');
subplot(122);imshow(bw2);title('prewitt算子锐化');
bw3 = edge(ima,'roberts');%roberts算子锐化
figure;subplot(121);imshow(uint8(ima));title('原始图像');
subplot(122);imshow(bw3);title('roberts算子锐化');
bw4 = edge(ima,'log');%log算子锐化
figure;subplot(121);imshow(uint8(ima));title('原始图像');
subplot(122);imshow(bw4);title('log算子锐化');
bw5 = edge(ima,'canny'); %nny算子锐化
figure;subplot(121);imshow(uint8(ima));title('原始图像');
精品文档,仅供学习与交流,如有侵权请联系网站删除
【精品文档】第 2 页
subplot(122);imshow(bw5);title('