PANDORE Version 6 GREYC-IMAGE

plinearinterpolation



Replaces missing pixels by linear interpolation of the neighbors.



Synopsis

plinearinterpolation window_depth window_height window_width [im_in|-] [im_msk|-] [im_out|-]

Description

The operator plinearinterpolation replaces the pixel of the image permet im_in that are masked in the image im_msk with linear interpolation of the neighboring pixels. The neighborhood is defined as a window of size window_depth x window_height x window_width centered in the pixel.

The output image im_out is built as follows:

if im_msk(y,x) = 0 then im_out(y,x) = im_in(y,x)
                   else im_out(y,x) = mean(im_in, (x, y)), window)

where mean(im_in, (y,x), window) is the mean value of the unmasked pixels in the window.

Parameters

Inputs

Outputs

Result

Returns SUCCESS or FAILURE.

Examples

Build a mask image with a round inside and apply the linear interpolation inside the round:

  pshapedesign 205 244 0 1 20 0 a.pan
  plinearinterpolation 20 20 0 examples/butterfly.pan a.pan b.pan

See also

Interpolation

C++ prototype

Errc PLinearInterpolation( const Img2duc &im_in;, const Img2duc &im_msk, Img2duc &im_out, int window_depth, int window_height, int window_width );
Author: Régis Clouard