IPSDK  4_1_0_2
IPSDK : Image Processing Software Development Kit

TopHat binary threshold on one 3d image. More...

IPSDKIPLBINARIZATION_API image::ImagePtr ipsdk::imaproc::bin::darkTopHat3dImg (const image::ImageConstPtr &pInImg3d, const StructuringElementXYZInfoConstPtr &pInSEXYZ, const ipReal64 inTopHatThreshold)
 wrapper function for dark TopHat binary threshold on one 3d image More...
 
IPSDKIPLBINARIZATION_API image::ImagePtr ipsdk::imaproc::bin::darkTopHat3dImg (const image::ImageConstPtr &pInImg3d, const StructuringElementXYZInfoConstPtr &pInSEXYZ, const ipReal64 inTopHatThreshold, const attr::eBorderExtensionPolicy &inOptBorderExtensionPolicy)
 wrapper function for dark TopHat binary threshold on one 3d image More...
 
IPSDKIPLBINARIZATION_API void ipsdk::imaproc::bin::darkTopHat3dImg (const image::ImageConstPtr &pInImg3d, const StructuringElementXYZInfoConstPtr &pInSEXYZ, const ipReal64 inTopHatThreshold, const attr::eBorderExtensionPolicy &inOptBorderExtensionPolicy, const image::ImagePtr &pOutBinImg)
 wrapper function for dark TopHat binary threshold on one 3d image More...
 
IPSDKIPLBINARIZATION_API image::ImagePtr ipsdk::imaproc::bin::lightTopHat3dImg (const image::ImageConstPtr &pInImg3d, const StructuringElementXYZInfoConstPtr &pInSEXYZ, const ipReal64 inTopHatThreshold)
 wrapper function for light TopHat binary threshold on one 3d image More...
 
IPSDKIPLBINARIZATION_API image::ImagePtr ipsdk::imaproc::bin::lightTopHat3dImg (const image::ImageConstPtr &pInImg3d, const StructuringElementXYZInfoConstPtr &pInSEXYZ, const ipReal64 inTopHatThreshold, const attr::eBorderExtensionPolicy &inOptBorderExtensionPolicy)
 wrapper function for light TopHat binary threshold on one 3d image More...
 
IPSDKIPLBINARIZATION_API void ipsdk::imaproc::bin::lightTopHat3dImg (const image::ImageConstPtr &pInImg3d, const StructuringElementXYZInfoConstPtr &pInSEXYZ, const ipReal64 inTopHatThreshold, const attr::eBorderExtensionPolicy &inOptBorderExtensionPolicy, const image::ImagePtr &pOutBinImg)
 wrapper function for light TopHat binary threshold on one 3d image More...
 

Detailed Description

TopHat binary threshold on one 3d image.

Top-Hat transform is an operation which allows to extract small details from an image. This transformation is in this case associated to a thresholding operation to obtain a binary image. This algorithm can be customized to search for dark (black, which is the default) which is the default or light (white) small particules.

Top-Hat transformation, given a structuring element $ InSEXYZ $, is associated to following formula :

Where $ \odot $ and $ \circledcirc $ are respectively a closing and an opening operation (see Opening 3d and Closing 3d).

Note
Behavior of this algorithm is specialized using specific morphological structuring elements (see 3d structuring elements for more informations about these shapes).
Please refer to Usage for examples of usage of different types of specific structuring elements during morphological operations.

An example of top-hat transform operation is illustrated in 2d case : see TopHat 2d.

See also
http://en.wikipedia.org/wiki/Top-hat_transform
Note
This algorithm is associated with three temporary working images ipsdk::imaproc::attr::OutOptWk1Img, ipsdk::imaproc::attr::OutOptWk2Img and ipsdk::imaproc::attr::OutWk1Img.

Attributes description

Attribute description for algorithm :

Name ToolTip Default Initializer
ipsdk::imaproc::attr::InImg3d [Input] 3d image for operation X
ipsdk::imaproc::attr::InSEXYZ [Input] structuring element xyz for processing operation X
ipsdk::imaproc::attr::InShapeGreyscaleType [Input] shape greyscale type considered during processing X
ipsdk::imaproc::attr::InTopHatThreshold [Input] threshold value used for top hat binarization X
ipsdk::imaproc::attr::InOptBorderExtensionPolicy [Input Optional] flag indicating border extension policy for processing X
ipsdk::imaproc::attr::OutOptWk1Img [Output Optional] Temporary working image for algorithm X
ipsdk::imaproc::attr::OutOptWk2Img [Output Optional] Temporary working image for algorithm X
ipsdk::imaproc::attr::OutWk1Img [Output] Temporary working image for algorithm ipsdk::imaproc::duplicateInOut (_pOutWk1Img, _pInImg3d)
ipsdk::imaproc::attr::OutBinImg [Output] binary image for processing operation ipsdk::imaproc::duplicateInOut (_pOutBinImg, _pInImg3d, image::eImageBufferType::eIBT_Binary)

Global Rule description

