PANDORE Version 6 GREYC-IMAGE

pbellrescale



Performs a rescaling of image using the Bell algorithm.



Synopsis

pbellrescale zoomx zoomy zoomyz [im_in|-] [im_out|-]

Description

pbellrescale uses a convolution kernel to interpolate the pixel of the input image im_in in order to calculate the pixel value of the output image im_out. The interpolation consists in weigthing the input pixels influence on the output pixels. The weights are relative to the position of the output pixels and are given by the Bell algorithm:

       | 0.75-sqr(x) if -0.5<x<0.5
B(x) = | 0.5 * sqr(|x|-1.5) if -1.5 < x <1.5
       | 0 otherwise 

For example, if the image is scaled by 3, then each output pixel is:

for i in [-2, 2]
  for j in [-2, 2]
      im_out[p.y][p.x]] += B(i*scalex)*B(j*scaley)*im_in[p.y*scaley+j][p.x*scalex+i]

To rescale region map or graph, use the operator prescale.

Parameters

Inputs

Outputs

Result

Returns SUCCESS or FAILURE.

Examples

See also

Transformation, plinearrescale, pbicubicrescale, planczosrescale, pmitchellrescale, prescale

C++ prototype

Errc PBellRescale( const Img2duc &im_in, Img2duc &im_out, const float zoomy, const float zoomx );

Version française

Retaille d'une image par l'algorithme de Bell.


Author: Régis Clouard