Skeletons are widely used in computer vision , image analysis , pattern recognition and digital image processing for purposes such as optical character recognition , fingerprint recognition , visual inspection or compression .