I am programming an android application. This application uses camera and different visualization modes, like grey, high contrast, etc. It will be used by people with very low vision to read any kind of text. Some of this people can read only in determined colors.
So, my application, at the moment supports only the effects offered by Camera.Parameters.EFFECT_X
and I need to offer a visualization mode with two colors: color for the font of the image and color for the text of the image. The person should be able to choose the colors from some kind of pallet. So the question is how to make a threshold to obtain frames in only 2 colors. I thought about using opencv4android but i would like to avoid it. I think it could be done mathematically in the callback set for every frame of the camera, but I am not sure...
I checked some topics here but in this How can I manipulate the camera preview?
canvas.lock
is used. I can't use it because my application should work on Android versions prior to 3 so I'm forced to put mHolder.setType(SurfaceHolder.SURFACE_TYPE_PUSH_BUFFERS);
and that crashes the application if I put any canvas.lock
. If I could avoid setting the type or the crash...
Any help, please?