I am taking screenshots on Android with two different methods:
- By running
/system/bin/screencap -p $path. - With the
MediaProjectionAPI.
Even though it's the exact same screen, when performing OCR (with the use of Tesseract) I get different results.
With /system/bin/screencap I get the expected results.
With the MediaProjection API is unable to recognise all text correctly, hence I need to preprocess the image.
Why is that? Maybe it depends on different configurations of the Bitmap file I pass as argument to Tesseract?
Meaning the bitmap decoded from the system command has a different configuration than the bitmap created from the mediaprojection API?
This is how I am creating the bitmap from the MediaProjection API: