Device and method for generating two-dimensional code sample with angle

By designing an angled QR code sample generation device, using automatic adjustment of the shooting angle of the camera and the flat panel, combined with lighting control, the problems of low efficiency and poor quality of QR code sample generation in the existing technology are solved, and efficient and robust sample generation.

CN119026624APending Publication Date: 2024-11-26深圳开鸿数字产业发展有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411058269.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-02
Publication Date
2024-11-26

AI Technical Summary

Technical Problem

In the prior art, the QR code sample generation efficiency is low and the generated samples are of poor quality, which cannot meet the needs of high efficiency and high quality.

Method used

An angled QR code sample generation device is designed, including a camera, a fixed rotor shaft, a motor and a transmission belt. The shooting angle of the camera and the flat panel is automatically adjusted through the angle adjustment component, and combined with lighting control, high-quality QR code samples are generated.

Benefits of technology

It improves the efficiency of QR code sample generation, avoids invalid and duplicate samples, and the generated samples are of high quality and have high robustness. It is suitable for training network models that accurately identify QR codes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119026624A_ABST
    Figure CN119026624A_ABST
Patent Text Reader

Abstract

The invention discloses a generation device and method for a two-dimensional code sample with an angle. The generation device comprises a camera device, a placement assembly and a main control board. The camera device comprises a camera, a first fixed rotating shaft, a first motor and a first transmission belt; the placing assembly comprises a flat plate, a second fixed rotating shaft, a second transmission belt and a second motor. According to the method, the shooting program can be set on the main control board, and the shooting device and the placement assembly automatically shoot the two-dimensional code according to the preset shooting program to generate the sample set of the two-dimensional code samples with angles, so that the generation efficiency of the two-dimensional code samples is improved; and the two-dimensional code picture in the sample set generated by the method is shot according to the preset angle of the preset shooting program, so that the generation of invalid and pattern-missing two-dimensional codes is avoided, the quality of the two-dimensional code sample generated by the embodiment is high, and the generation device has relatively high robustness.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of image recognition technology, and in particular to an apparatus and method for generating angled QR code samples. Background Art

[0002] Because QR codes contain a large amount of information, possess strong security and anti-counterfeiting capabilities, and are costly to produce, they are widely used in various fields. During use, it is necessary to scan the QR code to obtain the information stored within. To achieve accurate QR code recognition, a trained QR code recognition network model is typically used.

[0003] When training a QR code network model, it is necessary to first construct a training QR code sample set. The QR code samples in the sample set are then used to train the QR code network model. Therefore, the quality of the samples in the QR code sample set becomes a key concern. Currently, QR code samples are generally generated by photographing printed QR codes. However, manually photographing QR codes is not only inefficient, but also results in a high rate of repetition, failing to meet the requirements for efficient sample set construction and high-quality samples.

[0004] Therefore, the methods in the existing technology need further improvement. Summary of the Invention

[0005] In view of the shortcomings of the above-mentioned related technologies, the purpose of the present invention is to provide an apparatus and method for generating angled QR code samples, overcoming the defects of low QR code sample generation efficiency and poor quality of generated QR code samples in the prior art.

[0006] The technical solution adopted by this invention to solve the technical problem is as follows:

[0007] In a first aspect, this embodiment discloses a device for generating angled QR code samples, comprising: a fixed bracket, a camera device disposed above the fixed bracket, a placement component disposed below the camera device, and a main control board; the main control board is provided with an angle adjustment component;

[0008] The camera device includes: a camera, a first fixed rotating shaft, a first motor, and a first transmission belt; the angle adjustment component is connected to the first motor;

[0009] The camera is fixedly connected to the first fixed rotating shaft. One end of the first transmission belt is sleeved on the first fixed rotating shaft, and the other end is connected to the first motor. The first motor receives the first angle control signal sent by the angle adjustment component and drives the first transmission belt to rotate the first fixed rotating shaft to adjust the rotation angle of the camera.

