Delineate2d
Enhances contrast of a two-dimensional image.
Access to parameter description
For an introduction to image filters: see section Images Filtering.
This algorithm provides contrast enhancement of an image using basic morphological transformations.
The delineate filter is based on the fact that a function $f$ is always between the erosion and the dilation of $f$. $$ E(I(n,m)) \leq I(n,m) \leq D(I(n,m)) $$ For each pixel, the output gray level value is assigned to the closest value between the erosion and the dilation of $I(n,m)$: $$ O(n,m)=\left\{\begin{array}{ll} D(I(n,m)) & \mbox {if $\left[D(I(n,m))-I(n,m)\right] < \left[E(I(n,m))-I(n,m)\right]$} \\ E(I(n,m)) & \mbox{otherwise} \end{array}\right. $$ See also
Access to parameter description
For an introduction to image filters: see section Images Filtering.
This algorithm provides contrast enhancement of an image using basic morphological transformations.
The delineate filter is based on the fact that a function $f$ is always between the erosion and the dilation of $f$. $$ E(I(n,m)) \leq I(n,m) \leq D(I(n,m)) $$ For each pixel, the output gray level value is assigned to the closest value between the erosion and the dilation of $I(n,m)$: $$ O(n,m)=\left\{\begin{array}{ll} D(I(n,m)) & \mbox {if $\left[D(I(n,m))-I(n,m)\right] < \left[E(I(n,m))-I(n,m)\right]$} \\ E(I(n,m)) & \mbox{otherwise} \end{array}\right. $$ See also
Function Syntax
This function returns outputImage.
// Function prototype
std::shared_ptr< iolink::ImageView > delineate2d( std::shared_ptr< iolink::ImageView > inputImage, int32_t kernelRadius, std::shared_ptr< iolink::ImageView > outputImage = NULL );
This function returns outputImage.
// Function prototype. delineate_2d( input_image, kernel_radius = 3, output_image = None )
This function returns outputImage.
// Function prototype. public static IOLink.ImageView Delineate2d( IOLink.ImageView inputImage, 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 | |
kernelRadius |
The half size of the square structuring element. A structuring element always has an odd side length (3x3, 5x5, etc.) which is defined by twice the kernel radius + 1. | Int32 | >=1 | 3 | |
outputImage |
The output image. Its dimensions and type are forced to the same values as the input. | Image | nullptr |
Parameter Name | Description | Type | Supported Values | Default Value | |
---|---|---|---|---|---|
input_image |
The input image. | image | Binary, Label, Grayscale or Multispectral | None | |
kernel_radius |
The half size of the square structuring element. A structuring element always has an odd side length (3x3, 5x5, etc.) which is defined by twice the kernel radius + 1. | int32 | >=1 | 3 | |
output_image |
The output image. Its dimensions and type are forced to the same values as the input. | image | None |
Parameter Name | Description | Type | Supported Values | Default Value | |
---|---|---|---|---|---|
inputImage |
The input image. | Image | Binary, Label, Grayscale or Multispectral | null | |
kernelRadius |
The half size of the square structuring element. A structuring element always has an odd side length (3x3, 5x5, etc.) which is defined by twice the kernel radius + 1. | Int32 | >=1 | 3 | |
outputImage |
The output image. Its dimensions and type are forced to the same values as the input. | Image | null |
Object Examples
std::shared_ptr< iolink::ImageView > polystyrene = ioformat::readImage( std::string( IMAGEDEVDATA_IMAGES_FOLDER ) + "polystyrene.tif" ); Delineate2d delineate2dAlgo; delineate2dAlgo.setInputImage( polystyrene ); delineate2dAlgo.setKernelRadius( 3 ); delineate2dAlgo.execute(); std::cout << "outputImage:" << delineate2dAlgo.outputImage()->toString();
polystyrene = ioformat.read_image(imagedev_data.get_image_path("polystyrene.tif")) delineate_2d_algo = imagedev.Delineate2d() delineate_2d_algo.input_image = polystyrene delineate_2d_algo.kernel_radius = 3 delineate_2d_algo.execute() print( "output_image:", str( delineate_2d_algo.output_image ) )
ImageView polystyrene = ViewIO.ReadImage( @"Data/images/polystyrene.tif" ); Delineate2d delineate2dAlgo = new Delineate2d { inputImage = polystyrene, kernelRadius = 3 }; delineate2dAlgo.Execute(); Console.WriteLine( "outputImage:" + delineate2dAlgo.outputImage.ToString() );
Function Examples
std::shared_ptr< iolink::ImageView > polystyrene = ioformat::readImage( std::string( IMAGEDEVDATA_IMAGES_FOLDER ) + "polystyrene.tif" ); auto result = delineate2d( polystyrene, 3 ); std::cout << "outputImage:" << result->toString();
polystyrene = ioformat.read_image(imagedev_data.get_image_path("polystyrene.tif")) result = imagedev.delineate_2d( polystyrene, 3 ) print( "output_image:", str( result ) )
ImageView polystyrene = ViewIO.ReadImage( @"Data/images/polystyrene.tif" ); IOLink.ImageView result = Processing.Delineate2d( polystyrene, 3 ); Console.WriteLine( "outputImage:" + result.ToString() );