Use RGB to store QR codes for more information

Source: Internet
Author: User

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.

  1. Three grayscale images generated based on different information are used as RGB Images.
  2. 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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.