DilationColor2d
Performs a dilation on a true-color image using a structuring element matching with a square.
Access to parameter description
For an introduction:
The maximum in the neighborhood is either computed on the luminance or the saturation of pixels, and the center is set to the pixel that gives the maximum luminance or saturation.
With this method, no new color is created.
See also
Access to parameter description
For an introduction:
- section Mathematical Morphology
- section Introduction To Dilation
The maximum in the neighborhood is either computed on the luminance or the saturation of pixels, and the center is set to the pixel that gives the maximum luminance or saturation.
With this method, no new color is created.
See also
Function Syntax
This function returns outputColorImage.
// Function prototype
std::shared_ptr< iolink::ImageView > dilationColor2d( std::shared_ptr< iolink::ImageView > inputColorImage, int32_t kernelRadius, DilationColor2d::CriterionPlane criterionPlane, std::shared_ptr< iolink::ImageView > outputColorImage = nullptr );
This function returns outputColorImage.
// Function prototype. dilation_color_2d(input_color_image: idt.ImageType, kernel_radius: int = 3, criterion_plane: DilationColor2d.CriterionPlane = DilationColor2d.CriterionPlane.LUMINANCE, output_color_image: idt.ImageType = None) -> idt.ImageType
This function returns outputColorImage.
// Function prototype. public static IOLink.ImageView DilationColor2d( IOLink.ImageView inputColorImage, Int32 kernelRadius = 3, DilationColor2d.CriterionPlane criterionPlane = ImageDev.DilationColor2d.CriterionPlane.LUMINANCE, IOLink.ImageView outputColorImage = null );
Class Syntax
Parameters
Parameter Name | Description | Type | Supported Values | Default Value | |||||
---|---|---|---|---|---|---|---|---|---|
inputColorImage |
The input color image. | Image | 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 | |||||
criterionPlane |
The plane on which the criterion is computed.
|
Enumeration | LUMINANCE | ||||||
outputColorImage |
The output color image. Its dimensions and type are forced to the same values as the input image. | Image | nullptr |
Parameter Name | Description | Type | Supported Values | Default Value | |||||
---|---|---|---|---|---|---|---|---|---|
input_color_image |
The input color image. | image | 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 | |||||
criterion_plane |
The plane on which the criterion is computed.
|
enumeration | LUMINANCE | ||||||
output_color_image |
The output color image. Its dimensions and type are forced to the same values as the input image. | image | None |
Parameter Name | Description | Type | Supported Values | Default Value | |||||
---|---|---|---|---|---|---|---|---|---|
inputColorImage |
The input color image. | Image | 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 | |||||
criterionPlane |
The plane on which the criterion is computed.
|
Enumeration | LUMINANCE | ||||||
outputColorImage |
The output color image. Its dimensions and type are forced to the same values as the input image. | Image | null |
Object Examples
auto ateneub = ioformat::readImage( std::string( IMAGEDEVDATA_IMAGES_FOLDER ) + "ateneub.jpg" ); DilationColor2d dilationColor2dAlgo; dilationColor2dAlgo.setInputColorImage( ateneub ); dilationColor2dAlgo.setKernelRadius( 3 ); dilationColor2dAlgo.setCriterionPlane( DilationColor2d::CriterionPlane::LUMINANCE ); dilationColor2dAlgo.execute(); std::cout << "outputColorImage:" << dilationColor2dAlgo.outputColorImage()->toString();
ateneub = ioformat.read_image(imagedev_data.get_image_path("ateneub.jpg")) dilation_color_2d_algo = imagedev.DilationColor2d() dilation_color_2d_algo.input_color_image = ateneub dilation_color_2d_algo.kernel_radius = 3 dilation_color_2d_algo.criterion_plane = imagedev.DilationColor2d.LUMINANCE dilation_color_2d_algo.execute() print("output_color_image:", str(dilation_color_2d_algo.output_color_image))
ImageView ateneub = ViewIO.ReadImage( @"Data/images/ateneub.jpg" ); DilationColor2d dilationColor2dAlgo = new DilationColor2d { inputColorImage = ateneub, kernelRadius = 3, criterionPlane = DilationColor2d.CriterionPlane.LUMINANCE }; dilationColor2dAlgo.Execute(); Console.WriteLine( "outputColorImage:" + dilationColor2dAlgo.outputColorImage.ToString() );
Function Examples
auto ateneub = ioformat::readImage( std::string( IMAGEDEVDATA_IMAGES_FOLDER ) + "ateneub.jpg" ); auto result = dilationColor2d( ateneub, 3, DilationColor2d::CriterionPlane::LUMINANCE ); std::cout << "outputColorImage:" << result->toString();
ateneub = ioformat.read_image(imagedev_data.get_image_path("ateneub.jpg")) result = imagedev.dilation_color_2d(ateneub, 3, imagedev.DilationColor2d.LUMINANCE) print("output_color_image:", str(result))
ImageView ateneub = ViewIO.ReadImage( @"Data/images/ateneub.jpg" ); IOLink.ImageView result = Processing.DilationColor2d( ateneub, 3, DilationColor2d.CriterionPlane.LUMINANCE ); Console.WriteLine( "outputColorImage:" + result.ToString() );