[0010] The placement assembly includes: a flat plate for placing the QR code image to be photographed, a second fixed rotating shaft, a second transmission belt, and a second motor; the angle adjustment assembly is connected to the second motor.

[0011] The flat plate is fixedly connected to the second fixed rotating shaft. One end of the second transmission belt is sleeved on the second fixed rotating shaft, and the other end is connected to the second motor. The second motor receives the second angle control signal sent by the angle adjustment component and drives the second transmission belt to rotate the second fixed rotating shaft to adjust the rotation angle of the flat plate.

[0012] Optionally, the fixed bracket is further provided with a lighting component; the main control board is further provided with a lighting control unit;

[0013] The lighting component is used to emit a light source;

[0014] The lighting control unit is used to adjust the ambient light brightness of the tablet or camera.

[0015] Optionally, the camera device is mounted on top of the fixed bracket, and the placement component is correspondingly mounted below the camera, with the camera and the tablet positioned relative to each other.

[0016] Optionally, the generating device further includes: a display connected to the main control board; the display is disposed on one side of the fixed bracket;

[0017] The main control board is fixed on the fixed bracket and is used to control the transmission of the QR code image captured by the camera device to the display and display it.

[0018] Optionally, the angle adjustment assembly includes a first angle adjustment unit and a second angle adjustment unit;

[0019] The first angle adjustment unit is used to send a first angle control signal, which is used to adjust the rotation angle of the camera.

[0020] The second angle adjustment unit is used to send a second angle control signal, which is used to adjust the rotation angle of the plate.

[0021] Optionally, the fixed bracket is further provided with a partition, which is located at the lower end of the fixed bracket and is used to isolate the power supply, the second motor and the main control board placed inside the fixed bracket from the flat plate.

[0022] Secondly, this embodiment discloses a method for generating angled QR code samples, wherein the device used for generating the angled QR code samples includes:

[0023] Control the camera to take pictures of the QR code on the tablet at a preset rotation angle to obtain multiple original QR code images;

[0024] Based on the shooting angle of each original QR code image, angle information tags are added to each original QR code image to generate angled QR code samples.

[0025] Optionally, the step of controlling the camera to capture the QR code located on the tablet at a preset rotation angle includes:

[0026] The camera is controlled to take pictures of the QR code on the tablet from different tablet rotation angles and different camera rotation angles.

[0027] Optionally, before the step of adding angle information tags to each original QR code image according to the shooting angle corresponding to each original QR code image, the method further includes:

[0028] Multiple types of feature information are extracted from the original QR code images to obtain multimodal feature values ​​corresponding to each original QR code image;

[0029] The multimodal feature values ​​corresponding to each original QR code image are compared with the set multimodal feature values ​​to filter out the QR code images that meet the preset conditions, thus obtaining the filtered original QR code samples.

[0030] Optionally, the fixed bracket is further provided with a lighting component; the main control board is further provided with a lighting control unit;

[0031] The step of controlling the camera to capture images of the QR code on the tablet at a preset rotation angle to obtain multiple original QR code images further includes:

[0032] The camera is controlled to take pictures of the QR code on the tablet at a preset rotation angle under different brightness levels, resulting in multiple original QR code images.

[0033] Beneficial effects:

[0034] This embodiment discloses a device and method for generating angled QR code samples. The generating device includes a camera device mounted above a fixed support, a placement component mounted below the camera device, and a main control board. The camera device includes a camera, a first fixed rotating shaft, a first motor, and a first transmission belt. The camera is fixedly connected to the first fixed rotating shaft, and the first motor drives the first transmission belt to rotate the first fixed rotating shaft, thereby adjusting the rotation angle of the camera. The placement component includes a flat plate for placing the QR code image to be photographed, a second fixed rotating shaft, a second transmission belt, and a second motor. The flat plate is fixedly connected to the second fixed rotating shaft, and the second motor drives the second transmission belt to rotate the second fixed rotating shaft, thereby adjusting the rotation angle of the flat plate. This method can generate a sample set of angled QR code samples by setting a shooting program on the main control board. The camera device and the placement component automatically photograph the QR code according to the preset shooting program, improving the generation efficiency of QR code samples. Furthermore, the QR code images in the sample set generated by this method are photographed at a predetermined angle according to the preset shooting program, avoiding the generation of invalid or missing QR codes. Therefore, the QR code samples generated in this embodiment are of high quality, and the generating device has high robustness. Attached Figure Description

