matlab fspecial 用法解释

2024-06-24 00:48
文章标签 matlab 用法 解释 fspecial

本文主要是介绍matlab fspecial 用法解释,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!

fspecial 函数用于建立预定义滤波算子,其语法格式为:
h = fspecial(type)
h = fspecial(type para)
其中 type 指定算子的类型, para 指定相应的参数
type 的类型有:
1 'average'
averaging filter

为均值滤波,参数为 hsize 代表模板尺寸,默认值为【 3 3 】。
H = FSPECIAL('average',HSIZE) returns an averaging filter H of size

HSIZE. HSIZE can be a vector specifying the number of rows and columns in


H or a scalar, in which case H is a square matrix.

The default HSIZE is [3 3].
2  'disk'
circular averaging filter

为圆形区域均值滤波,参数为 radius 代表区域半径,默认值为 5.
H = FSPECIAL('disk',RADIUS) returns a circular averaging filter

(pillbox) within the square matrix of side 2*RADIUS+1.


The default RADIUS is 5.

3 'gaussian'
Gaussian lowpass filte
r

为高斯低通滤波,有两个参数, hsize 表示模板尺寸,默认值为【 3 3 】, sigma 滤波器的标准值,单位为像素,默认值为 0.5.
H = FSPECIAL('gaussian',HSIZE,SIGMA) returns a rotationally

symmetric Gaussian lowpass filter
of size HSIZE with standard


deviation SIGMA (positive). HSIZE can be a vector specifying the


number of rows and columns in H or a scalar, in which case H is a


square matrix.


The default HSIZE is [3 3], the default SIGMA is 0.5.

4 'laplacian' filter approximating the 2-D Laplacian operator
为拉普拉斯算子,参数 alpha 用于控制算子形状,取值范围为【 0 1 】,默认值为 0.2.

H = FSPECIAL('laplacian',ALPHA) returns a 3-by-3 filter


approximating the shape of the two-dimensional Laplacian


operator. The parameter ALPHA controls the shape of the


Laplacian and must be in the range 0.0 to 1.0.


The default ALPHA is 0.2.

5 'log'
Laplacian of Gaussian filter

为拉普拉斯高斯算子,有两个参数, hsize 表示模板尺寸,默认值为【 3 3 】, sigma 为滤波器的标准差,单位为像素,默认值为 0.5.
H = FSPECIAL('log',HSIZE,SIGMA) returns a rotationally symmetric

Laplacian of Gaussian filter of size HSIZE with standard deviation


SIGMA (positive). HSIZE can be a vector specifying the number of rows


and columns in H or a scalar, in which case H is a square matrix.


The default HSIZE is [5 5], the default SIGMA is 0.5.

6 'motion'
motion filter

为运动模糊算子,有两个参数,表示摄像物体逆时针方向以 theta 角度运动了 len 个像素, len 的默认值为 9 theta 的默认值为 0
H = FSPECIAL('motion',LEN,THETA) returns a filter to approximate, once

convolved with an image, the linear motion of a camera by LEN pixels,


with an angle of THETA degrees in a counter-clockwise direction. The


filter becomes a vector for horizontal and vertical motions.
The


default LEN is 9, the default THETA is 0, which corresponds to a


horizontal motion of 9 pixels.

7 'prewitt'
Prewitt horizontal edge-emphasizing filter

用于边缘增强,大小为【 3 3 】,无参数
H = FSPECIAL('prewitt') returns 3-by-3 filter that emphasizes

horizontal edges by approximating a vertical gradient. If you need to


emphasize vertical edges, transpose the filter H: H'.



[1 1 1;0 0 0;-1 -1 -1].

8 'sobel'
Sobel horizontal edge-emphasizing filter

用于边缘提取,无参数
H = FSPECIAL('sobel') returns 3-by-3 filter that emphasizes

horizontal edges utilizing the smoothing effect by approximating a


vertical gradient. If you need to emphasize vertical edges, transpose


the filter H: H'.



[1 2 1;0 0 0;-1 -2 -1].

9 'unsharp'
unsharp contrast enhancement filter

为对比度增强滤波器。参数 alpha 用于控制滤波器的形状,范围为【 0 1 】,默认值为 0.2.
H = FSPECIAL('unsharp',ALPHA) returns a 3-by-3 unsharp contrast


