Class SoTopHatProcessing
- 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.imagesegmentation.binarization.SoTopHatProcessing
-
- All Implemented Interfaces:
SafeDisposable
public class SoTopHatProcessing extends SoImageVizEngine
SoTopHatProcessingimage filter. TheSoTopHatProcessingengine performs a Top-Hat algorithm on a gray level image.The Top-Hat segmentation extracts small elements and details from given images. It detects the dark or the bright area, corresponding to the valleys or the narrow peaks. There exist two types of Top-Hat transform:
- The Black Top-Hat: it is defined as the difference between the closing with a particular kernel and the input image. The smaller is the kernel, the smaller are the elements in the Top-Hat image. A threshold allows selecting the darker elements of the Top-Hat result, i.e., the depth of the selected valleys. See Figure 1.
- The White Top-Hat: it is defined as the difference between the input image and its opening (using a particular kernel). The threshold allows selecting the brighter elements of the Top-Hat result.
The Top-Hat module is divided into two phases:
- The Top-Hat image computation, depending on the Top-Hat type and the closing/opening parameters; (step 1 and 2 on figure 1)
- The Thresholding, to select the valleys/narrow peaks depth. (step 3 on figure 1)
The
SoTopHatProcessingengine also includes a rough and a smooth mode. Whereas the rough mode uses a standard structuring element, the smooth mode employs a more sophisticated volumic structuring element, a rhombodecahedron, which usually generates a much more precise Top-Hat.File format/default:
TopHatProcessing {
computeMode MODE_AUTO elementShape ROUGH inGrayImage NULL elementSize 3 objectLightness BRIGHT_OBJECTS thresholdLevel 128.0f 255.0f
Library references: high_tophat tophat
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classSoTopHatProcessing.ElementShapesstatic classSoTopHatProcessing.ObjectLightnessType-
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>computeModeSelect the compute Mode (2D or 3D or AUTO) .SoSFEnum<SoTopHatProcessing.ElementShapes>elementShapeSelect the type of structuring element shape.SoSFInt32elementSizeThe half size of the structuring element.SoSFImageDataAdapterinGrayImageInput grey level image.SoSFEnum<SoTopHatProcessing.ObjectLightnessType>objectLightnessSelect the lightness mode for object to detect.SoImageVizEngineOutput<SoSFImageDataAdapter,SoImageDataAdapter>outBinaryImageThe output binary image.SoSFVec2fthresholdLevelThe low and high threshold levels.-
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 SoTopHatProcessing()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
-
elementShape
public final SoSFEnum<SoTopHatProcessing.ElementShapes> elementShape
Select the type of structuring element shape. . Default is ROUGH
-
inGrayImage
public final SoSFImageDataAdapter inGrayImage
Input grey level image. Default value is NULL. Supported types include: grayscale binary label image.
-
elementSize
public final SoSFInt32 elementSize
The half size of the structuring element. A structuring element always has an odd side length (3x3, 5x5, etc) which is defined by 2 * elementSize + 1. Default value is 3.
-
objectLightness
public final SoSFEnum<SoTopHatProcessing.ObjectLightnessType> objectLightness
Select the lightness mode for object to detect. . Default is BRIGHT_OBJECTS
-
thresholdLevel
public final SoSFVec2f thresholdLevel
The low and high threshold levels. Default value isSbVec2f(128.0f,255.0f).
-
outBinaryImage
public final SoImageVizEngineOutput<SoSFImageDataAdapter,SoImageDataAdapter> outBinaryImage
The output binary image. Default value is NULL. Supported types include: binary image.
-
-