当前位置: 首页 > article >正文

Design Linear Filters in the Frequency Domain (MATLAB帮助文档)

Design Linear Filters in the Frequency Domain

这个帮助文档写得很好,简单明了,一句废话没有。

This topic describes functions that perform filtering in the frequency domain.

2-D Finite Impulse Response (FIR) Filters

The Image Processing Toolbox™ software supports one class of linear filter: the two-dimensional finite impulse response (FIR) filter. FIR filters have a finite extent to a single point, or impulse. All of the Image Processing Toolbox filter design functions return FIR filters.

FIR filters have several characteristics that make them ideal for image processing in the MATLAB® environment:

  • FIR filters are easy to represent as matrices of coefficients.

  • Two-dimensional FIR filters are natural extensions of one-dimensional FIR filters.

  • There are several well-known, reliable methods for FIR filter design.

  • FIR filters are easy to implement.

  • FIR filters can be designed to have linear phase, which helps prevent distortion.

Another class of filter, the infinite impulse response (IIR) filter, is not as suitable for image processing applications. It lacks the inherent stability and ease of design and implementation of the FIR filter. Therefore, this toolbox does not provide IIR filter support.

FIR 滤波器的主要缺点是,要达到同样的性能水平,其所需阶数远高于 IIR 滤波器。相应地,这些滤波器的延迟通常比同等性能的 IIR 滤波器大得多。

其实冈萨雷斯想的也是FIR滤波器,因为IIR滤波器就不能通过卷积实现。只是他的概念太不清楚了,就把模拟、IIR、FIR各种滤波器混在了一起。

Create Filter Using Frequency Sampling Method

This example shows how to create a 2-D filter based on a desired frequency response using the frequency sampling method.

Given a matrix of points that define the shape of the frequency response, the frequency sampling method creates a filter whose frequency response passes through those points. Frequency sampling places no constraints on the behavior of the frequency response between the given points. Usually, the response ripples in these areas. Ripples are oscillations around a constant value. The frequency response of a practical filter often has ripples where the frequency response of an ideal filter is flat.

Create the filter based on the target frequency response using the fsamp2 function. fsamp2 returns the filter h with a frequency response that passes through the points in the input matrix Hd.
在这里插入图片描述
在这里插入图片描述

在这里插入图片描述

Notice the ripples in the actual frequency response compared to the desired frequency response. These ripples are a fundamental problem with the frequency sampling design method. They occur wherever there are sharp transitions in the desired response.

You can reduce the spatial extent of the ripples by using a larger filter. However, a larger filter does not reduce the height of the ripples, and requires more computation time for filtering. To achieve a smoother approximation to the desired frequency response, consider using the frequency transformation method or the windowing method.

Create Filter Using Windowing Method

The windowing method involves multiplying the ideal impulse response with a window function to generate a corresponding filter, which tapers the ideal impulse response. Like the frequency sampling method, the windowing method produces a filter whose frequency response approximates a desired frequency response. The windowing method, however, tends to produce better results than the frequency sampling method.

The toolbox provides two functions that design two-dimensionsal filters using a window-based filter design.

fwind1 converts one or two one-dimensional windows that you specify into a two-dimensional window.

fwind2 uses a two-dimensional window that you specify.

fwind1 supports two different methods for making the two-dimensional windows:

When you specify a single one-dimensional window, fwind1 transforms the one-dimensional window using a process similar to rotation. The two-dimensional window is nearly circularly symmetric.

When you specify two one-dimensional windows, fwind1 computes their outer product. The two-dimensional window is rectangular and separable.

fwind1
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

fwind2
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

Create 2-D Filter Using Frequency Transformation of 1-D Filter

This example shows how to transform a one-dimensional FIR filter into a two-dimensional FIR filter using the ftrans2 function. This function can be useful because it is easier to design a one-dimensional filter with particular characteristics than a corresponding two-dimensional filter. The frequency transformation method preserves most of the characteristics of the one-dimensional filter, particularly the transition bandwidth and ripple characteristics. The shape of the one-dimensional frequency response is clearly evident in the two-dimensional response.

This function uses a transformation matrix, a set of elements that defines the frequency transformation. This function’s default transformation matrix produces filters with nearly circular symmetry. By defining your own transformation matrix, you can obtain different symmetries. (See Jae S. Lim, Two-Dimensional Signal and Image Processing, 1990, for details.)
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述


http://www.kler.cn/a/419115.html

相关文章:

  • Lumos学习王佩丰Excel第十八讲:LOOKUP函数与数组
  • CSDN设置成黑色背景(谷歌 Edge)
  • 大模型翻译能力评测
  • 第五讲:运算符与表达式:算术、关系、逻辑、赋值等运算符及其优先级
  • 【英特尔IA-32架构软件开发者开发手册第3卷:系统编程指南】2001年版翻译,2-39
  • JavaScript 中的原型和原型链
  • Python json 序列化
  • mongodb/redis/neo4j 如何自己打造一个 web 数据库可视化客户端?
  • Linux —— 《线程控制》
  • nmap基本用法
  • 【小白学机器学习39】如何用numpy生成总体,生成样本samples
  • 【RISC-V CPU debug 专栏 2.3 -- Run Control】
  • .NET周刊【11月第4期 2024-11-24】
  • React与Ant Design入门指南
  • springboot336社区物资交易互助平台pf(论文+源码)_kaic
  • Linux命令进阶·如何切换root以及回退、sudo命令、用户/用户组管理,以及解决创建用户不显示问题和Ubuntu不显示用户名只显示“$“符号问题
  • 桶排序(代码+注释)
  • webUI自动化(十)iframe切换
  • 【docker集群应用】Docker数据管理与镜像创建
  • Flutter:encrypt插件 AES加密处理
  • 10.请求拦截和响应拦截
  • Rust代写 OCaml代做 Go R语言 SML Haskell Prolog DrRacket Lisp
  • Jackson库--ObjecMapper
  • vue3 与 spring-boot 完成跨域访问
  • Maven java 项目,想执行verify阶段指令,通常需要配置哪些插件呢?
  • YOLOv8-ultralytics-8.2.103部分代码阅读笔记-ops.py