I am trying to display an image that includes both numbers and characters using the Tesseract library with opencv and C ++. Before calling the tesseract library, I used an image with opencv for grayscale
cvtColor(roiImg,roiImg,CV_BGR2GRAY);
it 
The OCR results for this image were not 100% accurate.
Then the same image was tested using a library of python pillows. The original image was grayscale using the following method.
gray = image.convert('L')
it 
The last mentioned gray scaled image gave 100% accurate results.
As soon as I looked over the Internet, it was mentioned that both opencv BGR2Gray and the cushion method img.convert use the same brightness conversion algorithm.
What is the reason for two different OCR results?
Advance