ImageDev

Deblur2d

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.

Note: The output image type is upgraded according to the Image type basic rule.

See also

Function Syntax

This function returns the outputImage output parameter.
// Function prototype.
std::shared_ptr< iolink::ImageView >
deblur2d( std::shared_ptr< iolink::ImageView > inputImage,
          double sharpeningFactor,
          std::shared_ptr< iolink::ImageView > outputImage = NULL );
This function returns the outputImage output parameter.
// Function prototype.
deblur_2d( input_image, sharpening_factor = 1, output_image = None )
This function returns the outputImage output parameter.
// Function prototype.
public static IOLink.ImageView
Deblur2d( IOLink.ImageView inputImage,
          double sharpeningFactor = 1,
          IOLink.ImageView outputImage = null );

Class Syntax

Parameters

Class Name Deblur2d

Parameter Name Description Type Supported Values Default Value
input
inputImage
The input image. Image Grayscale or Multispectral nullptr
input
sharpeningFactor
The sharpening factor. Float64 >=0 1
output
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" );

Deblur2d deblur2dAlgo;
deblur2dAlgo.setInputImage( polystyrene );
deblur2dAlgo.setSharpeningFactor( 1.0 );
deblur2dAlgo.execute();

std::cout << "outputImage:" << deblur2dAlgo.outputImage()->toString();
polystyrene = ioformat.read_image(imagedev_data.get_image_path("polystyrene.tif"))

deblur_2d_algo = imagedev.Deblur2d()
deblur_2d_algo.input_image = polystyrene
deblur_2d_algo.sharpening_factor = 1.0
deblur_2d_algo.execute()

print( "output_image:", str( deblur_2d_algo.output_image ) );
ImageView polystyrene = ViewIO.ReadImage( @"Data/images/polystyrene.tif" );

Deblur2d deblur2dAlgo = new Deblur2d
{
    inputImage = polystyrene,
    sharpeningFactor = 1.0
};
deblur2dAlgo.Execute();

Console.WriteLine( "outputImage:" + deblur2dAlgo.outputImage.ToString() );

Function Examples

std::shared_ptr< iolink::ImageView > polystyrene = ioformat::readImage( std::string( IMAGEDEVDATA_IMAGES_FOLDER ) + "polystyrene.tif" );

auto result = deblur2d( polystyrene, 1.0 );

std::cout << "outputImage:" << result->toString();
polystyrene = ioformat.read_image(imagedev_data.get_image_path("polystyrene.tif"))

result = imagedev.deblur_2d( polystyrene, 1.0 )

print( "output_image:", str( result ) );
ImageView polystyrene = ViewIO.ReadImage( @"Data/images/polystyrene.tif" );

IOLink.ImageView result = Processing.Deblur2d( polystyrene, 1.0 );

Console.WriteLine( "outputImage:" + result.ToString() );