# SoLocalMaximaQuantification Class Reference [Statistics]

`#include <ImageViz/Engines/ImageAnalysis/Statistics/SoLocalMaximaQuantification.h>`

Inheritance diagram for SoLocalMaximaQuantification:

List of all members.

## Classes

Results details of SoLocalMaximaQuantification. More...

## Public Types

enum  PrecisionMode {
PIXEL = 0,
SUB_PIXEL = 1
}

## Public Member Functions

SoLocalMaximaQuantification ()

## Public Attributes

SoSFEnum computeMode
SoSFVec3i32 localWindow
SoSFFloat thresholdLevel
SoSFEnum precisionMode
SoSFInt32 numberOfPatterns
SoImageVizEngineAnalysisOutput
outResult

## Detailed Description

SoLocalMaximaQuantification engine

The SoLocalMaximaQuantification engine extracts the local maxima of an image using a neighborhood analysis.

Input_Image[i,j] is a local maximum if the 2 conditions below apply:

1. Considering k in [1,p], l in [1,q] and m in [-p,p], InputImage(i,j) verifies:
InputImage( i, j) > InputImage(i + m, j - l)
InputImage( i, j) > InputImage(i - k, j)
InputImage(i, j) >= InputImage(i + k, j)
InputImage(i, j) >= InputImage(i + m, j + l)

2. Input_Image[i,j] is higher than a specified threshold
InputImage(i, j) >= threshold

Graphic visualization of the neighborhood analysis

Examples:

Example 1:
Input parameters: p=0, q=0, threshold=4, number=50.
The local maxima will be the points higher or equal to 4.

Number of local maxima detected: 7
Positions of the local maxima:
(7,3) (6,5) (5,7) (6,7) (6,8) (2,9) (6,9)
This corresponds to a threshold.

Example 2: Input parameters:p=1, q=1, threshold=3, number=50.
Number of local maxima detected: 4
Positions of the local maxima: (7,3) (6,5) (5,7) (2,9)

Remark: If there is an area in the image at constant level, the engine returns the upper left corner of this area. The other points of the area are not considered as ï¿½local maximaï¿½.

Example 3: Input parameters: p=2, q=2, threshold=3, number=50.
Number of local maxima detected: 2
Positions of the local maxima: (7,3) (5,7)

Remark: The algorithm is not performed on the image border depending on n and m values. That is the reason why the point (2,9) is not considered as a local maximum.

Local Maximum Sub-Pixel Position Determination:
On example 3, the algorithm detects 2 local maxima. The positions are converted to sub-pixel positions:

X Sub-pixel Position Determined by Parabola Approximation

Y Sub-pixel Position Determined by Parabola Approximation

### FILE FORMAT/DEFAULT

LocalMaximaQuantification {  computeMode MODE_AUTO inGrayImage NULL localWindow 3 3 3 thresholdLevel 0.0f precisionMode PIXEL numberOfPatterns 1
}

Library references: maxextract maxextract3d

## Member Enumeration Documentation

Enumerator:
 PIXEL SUB_PIXEL

## Constructor & Destructor Documentation

 SoLocalMaximaQuantification::SoLocalMaximaQuantification ( )

Constructor.

## Member Data Documentation

Select the compute Mode (2D or 3D or AUTO) Use enum ComputeMode.

Default is MODE_AUTO

Enter input grey level image Default value is NULL.

Supported types include: grayscale binary label image.

The neighborhood size in X, Y and Z.

Default value is SbVec3i32(3,3,3).

The number of patterns to be detected.

Default value is 1.

The matching results.

Default value is NULL.

Select the precision mode of position.

Use enum PrecisionMode. Default is PIXEL

Threshold.

Default value is 0.0f.

The documentation for this class was generated from the following file:

Open Inventor Toolkit reference manual, generated on 16 Jul 2020