Digit recognition with OpenCV