SkewnessFilter2d
Computes, for each pixel of a two-dimensional image, the skewness 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 > skewnessFilter2d( std::shared_ptr< iolink::ImageView > inputImage, SkewnessFilter2d::KernelShape kernelShape, uint32_t kernelRadius, std::shared_ptr< iolink::ImageView > outputImage = NULL );
This function returns outputImage.
// Function prototype. skewness_filter_2d( input_image, kernel_shape = SkewnessFilter2d.KernelShape.DISK, kernel_radius = 3, output_image = None )
This function returns outputImage.
// Function prototype. public static IOLink.ImageView SkewnessFilter2d( IOLink.ImageView inputImage, SkewnessFilter2d.KernelShape kernelShape = ImageDev.SkewnessFilter2d.KernelShape.DISK, UInt32 kernelRadius = 3, IOLink.ImageView outputImage = null );
Class Syntax
Parameters
Class Name | SkewnessFilter2d |
---|
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 |
Object Examples
std::shared_ptr< iolink::ImageView > polystyrene = ioformat::readImage( std::string( IMAGEDEVDATA_IMAGES_FOLDER ) + "polystyrene.tif" ); SkewnessFilter2d skewnessFilter2dAlgo; skewnessFilter2dAlgo.setInputImage( polystyrene ); skewnessFilter2dAlgo.setKernelShape( SkewnessFilter2d::KernelShape::SQUARE ); skewnessFilter2dAlgo.setKernelRadius( 3 ); skewnessFilter2dAlgo.execute(); std::cout << "outputImage:" << skewnessFilter2dAlgo.outputImage()->toString();
polystyrene = ioformat.read_image(imagedev_data.get_image_path("polystyrene.tif")) skewness_filter_2d_algo = imagedev.SkewnessFilter2d() skewness_filter_2d_algo.input_image = polystyrene skewness_filter_2d_algo.kernel_shape = imagedev.SkewnessFilter2d.SQUARE skewness_filter_2d_algo.kernel_radius = 3 skewness_filter_2d_algo.execute() print( "output_image:", str( skewness_filter_2d_algo.output_image ) )
ImageView polystyrene = ViewIO.ReadImage( @"Data/images/polystyrene.tif" ); SkewnessFilter2d skewnessFilter2dAlgo = new SkewnessFilter2d { inputImage = polystyrene, kernelShape = SkewnessFilter2d.KernelShape.SQUARE, kernelRadius = 3 }; skewnessFilter2dAlgo.Execute(); Console.WriteLine( "outputImage:" + skewnessFilter2dAlgo.outputImage.ToString() );
Function Examples
std::shared_ptr< iolink::ImageView > polystyrene = ioformat::readImage( std::string( IMAGEDEVDATA_IMAGES_FOLDER ) + "polystyrene.tif" ); auto result = skewnessFilter2d( polystyrene, SkewnessFilter2d::KernelShape::SQUARE, 3 ); std::cout << "outputImage:" << result->toString();
polystyrene = ioformat.read_image(imagedev_data.get_image_path("polystyrene.tif")) result = imagedev.skewness_filter_2d( polystyrene, imagedev.SkewnessFilter2d.SQUARE, 3 ) print( "output_image:", str( result ) )
ImageView polystyrene = ViewIO.ReadImage( @"Data/images/polystyrene.tif" ); IOLink.ImageView result = Processing.SkewnessFilter2d( polystyrene, SkewnessFilter2d.KernelShape.SQUARE, 3 ); Console.WriteLine( "outputImage:" + result.ToString() );