PANDORE Version 6 |
GREYC-IMAGE |
pround
Computes round integral value of image or graph.
Synopsis
pround mode [-m mask] [im_in|-] [im_out|-]
Description
pround performs rounding of input values.
If im_in is an image, pround is applied
on each pixel value:
pixel(im_out)=round(pixel(im_in))
The rounding type depends on the parameter value mode:
- 0: the nearest integer than the initial value (1.1=1; 1.9=2; -8.8=-9; -8.1=-8).
- 1: the nearest integer not greater than the initial value (1.1=1, 1.9=1; -8.8=-9; -8.1=-9);
- 2: the nearest integer not lower than the initial value (1.1=2; 1.9=2; -8.8=-8; -8.1=-8);
For color or multispectral image, rounding
is computed separately on each band.
The output image im_out is of the same type
as im_in.
If im_in is a graph rounding is applied
on each node value.
Parameters
- mode specifies the type of rounding:
- 0: the nearest integer than the initial value (1.1=1; 1.9=2; -8.8=-9; -8.1=-8).
- 1: the nearest integer not greater than the initial value (1.1=1, 1.9=1; -8.8=-9; -8.1=-9);
- 2: the nearest integer not lower than the initial value (1.1=2; 1.9=2; -8.8=-8; -8.1=-8);
Inputs
- im_in: a Float image or a graph.
Outputs
- im_out: a Float image or a graph.
Result
Returns SUCCESS or FAILURE.
Examples
plog a.pan b.panx
pround 0 b.pan c.pan
See also
Arithmetic
C++ prototype
Errc PRound( const Img2dsf &im_in, Img2dsf &im_out, int mode );
Version française
Arrondi d'une image de réels ou d'un graphe.
Author: Régis Clouard