[0035] Figure 1 This is a schematic diagram of the structure of the device for generating angled QR code samples according to an embodiment of the present invention;

[0036] Figure 2 This is a schematic diagram of the angle of QR code image acquisition in this embodiment of the invention;

[0037] Figure 3 This is a flowchart illustrating the steps of the method in an embodiment of the present invention;

[0038] Figure 4 This is a schematic diagram illustrating the cropping process during the QR code image preprocessing in the method described in this invention. Detailed Implementation

[0039] In order to make the purpose, technical solutions and advantages of this application more clear, the following further describes this application in detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain this application and are not intended to limit this application.

[0040] When using deep learning methods to recognize QR code images, a trained QR code recognition network model is required for image recognition. However, the training of this network model requires a high-quality training sample set. Therefore, how to construct a high-quality training sample set is one of the key issues that needs to be addressed during the training process of the QR code recognition network model.

[0041] In existing technologies, printed QR code images are usually photographed manually to collect different QR code images. However, manual photography is not only inefficient and has a limited number of images, but also may produce duplicate or blurry images due to the manual nature of the photography, resulting in a low-quality QR code sample set. Therefore, manual photography cannot meet the requirements of high efficiency and high quality.

[0042] To overcome the aforementioned problems, this invention provides an apparatus and method for generating angled QR code samples. The apparatus includes an imaging device and a placement component. The placement component holds the QR code to be photographed, and the imaging device photographs the QR code image on the placement component to obtain multiple photographed QR code images. During the photographing process, multiple QR code images with different photographing angles are obtained by controlling the shooting angle, thus generating angled QR code samples. Because the apparatus provided by this invention can automatically adjust the shooting angle and automatically perform the photographing, it has high QR code sample generation efficiency. Furthermore, the method provided by this invention automatically photographs QR code samples, avoiding the generation of invalid or duplicate QR codes, thus improving the quality of QR code samples in the sample set. Therefore, it has good robustness, providing a guarantee for training a network model that accurately recognizes QR codes.

[0043] The following description, in conjunction with the accompanying drawings, further illustrates the apparatus and method for generating angled QR code samples according to this embodiment.

[0044] Firstly, this embodiment discloses a device for generating angled QR code samples, such as... Figure 1 As shown, it includes: a fixed bracket 3, a camera device disposed above the fixed bracket 3, a placement assembly disposed below the camera device, and a main control board 13. The main control board 13 is provided with an angle adjustment assembly.

[0045] The camera device includes a camera 21, a first fixed rotating shaft 2, a first motor 22, and a first transmission belt 1. The angle adjustment component is connected to the first motor 22. The camera 21 is fixedly connected to the first fixed rotating shaft 2. One end of the first transmission belt 1 is sleeved on the first fixed rotating shaft 2, and the other end is connected to the first motor 22. The first motor 22 receives a first angle control signal from the angle adjustment component and drives the first transmission belt 1 to rotate the first fixed rotating shaft 2, thereby adjusting the rotation angle of the camera 21.

[0046] The placement component includes: a flat plate 6 for placing the QR code image to be photographed, a second fixed rotating shaft 7, a second transmission belt 8, and a second motor 12; the angle adjustment component is connected to the second motor 12; the flat plate is fixedly connected to the second fixed rotating shaft, one end of the second transmission belt 8 is sleeved on the second fixed rotating shaft 7, and the other end is connected to the second motor 12; the second motor 12 receives a second angle control signal from the angle adjustment component and drives the second transmission belt 8 to rotate the second fixed rotating shaft 7 to adjust the rotation angle of the flat plate 6.

