A method for transforming a matrix representation of pixels of an image
into a vector representation of the image involves partition of the image
into contiguous homogeneous regions by applying a watershed type
morphologic algorithm to the matrix representation of pixels and
identifying the contours of the contiguous homogeneous regions by
applying a vector code contouring algorithm of the chain-code type to
every region. By selecting quantization level of the gradient, improved
image quality, dimensions and noise are achieved.