SirJB7
Excel Rōnin
Hi!
Let me start asking instead of answering, just to keep the custom.
I started a project to develop Quick Response Codes features, both in Excel and in .NET, so I chose Visual Basic for Applications as the language to be used to develop first in Excel and then migrate it to Visual Basic in Visual Studio.
I've seen many websites and free software that provided symbol creation (the main square with little black and white squares) but I wasn't able to find any compliant with the "ISO 18004 - 2nd. Edition - 2006" normative (Micro QR and QR formats, 4 and 40 versions respectively, inverted colors -white on black- and mirrored images), so I begin analyzing, designing and coding a fully compliant QR Code symbol generation software.
The issue?
Two, in fact:
1) Error correction codewords:
In 6.5.2 "Generating the error correction codewords" it says "Thirty-six different generator polynomials are used for generating the error correction codewords for QR Code. And in the annex it prints the 36 polynomials thru degree 68.
But it says too in the same place that "The data codewords including Pad codewords as necessary shall be divided into the number of blocks shown in Table 9. Error correction codewords shall be calculated for each block and appended to the data codewords.". If so, only 18 would be needed (up to degree 30), and one is missing, so there should be 19 polynomials.
And if we don't interpret that the number of EC CW (error correction codewords) have to be considered by block -as there is the contradiction explained above) and we interpret that the number of EC CW is considered for the whole symbol, we're talking about of polynomials of up to degree 2430, for which I wrote an ad-hoc code that creates them.
Briefly, this is the unique non fully clear point in the whole normative, and I've failed trying to find out information about this point: the question is, how do EC CW are created regarding which degree polynomial is to be used?
It involves mathematics on Galois Fields 2^1 and 2^8 (256), just fyi. I had not problem with those operations over finite fields but the way they treat that part in the normative is absolutely obfuscating. I'm wondering if it weren't done in such manner with a deliberated purpose.
2) Symbol examples
In "Annex I (informative) Symbol encoding examples" there is a step by step procedure of how to create a Micro QR and a QR Code symbol, and it ends with the placement of each bit (white square for zero and black square for one) in the symbol accordingly to the entire normative, except that of masking the Data and EC Codewords.
Well, I get the exact values for each element, i.e. the same bits for each square of tye symbol, but the displayed symbol differs from what I build, which I checked bit a bit.
...
I have finished coding and testing each of the 19 parts in which I split the symbol generation trying to follow each process described in the normative, and all of them work fine individually, with the exception of the EC CW generation that works with my approach, which evidently is not the right one but the described in the normative isn't clear at all. So I think that this is the last stone in my path.
I cannot post the normative as it's copyrighted and I'm looking for someone that have worked with it to verify those previous two issues. If anyone faced or is facing the same problem I'm eager to see how did he managed it, and if anyone else is stuck with any other issue I'd be glad to help if I can.
Regards!
Let me start asking instead of answering, just to keep the custom.
I started a project to develop Quick Response Codes features, both in Excel and in .NET, so I chose Visual Basic for Applications as the language to be used to develop first in Excel and then migrate it to Visual Basic in Visual Studio.
I've seen many websites and free software that provided symbol creation (the main square with little black and white squares) but I wasn't able to find any compliant with the "ISO 18004 - 2nd. Edition - 2006" normative (Micro QR and QR formats, 4 and 40 versions respectively, inverted colors -white on black- and mirrored images), so I begin analyzing, designing and coding a fully compliant QR Code symbol generation software.
The issue?
Two, in fact:
1) Error correction codewords:
In 6.5.2 "Generating the error correction codewords" it says "Thirty-six different generator polynomials are used for generating the error correction codewords for QR Code. And in the annex it prints the 36 polynomials thru degree 68.
But it says too in the same place that "The data codewords including Pad codewords as necessary shall be divided into the number of blocks shown in Table 9. Error correction codewords shall be calculated for each block and appended to the data codewords.". If so, only 18 would be needed (up to degree 30), and one is missing, so there should be 19 polynomials.
And if we don't interpret that the number of EC CW (error correction codewords) have to be considered by block -as there is the contradiction explained above) and we interpret that the number of EC CW is considered for the whole symbol, we're talking about of polynomials of up to degree 2430, for which I wrote an ad-hoc code that creates them.
Briefly, this is the unique non fully clear point in the whole normative, and I've failed trying to find out information about this point: the question is, how do EC CW are created regarding which degree polynomial is to be used?
It involves mathematics on Galois Fields 2^1 and 2^8 (256), just fyi. I had not problem with those operations over finite fields but the way they treat that part in the normative is absolutely obfuscating. I'm wondering if it weren't done in such manner with a deliberated purpose.
2) Symbol examples
In "Annex I (informative) Symbol encoding examples" there is a step by step procedure of how to create a Micro QR and a QR Code symbol, and it ends with the placement of each bit (white square for zero and black square for one) in the symbol accordingly to the entire normative, except that of masking the Data and EC Codewords.
Well, I get the exact values for each element, i.e. the same bits for each square of tye symbol, but the displayed symbol differs from what I build, which I checked bit a bit.
...
I have finished coding and testing each of the 19 parts in which I split the symbol generation trying to follow each process described in the normative, and all of them work fine individually, with the exception of the EC CW generation that works with my approach, which evidently is not the right one but the described in the normative isn't clear at all. So I think that this is the last stone in my path.
I cannot post the normative as it's copyrighted and I'm looking for someone that have worked with it to verify those previous two issues. If anyone faced or is facing the same problem I'm eager to see how did he managed it, and if anyone else is stuck with any other issue I'd be glad to help if I can.
Regards!