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

相关文章

C#中async await异步关键字用法和异步的底层原理全解析

《C#中asyncawait异步关键字用法和异步的底层原理全解析》:本文主要介绍C#中asyncawait异步关键字用法和异步的底层原理全解析,本文给大家介绍的非常详细,对大家的学习或工作具有一... 目录C#异步编程一、异步编程基础二、异步方法的工作原理三、代码示例四、编译后的底层实现五、总结C#异步编程

python3 gunicorn配置文件的用法解读

《python3gunicorn配置文件的用法解读》:本文主要介绍python3gunicorn配置文件的使用,具有很好的参考价值,希望对大家有所帮助,如有错误或未考虑完全的地方,望不吝赐教... 目录python3 gunicorn配置文件配置文件服务启动、重启、关闭启动重启关闭总结python3 gun

MySQL 中的 LIMIT 语句及基本用法

《MySQL中的LIMIT语句及基本用法》LIMIT语句用于限制查询返回的行数,常用于分页查询或取部分数据,提高查询效率,:本文主要介绍MySQL中的LIMIT语句,需要的朋友可以参考下... 目录mysql 中的 LIMIT 语句1. LIMIT 语法2. LIMIT 基本用法(1) 获取前 N 行数据(

C#中DrawCurve的用法小结

《C#中DrawCurve的用法小结》本文主要介绍了C#中DrawCurve的用法小结,通常用于绘制一条平滑的曲线通过一系列给定的点,具有一定的参考价值,感兴趣的可以了解一下... 目录1. 如何使用 DrawCurve 方法(不带弯曲程度)2. 如何使用 DrawCurve 方法(带弯曲程度)3.使用Dr

C++ vector的常见用法超详细讲解

《C++vector的常见用法超详细讲解》:本文主要介绍C++vector的常见用法,包括C++中vector容器的定义、初始化方法、访问元素、常用函数及其时间复杂度,通过代码介绍的非常详细,... 目录1、vector的定义2、vector常用初始化方法1、使编程用花括号直接赋值2、使用圆括号赋值3、ve

MySQL中FIND_IN_SET函数与INSTR函数用法解析

《MySQL中FIND_IN_SET函数与INSTR函数用法解析》:本文主要介绍MySQL中FIND_IN_SET函数与INSTR函数用法解析,本文通过实例代码给大家介绍的非常详细,感兴趣的朋友一... 目录一、功能定义与语法1、FIND_IN_SET函数2、INSTR函数二、本质区别对比三、实际场景案例分

pytorch之torch.flatten()和torch.nn.Flatten()的用法

《pytorch之torch.flatten()和torch.nn.Flatten()的用法》:本文主要介绍pytorch之torch.flatten()和torch.nn.Flatten()的用... 目录torch.flatten()和torch.nn.Flatten()的用法下面举例说明总结torch

Python Faker库基本用法详解

《PythonFaker库基本用法详解》Faker是一个非常强大的库,适用于生成各种类型的伪随机数据,可以帮助开发者在测试、数据生成、或其他需要随机数据的场景中提高效率,本文给大家介绍PythonF... 目录安装基本用法主要功能示例代码语言和地区生成多条假数据自定义字段小结Faker 是一个 python

前端高级CSS用法示例详解

《前端高级CSS用法示例详解》在前端开发中,CSS(层叠样式表)不仅是用来控制网页的外观和布局,更是实现复杂交互和动态效果的关键技术之一,随着前端技术的不断发展,CSS的用法也日益丰富和高级,本文将深... 前端高级css用法在前端开发中,CSS(层叠样式表)不仅是用来控制网页的外观和布局,更是实现复杂交

揭秘Python Socket网络编程的7种硬核用法

《揭秘PythonSocket网络编程的7种硬核用法》Socket不仅能做聊天室,还能干一大堆硬核操作,这篇文章就带大家看看Python网络编程的7种超实用玩法,感兴趣的小伙伴可以跟随小编一起... 目录1.端口扫描器:探测开放端口2.简易 HTTP 服务器:10 秒搭个网页3.局域网游戏:多人联机对战4.