函数的功能及格式:
 
fspecial()函数用于建立预定义的滤波算子,其语法格式为:
h = fspecial(type)
h = fspecial(type,para)
其中type指定算子的类型,para指定相应的参数;
 
type的类型:

'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].

'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.

'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.

'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.

'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.

'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.

'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].

'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].

'unsharp'

unsharp contrast enhancement filter
为对比度增强滤波器。参数alpha用于控制滤波器的形状,范围为[0,1],默认值为0.2.

matlab fspecial相关推荐

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

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

  2. matlab fspecial用法,matlab fspecial 用法解释

    参数: type的类型有: 1.'average' averaging filter 为均值滤波,参数为hsize代表模板尺寸,默认值为[3,3]. H = FSPECIAL('average',HS ...

  3. matlab fspecial创建滤波算子

    Fspecial函数用于创建预定义的滤波算子,其语法格式为: h = fspecial(type) h = fspecial(type,parameters,sigma) 参数type制定算子类型,p ...

  4. matlab中fdyn,Matlab的用法总结

    1. 对序列进行洗牌 randperm() randperm()产生随机的序列 %if filepaths 是一个5*1的结构体,then cshuffle = randperm(length(fil ...

  5. 数字图像处理实验(五)|图像复原{逆滤波和伪逆滤波、维纳滤波deconvwnr、大气湍流扰动模型、运动模糊处理fspecial}(附matlab实验代码和截图)

    文章目录 一.实验目的 二.实验仪器 三.实验原理 四.实验内容 1.逆滤波:选择MATLAB文件夹中的foggy图像作为实验图像. (1)生成退化函数: (2)复原 (a)直接逆滤波 (b)修正函数 ...

  6. 数字图像处理实验(三)|图像增强{归一化直方图imhist(f)/numel(f)、直方图均衡化histeq、生成线性空间滤波fspecial、中值滤波medfilt2}(附matlab实验代码截图)

    文章目录 一.实验目的 二.实验原理 1. 基本亮度变换函数 2.直方图均衡化 3.空间域滤波 三.预备知识: 四.实验内容 1.灰度修正 2.直方图均衡化: 3.空间域滤波 4. 频域率滤波 五.思 ...

  7. Matlab中fspecial函数 和imfilter函数的用法

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

  8. fspecial 在MATLAB中的用法

    fspecial 这个函数的功能相当于给图像滤波,让图像变得模糊, 常用格式有几种: h = fspecial(type)创建指定类型的二维滤波器,有一下几种type: h = fspecial(ty ...

  9. Matlab实现图像边缘检测

    边缘检测 为了在一幅图像 f 的(x,y)位置寻找边缘的强度和方向,所选择的工具就是梯度,梯度使用向量来表示: 该向量指出了图像 f 在位置(x,y)处的最大变化率的方向,梯度向量的大小表示为: 它是 ...

最新文章

  1. android ip 黑白名单,GaussDB T 单机 IP黑白名单配置
  2. 访问动态页面很慢 PHP,PHP动态网页程序优化及高效提速问题
  3. idea警告Cannot resolve MVC View
  4. jquery.form.js java_使用jQuery.form.js/springmvc框架实现文件上传功能
  5. java版selenium_Selenium3.0-Java版(共61节)
  6. ubuntu 安装php mcrypt扩展
  7. 解决NuGet加载或下载资源慢的问题
  8. R语言绘制差异火山图示例
  9. pdf转word好用的软件
  10. 拥抱数字化变革 |2021 全球产品经理大会亮点回顾
  11. rancher运行pvc程序报错解决方法
  12. 阿里大数据工程师面经
  13. Hacked Exam 14pts 2021Google codejam round1A
  14. Laravel防范xss攻击
  15. 最受欢迎的八种编程语言
  16. linux查看已经连接的wifi的密码
  17. selenium入门教程
  18. LZW 编解码算法实现与分析
  19. Mysql 报错Duplicate entry '值' for key '字段名'的解决
  20. opencv应用程序移植到hi3559板卡

热门文章

  1. 学python可以从事什么工作-学完Python后可以从事哪些工作?
  2. mysql排序规则英文 数字_如何在MySQL中为日语设置模式排序规则
  3. vue(vue-cli+vue-router)+babel+webpack项目搭建入门(四)
  4. 【动态规划】区间dp: P1063能量项链
  5. mysql进程线程_MySQL 内核线程简要分析
  6. oracle 拉链表 计算和,Oracle拉链表和流水表如何按照时间匹配求新的计算项
  7. 小型机oracle命令,IBM 小型机基本知识及AIX操作系统基本命令.doc
  8. JVM面试重点总结(二)——垃圾收集器(GC)与内存分配策略
  9. Proxy error: Could not proxy request错误解决
  10. ztree实现节点事件