求用Matlab进行边缘检测
用Lena标准检测图像,图像与代码下面请注明是哪张图像。要完整程序。要带注释的。一、没有噪声时的检测结果1原始图像2Sobel算子边缘检测3Prewitt算子边缘检测4R...
用Lena标准检测图像,图像与代码下面请注明是哪张图像。要完整程序。要带注释的。
一、没有噪声时的检测结果
1 原始图像
2 Sobel算子边缘检测
3 Prewitt算子边缘检测
4 Roberts算子边缘检测
5 Laplace算子边缘检测
6 Canny算子边缘检测
二、加入高斯噪声(μ=0,σ^2=0.01)检测结果
1 原始图像
2 Sobel算子边缘检测
3 Prewitt算子边缘检测
4 Roberts算子边缘检测
5 Laplace算子边缘检测
6 Canny算子边缘检测
三、加入高斯噪声(μ=0,σ^2=0.02)检测结果
1 原始图像
2 Sobel算子边缘检测
3 Prewitt算子边缘检测
4 Roberts算子边缘检测
5 Laplace算子边缘检测
6 Canny算子边缘检测
有高人帮做下。发邮箱也行959966169@qq.com。谢谢了就这点分了都给你了 展开
一、没有噪声时的检测结果
1 原始图像
2 Sobel算子边缘检测
3 Prewitt算子边缘检测
4 Roberts算子边缘检测
5 Laplace算子边缘检测
6 Canny算子边缘检测
二、加入高斯噪声(μ=0,σ^2=0.01)检测结果
1 原始图像
2 Sobel算子边缘检测
3 Prewitt算子边缘检测
4 Roberts算子边缘检测
5 Laplace算子边缘检测
6 Canny算子边缘检测
三、加入高斯噪声(μ=0,σ^2=0.02)检测结果
1 原始图像
2 Sobel算子边缘检测
3 Prewitt算子边缘检测
4 Roberts算子边缘检测
5 Laplace算子边缘检测
6 Canny算子边缘检测
有高人帮做下。发邮箱也行959966169@qq.com。谢谢了就这点分了都给你了 展开
1个回答
展开全部
clear all;
close all;
warning off all;
I = imread('lena.bmp'); %%如果是其他类型图像,请先转换为灰度图
%%没有噪声时的检测结果
BW_sobel = edge(I,'sobel');
BW_prewitt = edge(I,'prewitt');
BW_roberts = edge(I,'roberts');
BW_laplace = edge(I,'log');
BW_canny = edge(I,'canny');
figure(1);
subplot(2,3,1),imshow(I),xlabel('原始图像');
subplot(2,3,2),imshow(BW_sobel),xlabel('sobel检测');
subplot(2,3,3),imshow(BW_prewitt),xlabel('prewitt检测');
subplot(2,3,4),imshow(BW_roberts),xlabel('roberts检测');
subplot(2,3,5),imshow(BW_laplace),xlabel('laplace检测');
subplot(2,3,6),imshow(BW_canny),xlabel('canny检测');
%%加入高斯噪声(μ=0,σ^2=0.01)检测结果
I_g1 = imnoise(I,'gaussian',0,0.01);
BW_sobel = edge(I_g1,'sobel');
BW_prewitt = edge(I_g1,'prewitt');
BW_roberts = edge(I_g1,'roberts');
BW_laplace = edge(I_g1,'log');
BW_canny = edge(I_g1,'canny');
figure(2);
subplot(2,3,1),imshow(I_g1),xlabel('加入高斯噪声(μ=0,σ^2=0.01)图像');
subplot(2,3,2),imshow(BW_sobel),xlabel('sobel检测');
subplot(2,3,3),imshow(BW_prewitt),xlabel('prewitt检测');
subplot(2,3,4),imshow(BW_roberts),xlabel('roberts检测');
subplot(2,3,5),imshow(BW_laplace),xlabel('laplace检测');
subplot(2,3,6),imshow(BW_canny),xlabel('canny检测');
%%加入高斯噪声(μ=0,σ^2=0.02)检测结果
I_g2 = imnoise(I,'gaussian',0,0.02);
BW_sobel = edge(I_g2,'sobel');
BW_prewitt = edge(I_g2,'prewitt');
BW_roberts = edge(I_g2,'roberts');
BW_laplace = edge(I_g2,'log');
BW_canny = edge(I_g2,'canny');
figure(3);
subplot(2,3,1),imshow(I_g2),xlabel('加入高斯噪声(μ=0,σ^2=0.02)图像');
subplot(2,3,2),imshow(BW_sobel),xlabel('sobel检测');
subplot(2,3,3),imshow(BW_prewitt),xlabel('prewitt检测');
subplot(2,3,4),imshow(BW_roberts),xlabel('roberts检测');
subplot(2,3,5),imshow(BW_laplace),xlabel('laplace检测');
subplot(2,3,6),imshow(BW_canny),xlabel('canny检测');
close all;
warning off all;
I = imread('lena.bmp'); %%如果是其他类型图像,请先转换为灰度图
%%没有噪声时的检测结果
BW_sobel = edge(I,'sobel');
BW_prewitt = edge(I,'prewitt');
BW_roberts = edge(I,'roberts');
BW_laplace = edge(I,'log');
BW_canny = edge(I,'canny');
figure(1);
subplot(2,3,1),imshow(I),xlabel('原始图像');
subplot(2,3,2),imshow(BW_sobel),xlabel('sobel检测');
subplot(2,3,3),imshow(BW_prewitt),xlabel('prewitt检测');
subplot(2,3,4),imshow(BW_roberts),xlabel('roberts检测');
subplot(2,3,5),imshow(BW_laplace),xlabel('laplace检测');
subplot(2,3,6),imshow(BW_canny),xlabel('canny检测');
%%加入高斯噪声(μ=0,σ^2=0.01)检测结果
I_g1 = imnoise(I,'gaussian',0,0.01);
BW_sobel = edge(I_g1,'sobel');
BW_prewitt = edge(I_g1,'prewitt');
BW_roberts = edge(I_g1,'roberts');
BW_laplace = edge(I_g1,'log');
BW_canny = edge(I_g1,'canny');
figure(2);
subplot(2,3,1),imshow(I_g1),xlabel('加入高斯噪声(μ=0,σ^2=0.01)图像');
subplot(2,3,2),imshow(BW_sobel),xlabel('sobel检测');
subplot(2,3,3),imshow(BW_prewitt),xlabel('prewitt检测');
subplot(2,3,4),imshow(BW_roberts),xlabel('roberts检测');
subplot(2,3,5),imshow(BW_laplace),xlabel('laplace检测');
subplot(2,3,6),imshow(BW_canny),xlabel('canny检测');
%%加入高斯噪声(μ=0,σ^2=0.02)检测结果
I_g2 = imnoise(I,'gaussian',0,0.02);
BW_sobel = edge(I_g2,'sobel');
BW_prewitt = edge(I_g2,'prewitt');
BW_roberts = edge(I_g2,'roberts');
BW_laplace = edge(I_g2,'log');
BW_canny = edge(I_g2,'canny');
figure(3);
subplot(2,3,1),imshow(I_g2),xlabel('加入高斯噪声(μ=0,σ^2=0.02)图像');
subplot(2,3,2),imshow(BW_sobel),xlabel('sobel检测');
subplot(2,3,3),imshow(BW_prewitt),xlabel('prewitt检测');
subplot(2,3,4),imshow(BW_roberts),xlabel('roberts检测');
subplot(2,3,5),imshow(BW_laplace),xlabel('laplace检测');
subplot(2,3,6),imshow(BW_canny),xlabel('canny检测');
本回答被提问者采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
善思光电科技
2023-08-29 广告
2023-08-29 广告
X-ray无损检测是一种利用X射线源发射X射线,通过X射线探测器检测物体的内部结构,以检测物体的外部形状和内部结构。它可以在医学、工业和其他领域应用,用于检测物体的形状,内部构造,或者检测物体内部的缺陷。X-ray无损检测不仅可以对不可见焊...
点击进入详情页
本回答由善思光电科技提供
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询