是否可以解码不完整的二维码?
我的 QRCode 不完整(大约 30%)。是否可以仅解码它的片段?我真的很想要一个代码片段 - 语言并不重要。
I have an incomplete QRCode (about 30%). Is it possible to decode just the fragment of it? I would really like a code snippet - the language doesn't matter.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果您的意思是,即使部分代码被模糊或更改,您也可以解码 QR 码的全部内容,那么是的,有时可以。
QR 码可以使用不同级别的冗余进行编码,这些级别称为 L、M、Q 和 H 级别,分别对应于大约 7%、15%、25% 和 30% 的冗余。这意味着您可以丢失尽可能多的条形码,但仍然可以对其进行解码。丢失的越多,解码就越困难,但在这些限制内仍然是可能的。
请注意,QR 码的某些区域不能丢失。取景器图案(角落处的正方形)必须是可找到的;他们可以容忍一些失真,但没有纠错来帮助解决这一问题。此外,取景器图案周围的区域编码格式和版本。它们具有不同的冗余(使用 BCH 进行 2 倍编码,而不是 Reed-Solomon),但是,如果您丢失太多这些微小区域,则无论主要纠错如何,您都将无法解码。
If you mean, can you decode the entire contents of a QR code even if part of the code is obscured or changed, then yes you can -- sometimes.
QR codes can be encoded with varying levels of redundancy, which are known as levels L, M, Q and H, and correspond to about 7%, 15%, 25% and 30% redundancy. This means you can lose up to that much of the barcode and still decode it. The more you lose, the harder it is to decode, but remains possible within those limits.
Note that certain regions of the QR code can't be lost. The finder patterns (squares at corners) must be findable; they can tolerate some distortion but there's no error correction to help that. Also, the regions around the finder patterns encode format and version. They have a different redundancy (2x encoding using BCH, not Reed-Solomon), but, if you lose too much of those tiny areas you'll not be able to decode, regardless of the main error correction.