[0047] Specifically, the camera in the camera device is positioned above the tablet, and the camera captures a picture of a QR code placed on the tablet. This QR code image can be a printed QR code or a QR code on the surface of an object.

[0048] Furthermore, the fixed bracket 3 is also provided with a brightness adjustment component; the brightness adjustment component includes: a power supply 10, an illumination unit (the illumination unit includes a first bulb 4 disposed on the left and a second bulb 20 disposed on the right) and an illumination control unit.

[0049] The lighting unit is located on both sides of the camera device and / or above the placement component, and is used to adjust the ambient light brightness of the tablet or camera 21.

[0050] Specifically, the camera device is mounted on top of the fixed bracket, and the placement component is positioned below the camera, with the camera and tablet positioned relative to each other. When capturing a QR code, the QR code image to be captured is placed on the tablet, ensuring it is flat. The camera then captures the QR code image on the tablet to obtain a generated QR code sample. It is conceivable that the captured QR code image must be valid and complete. If the QR code sample to be generated corresponds to a specific product or item, the QR code in the captured image must also conform to the type of the required product or item.

[0051] Furthermore, the camera is fixed on a first fixed rotating shaft and rotates with the shaft. A first transmission belt is fitted onto the first fixed rotating shaft and rotates under the drive of a first motor. Therefore, by controlling the direction and angle of rotation of the first fixed rotating shaft, the rotation angle of the camera can be adjusted, resulting in different angles at which the QR code on the tablet is captured. Additionally, the tablet is fixed on a second fixed rotating shaft and rotates with it. A second transmission belt is fitted onto the second fixed rotating shaft and rotates under the drive of a second motor. Therefore, by controlling the direction and angle of rotation of the second fixed rotating shaft, the tilt angle of the tablet can be adjusted, thereby changing the angle between the camera and the QR code image on the tablet's surface. This allows for capturing QR code images at different angles, thus obtaining QR code samples from different angles.

[0052] In one implementation, combining Figure 1 As shown, the angle adjustment assembly includes a first angle adjustment unit and a second angle adjustment unit; the first angle adjustment unit is used to issue a first angle control signal, which is used to adjust the camera rotation angle 23; the second angle adjustment unit is used to issue a second angle control signal, which is used to adjust the tablet rotation angle 24. Figure 2 As shown, the camera rotation angle is the rotation angle ∠r of the camera within the plane of the camera device, while the tablet rotation angle is the angle ∠p between the tablet and the plane where the camera device is located.

[0053] Furthermore, combined Figure 1 As shown, the generating device further includes: a display 18 connected to the main control board; the display 18 is disposed on one side of the fixed bracket 3; the main control board 13 is fixed on the fixed bracket 3 and is used to control the transmission of the QR code image captured by the camera device to the display 18 for display.

[0054] In practice, users can check the displayed QR code image to determine if the shooting parameters, such as the position or angle of the shooting module, are set incorrectly. The display can also show user input commands received from the main control board, along with the corresponding shooting parameters.

[0055] Furthermore, combined Figure 1As shown, a partition 9 is also provided on the fixed bracket 3. The partition 9 is located at the lower end of the fixed bracket 3 and is used to isolate the power supply 10, the second motor 12, and the main control board 13, which are placed inside the fixed bracket 3, from the flat plate 6. The fixed bracket is a square frame, and the camera device and the placement assembly are both located inside the square frame of the fixed bracket. The camera device is located in the middle of the upper end of the fixed bracket, and the flat plate in the placement assembly is located in the middle of the fixed bracket. The partition is located below the flat plate, and the power supply, the second motor, and the main control board are placed between the partition and the bottom of the fixed bracket. This partition not only protects the power supply, the second motor, and the main control board, but also prevents the power supply or the second motor from interfering with the camera device when capturing QR code images.

