QR Codes Recognition [duplicate]

孤街浪徒 提交于 2019-12-04 19:11:57

Actually there is an algorithm to detect QR Codes that is described in ISO/IEC18004. You have to look for a specific pattern 1:1:3:1:1 (1 dark module: 1 light module: 3 dark: 1 light : 1 dark). Then you have 1 finder pattern. Afterwards you search the other 2 and you get the orientation... etc.

It is quite complicated, but this way it is possible to recognize the QR Code quite fast. The algorithm is described in pseudo code in the standard. To read is you have to pay for a copy. It is essential to have it if you plan to implement a QR Code reader.

There's no single best algorithm for detecting a QR code in an image. Designing such an algorithm is a bit of an art and entails a lot of trial and error and testing.

zxing has a C++ port that includes a QR code detector and decoder. It's tuned for detecting codes in real time from mobile phone cameras but works in other settings. When it detects a code, it returns the finder locations which can be used to provide visual feedback.

I don't know what skill level it would take to import that code into VS but it seems more tractable to do that than try to invent your own detector algorithm.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!