The use case is a PDF document. We transform each pdf page into an image via Aspose Java and check if a qr code is present. QR code detection of the following example page in png takes more than 120 seconds.
qrcode_issue.png (145.0 KB)
long aspStart = System.currentTimeMillis();
BarCodeReader reader = new BarCodeReader("C:\\qrcode_issue.png", DecodeType.QR);
reader.readBarCodes();
System.out.println("Aspose: " + (System.currentTimeMillis() - aspStart));
We also tried some of the following qualitySettings since the image seems to have “Salt-and-pepper noise”.
reader.getQualitySettings().setAllowSaltAndPaperFiltering(true); reader.getQualitySettings().setAllowDecreasedImage(true); reader.getQualitySettings().setAllowMedianSmoothing(true); reader.getQualitySettings().setMedianSmoothingWindowSize(4); reader.getQualitySettings().setAllowWhiteSpotsRemoving(true); reader.getQualitySettings().setAllowDecreasedImage(true);