KurtosisFilter2d
Computes, for each pixel of a two-dimensional image, the kurtosis value of its neighborhood.
Access to parameter description
For an introduction:
The shape of the neighborhood can be:
Access to parameter description
For an introduction:
- section Images Filtering.
- section First Order Statistics Filters.
The shape of the neighborhood can be:
- A square with a half side length defined by the kernelRadius parameter,
- A disk with a radius defined by the kernelRadius parameter.
Function Syntax
This function returns outputImage.
// Function prototype
std::shared_ptr< iolink::ImageView > kurtosisFilter2d( std::shared_ptr< iolink::ImageView > inputImage, KurtosisFilter2d::KernelShape kernelShape, uint32_t kernelRadius, std::shared_ptr< iolink::ImageView > outputImage = nullptr );
This function returns outputImage.
// Function prototype. kurtosis_filter_2d(input_image: idt.ImageType, kernel_shape: KurtosisFilter2d.KernelShape = KurtosisFilter2d.KernelShape.DISK, kernel_radius: int = 3, output_image: idt.ImageType = None) -> idt.ImageType
This function returns outputImage.
// Function prototype. public static IOLink.ImageView KurtosisFilter2d( IOLink.ImageView inputImage, KurtosisFilter2d.KernelShape kernelShape = ImageDev.KurtosisFilter2d.KernelShape.DISK, UInt32 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 kernel half side length or radius, in pixels. In case of a square, a value N produces a square window of 2N+1 pixels side length. In case of a disk, a value N produces a disk with a 2N+1 pixels diameter. | UInt32 | >=1 | 3 | |||||
kernelShape |
The shape of the window defining the neighborhood.
|
Enumeration | DISK | ||||||
outputImage |
The output image. Its dimensions are forced to the same values as the input. Its data type is forced to floating point. | 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 kernel half side length or radius, in pixels. In case of a square, a value N produces a square window of 2N+1 pixels side length. In case of a disk, a value N produces a disk with a 2N+1 pixels diameter. | uint32 | >=1 | 3 | |||||
kernel_shape |
The shape of the window defining the neighborhood.
|
enumeration | DISK | ||||||
output_image |
The output image. Its dimensions are forced to the same values as the input. Its data type is forced to floating point. | image | None |
Parameter Name | Description | Type | Supported Values | Default Value | |||||
---|---|---|---|---|---|---|---|---|---|
inputImage |
The input image. | Image | Binary, Label, Grayscale or Multispectral | null | |||||
kernelRadius |
The kernel half side length or radius, in pixels. In case of a square, a value N produces a square window of 2N+1 pixels side length. In case of a disk, a value N produces a disk with a 2N+1 pixels diameter. | UInt32 | >=1 | 3 | |||||
kernelShape |
The shape of the window defining the neighborhood.
|
Enumeration | DISK | ||||||
outputImage |
The output image. Its dimensions are forced to the same values as the input. Its data type is forced to floating point. | Image | null |
Object Examples
auto polystyrene = ioformat::readImage( std::string( IMAGEDEVDATA_IMAGES_FOLDER ) + "polystyrene.tif" ); KurtosisFilter2d kurtosisFilter2dAlgo; kurtosisFilter2dAlgo.setInputImage( polystyrene ); kurtosisFilter2dAlgo.setKernelShape( KurtosisFilter2d::KernelShape::SQUARE ); kurtosisFilter2dAlgo.setKernelRadius( 3 ); kurtosisFilter2dAlgo.execute(); std::cout << "outputImage:" << kurtosisFilter2dAlgo.outputImage()->toString();
polystyrene = ioformat.read_image(imagedev_data.get_image_path("polystyrene.tif")) kurtosis_filter_2d_algo = imagedev.KurtosisFilter2d() kurtosis_filter_2d_algo.input_image = polystyrene kurtosis_filter_2d_algo.kernel_shape = imagedev.KurtosisFilter2d.SQUARE kurtosis_filter_2d_algo.kernel_radius = 3 kurtosis_filter_2d_algo.execute() print("output_image:", str(kurtosis_filter_2d_algo.output_image))
ImageView polystyrene = ViewIO.ReadImage( @"Data/images/polystyrene.tif" ); KurtosisFilter2d kurtosisFilter2dAlgo = new KurtosisFilter2d { inputImage = polystyrene, kernelShape = KurtosisFilter2d.KernelShape.SQUARE, kernelRadius = 3 }; kurtosisFilter2dAlgo.Execute(); Console.WriteLine( "outputImage:" + kurtosisFilter2dAlgo.outputImage.ToString() );
Function Examples
auto polystyrene = ioformat::readImage( std::string( IMAGEDEVDATA_IMAGES_FOLDER ) + "polystyrene.tif" ); auto result = kurtosisFilter2d( polystyrene, KurtosisFilter2d::KernelShape::SQUARE, 3 ); std::cout << "outputImage:" << result->toString();
polystyrene = ioformat.read_image(imagedev_data.get_image_path("polystyrene.tif")) result = imagedev.kurtosis_filter_2d(polystyrene, imagedev.KurtosisFilter2d.SQUARE, 3) print("output_image:", str(result))
ImageView polystyrene = ViewIO.ReadImage( @"Data/images/polystyrene.tif" ); IOLink.ImageView result = Processing.KurtosisFilter2d( polystyrene, KurtosisFilter2d.KernelShape.SQUARE, 3 ); Console.WriteLine( "outputImage:" + result.ToString() );