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 );

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();

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();