Shenzhen Zuomi Technology Co., Ltd.

Tout
  • Tout
  • Titre
Accueil> Blog> Using the CSI camera as an example, analyze how to recognize the QR code through a normal camera

Using the CSI camera as an example, analyze how to recognize the QR code through a normal camera

December 27, 2022

Guide to this article

When QR code recognition no longer relies on dedicated camera modules, even common digital cameras, analog cameras, and USB cameras can easily and quickly recognize QR codes, and then provide free QR code recognition algorithms. Can you The solution brings convenience?

1. High cost

As non-cash payment gradually penetrates into our daily lives, we can usually go out without cash but cannot do without mobile phones. This is the convenience that QR codes bring to us. This article will focus on how to embed QR code recognition product design.

At present, the well-known QR code recognition requires a dedicated camera, and the cost has been high. If a general-purpose CSI camera can complete the recognition and calculation of the QR code, then both the design cost and the BOM cost will be brought. Considerable improvement. However, the cost of a dedicated QR code camera remains high. How to reduce the cost? This is a problem that many people are concerned about. This article will use the CSI camera as an example to analyze how to recognize the QR code information through a normal camera.

2. QR code development environment

The establishment of the dimensional code components is mainly composed of the main control-M1052 core board, the acquisition camera-OV725 camera, and the human-computer interaction interface-4.3-inch color LCD screen.

1. M1052 core board

Figure 1 M1052 core board

The M1052 cross-border core board is used as the main control solution for the QR code scanning device. It is equipped with NXP i.MX RT105x processor with a main frequency of up to 528MHz. This core board supports CSI (CMOS Sensor Interface) interface and can analyze the transmission from the COMS camera. data.

2. OV7725 camera

Figure 2 OV7725

OV7725 is a low-cost high-definition CMOS camera chip produced by OmniVision, which can reach 30w pixels and supports image sizes of VGA and QVGA. The output format supports Raw RGB, RGB (GRB 4:2:2, RGB565/555/444) and YCbCr (4:2:2) formats. Support AEC (automatic exposure control), AGC (automatic gain control), AWB (automatic white balance), ABF (automatic bandpass filter) and other functions, the communication protocol adopts sccc (serial camera control bus) protocol, support 8/10 Bit bayer format output.

3. Human-computer interaction interface

Figure 3 4.3 inch LCD display

The display adopts a 4.3-inch TFT resistive screen. The purpose of the display is to conveniently check whether the current camera has captured the corresponding QR code. This can quickly locate the QR code. Of course, if the position of the camera is fixed, the LCD display is not needed.

Three, effect display

Combine the required system components to write the corresponding application program (test program function: when the decoding is successful, print out the decoded information on the serial port), as shown below.

Figure 4 OV7725 camera

By moving the camera or moving the corresponding QR code picture, the QR code can be clearly displayed on the LCD screen.

Figure 5 LCD display

When a picture with a QR code can be clearly displayed on the LCD display, the decoding can be successful.

Figure 6 Main control (composed of M105x core board and backplane)

When acquiring a frame of image, the main control tries to decode the two-dimensional code, and the decoding information will be printed on the console if the decoding is successful.

Figure 7 Successfully decoded and print the decoded information

When a frame is successfully decoded, the decoded information will be printed out on the console.

Fourth, the real advantages of using M105x as a QR code

1. Super processing performance gives the ultimate decoding ability

Since the frequency of M105x can reach 528MHz, compared with other microcontrollers, the CPU rate has a sufficient advantage in the two-dimensional code decoding speed. It takes an average of 52ms to decode a frame of VGA (640 * 480) picture. A QVGA (320 * 240) picture takes 28ms on average.

2. High-speed SDRAM boost

On the M105x core board, there is a 16M SDRAM chip onboard, which has enough memory to handle algorithmic work. The following table is the speed measurement of SDRAM reading and writing.

Table 1 SDRAM read and write speed measurement

3. Abundant peripheral resources

M105x peripherals are mostly shown in Figure 8, which can operate other peripherals to do corresponding work while processing the QR code.

Figure 8 Functional block diagram of M1052 core board

Wireless transmission: Since M105x has core boards integrated with Wi-Fi, LoRa, etc., it can transmit decoded data through the network. You can select the corresponding core board through the application scenario.

Zhiyuan Electronics Introduction

Guangzhou Zhiyuan Electronics Co., Ltd. was established in 2001. It is a national-level high-tech certification enterprise and a high-end industrial control measuring instrument engineering technology research and development center in Guangdong Province.

Vision: To become a leader in the industrial Internet ecosystem

The "chip + AWorks software platform" is used to design high value-added modules, boards and high-end measuring instruments, and connect to the ZWS IoT cloud through wired and wireless interfaces to realize big data processing and form an industrial Internet ecosystem.

Nous contacter

Author:

Ms. emily

Phone/WhatsApp:

+8613570860280

Produits populaires
You may also like
Related Categories

Envoyer à ce fournisseur

Sujet:
E-mail :
message:

Your message must be betwwen 20-8000 characters

We will contact you immediately

Fill in more information so that we can get in touch with you faster

Privacy statement: Your privacy is very important to Us. Our company promises not to disclose your personal information to any external company with out your explicit permission.

envoyer