The common two-dimensional code is black and white, which naturally improves the recognition accuracy. Recently, the color QR code has also appeared, but all I have seen is more interesting. For example, the QR code application can put your profile picture in the QR code.
A simple idea is: can we use each channel/component of RGB to store a QR code? If the recognition accuracy does not affect or has little impact, a color QR code can be stored three times as much as a black or white QR code.
The following is the result of my simple experiment. In simple terms, the accuracy is still very high, so the two-dimensional code that uses RGB channels to store more information is still a bit useful.
- Three grayscale images generated based on different information are used as RGB Images.
- Pictures Taken by mobile phone and separated by RGB Channels
A further consideration is how to enable the normal QR code recognition software to still read the specified information. Zxing and other two-dimensional code software pre-processing images is about binarization of grayscale images. In this case, we need to find a good color space, which can save the grayscale information when the channel changes.
One idea is to convert the gray scale according to the RGB formula:
Gray = (0.299 * r + 0.587 * g + 0.114 * B );
It can be seen that the blue channel has little influence on the gray level. Therefore, one solution is that R and G channels store the same information, and channel B stores additional information. in this way, normal QR code recognition can still read the information we set, while channel B needs to be separated before reading the information.
The experimental results show that the common QR code recognition software can normally identify R and G channel information, while the isolated B channel can also be recognized normally.
I have not found any better method yet. Please kindly advise and discuss it!
From: http://lzhj.me/archives/31