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 = nullptr );
This function returns outputImage.
// Function prototype. morphological_laplacian(input_image: idt.ImageType, precision: MorphologicalLaplacian.Precision = MorphologicalLaplacian.Precision.FASTER, kernel_radius: int = 3, output_image: idt.ImageType = None) -> idt.ImageType
This function returns outputImage.
// Function prototype. public static IOLink.ImageView MorphologicalLaplacian( IOLink.ImageView inputImage, MorphologicalLaplacian.Precision precision = ImageDev.MorphologicalLaplacian.Precision.FASTER, Int32 kernelRadius = 3, 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 |
Parameter Name | Description | Type | Supported Values | Default Value | |||||
---|---|---|---|---|---|---|---|---|---|
input_image |
The input image. | image | Binary, Label, Grayscale or Multispectral | None | |||||
precision |
The precision for computation for 3D morphological operations.
|
enumeration | FASTER | ||||||
kernel_radius |
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 | |||||
output_image |
The output image. | image | None |
Parameter Name | Description | Type | Supported Values | Default Value | |||||
---|---|---|---|---|---|---|---|---|---|
inputImage |
The input image. | Image | Binary, Label, Grayscale or Multispectral | null | |||||
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 | null |
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();
foam = imagedev.read_vip_image(imagedev_data.get_image_path("foam.vip")) morphological_laplacian_algo = imagedev.MorphologicalLaplacian() morphological_laplacian_algo.input_image = foam morphological_laplacian_algo.precision = imagedev.MorphologicalLaplacian.FASTER morphological_laplacian_algo.kernel_radius = 3 morphological_laplacian_algo.execute() print("output_image:", str(morphological_laplacian_algo.output_image))
ImageView foam = Data.ReadVipImage( @"Data/images/foam.vip" ); MorphologicalLaplacian morphologicalLaplacianAlgo = new MorphologicalLaplacian { inputImage = foam, precision = MorphologicalLaplacian.Precision.FASTER, kernelRadius = 3 }; morphologicalLaplacianAlgo.Execute(); Console.WriteLine( "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();
foam = imagedev.read_vip_image(imagedev_data.get_image_path("foam.vip")) result = imagedev.morphological_laplacian(foam, imagedev.MorphologicalLaplacian.FASTER, 3) print("output_image:", str(result))
ImageView foam = Data.ReadVipImage( @"Data/images/foam.vip" ); IOLink.ImageView result = Processing.MorphologicalLaplacian( foam, MorphologicalLaplacian.Precision.FASTER, 3 ); Console.WriteLine( "outputImage:" + result.ToString() );