Global rule description for algorithm :
((ipsdk::imaproc::matchSize (_pInImg3d,_pOutBinImg)) && 
 (ipsdk::imaproc::matchSizeAndType (_pInImg3d,_pOutWk1Img)) && 
 (ipsdk::imaproc::noInSitu (_pInImg3d,_pOutWk1Img)) && 
 (ipsdk::processor::ifIsSet (_pOutOptWk1Img,
   ipsdk::imaproc::customImageProperty (_pOutOptWk1Img,
    morpho::matchBorderExtension1 (_pInImg3d,_pInSEXYZ,_pInOptBorderExtensionPolicy)))) && 
 (ipsdk::processor::ifIsSet (_pOutOptWk2Img,
   ipsdk::imaproc::customImageProperty (_pOutOptWk2Img,
    morpho::matchBorderExtension2 (_pInImg3d,_pInSEXYZ,_pInOptBorderExtensionPolicy)))))

Example of Python code :

Example imports

import PyIPSDK
import PyIPSDK.IPSDKIPLBinarization as bin

Code Example

# opening of input images
inImg = PyIPSDK.loadTiffImageFile(inputImgPath)
# creation of used structuring element
structuringElement = PyIPSDK.sphericalSEXYZInfo(5)
# dark top hat 3d image computation
outImg = bin.darkTopHat3dImg(inImg, structuringElement, 20)

Example of C++ code :

Example informations

Associated library

IPSDKIPLBinarization

Header file

Code Example

// create a 3x4x2 rectangular structuring element
// opening input image
ImagePtr pInImg = loadTiffImageFile(inputImgPath);
// compute dark tophat on input image
ImagePtr pOutImgDark = darkTopHat3dImg(pInImg, pInSEXYZ, 30);
See also
TopHat3dImgLvl1

Function Documentation

◆ darkTopHat3dImg() [1/3]

IPSDKIPLBINARIZATION_API image::ImagePtr ipsdk::imaproc::bin::darkTopHat3dImg ( const image::ImageConstPtr pInImg3d,
const StructuringElementXYZInfoConstPtr pInSEXYZ,
const ipReal64  inTopHatThreshold 
)

wrapper function for dark TopHat binary threshold on one 3d image

Exceptions
ipsdk::processor::IPSDKBaseProcessingExceptionon failure

◆ lightTopHat3dImg() [1/3]

IPSDKIPLBINARIZATION_API image::ImagePtr ipsdk::imaproc::bin::lightTopHat3dImg ( const image::ImageConstPtr pInImg3d,
const StructuringElementXYZInfoConstPtr pInSEXYZ,
const ipReal64  inTopHatThreshold 
)

wrapper function for light TopHat binary threshold on one 3d image

Exceptions
ipsdk::processor::IPSDKBaseProcessingExceptionon failure

◆ darkTopHat3dImg() [2/3]

IPSDKIPLBINARIZATION_API image::ImagePtr ipsdk::imaproc::bin::darkTopHat3dImg ( const image::ImageConstPtr pInImg3d,
const StructuringElementXYZInfoConstPtr pInSEXYZ,
const ipReal64  inTopHatThreshold,
const attr::eBorderExtensionPolicy inOptBorderExtensionPolicy 
)

wrapper function for dark TopHat binary threshold on one 3d image

Exceptions
ipsdk::processor::IPSDKBaseProcessingExceptionon failure

◆ darkTopHat3dImg() [3/3]

IPSDKIPLBINARIZATION_API void ipsdk::imaproc::bin::darkTopHat3dImg ( const image::ImageConstPtr pInImg3d,
const StructuringElementXYZInfoConstPtr pInSEXYZ,
const ipReal64  inTopHatThreshold,
const attr::eBorderExtensionPolicy inOptBorderExtensionPolicy,
const image::ImagePtr pOutBinImg 
)

wrapper function for dark TopHat binary threshold on one 3d image

Exceptions
ipsdk::processor::IPSDKBaseProcessingExceptionon failure

◆ lightTopHat3dImg() [2/3]

IPSDKIPLBINARIZATION_API image::ImagePtr ipsdk::imaproc::bin::lightTopHat3dImg ( const image::ImageConstPtr pInImg3d,
const StructuringElementXYZInfoConstPtr pInSEXYZ,
const ipReal64  inTopHatThreshold,
const attr::eBorderExtensionPolicy inOptBorderExtensionPolicy 
)

wrapper function for light TopHat binary threshold on one 3d image

Exceptions
ipsdk::processor::IPSDKBaseProcessingExceptionon failure

◆ lightTopHat3dImg() [3/3]

IPSDKIPLBINARIZATION_API void ipsdk::imaproc::bin::lightTopHat3dImg ( const image::ImageConstPtr pInImg3d,
const StructuringElementXYZInfoConstPtr pInSEXYZ,
const ipReal64  inTopHatThreshold,
const attr::eBorderExtensionPolicy inOptBorderExtensionPolicy,
const image::ImagePtr pOutBinImg 
)

wrapper function for light TopHat binary threshold on one 3d image

Exceptions
ipsdk::processor::IPSDKBaseProcessingExceptionon failure