5 ms·
>The math behind computing the Reed-Solomon error correction codes is omitted because it is long, tedious, and not very interesting. LOL! That's probably the m
by layoutIfNeeded 6y ago
>The math behind computing the Reed-Solomon error correction codes is omitted because it is long, tedious, and not very interesting.
LOL! That's probably the most difficult part of creating a QR code, the rest is just framing/padding the data which is pretty obvious.
- jedimastert 6y agoFor those curious, I've always found Computerphile has a reasonable explanation for most things https://www.youtube.com/watch?v=fBRMaEAFLE0 https://www.youtube.com/watch?v=fBRMaEAFLE0
- eru 6y agoAnd perhaps the most interesting part, too.
- mytailorisrich 6y agoI'd argue that while Reed-Solomon is used in QR codes, the math behind it is not central to explaining how to create a QR code, and there are plenty of material available on Reed-Solomon. Specific framing/padding of the data is what makes a QR code. This may be simpler than explaining how Reed-Solomon codes work but it is not obvious. I think it is good that this article stays on point.
- nayuki 6y agoOther discussions on Hacker News and Reddit have requested me to show the Reed-Solomon ECC calculations too (see https://news.ycombinator.com/item?id=18370829 https://news.ycombinator.com/item?id=18370829 ). mytailorisrich is correct; Reed-Solomon is used by many different standards, so it's not difficult if you learned it elsewhere. Whereas other parts of the QR Code standard are idiosyncratic, i.e. unique to it. If you want to see for yourself, go learn how Data Matrix works (another 2D barcode) and notice how little knowledge you can carry between the two standards. As for showing the Reed-Solomon calculations, I stand by my statement of them being long and tedious. Moreover, it requires background knowledge of finite field arithmetic (as opposed to ordinary arithmetic), which increases the explanation length and makes the calculations even more difficult to follow by hand. The actual Reed-Solomon encoding is conceptually simple. First you choose a generator element. Then you create a divisor polynomial by multiplying monomial terms involving powers of the generator. Then you encode the message as a polynomial, and finally divide the message by the divisor to yield the remainder polynomial, which is the final RS ECC data. If you want to see the cryptic verbosity of tons of numbers, here are examples: https://www.backblaze.com/blog/reed-solomon/ https://www.backblaze.com/blog/reed-solomon/ ; https://www.youtube.com/watch?v=H2LlHOw_ANg https://www.youtube.com/watch?v=H2LlHOw_ANg (AES)