cvsencode Encode a set of curves : return bit rate for lossless compression
cvsencode [-s L] [-o O] C . . .
-s L : split curves with overlapping parts of length greater than L
-o O : output the encoded curves (C=O if option -s is not selected)
C : input curves
. (screen output) : output number of points
. (screen output) : output number of bits to code the curves
. (screen output) : compression rate (bit per point = B/N)
double cvsencode (L , O , C , N , B )
int *L ;
Curves O , C ;
unsigned int *N ;
double *B ;
This module computes the bit rate needed to encode
all points of the curves contained in the input set.
The bit rate is given in bit per point, the number of points being
the total number of points contained in all curves.
The curves are supposed to be composed by connected points
for the 4-connectivity. To encode curves with holes, rather use
This module first calls
cvsorgcode to get the
bit rate to code the origin points, and after that
cvsfreecode to get the bit rate to code the other points
by the Freeman's algorithm [Fre74].
-s avoids to code large parts of multiple points,
by splitting curves into pieces of non-overlapping curves.
The length of the permitted overlapping is given by the parameter
Be aware that by splitting curves, the amount of origin points,
hard to code, grows.
Do not use this option if it is non-sense to modify your curves
-o is meaningful together with
-s : it
allows to output the curves which were really coded.
The function outputs also the total number of points
and the number of bits
B needed to code the curves.
Such module is useful to encode level lines geometry, such as in [Fro99].
Last Modification date : Thu Nov 29 20:23:57 2001