转自:http://blog.sina.com.cn/s/blog_6056e8800100hter.html

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 filter

为高斯低通滤波,有两个参数,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函数用法相关推荐

  1. matlab fspecial用法,Matlab 的fspecial函数用法

    Matlab 的fspecial函数用法 fspecial函数用于建立预定义的滤波算子,其语法格式为: h = fspecial(type) h = fspecial(type,para) 其中typ ...

  2. matlab imfilter函数,Matlab的imfilter函数用法详解

    Matlab的imfilter函数用法 功能:对任意类型数组或多维图像进行滤波. 用法:B = imfilter(A,H) B = imfilter(A,H,option1,option2,...) ...

  3. MATLAB之find函数用法

    matlab 中 find() 函数用法 一. 功能: **寻找非零元素的索引和值** 语法: ind = find(X) ind = find(X, k) ind = find(X, k, 'fir ...

  4. matlab sort descend,详解Matlab中 sort 函数用法

    搜索热词 (1)B=sort(A) 对一维或二维数组进行升序排序,并返回排序后的数组,当A为二维时,对数组每一列进行排序. eg: A=[1,5,3],则sort(A)=[1,3,5] A=[1,3; ...

  5. matlab中频域信号IFFT,MATLAB中ifft函数用法、性质、特性-以及与fft的组合应用全面深入解析(含程序)...

    MATLAB中ifft函数用法.性质.特性,以及与fft的组合应用全面深入解析(含程序) 前言 在我之前的<MATLAB中fft函数用法.性质.特性.缺陷全面深入解析(含程序)>中,我已经 ...

  6. Matlab中 intlinprog函数用法简介

    Matlab中 intlinprog函数用法简介 本来想要自己亲手写一遍的,发现了一优质博文基本上跟我做过的例题大差不差,所以就直接放上链接. 参考链接 https://www.cnblogs.com ...

  7. matlab stem 属性,matlab中stem函数用法_常见问题解析

    matlab中如何自定义图例_常见问题解析 matlab中自定义图例的方法:首先打开matlab软件:然后点击勾选按钮,新建一个文件并输入代码为"x = 0:pi/50:2*pi;" ...

  8. stem什么意思matlab,matlab中stem函数用法_常见问题解析,matlab

    matlab中如何自定义图例_常见问题解析 matlab中自定义图例的方法:首先打开matlab软件:然后点击勾选按钮,新建一个文件并输入代码为"x = 0:pi/50:2*pi;" ...

  9. matlab:atan2函数用法

    matlab:atan2函数用法 MATLAB中的atan2函数是计算反正切函数的函数,其语法为: theta = atan2(y,x) 其中,y和x是输入的两个数值,theta是输出的结果,表示y/ ...

  10. matlab里randn是什么,matlab中randn函数用法

    matlab中randn函数用法 MATLAB 中的randn函数 matlab函数 randn:产生正态分布的随机数或矩阵的函数 randn:产生均值为0,方差σ^2 = 1,标准差σ = 1的正态 ...

最新文章

  1. Android View之间的触摸事件传递图
  2. linux(CentOS)下安装mongodb
  3. java发送会议邀请邮件模板_Spring 发送邮件 HTML邮件
  4. resnet50能用cpu跑吗_2020年12月1日更新。性价比最高入门游戏CPU--intel 10100F装机配置推荐。...
  5. 引用另一模板的宏_生信人值得拥有的编程模板Shell
  6. arduino倾斜开关python语言_Arduino小白的学习记录:倾斜开关实验
  7. 将本地文件push到gitee上面
  8. android获取电量的方法,Android获取电池电量和电池容量
  9. JAVA代码爬虫获取网站信息
  10. Jmeter使用教程(图文并茂)|实战干货
  11. 地类图斑代码大全_使用字段计算器对同一地类图斑自动编号(标记重复记录)...
  12. html调用java函数_html通过JavaScript调用java代码
  13. php表格中的caption,HTML中的caption属性是什么意思?caption标签在HTML中的用法(附实例)...
  14. jQuery停止动画——stop()方法的使用
  15. 密码加密md5和加盐处理
  16. CentOS7中使用yum安装Nginx
  17. 谷歌小恐龙-有网也能玩儿
  18. Multisim # 数字逻辑仿真实验一些基础的tips
  19. java 分析类_java--分析简单java类与反射的联系
  20. RBG颜色对照表:有网址

热门文章

  1. 2020年十大电子邮件抓取工具—用于销售勘探
  2. 基础知识 | 贴片电阻快速扫盲
  3. 高清电子警察监控系统方案
  4. 备战秋招之数电知识查漏补缺
  5. QT Designer的安装和使用
  6. 串口连接BBB(三)
  7. 21. 合并两个有序链表
  8. 利用PS和抠图软件轻松换证件照背景
  9. 华硕飞行堡垒加装固态硬盘和内存条
  10. 抖音短视频在线下载无水印,