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 p_w_picpath, 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.

转载于:https://blog.51cto.com/10042542/1631721

matlab的special函数用法相关推荐

  1. matlab fspeical,matlab的special函数用法

    h = fspecial(type) h = fspecial(type,para)其中type指定算子的类型,para指定相应的参数: type的类型有: 1.'average' averaging ...

  2. MATLAB之find函数用法

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

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

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

  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 fspecial用法,Matlab 的fspecial函数用法

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

最新文章

  1. Linux日常命令使用记录
  2. 求职特训营火热来袭,阿里大咖教你制作专业简历
  3. 计算机第二章题库,全国计算机二级题库第二章
  4. 使用MyBatis和Spring构建Java Web应用程序
  5. pb graph鼠标移上显示数据_Plotly数据可视化:离线版、微软vscode版的Python的基本作图...
  6. mysql 5.7 hint_新特性解读 | MySQL 8.0 新增 HINT 模式
  7. java 过滤列表_Java 8 Stream过滤列表中列表的值
  8. iOS开发 - 不进入待机(屏幕保持唤醒)---UIApplication学习
  9. 我的docker随笔17:使用docker-compose启动MySQL、Redis和Mongo
  10. Android之控件与布局,结构知识点,基础完结
  11. 从“技术理性”到“实践智慧” 华为云这波大招够强
  12. 专业级的WPF条形码控件
  13. 如何压缩word文档的大小?
  14. 看完了 2021 CSS 年度报告,我学到了啥?
  15. 微信小程序商城源码学习
  16. 【开发工具】 Photoshop CS6 安装与破解
  17. 对于升级go1.18的goland问题
  18. 数据库开发-8-并发处理
  19. 酷狗服务器显示失败怎么回事,酷狗音乐如何分享音乐失败怎么办 ?酷狗音乐分享音乐失败如何解决?...
  20. MacOS 上安装 telnet 和 wget

热门文章

  1. 面向对象进阶4:软件开发规范
  2. 【转】字符串和浮点数格式化输出小结
  3. OpenCV(C++版)图像读取,创建,复制,保存,显示
  4. 增强SEO的div+css命名规则
  5. 升级EXCHANGE2010到2013(C)
  6. 4.21-4.26旅行记之山城重庆(二)
  7. Advice只有切面化之后才能显现出AOP的巨大优势
  8. 工业大数据的应用有哪些
  9. C++算法学习(力扣:134. 加油站)
  10. python中、函数定义可以不包括以下_python函数定义精讲