I 摘要
对于许多图像处理问题,传统的线性滤波方法存在着固有的缺陷,为此,最近30年来,发展起来了一类新的非线性滤波器结构—中值滤波器。这类滤波器在图像信号处理中具有独特的优势,目前已成为非线性滤波领域的一个研究热点。本文主要针对图像的低级处理(主要是滤噪声)问题,对中值滤波器做了一些初步研究工作,从而给出一些新的滤波器算法。
主要工作包括以下几个方面:
1.结合新的算法结构,改进了传统多级中值滤波器算法,得到一种新的中值滤波算法,并且进行编程,在MATLAB中生成M文件,在M文件下建立函数体,通过在函数体下对滤波器算法的编程,使函数体达到滤波的功能,然后进行滤波,并且和MATLAB中的算法比较,仿真显示这种算法具有比较好的图像滤噪和细节保护性能。
2.结合新的递归算法结构,改进了传统多级中值滤波器算法,得到一种新的中值滤波算法一一新型递归中值滤波器。
3.提出了基于FPGA的数字图像中值滤波器的设计算法,并且对算法进行了初步的分析。
关键词: 图像处理,滤噪,中值滤波,算法
I Abstract
For many image processing problem, the traditional linear method of filtering there was an inherent defect, to that end, the last 30 years, has developed a new class of nonlinear filter - median filter. Such filters in image signal processing has unique advantages, has become a field of nonlinear filtering hotspot. This article mainly for the low-level image processing (mainly filter noise) problem, the median filter has done some preliminary research, presented some new filter algorithm.
Its main tasks are the following:
1. In light of the new algorithm, improving the traditional multi-level median filter algorithm, get a new median filtering algorithms and programming in MATLAB M generated in the document, the document under this filter M - Generating algorithm, and then filtering, and MATLAB and the algorithm, the simulation showed that this method is relatively good image filtering noise and details of protection.
2. Recursive algorithm in light of the new structure, and improve the traditional multi-level median filter algorithm, get a new filter in the value of January 1 in the value of the new recursive filter.
3. To the FPGA-based digital image in the value of the filter design algorithms, and algorithm on a preliminary analysis.
Key words: image processing ,filtering noise, the median filter, the algorithm
II 目 录
摘要.................................................................................................................................... I Abstract .............................................................................................................................. II 目 录 ................................................................................................................................ III 1绪言 .................................................................................................................................1
1.1课题背景 ..............................................................................................................1 1.2课题研究的目标和意义 .........................................................................................2
1.2.1研究目标..................................................................................................................................... 2
1.2.2意义 ............................................................................................................................................. 2
1.3国内外概况 ...........................................................................................................2 2 数字图像处理的基本理论.................................................................................................4
2. 1数字图像处理的发展和应用 .................................................................................4 2.2图像与数字图像 ....................................................................................................4 2.3数字图像的处理方法 .............................................................................................6
2.4数字图像的矩阵表示 .............................................................................................6 2.5数字图像处理中的常用噪声模型 ...........................................................................6 3 中值滤波的基本理论........................................................................................................8
3.1中值滤波理论 .......................................................................................................8
3.2一维中值滤波原理 ................................................................................................8 3.3二维中值滤波原理 ................................................................................................9 3.4中值滤波的主要特性 ........................................................................................... 10
3.4.1中值滤波的主要特性 ............................................................................................................ 10
4 MATLAB在数字图像中的应用 ....................................................................................... 12
4.1 MATLAB的概念................................................................................................. 12
4.2 MATLAB的优势和特点 ...................................................................................... 12 4.3 MATLAB的主要功能.......................................................................................... 14 4.4MATLAB在图像处理中的应用 ............................................................................ 15 5中值滤波器的MATLAB实现 ......................................................................................... 16
5.1 系统原理 ........................................................................................................... 16 5.2 系统的软件编程实现 .......................................................................................... 17
5.2.1实现的基本功能 ..................................................................................................................... 17
5.3结果的比较 ......................................................................................................... 17
5.3.1截取一副灰度图象................................................................................................................. 17 5.3.2加椒盐噪声 .............................................................................................................................. 18
5.3.3加高斯噪声 .............................................................................................................................. 20
6 新型的中值滤波器算法构想 ........................................................................................... 24
6.1新型递归多级中值滤波器 .................................................................................... 24 6.2传统的多级中值滤波器 ....................................................................................... 24
6.3 提出的关于中值滤波的递归算法结构 ................................................................. 25
6.3.1该算法的结构思想................................................................................................................. 25
6.4新型递归多级中值滤波器 .................................................................................... 26 6.5小结 ................................................................................................................... 27
III 7中值滤波器的硬件平台实现 ............................................................................................ 28
7.1 FPGA简介.......................................................................................................... 28 7.2系统设计方案 ..................................................................................................... 28 7.2.1 3×3模块功能和设计方法。 .............................................................................. 29 7.2.2行列计数器模块 ............................................................................................... 30 7.3拟解决的关键问题 .............................................................................................. 30 7.4基于硬件的中值滤波快速算法设计与实现 ........................................................... 30 7.5 FPGA 的设计实现 .............................................................................................. 32
7.5.1 FPGA的选取........................................................................................................................... 32
7.5.2中值滤波算法硬件实现分析 ............................................................................................... 33 7.5.3FPGA程序的设计................................................................................................................... 34 7.5.4VHDL编程 ............................................................................................................................... 36
8 总结 .............................................................................................................................. 38 致谢.................................................................................................................................. 39 参考文献........................................................................................................................... 40 独创性声明 ....................................................................................................................... 42 学位论文(设计)版权使用授权书 .................................................................................... 43 附件.................................................................................................................................. 44 IV