Pattern recognition and image analysis