I have to scan a Data Matrix written on something like this.
The code is white/light gray but the background reflects different colors, depending on the position of the camera(angle), light.
Where would be the right place to edit the image captured in Android Zxing?
Is there any possible adjustment to make the image black on white before processing?
Any idea would be great.
Bitmap bm = Bitmap.createBitmap(500, 500, Bitmap.Config.RGB_565);
Canvas c = new Canvas(bm);
Paint paint = new Paint();
ColorMatrix cm = new ColorMatrix();
cm.setSaturation(0);
ColorMatrixColorFilter f = new ColorMatrixColorFilter(cm);
paint.setColorFilter(f);
int xo = (w-500)/2;
int yo = (h-500)/2;
c.drawBitmap(bmp, -xo, -yo, paint);
bmp.recycle();