数学建模--数字图像处理(1)--亮度变换与空间滤波

数学建模–数字图像处理–亮度变换与空间滤波

在数学建模竞赛中,还存在一类大的模块就是数字图像处理相关算法的使用以及图像的显示。最近正好也在学数字图像处理这一课程,基于两者利用Matlab编程给出一些示例

原文:
http://blog.csdn.net/qq_34861102/article/details/77914486


亮度变换工具:

g = imadjust(f,[low_in;high_in],[low_out;high_out],gamma)
uiopen('D:\Users\Outlier\Desktop\test.jpg',1)
g = imadjust(test,[0;1],[1;0]);
subplot(1,2,1)
imshow(test)
subplot(1,2,2)
imshow(g)

这里写图片描述


线性空间滤波器:

fspecial('laplacian',a)

实现一个拉普拉算子掩膜

这里写图片描述

uiopen('D:\Users\Outlier\Desktop\test.jpg',1)
h1 = fspecial('laplacian',0);
g1 = test - imfilter(test,h1);   %原图像中减去拉普拉算子处理的结果
h2 = [1 1 1;1 -8 1; 1 1 1];
g2 = test - imfilter(test,h2);
subplot(1,3,1)
imshow(test)
subplot(1,3,2)
imshow(g1)
subplot(1,3,3)
imshow(g2)

非线性空间滤波器:

工具函数:ordfilt2

g = ordilt2(f,m*n,ones(m,n));

这里写图片描述

I = imread('eight.tif');
J = imnoise(I,'salt & pepper',0.02);
K = medfilt2(J);
subplot(1,3,1)
imshow(I)
subplot(1,3,2)
imshow(J)
subplot(1,3,3)
imshow(K)
  • 0
    点赞
  • 8
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值