[0056] Furthermore, in combination Figure 1 As shown, the lower part of the fixed bracket is also provided with a first universal wheel 11 and a second universal wheel 14, and the QR code sample generation device provided in this embodiment is moved by pushing the first universal wheel 11 and the second universal wheel 14.

[0057] Specifically, the generating device is also equipped with a movable support frame 17 for connecting the display 18 to the fixed bracket 3. When it is necessary to change the position of the display 18, this can be achieved by changing the position of the movable support frame 17. To facilitate the protection of the various components inside the fixed bracket 3, a door can also be provided on the fixed bracket 3. When the generating device is not working, the door 5 can be closed to protect the various components inside the fixed bracket 3 from being in a clean environment. It is conceivable that the fixed bracket is also equipped with power supply and communication cables 19, power sockets 15, and communication cable sockets 16 that connect the main control board and the lighting unit.

[0058] The generation device disclosed in this embodiment can store control programs for the camera device and the placement component in the angle adjustment component (which can be a control chip) on the main control board. The angle control program outputs a first angle control signal to the camera device, and the camera device performs angle adjustment of the camera according to the received first angle control signal, and outputs a second angle control signal to the placement component to adjust the rotation angle of the tablet, thereby obtaining QR code image samples at different angles.

[0059] Additionally, users can control the output brightness of the lights on both sides of the camera via the lighting control unit, thereby obtaining QR code images under different brightness levels and angles. The settings for the control program on the main control board can be displayed on the monitor, or an additional display device can be added.

[0060] This embodiment, based on the aforementioned apparatus, also discloses a method for generating angled QR code samples. The method disclosed in this embodiment is applied to the aforementioned apparatus for generating angled QR code samples, such as... Figure 3 As shown, the generation method includes:

[0061] Step S1: Control the camera to take pictures of the QR code on the tablet at a preset rotation angle to obtain multiple original QR code images.

[0062] Step S2: Based on the shooting angle of each original QR code image, add angle information tags to each original QR code image to generate angled QR code samples.

[0063] Furthermore, the step of controlling the camera to capture the QR code located on the tablet at a preset rotation angle includes:

[0064] The camera is controlled to take pictures of the QR code on the tablet from different tablet rotation angles and different camera rotation angles.

[0065] Furthermore, before the step of adding angle information tags to each original QR code image based on the shooting angle corresponding to each original QR code image, the method further includes:

[0066] Multiple types of feature information are extracted from the original QR code images to obtain multimodal feature values ​​corresponding to each original QR code image. The multimodal feature values ​​corresponding to each original QR code image are compared with the set multimodal feature values ​​to filter out QR code images that meet the preset conditions, thus obtaining the filtered original QR code samples.

[0067] Furthermore, a lighting assembly is also provided on the fixed bracket; the main control board is also provided with a lighting control unit;

[0068] The step of controlling the camera to capture images of the QR code on the tablet at a preset rotation angle to obtain multiple original QR code images further includes:

[0069] The camera is controlled to take pictures of the QR code on the tablet at a preset rotation angle under different brightness levels, resulting in multiple original QR code images.

[0070] Furthermore, the QR codes involved in this step can be different types of QR codes. For example, they can be QR codes corresponding to a certain type of device, QR codes corresponding to different models of devices, or QR codes corresponding to different types of devices.

[0071] The shooting device can be a high-definition camera, a DSLR camera, or other devices capable of taking pictures.

[0072] When using a camera to photograph QR codes to obtain a large number of QR codes, this step involves changing the shooting angle and the brightness of the shooting environment to obtain QR codes under different angles and brightness levels.

[0073] Specifically, when taking the photos, you can prepare a large number of QR codes, place the camera above the QR codes, and continuously change the shooting angle and the brightness of the shooting environment to obtain QR code images from different shooting angles and brightness levels, thereby obtaining multiple original QR code images.

[0074] The original QR code images captured in the above steps are preprocessed, for example, by removing duplicate images, blurry images, or images where the QR code is not fully captured. Image correction can also be performed on the captured QR codes to facilitate scanning and recognition.

[0075] During actual shooting, in order to avoid the QR code not being recognizable in the captured image and thus rendering the image invalid, the shooting angle and shooting brightness are set within a certain range.

[0076] By using object detection algorithms to extract feature information from each preprocessed QR code image in the original QR code image set, various types of feature values ​​are obtained, and thus the multimodal feature values ​​corresponding to each QR code image are obtained.

[0077] Specifically, the step described above of extracting multimodal feature values ​​from the cropped QR codes to obtain the multimodal feature values ​​corresponding to each QR code image includes:

[0078] The angle and light intensity features of the cut-out QR codes are extracted separately to obtain angle feature values ​​and light intensity feature values.

[0079] Multiple types of feature information include angle feature information and light intensity feature information. These two types of feature information correspond to angle feature values ​​and light intensity feature values, respectively. Therefore, the multimodal feature values ​​corresponding to a QR code include: the angle feature value of the QR code and the light intensity feature value. The angle feature value includes a first angle feature value and a second angle feature value. The first angle feature value corresponds to the angle between the plane where the shooting device is located and the plane where the QR code is located. The second angle feature value corresponds to the angle between the lens direction of the camera in the plane where the shooting device is located and the line of intersection between the two planes. The angle feature value and the light intensity feature value constitute the multimodal feature values.

[0080] In detail, the step of extracting various types of feature information from the QR code images contained in the original QR code image set to obtain the multimodal feature values ​​corresponding to each QR code image in the original QR code image set includes:

[0081] In one implementation, existing object detection algorithms can be used to detect objects in each QR code image to obtain the region contour information of the QR code in each image. In one implementation, the object detection algorithm can be a YOLOv5 model, a convolutional neural network (CNN), or an EfficientDet model. Furthermore, the QR code image can be binarized, converting the captured color image into a binary image to highlight the QR code boundary. This binary image can then be further combined with a threshold to extract the QR code region contour from the image.

[0082] The QR code is cropped from the QR code image based on the extracted region contour information, and then combined with... Figure 4 As shown, coarse-grained cropping of the QR code in the image yields the cropped QR code. Coarse-grained cropping is a pruning method used in neural network model compression. It typically involves pruning the entire convolutional kernel, channels, or feature maps. By deleting channels from the feature maps, the model structure is simplified, the number of computational parameters is reduced, and the model's complexity and computational cost are decreased.

[0083] Multimodal feature value extraction is performed on the cropped QR codes to obtain the multimodal feature values ​​corresponding to each QR code image.

[0084] right Figure 4 The QR code cut out from the image is subjected to multimodal feature value extraction to obtain a multimodal feature map. Multimodal feature values ​​include angle feature values ​​and light intensity feature values. Feature extraction can be performed using different feature extraction algorithms separately, or it can be performed using a feature extraction algorithm that can simultaneously output angle and light intensity feature values.

[0085] After obtaining the corresponding multimodal feature values ​​from each QR code image, these extracted multimodal feature values ​​are compared with pre-set multimodal feature values ​​to filter out QR code images that meet the preset conditions. In this step, the set multimodal feature values ​​are within a preset numerical range. If a multimodal feature value falls within this range, it is determined to meet the preset conditions. The set multimodal feature values ​​include the maximum and minimum values. Since multimodal feature values ​​include angle and light intensity features, the set multimodal feature values ​​include the maximum angle feature value, minimum angle feature value, maximum light intensity feature value, and minimum light intensity feature value.

[0086] Since the angular eigenvalues ​​include the first angular eigenvalue and the second angular eigenvalue, the minimum angular eigenvalue includes the minimum first angular eigenvalue and the minimum first angular eigenvalue. The maximum angular eigenvalue includes the maximum first angular eigenvalue and the maximum second angular eigenvalue.

[0087] Specifically, the step of comparing the multimodal feature values ​​corresponding to each of the QR code images with preset multimodal feature values ​​to filter out QR code images that meet preset conditions includes:

[0088] Determine whether the angle feature value and light intensity feature value corresponding to each QR code are within the preset range of the angle feature value and light intensity feature value, respectively; if the angle feature value is within the preset range of the angle feature value and the light intensity feature value is within the preset range of the light intensity feature value, then the QR code image corresponding to the QR code is a QR code image that meets the preset conditions.

[0089] Furthermore, once a QR code image that meets the preset conditions is obtained, an angle label is added to each QR code image based on the angle feature value corresponding to each QR code image, thereby obtaining a QR code sample with angle.

[0090] The present invention will be further described below using specific application examples of the method in this embodiment.

[0091] In practical applications, the operation flow of the method in this embodiment is as follows:

[0092] Step 1: Customize the data collection program

[0093] Place the printed QR code image in the appropriate location. Figure 1 Place it on the flat panel and close the door of the device.

[0094] As required, on the monitor (corresponding) Figure 1 The operating program on the monitor (referring to the control program corresponding to the steps of this method, installed on the monitor) Figure 1 On the main control board, set the Perspective angle range set P (corresponding to...) Figure 1 The set of rotation angles p) and the set of rotation angle ranges R (corresponding to) Figure 1 Let P be a set of perspective angles r of a flat plate, and let P be a set of elements with the number of elements m and n be a set of elements n.

[0095] As required, set the light intensity range set L on the monitor (via the corresponding...) Figure 1 The left and right light bulbs are set to have different light intensities (l), and the set L contains t elements.

[0096] Step 2: Set the angle and acquire images.

[0097] Iterate through the elements in sets P, R, and L, by Figure 1 The main control board is equipped with a first motor, a second motor, and a light source, and is connected via... Figure 1The camera in the image captures a set Q of original QR code images (for a single QR code image q, the corresponding perspective angle, rotation angle, and illumination intensity are p, r, and l, respectively). Therefore, a total of m*n*t original QR code images are collected.

[0098] Step 3: Image Preprocessing

[0099] The Yo-Lo object detection framework is used to detect the original QR code image, identify the position of the QR code in the original QR code image, and crop out the image with a more precise position so that the QR code image occupies most of the space of the entire image.

[0100] Step 4: Generate a QR code image with angle labels.

[0101] The processed QR code images are set S. For each element s in S, the corresponding perspective angle, rotation angle, and illumination intensity are p, r, and l, respectively.

[0102] This generates a sample set S of m*n*t QR code images with labels for perspective angle, rotation angle, and illumination intensity.

[0103] QR code image sample set S can be accessed Figure 1 The communication cable socket can be exported or stored on the local main control board.

[0104] The device and method of this embodiment can automatically generate / collect a sufficient number of QR code images. The QR code images generated in this embodiment have customizable angles and customizable lighting conditions, enabling customized QR code image collection. Furthermore, the QR code samples generated in this embodiment have been preprocessed to facilitate subsequent algorithm training and recognition, thus making them easier to use and providing convenience for training the network model.

[0105] In the description of this specification, the references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of this application. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Moreover, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of different embodiments or examples.

[0106] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the invention patent. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this patent application should be determined by the appended claims.

Claims

1. A device for generating angled two-dimensional code samples, It is characterized in that include: A fixed bracket, a camera device arranged above the fixed bracket, a placement component and a main control board arranged below the camera device; The main control board is provided with an angle adjustment component; The camera device comprises: a camera, a first fixed shaft, a first motor and a first transmission belt; the angle adjustment component is connected to the first motor; The camera is fixedly connected to the first fixed rotating shaft, one end of the first transmission belt is sleeved on the first fixed rotating shaft, and the other end is connected to the first motor, and the first motor receives the first angle control signal sent by the angle adjustment component, drives the first transmission belt to drive the first fixed rotating shaft to rotate, so as to adjust the rotation angle of the camera; The placement component comprises: a flat plate for placing the QR code image to be photographed, a second fixed shaft, a second transmission belt and a second motor; the angle adjustment component is connected to the second motor; The flat panel is fixedly connected to the second fixed rotating shaft, one end of the second transmission belt is sleeved on the second fixed rotating shaft, and the other end is connected to the second motor, and the second motor receives the second angle control signal emitted by the angle adjustment component, drives the second transmission belt to drive the second fixed rotating shaft to rotate, so as to adjust the rotation angle of the flat panel.

2. The device for generating an angled two-dimensional code sample according to claim 1, It is characterized in that The fixing bracket is also provided with a lighting assembly; the main control board is also provided with a lighting control unit; The lighting assembly is used to emit a light source; The lighting control unit is used to adjust the ambient light brightness of the camera.

3. The device for generating an angled two-dimensional code sample according to claim 1 or 2, It is characterized in that The camera device is arranged on the top of the fixing bracket, the placement component is correspondingly arranged below the camera, and the camera and the flat panel are arranged relative to each other.

4. The device for generating an angled two-dimensional code sample according to claim 1, It is characterized in that The generating device further comprises: a display connected to the main control board; the display is arranged on one side of the fixing bracket; The main control board is fixed on the fixing bracket and is used to control the transmission of the two-dimensional code image captured by the camera device to the display and display it.

5. The device for generating an angled two-dimensional code sample according to claim 4, It is characterized in that The angle adjustment assembly includes a first angle adjustment unit and a second angle adjustment unit; The first angle adjustment unit is used to send a first angle control signal, and the first angle control signal is used to adjust the rotation angle of the camera; The second angle adjustment unit is used to send a second angle control signal, and the second angle control signal is used to adjust the rotation angle of the tablet.

6. The device for generating an angled two-dimensional code sample according to claim 1, It is characterized in that The fixing bracket is also provided with a partition plate, which is arranged at the lower end portion inside the fixing bracket and is used to isolate the power supply, the second motor and the main control board placed inside the fixing bracket from the flat panel.

7. A method for generating angled QR code samples, It is characterized in that Applied to the device for generating an angled two-dimensional code sample as claimed in claim 1, the generating method comprises: Control the camera to shoot the QR code on the tablet according to a preset rotation angle to obtain multiple original QR code images; According to the shooting angle corresponding to each original QR code image, an angle information tag is added to each original QR code image to generate an angled QR code sample.

8. The method for generating an angled two-dimensional code sample according to claim 7, It is characterized in that The step of controlling the camera to shoot the QR code on the tablet according to a preset rotation angle includes: The camera is controlled to take pictures of the QR code on the tablet at different tablet rotation angles and different camera rotation angles.

9. The method for generating an angled two-dimensional code sample according to claim 8, It is characterized in that Before the step of adding angle information tags to each original two-dimensional code image according to the shooting angle corresponding to each original two-dimensional code image, the method further includes: Extracting multiple types of feature information from the original two-dimensional code image to obtain multimodal feature values ​​corresponding to each original two-dimensional code image; The multimodal feature values ​​corresponding to each original QR code image are compared with the set multimodal feature values, and the QR code images that meet the preset conditions are screened out to obtain the screened original QR code samples.

10. The method for generating an angled two-dimensional code sample according to claim 8, It is characterized in that The fixing bracket is also provided with a lighting assembly; the main control board is also provided with a lighting control unit; The step of controlling the camera to shoot the two-dimensional code on the flat panel according to a preset rotation angle to obtain a plurality of original two-dimensional code images also includes: The camera is controlled to shoot the QR code on the tablet at a preset rotation angle under different brightness to obtain multiple original QR code images.