IPSDK 0.2
IPSDK : Image Processing Software Development Kit
Union linear closing 2dSee full documentation
imageunionLinearClosing2dImg (inImg,radius)
imageunionLinearClosing2dImg (inImg,radius,nbAngles)
imageunionLinearClosing2dImg (inImg,radius,inOptBorderExtensionPolicy)
imageunionLinearClosing2dImg (inImg,radius,nbAngles,inOptBorderExtensionPolicy)

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

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

Header file

#include <IPSDKIPL/IPSDKIPLBasicMorphology/Processor/UnionLinearClosing2dImg/UnionLinearClosing2dImg.h>

Code Example

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