You are here: Start » AVL.NET » AVL.ImageLocalMinima(AvlNet.Image, AvlNet.Region, bool, float?, float?, float, AvlNet.ImageLocalExtremaVerification?, AvlNet.Region[], AvlNet.Point2D[], float[])

AVL.ImageLocalMinima(AvlNet.Image, AvlNet.Region, bool, float?, float?, float, AvlNet.ImageLocalExtremaVerification?, AvlNet.Region[], AvlNet.Point2D[], float[])

Namespace:AvlNet
Assembly:AVL.NET.dll

Syntax


public static void ImageLocalMinima(
	AvlNet.Image inImage,
	AvlNet.Region inRoi,
	bool inConsiderLowlands,
	float? inMinValue,
	float? inMaxValue,
	float inMinDistance,
	AvlNet.ImageLocalExtremaVerification? inMinimaVerification,
	out AvlNet.Region[] outMinimaRegions,
	out AvlNet.Point2D[] outMinimaPoints,
	out float[] outMinimaValues
)

Parameters

inImage
Type: AvlNet.Image
inRoi
Type: AvlNet.Region
inConsiderLowlands
Type: System.Boolean
inMinValue
Type: System.Nullable<System.Single>
inMaxValue
Type: System.Nullable<System.Single>
inMinDistance
Type: System.Single
inMinimaVerification
Type: System.Nullable<AvlNet.ImageLocalExtremaVerification>
outMinimaRegions
Type: AvlNet.Region
outMinimaPoints
Type: AvlNet.Point2D
outMinimaValues
Type: System.Single

Description

The operation finds local minima on the image inImage within specific region inRoi.

It returns three arrays of the same length:

  • Subpixel precise positions of the minima
  • Values of the minima
  • Regions of equally bright pixels around the minima

If the given image consists of more than one channel, they are averaged to obtain monochromatic image, so that the values of the extrema are of type real.

There are two types of local extrema:

  • Peak/hole: single pixel (strictly) brighter/darker than its neighbourhood (eight pixels). The extremum's position is determined with subpixel precision using gradient method with Sobel gradient. Returned region contains only one pixel.
  • Plateau/lowland: a connected set of equally bright pixels (strictly) brighter/darker from their neighbourhood. Returned position for this extremum is the center of mass of the plateau.

If parameter inConsiderLowlands is set to true, the filter finds both types. Otherwise, it finds only strict minima.

Parameter inMaxValue determines the maximal value of the minimum to be considered.

Examples

Example image

Output for example image

Remarks

If a plateau/lowland is concave, it's center of mass may lie outside it. In such case, the value of the extremum (which is equal to the common value of its pixels) may be different from the value of pixel indicated by position of the extremum.

See also