Reputation: 61463
I need to evaluate and compare QR Code generating libraries, and looking for logical parameters to measure and compare the output.
Why do I need this? It seems that when I give two different QR generators the same input, different output seems to be generated, and I as a human can't tell which one is correct.
By correct I mean how much "QR" data is encoded/represented by my input, or is able to be read by cheap cell phones (larger blocks).
This is especially true with dealing with binary data where each byte is between 0x7f (127 decimal) or A0 (160 decimal), and occasionally when dealing with values from 0 to 0x20 (32 decimal)
The problematic areas mentioned above just to happen to also correlate with invalid or non printable characters of ISO IEC 8859 1 character set, so it's possible that the library is reading my input as a one character string, or encoding it as a 2 byte UTF-16 character, or who knows!
If anyone has details on what aspects of a QR code I should look at, or better yet, an app that displays the diagnostic data of a QR code, that would be perfect.
Upvotes: 10
Views: 4762
Reputation: 761
A QR decoder with more debug output than zxing is http://qrlogo.kaarposoft.dk/qrdecode.html
According to its author, the software used is pure JavaScript, so it runs in your own browser.
An example QR code decode (PNG was encoded by http://www.qrcode-monkey.de/) with debug output enable:
left=2 right=22 top=2 bottom=22
size=21
matchVersion version=1 finder0=64 finder1=64 finder2=64
matchVersion version=1 timing0=1 timing1=1 alignment=1
matchVersion version=1 format_NW =9 0 format_NESW =9 1 format = 9 ecl = 1 mask = 1
matchVersion version=1 grades(F(V)TAF): 4444->4
findModuleSize version=1 grade=4 error_correction_level=1 mask=1
getCodewords mask=1 length=26
getCodewords = 64,55,70,86,194,0,216,32,80,246,228,98,160,0,236,17,236,17,236,237,167,185,237,199,28,244
setBlocks n_blocks_first=1 n_blocks_second=0 n_blocks=1 n_block_words_first=19 n_block_words_second=0 n_block_ec_words=7 total=26
setBlocks block 0 (26): 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25
RS calculateSyndroms: No errors
correctErrors in = 64,55,70,86,194,0,216,32,80,246,228,98,160,0,236,17,236,17,236,237,167,185,237,199,28,244
correctErrors out = 64,55,70,86,194,0,216,32,80,246,228,98,160,0,236,17,236,17,236
error_grade=4
extractData bytes in (19) = 64,55,70,86,194,0,216,32,80,246,228,98,160,0,236,17,236,17,236
extractData mode = 4
extract charcount = 3
extractData mode = 2
extractAlphanum charcount = 1
extractData mode = 1
extractNumeric charcount = 10
extractData mode = 0
extractData data(14) = 116,101,108,58,49,50,51,52,53,54,55,56,57,48
Note: the data embedded is tel:1234567890
Upvotes: 14
Reputation: 14314
I would use a service like ZXing - http://zxing.org/w/decode.jspx
You can feed it a QR code - either via upload or pointing to a URL.
It will give you some diagnostic information, including the raw bytes which have been encoded
Raw bytes
44 76 d6 16 96 c7 46 f3 a7 26 56 36 97 06 96 56
e7 44 06 57 86 16 d7 06 c6 52 e6 36 f6 d3 f6 36
33 d6 f7 46 86 57 24 06 57 86 16 d7 06 c6 52 e6
36 f6 d2 67 37 56 26 a6 56 37 43 d6 86 56 c6 c6
f2 66 26 f6 47 93 d7 96 f0 ec 11 ec
If you'd rather not trust a random website, it's Open Source so you can run it locally.
Upvotes: 2