Hi,
We are using the QR Code at our customer sites. Some of them have printers that produce less that ideal quality print outs and/or the paper has crinkled a bit. So when the users go to scan in the documents (as TIFF images), the QR Code is not always detected.
This is understandable if the image is unreadable, but is there a way for Aspose.BarCode to recognize that there is a bar code present on the page, but it’s “illegible”?
The use case we have is when a user has a stack of documents that they put on the scanner. They want every page that has a QR Code to be the first page of a new document. If there is no QR Code on that page, that page get’s appended to the current document. The problem arises when the Aspose.BarCode software doesn’t recognize any bar codes on a page, even though there is one.
What I would like to do is be able to flag that page as one that has a “problem”. But with the Apsose.BarCode software, it seems to be all or none. But I would like a way for it to determine that, yes there is some type of bar code on the page, but it can’t read it properly.
Is that in the API and I am missing it? If not, can it be added?
Thank you,
Todd
Hi Todd,
- Barcode found, CodeText read correctly
- Barcode found, CodeText read incorrectly
- Barcode not found
Hi,
I’ve looked at those links before, but I will go back over them to see if there is anything I missed.
But a flag to indicate that a bar code was found, but illegible/unreadable would be great.
I just sent you a private email with the QR Code cropped out of the document I scanned in as a TIFF.
Thank you,
Todd
Hi Todd,
Hi again,
Hi,
This thread coincides with this one:
BarCodeRecognitionException: Not supported format... For BMP?
Please see the code in that link for what I’ve been doing.
Please let me know if you need anything else.
Thank you for your help,
Todd
Hi Todd,
Hi,
We are primarily using TIFF when we do the scans. We are converting the TIFFs to a BufferedImage via ImageIO. The BufferedImage is then passed to the BarCodeReader to get the Code Text.
Here is a sample of the code we are using:
//ImportAttribute is a POJO that get’s passed around that contains data about the image that was scanned in
List attributes = new ArrayList();
//FileUtils is a custom class to determine file types
if(FileUtils.isTiff(file)) {
Iterator readers = ImageIO.getImageReadersBySuffix(“tiff”);
if(readers.hasNext()) {
ImageInputStream imageInputStream = null;
ImageReader imageReader = null;
try {
imageInputStream = ImageIO.createImageInputStream(file);
imageReader = (ImageReader) (readers.next());
imageReader.setInput(imageInputStream);
final int pageCount = imageReader.getNumImages(true);
for(int i = 0; i < pageCount; i++) {
BarCodeReader barCodeReader = null;
try {
BufferedImage bufferedImage = imageReader.read(i);
barCodeReader = new BarCodeReader(bufferedImage, BarCodeReadType.QR);
while(barCodeReader.read()){
//Custom code to take the code text and convert it to a POJO
convertTextToAttributes(barCodeReader.getCodeText(), attributes);
}
bufferedImage.flush();
} finally {
if(barCodeReader != null) {
barCodeReader.close();
}
}
}
} finally {
if(imageReader != null) {
imageReader.dispose();
}
if(imageInputStream != null) {
imageInputStream.flush();
imageInputStream.close();
}
}
}
}
Hi,
Is there any update to this issue? I still would like to see a way for the Bar Code Recognition software to detect that a bar code is on a page, but not readable.
Is there a way for me to follow the status of #32482?
Thank you,
Todd
Hi Todd,
Thank you for the update.
I will check back when change is officially in 4.7.0.
Do you have an ETA?
Thank you.
Hi Todd,