ClassesClassesClassesClasses | | | | Operators

segment_image_mserT_segment_image_mserSegmentImageMsersegment_image_mserSegmentImageMserSegmentImageMser (Operator)

Name

segment_image_mserT_segment_image_mserSegmentImageMsersegment_image_mserSegmentImageMserSegmentImageMser — Segment image using Maximally Stable Extremal Regions (MSER).

Signature

segment_image_mser(Image : MSERDark, MSERLight : Polarity, MinArea, MaxArea, Delta, GenParamName, GenParamValue : )

Herror T_segment_image_mser(const Hobject Image, Hobject* MSERDark, Hobject* MSERLight, const Htuple Polarity, const Htuple MinArea, const Htuple MaxArea, const Htuple Delta, const Htuple GenParamName, const Htuple GenParamValue)

Herror segment_image_mser(Hobject Image, Hobject* MSERDark, Hobject* MSERLight, const HTuple& Polarity, const HTuple& MinArea, const HTuple& MaxArea, const HTuple& Delta, const HTuple& GenParamName, const HTuple& GenParamValue)

HRegionArray HImage::SegmentImageMser(HRegionArray* MSERLight, const HTuple& Polarity, const HTuple& MinArea, const HTuple& MaxArea, const HTuple& Delta, const HTuple& GenParamName, const HTuple& GenParamValue) const

void SegmentImageMser(const HObject& Image, HObject* MSERDark, HObject* MSERLight, const HTuple& Polarity, const HTuple& MinArea, const HTuple& MaxArea, const HTuple& Delta, const HTuple& GenParamName, const HTuple& GenParamValue)

HRegion HImage::SegmentImageMser(HRegion* MSERLight, const HString& Polarity, const HTuple& MinArea, const HTuple& MaxArea, const HTuple& Delta, const HTuple& GenParamName, const HTuple& GenParamValue) const

HRegion HImage::SegmentImageMser(HRegion* MSERLight, const HString& Polarity, Hlong MinArea, Hlong MaxArea, Hlong Delta, const HTuple& GenParamName, const HTuple& GenParamValue) const

HRegion HImage::SegmentImageMser(HRegion* MSERLight, const char* Polarity, Hlong MinArea, Hlong MaxArea, Hlong Delta, const HTuple& GenParamName, const HTuple& GenParamValue) const

void HOperatorSetX.SegmentImageMser(
[in] IHUntypedObjectX* Image, [out] IHUntypedObjectX*MSERDark, [out] IHUntypedObjectX*MSERLight, [in] VARIANT Polarity, [in] VARIANT MinArea, [in] VARIANT MaxArea, [in] VARIANT Delta, [in] VARIANT GenParamName, [in] VARIANT GenParamValue)

IHRegionX* HImageX.SegmentImageMser(
[out] IHRegionX*MSERLight, [in] BSTR Polarity, [in] VARIANT MinArea, [in] VARIANT MaxArea, [in] VARIANT Delta, [in] VARIANT GenParamName, [in] VARIANT GenParamValue)

static void HOperatorSet.SegmentImageMser(HObject image, out HObject MSERDark, out HObject MSERLight, HTuple polarity, HTuple minArea, HTuple maxArea, HTuple delta, HTuple genParamName, HTuple genParamValue)

HRegion HImage.SegmentImageMser(out HRegion MSERLight, string polarity, HTuple minArea, HTuple maxArea, HTuple delta, HTuple genParamName, HTuple genParamValue)

HRegion HImage.SegmentImageMser(out HRegion MSERLight, string polarity, int minArea, int maxArea, int delta, HTuple genParamName, HTuple genParamValue)

Description

segment_image_msersegment_image_mserSegmentImageMsersegment_image_mserSegmentImageMserSegmentImageMser segments an image into regions of homogenous gray values using the approach of Maximally Stable Extremal Regions (MSER). The segmentation process determines if a region is homogenous by observing the local region surrounding. Therefore, the operator is particularly suited to robustly segment objects in front of inhomogeneous background or in applications with changing illumination.

Parameters

PolarityPolarityPolarityPolarityPolaritypolarity

The PolarityPolarityPolarityPolarityPolaritypolarity determines the type of the regions that are extracted.

Value Meaning
'dark'"dark""dark""dark""dark""dark" Only MSERs that are darker than their surroundings are extracted
'light'"light""light""light""light""light" Only MSERs that are lighter than their surroundings are extracted
'both'"both""both""both""both""both" (default) Both types of MSERs are extracted

MinAreaMinAreaMinAreaMinAreaMinAreaminArea, MaxAreaMaxAreaMaxAreaMaxAreaMaxAreamaxArea

