ImageDev

FlowInpainting

Reconstructs missing areas of an image with an inpainting algorithm.

Access to parameter description

The FlowInpainting algorithm performs inpainting operations in an image in order to reconstuct some missing or corrupted data, designated by a binary mask. It consists of locally extrapolating the searched data in the input image.
These techniques can be used, for example, for reducing strong ring artifacts in computed tomograpy images.



Figure 1. Inpainting inputs: (left) input image, (right) binary mask

<b> Figure 2.</b> Inpainting result image
Figure 2. Inpainting result image

Reference:
D.Tschumperle, R.Deriche. "Vector-Valued Image Regularization with PDE's: A Common Framework for Different Applications", Rapport de recherche no 4657, INRIA Sophia-Antipolis, Dec. 2002.

See also

Function Syntax

This function returns outputImage.
// Function prototype
std::shared_ptr< iolink::ImageView > flowInpainting( std::shared_ptr< iolink::ImageView > inputImage, std::shared_ptr< iolink::ImageView > inputMaskImage, int32_t numberOfIterations, double standardDeviation, std::shared_ptr< iolink::ImageView > outputImage = NULL );

Class Syntax

Parameters

Parameter Name Description Type Supported Values Default Value
input
inputImage
The input image. Image Binary, Label, Grayscale or Multispectral nullptr
input
inputMaskImage
The input binary image designating the area to reconstruct. It must have same dimensions as the input image. Image Binary nullptr
input
numberOfIterations
The number of iterations (must be a positive integer). Int32 >=1 10
input
standardDeviation
The standard deviation in pixel units. Float64 >0 1
output
outputImage
The output image. Its dimensions, type, and calibration are forced to the same values as the input. Image nullptr

Object Examples

auto foam = readVipImage( std::string( IMAGEDEVDATA_IMAGES_FOLDER ) + "foam.vip" );
auto foam_sep = readVipImage( std::string( IMAGEDEVDATA_IMAGES_FOLDER ) + "foam_sep.vip" );

FlowInpainting flowInpaintingAlgo;
flowInpaintingAlgo.setInputImage( foam );
flowInpaintingAlgo.setInputMaskImage( foam_sep );
flowInpaintingAlgo.setNumberOfIterations( 10 );
flowInpaintingAlgo.setStandardDeviation( 1.0 );
flowInpaintingAlgo.execute();

std::cout << "outputImage:" << flowInpaintingAlgo.outputImage()->toString();

Function Examples

auto foam = readVipImage( std::string( IMAGEDEVDATA_IMAGES_FOLDER ) + "foam.vip" );
auto foam_sep = readVipImage( std::string( IMAGEDEVDATA_IMAGES_FOLDER ) + "foam_sep.vip" );

auto result = flowInpainting( foam, foam_sep, 10, 1.0 );

std::cout << "outputImage:" << result->toString();