Class SoLocalMaximaQuantification
- java.lang.Object
-
- com.openinventor.inventor.Inventor
-
- com.openinventor.inventor.misc.SoBase
-
- com.openinventor.inventor.fields.SoFieldContainer
-
- com.openinventor.inventor.engines.SoEngine
-
- com.openinventor.imageviz.engines.SoImageVizEngine
-
- com.openinventor.imageviz.engines.imageanalysis.statistics.SoLocalMaximaQuantification
-
- All Implemented Interfaces:
SafeDisposable
public class SoLocalMaximaQuantification extends SoImageVizEngine
SoLocalMaximaQuantification
engine. TheSoLocalMaximaQuantification
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) >= thresholdExamples:
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
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
SoLocalMaximaQuantification.PrecisionModes
static class
SoLocalMaximaQuantification.SbLocalMaximaDetail
Results details ofSoLocalMaximaQuantification
.-
Nested classes/interfaces inherited from class com.openinventor.imageviz.engines.SoImageVizEngine
SoImageVizEngine.ComputeModes, SoImageVizEngine.EventArg, SoImageVizEngine.Neighborhood3ds
-
Nested classes/interfaces inherited from class com.openinventor.inventor.Inventor
Inventor.ConstructorCommand
-
-
Field Summary
Fields Modifier and Type Field Description SoSFEnum<SoImageVizEngine.ComputeModes>
computeMode
Select the compute Mode (2D or 3D or AUTO) .SoSFImageDataAdapter
inGrayImage
Enter input grey level image Default value is NULL.SoSFVec3i32
localWindow
The neighborhood size in X, Y and Z.SoSFInt32
numberOfPatterns
The number of patterns to be detected.SoImageVizEngineAnalysisOutput<SoLocalMaximaQuantification.SbLocalMaximaDetail>
outResult
The matching results.SoSFEnum<SoLocalMaximaQuantification.PrecisionModes>
precisionMode
Select the precision mode of position.SoSFFloat
thresholdLevel
Threshold.-
Fields inherited from class com.openinventor.imageviz.engines.SoImageVizEngine
onBegin, onEnd, onProgress
-
Fields inherited from class com.openinventor.inventor.Inventor
VERBOSE_LEVEL, ZeroHandle
-
-
Constructor Summary
Constructors Constructor Description SoLocalMaximaQuantification()
Constructor.
-
Method Summary
-
Methods inherited from class com.openinventor.imageviz.engines.SoImageVizEngine
abortEvaluate, isEvaluating, startEvaluate, waitEvaluate
-
Methods inherited from class com.openinventor.inventor.engines.SoEngine
copy, getByName, getOutput, getOutputName
-
Methods inherited from class com.openinventor.inventor.fields.SoFieldContainer
copyFieldValues, copyFieldValues, enableNotify, fieldsAreEqual, get, getAllFields, getEventIn, getEventOut, getField, getFieldName, hasDefaultValues, isNotifyEnabled, set, setToDefaults
-
Methods inherited from class com.openinventor.inventor.misc.SoBase
dispose, getName, isDisposable, isSynchronizable, setName, setSynchronizable, touch
-
Methods inherited from class com.openinventor.inventor.Inventor
getNativeResourceHandle
-
-
-
-
Field Detail
-
computeMode
public final SoSFEnum<SoImageVizEngine.ComputeModes> computeMode
Select the compute Mode (2D or 3D or AUTO) . Default is MODE_AUTO
-
inGrayImage
public final SoSFImageDataAdapter inGrayImage
Enter input grey level image Default value is NULL. Supported types include: grayscale binary label image.
-
localWindow
public final SoSFVec3i32 localWindow
The neighborhood size in X, Y and Z. Default value isSbVec3i32(3,3,3)
.
-
thresholdLevel
public final SoSFFloat thresholdLevel
Threshold. Default value is 0.0f.
-
precisionMode
public final SoSFEnum<SoLocalMaximaQuantification.PrecisionModes> precisionMode
Select the precision mode of position. . Default is PIXEL
-
numberOfPatterns
public final SoSFInt32 numberOfPatterns
The number of patterns to be detected. Default value is 1.
-
outResult
public final SoImageVizEngineAnalysisOutput<SoLocalMaximaQuantification.SbLocalMaximaDetail> outResult
The matching results. Default value is NULL.
-
-