IPSDK  4_1_0_2
IPSDK : Image Processing Software Development Kit

Union of closings calculated for several linear structuring element orientations. More...

IPSDKIPLBASICMORPHOLOGY_API image::ImagePtr ipsdk::imaproc::morpho::unionLinearClosing2dImg (const image::ImageConstPtr &pInImg, const ipsdk::ipReal64 radius)
 wrapper function for Union of closings calculated for several linear structuring element orientations More...
 
IPSDKIPLBASICMORPHOLOGY_API image::ImagePtr ipsdk::imaproc::morpho::unionLinearClosing2dImg (const image::ImageConstPtr &pInImg, const ipsdk::ipReal64 radius, const ipsdk::ipUInt32 nbAngles)
 wrapper function for Union of closings calculated for several linear structuring element orientations More...
 
IPSDKIPLBASICMORPHOLOGY_API image::ImagePtr ipsdk::imaproc::morpho::unionLinearClosing2dImg (const image::ImageConstPtr &pInImg, const ipsdk::ipReal64 radius, const attr::eBorderExtensionPolicy &inOptBorderExtensionPolicy)
 wrapper function for Union of closings calculated for several linear structuring element orientations More...
 
IPSDKIPLBASICMORPHOLOGY_API image::ImagePtr ipsdk::imaproc::morpho::unionLinearClosing2dImg (const image::ImageConstPtr &pInImg, const ipsdk::ipReal64 radius, const ipsdk::ipUInt32 nbAngles, const attr::eBorderExtensionPolicy &inOptBorderExtensionPolicy)
 wrapper function for Union of closings calculated for several linear structuring element orientations More...
 
IPSDKIPLBASICMORPHOLOGY_API void ipsdk::imaproc::morpho::unionLinearClosing2dImg (const image::ImageConstPtr &pInImg, const ipsdk::ipReal64 radius, const image::ImagePtr &pOutImg)
 wrapper function for Union of closings calculated for several linear structuring element orientations More...
 
IPSDKIPLBASICMORPHOLOGY_API void ipsdk::imaproc::morpho::unionLinearClosing2dImg (const image::ImageConstPtr &pInImg, const ipsdk::ipReal64 radius, const ipsdk::ipUInt32 nbAngles, const image::ImagePtr &pOutImg)
 wrapper function for Union of closings calculated for several linear structuring element orientations More...
 
IPSDKIPLBASICMORPHOLOGY_API void ipsdk::imaproc::morpho::unionLinearClosing2dImg (const image::ImageConstPtr &pInImg, const ipsdk::ipReal64 radius, const attr::eBorderExtensionPolicy &inOptBorderExtensionPolicy, const image::ImagePtr &pOutImg)
 wrapper function for Union of closings calculated for several linear structuring element orientations More...
 
IPSDKIPLBASICMORPHOLOGY_API void ipsdk::imaproc::morpho::unionLinearClosing2dImg (const image::ImageConstPtr &pInImg, const ipsdk::ipReal64 radius, const ipsdk::ipUInt32 nbAngles, const attr::eBorderExtensionPolicy &inOptBorderExtensionPolicy, const image::ImagePtr &pOutImg)
 wrapper function for Union of closings calculated for several linear structuring element orientations More...
 

Detailed Description

Union of closings calculated for several linear structuring element orientations.

The 2d union linear closing algorithm computes closings in several directions with linear structuring elements and combines them to keep the maximum pixel intensity. This algorithm is usefull to fill circular dark holes inside light objects while preserving thin dark structures.

Just like Closing 2d, the algorithm can handle holes to avoid contact with the image border. See the Closing 2d description for more details.

By default, the algorithm uses 4 different angles : $ 0 $, $ \pi / 4 $, $ \pi / 2 $ and $ 3 \pi / 4 $. To have a good compromise between detection accuracy and calculation time, it is advised to use $ 4 \times InRadius $ angles for small structuring elements ( $ InRadius < 5 $).

The figure below highlights the efficacy of this algorithm. Here, we used a radius of 32 and 15 different structuring element orientations:

UnionLinearClosing2dImg.png

Attributes description

Attribute description for algorithm :

Name ToolTip Default Initializer
ipsdk::imaproc::attr::InImg [Input] image for processing operation X
ipsdk::imaproc::attr::InRadius [Input] Radius X
ipsdk::imaproc::attr::InOptNbAngles2d [Input Optional] Number of angles for directional smoothing 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 customOutput (_pOutWk1Img, outputUnionLinear2d(_pInImg,_pInOptBorderExtensionPolicy,_pInRadius))
ipsdk::imaproc::attr::OutWk2Img [Output] Temporary working image for algorithm customOutput (_pOutWk2Img, outputUnionLinear2d(_pInImg,_pInOptBorderExtensionPolicy,_pInRadius))
ipsdk::imaproc::attr::OutImg [Output] image for processing operation ipsdk::imaproc::duplicateInOut (_pOutImg, _pInImg)

Global Rule description

Global rule description for algorithm :
(ipsdk::imaproc::matchSizeAndType (_pInImg,_pOutImg)) && 
(ipsdk::imaproc::customImageProperty (_pOutWk1Img,
  matchBorderExtension1 (_pInImg,_pInRadius,eSEXYSubType::eSEXY_Linear,_pInOptBorderExtensionPolicy))) && 
(ipsdk::imaproc::customImageProperty (_pOutWk2Img,
  matchBorderExtension1 (_pInImg,_pInRadius,eSEXYSubType::eSEXY_Linear,_pInOptBorderExtensionPolicy))) && 
