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 inapp

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 filteride

(pillbox) within the square matrix of side 2*RADIUS+1.函数

The default RADIUS is 5.

三、'gaussian'

Gaussian lowpass filterscala

为高斯低通滤波,有两个参数,hsize表示模板尺寸,默认值为【3 3】,sigma为滤波器的标准值,单位为像素,默认值为0.5.

H = FSPECIAL('gaussian',HSIZE,SIGMA) returns a rotationally3d

symmetric Gaussian lowpass filter

of size HSIZE with standardblog

deviation SIGMA (positive). HSIZE can be a vector specifying theci

number of rows and columns in H or a scalar, in which case H is ait

square matrix.io

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.

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.

imfilter函数

功能:对任意类型数组或多维图像进行滤波。

用法:B = imfilter(A,H)

B = imfilter(A,H,option1,option2,...)

或写做g = imfilter(f, w, filtering_mode, boundary_options, size_options)

其中,f为输入图像,w为滤波掩模,g为滤波后图像。filtering_mode用于指定在滤波过程当中是使用“相关”仍是“卷积”。boundary_options用于处理边界充零问题,边界的大小由滤波器的大小肯定。具体参数选项见下表:

matlab imfilter函数,Matlab中fspecial函数 和imfilter函数的用法相关推荐

  1. php 与时间有关的函数,php中与时间相关的常用函数有哪些

    php中与时间相关的常用函数有:date_default_timezone_set().date_create().date_diff().date_timestamp_get().strtotime ...

  2. java怎么调用存储函数_java中调用存储过程或存储函数的方法

    java中调用存储过程或存储函数的方法 1.调用存储过程:CallableStatement clstmt = null;try {clstmt = conn.prepareCall("{c ...

  3. python中延时函数_python中实现延时回调普通函数示例代码

    python中实现延时回调普通函数示例代码 这篇文章主要给大家介绍了关于python中实现延时回调普通函数的相关资料,文中通过示例代码介绍的非常详细,对大家的学习或者工作具有一定的参考学习价值,需要的 ...

  4. mysql 占比函数_MySQL中你必须了解的函数

    在学习MySQL的时候你会发现,它有非常多的函数,在学习的时候没有侧重.小编刚开始学习的时候也会有这个感觉.不过,经过一段时间的学习之后,小编发现尽管函数有很多,但是常用的却只有那几个.今天小编就把常 ...

  5. php的一些不安全函数,php中可能会产生安全问题一些函数

    php中可能会产生安全问题的一些函数 本文章适合正在学习代码审计的朋友,或者准备学习安全的朋友,大佬就可以绕过了,写的比较基础.我也是一个小白,总结一下对于php函数的理解,也分享一些自己觉得好用的方 ...

  6. mysql中locat函数,MySQL中的LOCATE和POSITION函数使用方法 | 很文博客

    不常用:MySQL中的LOCATE和POSITION函数 LOCATE(substr,str) POSITION(substr IN str) 返回子串 substr 在字符串 str 中第一次出现的 ...

  7. oracle crc32函数,CSS_ORACLE中实现CRC32的计算函数,SOLARIS平台,声明:这是我07年的一个偶然 - phpStudy...

    ORACLE中实现CRC32的计算函数,SOLARIS平台 声明:这是我07年的一个偶然所得,借助了很多朋友和同事的帮助.希望能对在这个领域里面找寻的同行一些帮助. 首先用C在SOLARIS上编写一个 ...

  8. excel三次样条函数_Excel中F1到F12键的神奇用法

    Excel中F1到F12键的神奇用法,可惜很多人都不知道... F1 帮助快捷键 在使用Excel遇到问题时,最简单粗暴的方法就是按F1,会出现帮助的窗口,然后输入查询内容即可. F2 编辑单元格 F ...

  9. r语言中paste函数_R中的paste()函数-简要指南

    r语言中paste函数 Using the paste() function in R will be straight and simple. In this tutorial let's see ...

  10. mysql中locat函数,MySQL中的LOCATE和POSITION函数使用方法

    不常用:MySQL中的LOCATE和POSITION函数 LOCATE(substr,str) POSITION(substr IN str) 返回子串 substr 在字符串 str 中第一次出现的 ...

最新文章

  1. leetcode-581-Shortest Unsorted Continuous Subarray
  2. 给年轻程序员的几句话
  3. 模拟网页行为之实践篇三
  4. 诺基亚宣布与博通合作开发5G芯片 包括定制处理器
  5. 双屏鼠标经常跑到副屏_这个电脑的双屏幕,让我重新找回了修图的乐趣
  6. dropdownList级联刷新gridView
  7. Why is it called “armature” instead of “skeleton”? or perhaps “rig”?
  8. python程序设计搜题软件下载_智慧职教云课堂APPPython程序设计期末考试搜题公众号答案...
  9. 如何不用ps来吸取颜色并将颜色一键插入到网页,自动生成代码?
  10. hustoj 服务器配置
  11. 微信公众号添加html,微信公众号添加页面模板怎么开通?
  12. 关于校园粮食浪费问题的调查
  13. 【PAT_1054】The Dominant Color
  14. Day2--安装MediaWiki搭建自己的个人百科
  15. 世界级软件平台企业,永洪科技要的就是这个范儿
  16. 数据挖掘人工神经网络,神经网络的数据处理
  17. 中继器、网桥、路由器和网关的功能及区别
  18. 图像检测:图像预处理
  19. 保研笔记一 软件工程与计算卷二(1-7章)
  20. 【学习日志】2022.09.02 (C++)strcmp和stricmp、strcmpi三者之间的区别、C语言判断文件后缀名、ZENO Audio Update、TEN MINUTES PHYSICS

热门文章

  1. 操作系统复习笔记--第十一、十二章 文件系统的实现与大容量存储结构
  2. 牛顿法详解(海森矩阵如何使用)
  3. Spring Boot 接入支付宝完整流程实战
  4. Java线程状态及其转移
  5. 用类描述计算机中CPU的速度和硬盘的容量,要求Java应用程序有4个类,名字分别为:pc CPU harddisk 和Test ,其中TEST是主类。
  6. IDEA安装Gitee插件
  7. java digester_Digester学习笔记(一)
  8. 【OTT】国内主要OTT平台背后的那些CDN服务商
  9. 【Linux】ubuntu18.04 安装英伟达显卡驱动
  10. 乐橙tp1 html调用,乐橙TP1的妙用