在Matlab R2013a 和R2014a中已经实现MSER特征的提取。

一、函数detectMSERFeatures

输入的是M*N的灰度图片。可以指定阈值刻度,区域范围,感兴趣区域等参数。

输出的是MSERRegions

class,即框住区域的椭圆由椭圆中心的坐标,椭圆的长短轴,椭圆的方向(有长轴与x方向形成的角),即区域内所有像素的坐标。

Detect MSER features and return MSERRegions object

Syntax

· regions = detectMSERFeatures(I) example

· regions = detectMSERFeatures(I,Name,Value)

Description

regions

= detectMSERFeatures(I)

returns an MSERRegions

object, regions, containing information about MSER features detected in the 2-D

grayscale input image, I. This object uses Maximally Stable Extremal Regions

(MSER) algorithm to find regions.

regions

= detectMSERFeatures(I,Name,Value)

sets additional options specified by one or moreName,Value pair arguments.

Code Generation Support:

Supports MATLAB Function block: No

For code generation, the function outputs regions.PixelList as an array. The

region sizes are defined in regions.Lengths. Generated code for this function

uses a precompiled platform-specific

shared library.

Code

Generation Support, Usage Notes, and Limitations

Examples

Read image and detect MSER regions.

I = imread(‘cameraman.tif‘);

regions = detectMSERFeatures(I);

Visualize MSER regions which are described by pixel lists stored inside

the returned ‘regions‘ object.

figure; imshow(I); hold ;

plot(regions, ‘showPixelList‘, true, ‘showEllipses‘, false);

Display ellipses and centroids fit into the regions.

figure; imshow(I); hold ;

plot(regions); % by default, plot displays ellipses and centroids

Input Arguments

M-by-N2-D grayscale

image

Input image, specified in grayscale. It must be real and nonsparse.

Data Types:uint8 | int16 | uint16 | single | double

Name-Value Pair Arguments

Specify optional comma-separated pairs of Name,Value arguments. Name is the

argument name andValue is the corresponding value. Name must appear inside

single quotes (‘ ‘). You can specify several name and value pair arguments in

any order as Name1,Value1,...,NameN,ValueN.

Example:‘RegionAreaRange‘,[30 14000], specifies the size of the

region in pixels.

Step size between intensity threshold levels, specified as the

comma-separated pair consisting of ‘ThresholdDelta‘ and a numeric value in the

range (0,100]. This value is expressed as a percentage of the input data type

range used in selecting extremal regions while testing for their stability.

Decrease this value to return more regions. Typical values range from 0.8 to

4.

[30

14000](default) | two-element vector

Size of the region in pixels, specified as the comma-separated pair

consisting of ‘RegionAreaRange‘ and a two-element vector. The vector,

[minArea maxArea], allows the selection of regions containing

pixels to be between minArea and maxArea, inclusive.

Maximum area variation between extremal regions at varying intensity

thresholds, specified as the comma-separated pair consisting of

‘MaxAreaVariation‘ and a positive scalar value. Increasing this value returns a

greater number of regions, but they may be less stable. Stable regions are very

similar in size over varying intensity thresholds. Typical values range from 0.1

to 1.0.

Rectangular region of interest, specified as a vector. The vector must be in

the format [x y widthheight]. When you specify an ROI, the

function detects corners within the area located at [x y] of size

specified by [width height] . The [x y] elements

specify the upper left corner of the region.

Output Arguments

MSER regions object, returned as a MSERRegions

object. The object contains information about MSER features detected in the

grayscale input image.

More About

Intensity Threshold Levels

The MSER detector incrementally steps through the intensity range of the

input image to detect stable regions. The ThresholdDelta

parameter determines the number of increments the detector tests for stability.

You can think of the threshold delta value as the size of a cup to fill a bucket

with water. The smaller the cup, the more number of increments it takes to fill

up the bucket. The bucket can be thought of as the intensity profile of the

region.

The MSER object checks the variation of the region area size between

different intensity thresholds. The variation must be less than the value of the

MaxAreaVariation

parameter to be considered stable.

At a high level, MSER can be explained, by thinking of the intensity profile

of an image representing a series of buckets. Imagine the tops of the buckets

flush with the ground, and a hose turned on at one of the buckets. As the water

fills into the bucket, it overflows and the next bucket starts filling up.

Smaller regions of water join and become bigger bodies of water, and finally the

whole area gets filled. As water is filling up into a bucket, it is checked

against the MSER stability criterion. Regions appear, grow and merge at

different intensity thresholds。

二 MSERRegions class

Object for storing MSER regions

Description

This object describes MSER regions and corresponding ellipses that have the

same second moments as the regions. It passes data between the detectMSERFeatures

and extractFeaturesfunctions.

The object can also be used to manipulate and plot the data returned by these

functions.

Although MSERRegions may hold many regions, it is a scalar object.

Therefore,NUMEL(MSERRegions)

always returns 1. This value may differ from LENGTH(MSERRegions),

which returns the true number of regions held by the object.

Construction

regions = MSERRegions(pixellist) constructs an MSER regions object,

regions, from an M-by-1 cell array of

regions,pixellist. Each cell contains a P-by-2 array of [x y]

coordinates for the detected MSER regions, where P varies based on the

number of pixels in a region.

CODE GENERATION SUPPORT

Compile-time constant inputs: No restrictions.

Supports MATLAB Function block: Yes

For code generation, you must specify both the pixellist

cell array and the length of each array, as the second input. The

object outputs, regions.PixelList as an array. The region sizes are

defined inregions.Lengths.

Generated code for this function uses a precompiled platform-specific

shared library.

Input Arguments

pixellist

M-by-2 cell array of [x y] coordinates of the detected MSER

regions.

Properties

The following properties are read-only and are calculated once the input

