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

Detailed Description

Union of opening calculated for several linear structuring element orientations.

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

Just like Opening 2d, the algorithm can handle holes to avoid contact with the image border. See the Opening 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 $).

A particularly relevant application example is presented in the Union linear closing 2d description.

Example of Python code :

Example imports

import PyIPSDK
import PyIPSDK.IPSDKIPLBasicMorphology as morpho

Code Example

# opening of input image
inImg = PyIPSDK.loadTiffImageFile(inputImgPath)
# Structuring element radius
radius = 4
# opening 2d image computation
outImg = morpho.unionLinearOpening2dImg(inImg, radius)

Example of C++ code :

Example informations

Header file

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

Code Example

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