Algorithm for image 3d opening.
Morphological opening of an image by a given structuring element InSEXYZ is defined as the dilation of the erosion of image by InSEXYZ :
See Erosion 3d and Dilation 3d respectively for more informations about these operations.
- 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 a opening operation is illustrated in 2d case : see Opening 2d.
- Note
- By default this algorithm uses a fast but inexact method to handle holes for which a contact may be created with image borders after first erosion step. Indeed, erosion step do not allows to keep a notion of deepness of such created image border contacts and then dilation step may keep these contacts when it should not. To avoid such errors user can set input algorithm parameter InOptBorderExtensionPolicy to value ipsdk::imaproc::attr::eBorderExtensionPolicy::eBEP_Enable. This will allow to handle exactly previous case at the cost of some computing times and of an additional allocated enlarged image. An example of such problems is illustrated in 2d case : see Opening 2d.
- See also
- http://en.wikipedia.org/wiki/Opening_%28morphology%29
- Note
- This algorithm is associated with two temporary working images. These working temporary images can be provided by user or will be automatically allocated when requested.
- ipsdk::imaproc::attr::OutOptWk1Img will only be used if InOptBorderExtensionPolicy is set to ipsdk::imaproc::attr::eBorderExtensionPolicy::eBEP_Enable.
- ipsdk::imaproc::attr::OutOptWk2Img is only used in special processing cases defined via ipsdk::imaproc::morpho::eSEProcessingCase enumerate. Such situation can be tested using ipsdk::imaproc::morpho::getSEProcessingCase function and associated image buffer type can be retrieved using ipsdk::imaproc::morpho::getSEWkImageBufferType.
Example of Python code :
Example imports
import PyIPSDK
import PyIPSDK.IPSDKIPLBasicMorphology as morpho
Code Example
inImg = PyIPSDK.loadTiffImageFile(inputImgPath)
inSE = PyIPSDK.sphericalSEXYZInfo(2)
outImg = morpho.opening3dImg(inImg, inSE)
Example of C++ code :
Example informations
Header file
#include <IPSDKIPL/IPSDKIPLBasicMorphology/Processor/Opening3dImg/Opening3dImg.h>
Code Example
ImagePtr pOutImg = opening3dImg(pInImg, pInSEXYZ);