PANDORE Version 6 | GREYC-IMAGE |
phermiterescale 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 Hermite algorithm:
| (2*x - 3)*x*x + 1 if -1<x>1 H(x) = | 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] += H(i*scalex)*H(j*scaley)*im_in[p.y*scaley+j][p.x*scalex+i]
To rescale region map or graph, use the operator prescale.
Returns SUCCESS or FAILURE.
phermiterescale 2 2 0 tangram.pan a.pan
phermiterescale 0.5 0.5 0 tangram.pan a.pan
Retaille d'une image par l'algorithme de Hermite.
Author: Régis Clouard