实验要求:

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的更多相关文章

  1. 数字图像处理实验(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 ...

  2. 数字图像处理实验(总计23个)汇总 标签: 图像处理MATLAB 2017-05-31 10:30 175人阅读 评论(0)

    以下这些实验中的代码全部是我自己编写调试通过的,到此,最后进行一下汇总. 数字图像处理实验(1):PROJECT 02-01, Image Printing Program Based on Half ...

  3. 数字图像处理实验(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 ( ...

  4. 数字图像处理实验(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 ...

  5. 2021.05.03 T3 数字

    2021.05.03 T3 数字 问题描述 一个数字被称为好数字当他满足下列条件: 1. 它有**2*n**个数位,n是正整数(允许有前导0) 2. 构成它的每个数字都在给定的数字集合S中. 3. 它 ...

  6. http://www.cnblogs.com/Matrix54/archive/2012/05/03/2481260.html

    http://www.cnblogs.com/Matrix54/archive/2012/05/03/2481260.html

  7. input验证码框,输入非数字或非12位时,红框提示;每4位加一个空格

    以下代码:input验证码框,输入非数字或非12位时,红框提示;每4位加一个空格 //input验证码框,输入非数字或非12位时,红框提示;每3位加一个空格 $(".text"). ...

  8. 【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 ...

  9. 数字图像处理实验(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 ...

随机推荐

  1. 用JQuery写出登录弹出框

    类似百度的登录弹出框,可用jquery的fadeIn(),hide(),show(),slideDown()等动画函数实现,一下为html5 代码: <!DOCTYPE html> < ...

  2. Spring3.x JSR-303

    JSR303介绍 JSR303-Bean Validation描述:This JSR will define a meta-data model and API for JavaBeanTM vali ...

  3. 洛谷 1155 (NOIp2008)双栈排序——仔细分析不合法的条件

    题目:https://www.luogu.org/problemnew/show/P1155 这道题教会我们要多思考. 好好分析过后发现同一个栈里不能有升序.就用它写了一个30分. #include& ...

  4. Java面试题:栈和队列的实现

    面试的时候,栈和队列经常会成对出现来考察.本文包含栈和队列的如下考试内容: (1)栈的创建 (2)队列的创建 (3)两个栈实现一个队列 (4)两个队列实现一个栈 (5)设计含最小函数min()的栈,要 ...

  5. 删除SVN被锁定文件

    svn的working copylocked这种情况大多是因为上次svn命令执行失败且被锁定了. 如果cleanup没有效果的话只好手动删除锁定文件. cd 到svn项目目录下,然后执行命令:del ...

  6. Eclipse里git提交冲突rejected – non-fast-forward

    Eclipse里commit代码,其实只是提交到本地仓库,需要push才会提交到远程的git仓库,这时是一个本地仓库到远程仓库的同步过程.Git是分布式的,每个人在本地仓库维护本地的自己的那一份代码, ...

  7. STM8S103 PB4和PB5

    STM8S103的PB4和PB5只能配置成开漏输出,用作I2C通讯: PB4和PB5不能配置为推挽输出,来控制LED之类的,因为内部没有上拉电阻,IO拉高电压只有1.8V左右,要想控制LED,只能通过 ...

  8. 第14篇 PSR-3规范(日志)

    1. Specification 1.1 Basics The LoggerInterface exposes eight methods to write logs to the eight RFC ...

  9. mysql5.7不支持0000-00-00 00:00:00的默认时间设置

    方案一: 数据不多的话把原有的5.53的数据改一下符合要求(数据库时间字段里千万不能出现0000-00-00 00:00:00这样的值),然后导出.sql文件,导出的.sql文件里把 DEFAULT ...

  10. 使用阿里云服务器(OOS)实现图片上传

    一: 页面 <%@ page language="java" contentType="text/html; charset=utf-8" pageEnc ...