MorphologicalLaplacian
Approximates an image Laplacian by using morphological operations.
Access to parameter description
For an introduction:
Figure 1. The MorphologicalLaplacian algorithm:
(a) gray level input image, (b) morphological Laplacian result
This algorithm uses ErosionDisk2d and DilationDisk2d in 2D case and ErosionBallProcessing3d and DilationBall3d in 3D case.
Two additional parameters are also provided:
See also
Access to parameter description
For an introduction:
- section Edge Detection
- section Gradient
- section Morphology
![]() (a) |
![]() (b) |
(a) gray level input image, (b) morphological Laplacian result
This algorithm uses ErosionDisk2d and DilationDisk2d in 2D case and ErosionBallProcessing3d and DilationBall3d in 3D case.
Two additional parameters are also provided:
- The computation mode for 3D morphological erosion an dilation: Fast or Precise.
- The size of structuring element for morphological operations.
See also
Function Syntax
This function returns outputImage.
// Function prototype
std::shared_ptr< iolink::ImageView > morphologicalLaplacian( std::shared_ptr< iolink::ImageView > inputImage, MorphologicalLaplacian::Precision precision, int32_t kernelRadius, std::shared_ptr< iolink::ImageView > outputImage = NULL );
Class Syntax
Parameters
Parameter Name | Description | Type | Supported Values | Default Value | |||||
---|---|---|---|---|---|---|---|---|---|
![]() |
inputImage |
The input image. | Image | Binary, Label, Grayscale or Multispectral | nullptr | ||||
![]() |
precision |
The precision for computation for 3D morphological operations.
|
Enumeration | FASTER | |||||
![]() |
kernelRadius |
The half size of the structuring element. A structuring element always has an odd side length (3x3, 5x5, etc) which is defined by 2 elementSize + 1. |
Int32 | >=1 | 3 | ||||
![]() |
outputImage |
The output image. | Image | nullptr |
Object Examples
auto foam = readVipImage( std::string( IMAGEDEVDATA_IMAGES_FOLDER ) + "foam.vip" ); MorphologicalLaplacian morphologicalLaplacianAlgo; morphologicalLaplacianAlgo.setInputImage( foam ); morphologicalLaplacianAlgo.setPrecision( MorphologicalLaplacian::Precision::FASTER ); morphologicalLaplacianAlgo.setKernelRadius( 3 ); morphologicalLaplacianAlgo.execute(); std::cout << "outputImage:" << morphologicalLaplacianAlgo.outputImage()->toString();
Function Examples
auto foam = readVipImage( std::string( IMAGEDEVDATA_IMAGES_FOLDER ) + "foam.vip" ); auto result = morphologicalLaplacian( foam, MorphologicalLaplacian::Precision::FASTER, 3 ); std::cout << "outputImage:" << result->toString();