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 imfilter函数,Matlab中imfilter()函数的用法

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

  2. matlab roundn函数_columns函数的使用方法 matlab中round函数具体用法

    Excel中column函数的使用方法是什么?其实小编会说分手是想被挽留,你却顺口祝小编自由. 只读属性,返回 TextStream 文件中当前字符位置的列号. 语法: =Column(referen ...

  3. MATLAB中randi函数的用法

    MATLAB中randi函数的用法 均匀分布的伪随机整数 语法 X = randi(imax) X = randi(imax,n) X = randi(imax,sz1,...,szN) X = ra ...

  4. MATLAB中freqz函数的用法

    本文引用自乱七八糟<MATLAB中freqz函数的用法>  FREQZ 是计算数字滤波器的频率响应的函数 [H,W] = FREQZ(B,A,N)returns the N-point c ...

  5. Matlab中linprog函数的用法总结

    Matlab中 linprog函数的用法总结 1.简介 在matlab中,linprog函数可以求解线性规划问题,用于寻找目标函数的最小值 matlab中,规划模型的标注写法如下 \[ min\ f\ ...

  6. Matlab中min函数的用法

    Matlab中min函数的用法 向量中的最小元素 创建一个向量并计算其最小元素. M = min(A) A = [23 42 37 15 52]; M = min(A)M = 15 每个矩阵列中的最小 ...

  7. MATLAB中plot()函数的用法

    文章目录 前言 一.plot()函数 二.代码运行结果 总结 前言 此为本人学习中的一些笔记总结,仅供参考. 提示:以下是本篇文章正文内容,下面案例可供参考 一.plot()函数 提示:关于plot( ...

  8. matlab的filter函数,filter函数用法 matlab中filter函数的用法

    matlab中filter函数的用法如果你深爱的人此刻在你身边陪你,你怎么会有时间来看这些文字呢 离散系统的差分方程为 2y[k]-y[-1]-3y[k-2]=2x[k]-x[k-1] x[k]=(0 ...

  9. matlab中reshape函数的用法

    matlab中reshape函数的用法 1.函数功能:变换矩阵维度 2.转换规律:按列读,按列存 A =[1, 2, 3, 4;5, 6, 7, 8;9, 10, 11, 12 ];C = resha ...

  10. matlab中 repmat 函数的用法

    一.repmat 函数定义 B = repmat(A,n) B = repmat(A,r1,-,rN) B = repmat(A,r) 这是一个处理矩阵内容有重复时使用,其功能是以A的内容堆叠在(r1 ...

最新文章

  1. CVPR 2021 Oral|只用静态图像,就能实时渲染出丝滑3D效果
  2. HDOJ/HDU 2565 放大的X(分段思考~)
  3. workspace-project-target关系与解耦工程结构总结
  4. 极光尔沃切片软件_极光尔沃3D打印机走进肥东中小学校
  5. Azure 中国篇之计算服务—多个站点的×××配置
  6. [js] 如何判断对象是否属于某个类?
  7. 2020 OPPO开发者大会:融合共创 打造多终端、跨场景的智能化生活
  8. JavaScript学习——JavaScript 循环
  9. Windows server 2019 - Raid5 搭建+测试
  10. 三菱 MX COMPONENT下载及安装测试
  11. 使用Python进行数独求解(二)
  12. ABAP 透明表操作备忘 刘欣
  13. matlab 输出 syms,matlab中latex和syms的完美结合
  14. Dijkstra算法和Floyd算法超详解以及区别
  15. 乐固加固后windows下实现给apk签名
  16. 陈强教授《机器学习及R应用》课程 第十四章作业
  17. 自建传奇2服务器,自己想要架设传奇服务器的详细攻略
  18. localtime()
  19. Android获取正在运行的进程列表
  20. 苹果三代耳机_Airpods pro苹果三代无线蓝牙耳机

热门文章

  1. 登录服务器的详细步骤
  2. 两级运放积分器的带宽分析
  3. shell脚本文件使用教程
  4. idea 安装Vue插件 超详细
  5. 培根密码加解密(Python)
  6. Xilinx Petalinux安装和使用
  7. stm8单片机内部存储EEPROM字节读写实例解析
  8. Excel图表—泊松分布函数的概率分布图的绘制
  9. python3视频教程哪个好_2020年5个经典python编程入门视频教程推荐学习
  10. Retinex理论,单尺度Retinex、多尺度Retinex(MSR)、带颜色恢复的多尺度 Retinex(MSRCR)原理