返回 2026-07-05
⚙️ 工程

结合 1D 和 2D 的混合条形码Combined 1D and 2D Barcodes

shkspr.mobi·2026-07-04 节选正文

随着 QR 码逐渐取代传统的 1D 条形码,作者探索了一种将两者物理结合的创新方案。通过特定的排版设计,将传统的 UPC 编码直接嵌入到 QR 码的图案中。当扫描设备靠近时读取 1D 条形码,距离较远时则由摄像头识别 2D QR 码。这种向后兼容的设计为零售和物流行业在条码系统过渡期提供了一种巧妙的解决思路。

Terence Eden

This was a little idea gnawing at the back of my brain. The humble barcode has been in use since the 1970s. In the next few years it will likely be replaced with a 2D QR Code.

I couldn't find anyone who'd made a QR code with an embedded UPC - so I decided to make one.

If you move your phone close to the code (so it can't see the squares in the corners) it should read the number in the 1D barcode. Zoom out and it'll read the URl in the QR code.

The QR code has a high level of error correction - which allows graphics to be placed within it, as I discussed in 2010.

The UPC has some whitespace padding around its edges - which makes it easier for some scanners to find, although not all scanners seem to accept it.

Is this in any way useful or desirable? I doubt it! I guess most point-of-sale barcode scanners are somewhat regularly updated - so they should all have the ability to scan newer codes. The embedded code destroys some of the error correction, thus making the QR code more fragile. It isn't a good idea.

Still, nice to fiddle about with something, eh?

You may also enjoy:

  • A Recursive QR Code.
  • Why are QR Codes with capital letters smaller than QR codes with lower-case letters?
  • Or see all my posts about QR Codes since 2007!
  • 需要完整排版与评论请前往来源站点阅读。