(ipsdk::processor::ifIsSet (_pOutOptWk1Img,
  ipsdk::imaproc::customImageProperty (_pOutOptWk1Img,
   matchBorderExtension1 (_pInImg,_pInRadius,eSEXYSubType::eSEXY_Linear,_pInOptBorderExtensionPolicy)))) && 
(ipsdk::processor::ifIsSet (_pOutOptWk2Img,
  ipsdk::imaproc::customImageProperty (_pOutOptWk2Img,
   matchBorderExtension1 (_pInImg,_pInRadius,eSEXYSubType::eSEXY_Linear,_pInOptBorderExtensionPolicy))))

Example of Python code :

Example imports

import PyIPSDK
import PyIPSDK.IPSDKIPLBasicMorphology as morpho

Code Example

# Structuring element radius
radius = 4
# opening 2d image computation
outImg = morpho.unionLinearClosing2dImg(inImg, radius)

Example of C++ code :

Example informations

Associated library

IPSDKIPLBasicMorphology

Header file

Code Example

// Input structuring element radius
const ipReal64 radius = 4.;
// compute union linear opening on the input image
ImagePtr pOutImg = unionLinearClosing2dImg(pInImg, radius);
See also
UnionLinearClosing2dImgLvl1

Function Documentation

◆ unionLinearClosing2dImg() [1/8]

IPSDKIPLBASICMORPHOLOGY_API image::ImagePtr ipsdk::imaproc::morpho::unionLinearClosing2dImg ( const image::ImageConstPtr pInImg,
const ipsdk::ipReal64  radius 
)

wrapper function for Union of closings calculated for several linear structuring element orientations

Exceptions
ipsdk::processor::IPSDKBaseProcessingExceptionon failure

◆ unionLinearClosing2dImg() [2/8]

IPSDKIPLBASICMORPHOLOGY_API image::ImagePtr ipsdk::imaproc::morpho::unionLinearClosing2dImg ( const image::ImageConstPtr pInImg,
const ipsdk::ipReal64  radius,
const ipsdk::ipUInt32  nbAngles 
)

wrapper function for Union of closings calculated for several linear structuring element orientations

Exceptions
ipsdk::processor::IPSDKBaseProcessingExceptionon failure

◆ unionLinearClosing2dImg() [3/8]

IPSDKIPLBASICMORPHOLOGY_API image::ImagePtr ipsdk::imaproc::morpho::unionLinearClosing2dImg ( const image::ImageConstPtr pInImg,
const ipsdk::ipReal64  radius,
const attr::eBorderExtensionPolicy inOptBorderExtensionPolicy 
)

wrapper function for Union of closings calculated for several linear structuring element orientations

Exceptions
ipsdk::processor::IPSDKBaseProcessingExceptionon failure

◆ unionLinearClosing2dImg() [4/8]

IPSDKIPLBASICMORPHOLOGY_API image::ImagePtr ipsdk::imaproc::morpho::unionLinearClosing2dImg ( const image::ImageConstPtr pInImg,
const ipsdk::ipReal64  radius,
const ipsdk::ipUInt32  nbAngles,
const attr::eBorderExtensionPolicy inOptBorderExtensionPolicy 
)

wrapper function for Union of closings calculated for several linear structuring element orientations

Exceptions
ipsdk::processor::IPSDKBaseProcessingExceptionon failure

◆ unionLinearClosing2dImg() [5/8]

IPSDKIPLBASICMORPHOLOGY_API void ipsdk::imaproc::morpho::unionLinearClosing2dImg ( const image::ImageConstPtr pInImg,
const ipsdk::ipReal64  radius,
const image::ImagePtr pOutImg 
)

wrapper function for Union of closings calculated for several linear structuring element orientations

Exceptions
ipsdk::processor::IPSDKBaseProcessingExceptionon failure

◆ unionLinearClosing2dImg() [6/8]

IPSDKIPLBASICMORPHOLOGY_API void ipsdk::imaproc::morpho::unionLinearClosing2dImg ( const image::ImageConstPtr pInImg,
const ipsdk::ipReal64  radius,
const ipsdk::ipUInt32  nbAngles,
const image::ImagePtr pOutImg 
)

wrapper function for Union of closings calculated for several linear structuring element orientations

Exceptions
ipsdk::processor::IPSDKBaseProcessingExceptionon failure

◆ unionLinearClosing2dImg() [7/8]

IPSDKIPLBASICMORPHOLOGY_API void ipsdk::imaproc::morpho::unionLinearClosing2dImg ( const image::ImageConstPtr pInImg,
const ipsdk::ipReal64  radius,
const attr::eBorderExtensionPolicy inOptBorderExtensionPolicy,
const image::ImagePtr pOutImg 
)

wrapper function for Union of closings calculated for several linear structuring element orientations

Exceptions
ipsdk::processor::IPSDKBaseProcessingExceptionon failure

◆ unionLinearClosing2dImg() [8/8]

IPSDKIPLBASICMORPHOLOGY_API void ipsdk::imaproc::morpho::unionLinearClosing2dImg ( const image::ImageConstPtr pInImg,
const ipsdk::ipReal64  radius,
const ipsdk::ipUInt32  nbAngles,
const attr::eBorderExtensionPolicy inOptBorderExtensionPolicy,
const image::ImagePtr pOutImg 
)

wrapper function for Union of closings calculated for several linear structuring element orientations

Exceptions
ipsdk::processor::IPSDKBaseProcessingExceptionon failure