Hi,
I was caught with the requirement, that need to extract bar code text from the image/s from a give folder. I wrote java code which is extracting bar code text for 9 images, but one image is getting skipped. When I proof read it, all the 9 images are having same brightness & contrast, but the one image is not.
Code Snippet:
BarCodeReader reader = new BarCodeReader(img , BarCodeReadType.OneCode);
reader.setRecognitionMode(RecognitionMode.ManualHints);
reader.setManualHints(ManualHint.ComplexBackground);
Any help is really appreciated.
Thanks in advance.
Balachander
Hi Balachander,
Can you please attach the barcode image again? The attachment in this forum thread looks corrupt. Sorry for the inconvenience.
Best Regards,
Thank you Muhammad Ijaz,
attached the bar code image to the post, and my requirement is to read that bar code in onecode standard. If the attachment is corrupted. Download it from the below link.
https://drive.google.com/file/d/0B8Oizrzw2PRqSkZOWEQ4cVZRU2s/view?usp=sharing
Hi Balachander,
Setting recognition mode to MaxBarCodes is extracting this barcode at my end. Please use the following line of code at your end.
reader.setRecognitionMode(RecognitionMode.MaxBarCodes);
If you want to keep using manual hints in any case, they set it to ManualHint.IncorrectBarcodes because this barcode has a very low quality or a bit damaged.
reader.setManualHints(ManualHint.IncorrectBarcodes);
Best Regards,