数字图像处理实验(12):PROJECT 05-03,Periodic Noise Reduction Using a Notch Filter 标签: 图像处理MATLAB 2017-0
实验要求:
Objective:
To understand the principle of the notch filter and its periodic noise reducing ability.
Main requirements:
Ability of programming with C, C++, or Matlab.
Instruction manual:
(a) Write a program that implements sinusoidal noise of the form given in Problem 5.14. The inputs to the program must be the amplitude, A, and the two frequency components u0 and v0 shown in the problem equation.
(b) Download image 5.26(a) and add sinusoidal noise to it, with u0 = M/2 (the image is square) and v0 = 0. The value of A must be high enough for the noise to be quite visible in the image.
(c) Compute and display the spectrum of the image. If the FFT program you developed in Project 4.01 can only handle images of size equal to an integer power of 2, reduce the size of the image to 512 x 512 or 256 x 256 using the program from Project 02-04. Resize the image before adding noise to it.
(d) Notch-filter the image using a notch filter of the form shown in Fig. 5.19(c).
这个实验的要求是使用陷波滤波器消除周期噪声。
对于某种周期噪声常常是以一对共轭的点的形式,出现在图像的频谱中,所以为我们使用一个陷波滤波器,使其正好对应那对共轭点以消除周期噪声。
实验代码:
%
close all;
clc;
clear all;
%
img = imread('Fig5.26(a).jpg');
[M, N] = size(img);
figure;
subplot(2,3,1);
imshow(img);
title('原图像');
% 产生周期噪声
C = [343, 0];
[noise, R, S] = imnoise3(M, N, C, 40000000);
subplot(2,3,2);
imshow(noise, []);
title('噪声');
% 计算傅里叶变换
img1 = double(img);
img2 = img1 + noise;
img3 = fft2(img2);
subplot(2,3,3);
imshow(img3);
title('傅里叶变换');
% 生成滤波器
sig = 100;
H = lpfilter('gaussian', M, N,sig);
subplot(2,3,4);
imshow(H);
title('滤波器');
% 频率域滤波
img_G = H .* img3;
subplot(2,3,5);
imshow(img_G);
title('频域陷波滤波');
% 傅里叶逆变换还原图像到时域
img_g = real(ifft2(img_G));
img_g = mat2gray(img_g);
subplot(2,3,6);
imshow(img_g);
title('陷波滤波结果');
实验结果:
数字图像处理实验(12):PROJECT 05-03,Periodic Noise Reduction Using a Notch Filter 标签: 图像处理MATLAB 2017-0的更多相关文章
- 数字图像处理实验(11):PROJECT 05-02,Noise Reduction Using a Median Filter 标签: 图像处理MATLAB 2017-05-26 23:
实验要求: Objective: To understand the non-linearity of median filtering and its noise suppressing abili ...
- 数字图像处理实验(总计23个)汇总 标签: 图像处理MATLAB 2017-05-31 10:30 175人阅读 评论(0)
以下这些实验中的代码全部是我自己编写调试通过的,到此,最后进行一下汇总. 数字图像处理实验(1):PROJECT 02-01, Image Printing Program Based on Half ...
- 数字图像处理实验(10):PROJECT 05-01 [Multiple Uses],Noise Generators 标签: 图像处理MATLAB 2017-05-26 23:36
实验要求: Objective: To know how to generate noise images with different probability density functions ( ...
- 数字图像处理实验(13):PROJECT 05-04,Parametric Wiener Filter 标签: 图像处理MATLAB 2017-05-27 10:59
实验要求: Objective: To understand the high performance of the parametric Wiener Filter in image restora ...
- 2021.05.03 T3 数字
2021.05.03 T3 数字 问题描述 一个数字被称为好数字当他满足下列条件: 1. 它有**2*n**个数位,n是正整数(允许有前导0) 2. 构成它的每个数字都在给定的数字集合S中. 3. 它 ...
- http://www.cnblogs.com/Matrix54/archive/2012/05/03/2481260.html
http://www.cnblogs.com/Matrix54/archive/2012/05/03/2481260.html
- input验证码框,输入非数字或非12位时,红框提示;每4位加一个空格
以下代码:input验证码框,输入非数字或非12位时,红框提示;每4位加一个空格 //input验证码框,输入非数字或非12位时,红框提示;每3位加一个空格 $(".text"). ...
- 【Ruby】【环境搭建】macOS Sierra 10.12.6 + Xcode 8 + gpg 2.2.8 + rvm 1.29.3 + Ruby 2.4.0 + RubyMine 2018.1.4
按出场顺序: macOS Sierra 10.12.6 + Xcode 8 + gpg 2.2.8 + rvm 1.29.3 + Ruby 2.4.0 + RubyMine 2018.1.4 ...
- 数字图像处理实验(16):PROJECT 06-03,Color Image Enhancement by Histogram Processing 标签: 图像处理MATLAB 2017
实验要求: Objective: To know how to implement image enhancement for color images by histogram processing ...
随机推荐
- SSH框架(2)
个人分类: Java面试 Struts 谈谈你对Struts的理解. 答: 1.struts是一个按MVC模式设计的Web层框架,其实它就是一个大大的servlet,这个Servlet名为Acti ...
- BZOJ3632: 外太空旅行
BZOJ1547: 周末晚会 https://lydsy.com/JudgeOnline/problem.php?id=1547 分析: 对于一个串旋转若干次会回到本身,旋转次数即是同构个数,这个东西 ...
- 对Tornado异步操作Sqlalchemy方法的选定 不错
使用原因 在一个实时通讯的项目中,由于需要使用Websocket这一协议,便在Python框架中选定了Tornado,也同时使用了Sqlalchemy这一ORM框架. 大家都知道Tornado有异步非 ...
- MD5中Java和Js配套实现
MD5为计算机安全领域广泛使用的一种散列函数,用以提供消息的完整性保护.用于确保信息传输完整一致.是计算机广泛使用的杂凑算法之一(又译摘要算法.哈希算法),主流编程语言普遍已有MD5实现.将数据(如汉 ...
- mybatis参数
分是不是用@Param注解的这两种情况, 1,使用@Param注解,就不用理parameterType xml文档直接用 字符串的值,若是一个类,class.property 2, 不使用@Param ...
- VS下QT的自定义槽函数修改方法
通过几天的摸索,基本发现了两个VS的槽函数的修改方法 一种是UI是通过UI 设计师拖出来的,类似VB的方法,通过拖的方法,按钮的代码是系统自动生成的,在UI.h的头文件下,这个时候,实现槽函数有个固定 ...
- week-02 线性表
一.PTA实验作业 题目1:顺序表 7-1 最长连续递增子序列 1. 设计思路 定义结构体List,定义数组Data[maxsize]表示顺序表元素,变量Position表示位置,变量Length表示 ...
- JS中有几种数据类型分别是哪几种
number,string,boolean,null,undefined,object
- MSComm 串口
MSComm 串口 http://www.docin.com/p-761416611.html http://blog.sina.com.cn/s/blog_50cfd0fc0102v27p.html
- Android中资源文件夹res/raw和assets的使用
Android中资源文件夹res/raw和assets的使用 2011-12-08 11:05 494人阅读 评论(0) 收藏 举报 androidxml存储stringencodinglayout ...