enhancement filter. FSPECIAL creates the unsharp filter from the


negative of the Laplacian filter with parameter ALPHA. ALPHA controls


the shape of the Laplacian and must be in the range 0.0 to 1.0.


The default ALPHA is 0.2. 

matlab fspecial 用法解释

这篇关于matlab fspecial 用法解释的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!



http://www.chinasem.cn/article/1088739

相关文章

Python中yield的用法和实际应用示例

《Python中yield的用法和实际应用示例》在Python中,yield关键字主要用于生成器函数(generatorfunctions)中,其目的是使函数能够像迭代器一样工作,即可以被遍历,但不会... 目录python中yield的用法详解一、引言二、yield的基本用法1、yield与生成器2、yi

深度解析Python yfinance的核心功能和高级用法

《深度解析Pythonyfinance的核心功能和高级用法》yfinance是一个功能强大且易于使用的Python库,用于从YahooFinance获取金融数据,本教程将深入探讨yfinance的核... 目录yfinance 深度解析教程 (python)1. 简介与安装1.1 什么是 yfinance?

Python库 Django 的简介、安装、用法入门教程

《Python库Django的简介、安装、用法入门教程》Django是Python最流行的Web框架之一,它帮助开发者快速、高效地构建功能强大的Web应用程序,接下来我们将从简介、安装到用法详解,... 目录一、Django 简介 二、Django 的安装教程 1. 创建虚拟环境2. 安装Django三、创

python中update()函数的用法和一些例子

《python中update()函数的用法和一些例子》update()方法是字典对象的方法,用于将一个字典中的键值对更新到另一个字典中,:本文主要介绍python中update()函数的用法和一些... 目录前言用法注意事项示例示例 1: 使用另一个字典来更新示例 2: 使用可迭代对象来更新示例 3: 使用

python连接sqlite3简单用法完整例子

《python连接sqlite3简单用法完整例子》SQLite3是一个内置的Python模块,可以通过Python的标准库轻松地使用,无需进行额外安装和配置,:本文主要介绍python连接sqli... 目录1. 连接到数据库2. 创建游标对象3. 创建表4. 插入数据5. 查询数据6. 更新数据7. 删除

Python中的sort()和sorted()用法示例解析

《Python中的sort()和sorted()用法示例解析》本文给大家介绍Python中list.sort()和sorted()的使用区别,详细介绍其参数功能及Timsort排序算法特性,涵盖自适应... 目录一、list.sort()参数说明常用内置函数基本用法示例自定义函数示例lambda表达式示例o

Python学习笔记之getattr和hasattr用法示例详解

《Python学习笔记之getattr和hasattr用法示例详解》在Python中,hasattr()、getattr()和setattr()是一组内置函数,用于对对象的属性进行操作和查询,这篇文章... 目录1.getattr用法详解1.1 基本作用1.2 示例1.3 原理2.hasattr用法详解2.

MySQL ORDER BY 语句常见用法、示例详解

《MySQLORDERBY语句常见用法、示例详解》ORDERBY是结构化查询语言(SQL)中的关键字,隶属于SELECT语句的子句结构,用于对查询结果集按指定列进行排序,本文给大家介绍MySQL... 目录mysql ORDER BY 语句详细说明1.基本语法2.排序方向详解3.多列排序4.常见用法示例5.

DNS查询的利器! linux的dig命令基本用法详解

《DNS查询的利器!linux的dig命令基本用法详解》dig命令可以查询各种类型DNS记录信息,下面我们将通过实际示例和dig命令常用参数来详细说明如何使用dig实用程序... dig(Domain Information Groper)是一款功能强大的 linux 命令行实用程序,通过查询名称服务器并输

Linux中的自定义协议+序列反序列化用法

《Linux中的自定义协议+序列反序列化用法》文章探讨网络程序在应用层的实现,涉及TCP协议的数据传输机制、结构化数据的序列化与反序列化方法,以及通过JSON和自定义协议构建网络计算器的思路,强调分层... 目录一,再次理解协议二,序列化和反序列化三,实现网络计算器3.1 日志文件3.2Socket.hpp