求用Matlab进行边缘检测
来源:学生作业帮 编辑:搜搜做题作业网作业帮 分类:综合作业 时间:2024/08/09 23:48:59
求用Matlab进行边缘检测
用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算子边缘检测
用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算子边缘检测
![求用Matlab进行边缘检测](/uploads/image/z/2694847-31-7.jpg?t=%E6%B1%82%E7%94%A8Matlab%E8%BF%9B%E8%A1%8C%E8%BE%B9%E7%BC%98%E6%A3%80%E6%B5%8B)
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检测');
求用Matlab进行边缘检测
可以用matlab来计算图像的信噪比么,图像是经过matlab边缘检测之后的算法图
matlab中如何实现将经过边缘检测后得到的图像边缘曲线逼成直线
用MATLAB的数学形态学做图像分割的步骤是什么啊?先腐蚀在膨胀 还是说先得用到边缘检测什么的?
matlab中图像边缘检测 edge函数总在报错?
图像边缘检测算法
用matlab进行仿真
急求:用MATLAB进行多元回归分析的问题
英语翻译摘要遥感图像中机场的识别以检测跑道为主.用多种算子变换方法对机场图像的边缘检测图进行计算,提取出机场跑道对应的平
求matlab程序 对一个任意信号进行采样和恢复 用MATLAB实现
高分求matlab程序 进行多项式拟合
求用粒子群优化算法进行图像分割的程序.matlab最好