The values MinAreaMinAreaMinAreaMinAreaMinAreaminArea and MaxAreaMaxAreaMaxAreaMaxAreaMaxAreamaxArea restrict the size of the returned MSERs.

Note that very small values of MinAreaMinAreaMinAreaMinAreaMinAreaminArea, e.g., values smaller than 5, can increase the runtime significantly, especially for noisy images.

To deactivate the restriction for the maximum area of the returned MSERs, set MaxAreaMaxAreaMaxAreaMaxAreaMaxAreamaxArea to an empty tuple (which is the default).

DeltaDeltaDeltaDeltaDeltadelta

The value of DeltaDeltaDeltaDeltaDeltadelta influences the selectivity of the algorithm. Larger values lead to fewer MSERs. Smaller values lead to more MSERs.

Please read the description of the segmentation process below to help understand the effect of this parameter.

The following generic parameters can be used to fine-tune the segmentation of MSERs. The generic parameters can be set with GenParamNameGenParamNameGenParamNameGenParamNameGenParamNamegenParamName and GenParamValueGenParamValueGenParamValueGenParamValueGenParamValuegenParamValue.

'max_variation'"max_variation""max_variation""max_variation""max_variation""max_variation":

The maximum variation of a component's area within the range of DeltaDeltaDeltaDeltaDeltadelta thresholds. Larger values lead to more MSERs. Smaller values lead to fewer MSERs.

Please read the description of the segmentation process below for a definition of 'variation' and to help understand the effect of this generic parameter.

Values: real values larger than or equal to 0.0

Suggested values: 0.1, 0.2, 0.5, 1.0, 2.0, 5.0

Default: 0.2

'min_diversity'"min_diversity""min_diversity""min_diversity""min_diversity""min_diversity":

The minimum relative difference of the sizes of two overlapping MSERs. Smaller values lead to more overlapping MSERs. Larger values lead to fewer overlapping MSERs.

Please read the description of the segmentation process below for a definition of 'diversity' and to help understand the effect of this generic parameter.

Setting 'min_diversity'"min_diversity""min_diversity""min_diversity""min_diversity""min_diversity" very close to 0.0 may increase the runtime.

Values: real values larger than or equal to 0.0

Suggested values: 0.1, 0.5, 0.8, 1.0, 2.0, 5.0

Default: 0.8

'may_touch_border'"may_touch_border""may_touch_border""may_touch_border""may_touch_border""may_touch_border":

Controls if regions that touch the border of the input domain are returned ('true'"true""true""true""true""true") or rejected ('false'"false""false""false""false""false").

Values: 'false'"false""false""false""false""false", 'true'"true""true""true""true""true"

Default: 'false'"false""false""false""false""false"

Segmentation Process

In a first step, the image is segmented with all threshold values t, from 0 to the maximal present gray value.

To illustrate this, the following example input image with twelve gray values (0...11) is used. On the right, the boundaries of the resulting threshold regions are shown.

Example input image with twelve gray values reaching from 0 (= black) to 11 (= white)
Boundaries of the threshold regions for all thresholds (t = 0...11)

The resulting threshold regions are split into their connected components (4-connected neighborhood) and the area increase of the individual components is monitored over the increasing thresholds. The area of each individual component increases monotonically with each (increasing) threshold. An MSER is a component whose area does not vary significantly within the range of DeltaDeltaDeltaDeltaDeltadelta thresholds. To be accepted as an MSER, the variation of the component's area within the range of DeltaDeltaDeltaDeltaDeltadelta thresholds must be a local minimum and it must be lower than 'max_variation'"max_variation""max_variation""max_variation""max_variation""max_variation". Furthermore, the diversity of overlapping MSERs must be greater than 'min_diversity'"min_diversity""min_diversity""min_diversity""min_diversity""min_diversity" (see below).

The variation of a component's area is defined by

Decreasing the value of 'max_variation'"max_variation""max_variation""max_variation""max_variation""max_variation" will reduce the number of accepted regions.

In our example, each threshold region consists of only one component. Therefore, the terms 'threshold region' and 'component' are used synonymously hereinafter. The following table shows the area of the threshold regions and their variations for DeltaDeltaDeltaDeltaDeltadelta set to 1 and for DeltaDeltaDeltaDeltaDeltadelta set to 2.

Threshold value t Threshold region Area of the threshold region Variation of the area (for DeltaDeltaDeltaDeltaDeltadelta = 1) Variation of the area (for DeltaDeltaDeltaDeltaDeltadelta = 2)

0
320 0.28 0.53
1
410 0.41 0.54
2
490 0.27 0.49
3
540 0.13 0.31
4
560 0.07 0.25
5