ftylitak / qzxing

Qt/QML wrapper library for the ZXing library. 1D/2D barcode image processing library
Apache License 2.0
614 stars 338 forks source link

Updated tests to detect BarcodeFormat & Barcode data #219

Open maheshdev305 opened 2 years ago

maheshdev305 commented 2 years ago

The existing tests was just reporting the Decoded barcode data alone. So, updating the tests to Decode barcode data as well as the Barcode Type/Format(i.e. QR_CODE , CODE_128 and so on)

maheshdev305 commented 2 years ago

Updated resources for this tests. So the resources PR-1 needs to be merged as well.

ftylitak commented 2 years ago

Hello @maheshdev305,

i have two comments:

maheshdev305 commented 2 years ago

@ftylitak

Hello @maheshdev305,

i have two comments:

  • In Qt 5.x it compiles successfully though for in Qt 6 it has compilation errors. Could you check them?

Qt6 compilation errors are present without this PR changes as well. Please check from your side as well.

  • The test results (success rate) is far off the previous results. Do you know the reason?

    • Using the old test mechanism: Total: [ 1110 ] , successful: [ 851 ] , failed: [ 237 ]
    • Using your solution : Total: [ 1192 ] , successful: [ 371 ] , failed: [ 821 ]

Not sure why it was a huge difference at your side. Below is the result counts from my machine.

Total Files :  1192
Decode Success count :  807
Decode Failure count :  385

Attached below is the complete output from my machine. Please do review and let me know.

NewTestResults.txt

ftylitak commented 2 years ago

a) regarding the compilation errors, I was facing them when building for Qt 6.0. When compiling with Qt 6.2 it was successful.

b) the reason why I am getting low success rate in the tests is because in both Ubuntu and Windows that I have tested, around 500 of the images can not be read for some reason. This resulted the QImage.isNull to be true after this line: https://github.com/ftylitak/qzxing/blob/6ea2b31e26db9d43db027ba207f5c73dc9d759fc/src/QZXing.cpp#L581.

Strange enough, the previous implementation of the tests work fine. So, this is the reason why this PR is not yet merged.

I gave it a try though I wasn't able to understand why this happens. Now, since this PR regards the tests and not the core library, I will consider it low priority. This means that even though I am interested in merging it, I currently do not have time to debug why I get this strange behavior of the Null images. If anyone has any suggestion, I would be more than willing to test it ASAP.

maheshdev305 commented 1 year ago

b) the reason why I am getting low success rate in the tests is because in both Ubuntu and Windows that I have tested, around 500 of the images can not be read for some reason. This resulted the QImage.isNull to be true after this line:

https://github.com/ftylitak/qzxing/blob/6ea2b31e26db9d43db027ba207f5c73dc9d759fc/src/QZXing.cpp#L581

. Strange enough, the previous implementation of the tests work fine. So, this is the reason why this PR is not yet merged.

I gave it a try though I wasn't able to understand why this happens. Now, since this PR regards the tests and not the core library, I will consider it low priority. This means that even though I am interested in merging it, I currently do not have time to debug why I get this strange behavior of the Null images. If anyone has any suggestion, I would be more than willing to test it ASAP.

Below are my observations...

Also, requesting you to consider this as a little higher priority and let me know the results.