Statistics-Based Chain Code Compression with Decreased Sensitivity to Shape Artefacts