Deblurring2d
Enhances contrast and removes blur from a two-dimensional image.
Access to parameter description
For an introduction to image filters: see section Images Filtering.
This algorithm provides contrast enhancement and removes blur. It improves the boundaries of the different objects. The principle is to subtract from the image its own Laplacian.
A sharpening factor parameter controls the filter strength. The higher it is, the more sharpened the edges are and the more noise is revealed.
See also
Access to parameter description
For an introduction to image filters: see section Images Filtering.
This algorithm provides contrast enhancement and removes blur. It improves the boundaries of the different objects. The principle is to subtract from the image its own Laplacian.
A sharpening factor parameter controls the filter strength. The higher it is, the more sharpened the edges are and the more noise is revealed.
See also
Function Syntax
This function returns outputImage.
// Function prototype
std::shared_ptr< iolink::ImageView > deblurring2d( std::shared_ptr< iolink::ImageView > inputImage, double sharpeningFactor, Deblurring2d::OutputType outputType, std::shared_ptr< iolink::ImageView > outputImage = NULL );
This function returns outputImage.
// Function prototype. deblurring_2d( input_image, sharpening_factor = 1, output_type = Deblurring2d.OutputType.SAME_AS_INPUT, output_image = None )
This function returns outputImage.
// Function prototype. public static IOLink.ImageView Deblurring2d( IOLink.ImageView inputImage, double sharpeningFactor = 1, Deblurring2d.OutputType outputType = ImageDev.Deblurring2d.OutputType.SAME_AS_INPUT, IOLink.ImageView outputImage = null );
Class Syntax
Parameters
Class Name | Deblurring2d |
---|
Parameter Name | Description | Type | Supported Values | Default Value | |||||
---|---|---|---|---|---|---|---|---|---|
inputImage |
The input image. | Image | Grayscale or Multispectral | nullptr | |||||
The sharpening factor. | Float64 | >0 | 1 | ||||||
outputType |
The output data type. It can either be the same as the input type, or forced to be float. In the case of floating input images, this parameter has no effect.
|
Enumeration | SAME_AS_INPUT | ||||||
outputImage |
The output image. Its dimensions are forced to the same values as the input. Its data type is promoted. | Image | nullptr |
Object Examples
std::shared_ptr< iolink::ImageView > polystyrene = ioformat::readImage( std::string( IMAGEDEVDATA_IMAGES_FOLDER ) + "polystyrene.tif" ); Deblurring2d deblurring2dAlgo; deblurring2dAlgo.setInputImage( polystyrene ); deblurring2dAlgo.setSharpeningFactor( 1.0 ); deblurring2dAlgo.setOutputType( Deblurring2d::OutputType::SAME_AS_INPUT ); deblurring2dAlgo.execute(); std::cout << "outputImage:" << deblurring2dAlgo.outputImage()->toString();
polystyrene = ioformat.read_image(imagedev_data.get_image_path("polystyrene.tif")) deblurring_2d_algo = imagedev.Deblurring2d() deblurring_2d_algo.input_image = polystyrene deblurring_2d_algo.sharpening_factor = 1.0 deblurring_2d_algo.output_type = imagedev.Deblurring2d.SAME_AS_INPUT deblurring_2d_algo.execute() print( "output_image:", str( deblurring_2d_algo.output_image ) )
ImageView polystyrene = ViewIO.ReadImage( @"Data/images/polystyrene.tif" ); Deblurring2d deblurring2dAlgo = new Deblurring2d { inputImage = polystyrene, sharpeningFactor = 1.0, outputType = Deblurring2d.OutputType.SAME_AS_INPUT }; deblurring2dAlgo.Execute(); Console.WriteLine( "outputImage:" + deblurring2dAlgo.outputImage.ToString() );
Function Examples
std::shared_ptr< iolink::ImageView > polystyrene = ioformat::readImage( std::string( IMAGEDEVDATA_IMAGES_FOLDER ) + "polystyrene.tif" ); auto result = deblurring2d( polystyrene, 1.0, Deblurring2d::OutputType::SAME_AS_INPUT ); std::cout << "outputImage:" << result->toString();
polystyrene = ioformat.read_image(imagedev_data.get_image_path("polystyrene.tif")) result = imagedev.deblurring_2d( polystyrene, 1.0, imagedev.Deblurring2d.SAME_AS_INPUT ) print( "output_image:", str( result ) )
ImageView polystyrene = ViewIO.ReadImage( @"Data/images/polystyrene.tif" ); IOLink.ImageView result = Processing.Deblurring2d( polystyrene, 1.0, Deblurring2d.OutputType.SAME_AS_INPUT ); Console.WriteLine( "outputImage:" + result.ToString() );