Application of piecewise-linear transforms in threshold compression of contours