pixel list is specified.

Count

Number of stored regions

Default:0

Location

An M-by-2 array of [x y] centroid coordinates of ellipses that have

the same second moments as the MSER regions.

Axes

A two-element vector, [majorAxis minorAxis]. This vector specifies the major

and minor axis of the ellipse that have the same second moments as the MSER

regions.

Orientation

A value in the range from -pi/2 to +pi/2 radians. This value represents the

orientation of the ellipse as measured from the X-axis to the major axis

of the ellipse. You can use this property for visualization purposes.

Methods

isempty

Returns

true for empty object

length

Number

of stored points

plot

Plot

MSER regions

size

Size

of the MSERRegions object

原文:http://www.cnblogs.com/dawnminghuang/p/3779552.html

mser matlab,Matlab mser(最大极值稳定区域)相关推荐

  1. OpenCV-最大极值稳定区域MSER分析

    OpenCV-最大极值稳定区域MSER分析 最大稳定极值区域MSER是一种类似分水岭图像的分割与匹配算法,它具有仿射不变性.极值区域反映的就是集合中的像素灰度值总大于或小于其邻域区域像素的灰度值.对于 ...

  2. opencv MSER(最大极值稳定区域)

    最大极值稳定区域,是一种类似分水岭图像的分割与匹配算法.它具有SIFT SURF及 ORB等特征不具备的仿射不变性,近年来广泛应用于图像分割与匹配领域. 详细算法原理介绍可参见链接   http:// ...

  3. matlab求多元函数的极小值,[转载]利用MATLAB求多元函数的极值(2)

    利用MATLAB求多元函数的极值分两种情况,(1)无约束条件:(2)有约束条件. (2)有约束条件下求极小值的方法: 假设多变量非线性函数的数学模型为 min f(x) c(x)<=0 ceq( ...

  4. matlab对多元函数求导,MATLAB多元函数导数求极值或最优值Word版

    <MATLAB多元函数导数求极值或最优值Word版>由会员分享,可在线阅读,更多相关<MATLAB多元函数导数求极值或最优值Word版(9页珍藏版)>请在人人文库网上搜索. 1 ...

  5. matlab 求单/多元函数极值

    matlab 求单/多元函数极值 单元函数极值: 平时如果手算的话,就会先求导数,再求驻点,最终代值算出极值,如果用matlab代码求的话,就可以减少很多不必要的计算. fun=inline('0.5 ...

  6. 多元函数的极值matlab,利用MATLAB求多元函数的极值(2)

    利用MATLAB求多元函数的极值分两种情况,(1)无约束条件:(2)有约束条件. (2)有约束条件下求极小值的方法: 假设多变量非线性函数的数学模型为 min f(x) c(x)<=0 ceq( ...

  7. matlab 样本均值,Matlab | Matlab从入门到放弃(4)——样本均值

    Matlab | Matlab从入门到放弃(4)--样本均值 Matlab | Matlab从入门到放弃(4)--样本均值 博主github:https://github.com/MichaelBee ...

  8. matlab 如何捕捉错误,【matlab|matlab运行错误捕捉方法】

    『傻大方知识库摘要_matlab|matlab运行错误捕捉方法』需安装VC2005运行库.Matlab错误提示往往以DOS窗口显示,错误提示经常一闪而过,无法查看具体错误信息,可以按照如下操作进行查看 ...

  9. wav数据提取 matlab,matlab 读取处理 wav 文件

    最近工作需要,要对wav文件中存储的声音信息进行分析处理.所以花了些时间收集了各种数学软件中处理wav文件的方法. Matlab Matlab 是最方便的.甚至于不用写任何代码就能读取wav文件(我用 ...

  10. [matlab]matlab cftool点了没反应

    [matlab]matlab cftool点了没反应 命名重复 首先排除是不是在同目录文件下新建了一个cftool.m文件,如果是的话将其改名,自定义为其他名字. 这就和写代码时同名变量覆盖一样,ma ...

最新文章

  1. php正则表达式函数 preg_replace用法
  2. 数位dp(求1-n中数字1出现的个数)
  3. CDH6.3.2默认管理端口是7180,HDFS相关端口
  4. 【iOS XMPP】使用XMPPFramewok(一):添加XMPPFramework(XCode 4.6.2)
  5. OSGI 插件操作命令
  6. spring 计划任务_与Spring的计划任务一起按时运行
  7. Quiver快速入门
  8. opencv图像切割1-KMeans方法
  9. python列表修改元素_如何在Python中替换多维列表的第n个元素?
  10. 使用Canvas扩展绘制动态ASP.NET Core Blazor条形图
  11. Intellij Idea下tomcat设置自动编译
  12. Shell脚本中的并发(转)
  13. 《人生七年》启示,穷人买车,富人投资教育
  14. 卡方检验用于特征选择
  15. tableau参数_Tableau-参数的设置方法
  16. extjs6整合到web项目中
  17. android wifi热点 信道,wifi 热点配置最优信道(示例代码)
  18. 硕泰克SL-67fv1支持PIII800EB吗?
  19. Agent 监控配置说明
  20. Linux里面 update 和 upgrade 的区别

热门文章

  1. IDEA上下移动一行或多行快捷键设置
  2. 二级python——软文的诗词风
  3. PHP__使用array_slice分割字符串
  4. 终端获取Gitee项目代码(仅用于个人纪录,如有错误,请见谅并指出,万分感谢!)
  5. 【java】一个int占多少个字节?
  6. lua加载lua文件
  7. BUAA 数据结构总结
  8. bm3d对比NL-Means去噪算法分析
  9. win10误删引导文件,0xc0000098的解决方案,bcd引导文件受损情况分析
  10. 一个资深系统管理员的O2O实践(四)