实验要求:

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. OneNote如何使用

    自从安装了Office2013后发现office套件中有很多的好东西,今天要和大家分享的就是Office套件中的OneNote软件,这狂软件能够很方便的记录我们生活中的一些学习资料.一些决绝方法的经验 ...

  2. 【JQuery】学习

    JavaScript参考 JQuery 学习总结及实例 1.JQuery概念 A.Jquery是一个优秀的Javascript框架.它是轻量级的js库 ,它兼容CSS3,还兼容各种浏览器,jQuery ...

  3. Spring IOC容器在Web容器中是怎样启动的

    前言 我们一般都知道怎样使用spring来开发web应用后,但对spring的内部实现机制通常不是很明白.这里从源码角度分析下Spring是怎样启动的.在讲spring启动之前,我们先来看看一个web ...

  4. 谨慎安装Python3.7.0,SSL低版本导致Pip无法使用

    最新新配置了一台服务器.安装 的时候直接使用了最新的Python 3.7最新版本. 安装成功,编译成功.但是用pip 安装包的时候提示:pip is configured with locations ...

  5. php excel 设置单元格格式为文本格式

    学习源头:https://www.cnblogs.com/php-linux/p/6179442.html 解决 PHPExcel 长数字串显示为科学计数 在excel中如果在一个默认的格中输入或复制 ...

  6. 蓝桥杯 基础练习 BASIC-30 阶乘计算

    基础练习 阶乘计算   时间限制:1.0s   内存限制:512.0MB 问题描述 输入一个正整数n,输出n!的值. 其中n!=1*2*3*…*n. 算法描述 n!可能很大,而计算机能表示的整数范围有 ...

  7. .Net 框架实现AOP(动态代理实现AOP,本文为翻译)

    在上一节,我们将静态实现AOP,但是对于一个大型项目,要想为每个类,每个方法都去实现AOP ,进行日志记录和权限验证似乎是不可能的. 即使可能对于成百上千个类维护,也是很难维护.所以今天的主题就是如标 ...

  8. Fragment的陷阱:概述

    现在主流的APP都会使用到Fragment,相信你也一定使用过,今天为大家介绍一下我曾经踏过的一个关于Fragment的坑. 以前做过的一个项目,Fragment嵌套高德地图,当再次进入Fragmen ...

  9. MySQL 性能测试经验

    一.背景 近期在进行资源调度管理平台的重构工作,其中的Resource/Property数据库设计,在没有更加优化的方案前,打算沿用当前平台的数据库结构:这就需要对当前平台的数据库结构进行剖析研究,并 ...

  10. Linux性能监测:监测目的与工具介绍

    性能监测是系统优化过程中重要的一环,如果没有监测.不清楚性能瓶颈在哪里,优化什么呢.怎么优化呢?所以找到性能瓶颈是性能监测的目的,也是系统优化的关键.本文对Linux性能监测的应用类型.底线和监测工具 ...