Digit recognition using OpenCV