Read Barcode with purple background

55 views
Skip to first unread message

Daniel Padilha Torquato Dantas

unread,
Sep 26, 2014, 2:42:34 PM9/26/14
to zx...@googlegroups.com
Hello,

I´m developing an app to Android with Zxing integration to read only Barcodes. But the barcode that we need to scan the company printed all barcodes with purple background. (See the picture in attached).
I have tried to change the Effect of the Android Camera, but i cant read.

Anyone can help me?

Thanks!!
card.png

Sean Owen

unread,
Sep 26, 2014, 3:40:54 PM9/26/14
to zx...@googlegroups.com
That's hard, because the background is much darker than the light elements of the image, so is not considered light. I think you would have to create a custom app that processes the image differently if it doesn't work reliably as-is. For example, if you are certain the background is always purple, you can transform regions with this hue to something lighter. Or treat any colored region as light.

Daniel Padilha Torquato Dantas

unread,
Sep 26, 2014, 5:19:33 PM9/26/14
to zx...@googlegroups.com
Em sexta-feira, 26 de setembro de 2014 16h40min54s UTC-3, Sean Owen escreveu:
> That's hard, because the background is much darker than the light elements of the image, so is not considered light. I think you would have to create a custom app that processes the image differently if it doesn't work reliably as-is. For example, if you are certain the background is always purple, you can transform regions with this hue to something lighter. Or treat any colored region as light.

Hi Sean,

I have sure that the color is always the same purple, every id card has this background.
Do you know how can i transform this specifically region purple to some one more easy to read the code?
I saw the class "DecodeHander.java" and more specifically the method decode(byte[] data, int width, int height). Do you know if i can change something here to get it?

Thanks!

JPatrick Davenport

unread,
Oct 2, 2014, 8:01:32 AM10/2/14
to zx...@googlegroups.com
> I saw the class "DecodeHander.java" and more specifically the method decode(byte[] data, int width, int height). Do you know if i can change something here to get it?

You should try transposing the data in that file into a new data array. The process should map anything that is close to your purple background color into a dramatically lighter version of it. Then pass the new array to the rest of the decode method.

Reply all
Reply to author
Forward
0 new messages