You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using PyBoof which is a wrapper for this library. Whilst benchmarking the QR code decoding for 1-H codes using random integer payloads, I noticed that payloads with values in the range [1000. 10000) were never detected, whilst these were detected successfully using OpenCV's QR code detection algorithm.
Sample code:
importpyboofaspbimportsegnofromtimeimporttimefromrandomimportrandint# uninstall Java JDK after testingTEST_FILE='qr_test.png'ATTEMPTS=10000-1000qr_pyboof=pb.FactoryFiducial(np.uint8).qrcode()
total_pyboof=0foriinrange(1000, 10000):
x=iqrcode=segno.make(x, version=1)
assertqrcode.error=='H'qrcode.save(TEST_FILE, scale=5)
img=cv2.imread(TEST_FILE)
img=cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)
img=cv2.resize(img, (88, 88))
start=time()
image=pb.ndarray_to_boof(img)
qr_pyboof.detect(image)
end=time()
assertlen(qr_pyboof.detections) ==0, f"Successfully detected {len(qr_pyboof.detections)} qr codes (input = {x})"# Assertion always passes, i.e. detection failstotal_pyboof+= (end-start) *1000print(f'Took an average of {(total_pyboof/ATTEMPTS):.2f}ms for {ATTEMPTS} attempts')
The detector starts working again at 10000, although some values still don't work here. I didn't test everything exhaustively, but obtained errors for the following values:
Failure to read 4-digit markers is caused by a bug in segno. In the future, by default, BoofCV will ignore the padding bit pattern since it's not worth fighting all the buggy encoders. Verified that this is what other libraries are doing.
Problems with a few 5-digit markers appear to be an actual issue. With 10110 there's a false positive when detecting the finder pattern. This should be fixable.
I'm using PyBoof which is a wrapper for this library. Whilst benchmarking the QR code decoding for 1-H codes using random integer payloads, I noticed that payloads with values in the range [1000. 10000) were never detected, whilst these were detected successfully using OpenCV's QR code detection algorithm.
Sample code:
The detector starts working again at 10000, although some values still don't work here. I didn't test everything exhaustively, but obtained errors for the following values:
The text was updated successfully, but these errors were encountered: