I would like to ask you the compress format and the quality of the bitmap file generated with the command:
system/bin/screencap -p $path
The reason I am asking it's because if I take I screenshot with screen cap and I am able to perform OCR correctly without the need to preprocess the image.
If I take a screenshot (the same screen) with the MediaProjection API, instead I am unable to get the same result with OCR, unless I preprocess the image.
Hence I suppose the reason must be in a different compression and/or quality.
Source: https://android.googlesource.com/platform/frameworks/base/+/master/cmds/screencap/screencap.cpp