A multi-qr code recognition method, a qr code-based mobile positioning method and system
By using multi-QR code recognition methods and machine vision technology, the center point and rotation angle of the QR code can be quickly detected. Combined with a multi-camera network, high-precision positioning and location tracking of moving objects are achieved, solving the problems of low positioning accuracy and high cost in existing technologies. It is suitable for real-time monitoring and information management in large-scale scenarios.
Patent Information
- Application Number
- CN202211452440.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-21
- Publication Date
- 2026-01-30
- Estimated Expiration
- 2042-11-21
AI Technical Summary
Existing mobile object positioning technologies suffer from low positioning accuracy, high cost, and poor real-time performance, especially in large-scale scenarios where they cannot achieve high-precision real-time positioning and location tracking of mobile objects.
A multi-QR code recognition method is adopted, which determines the center point and rotation angle of the QR code through image preprocessing, erosion operation, clustering algorithm and cross product calculation. Combined with machine vision technology, multiple cameras are installed in a large scene to build a camera vision network, so as to realize the rapid detection and dynamic tracking of object position information.
It enables rapid detection and recognition of multiple QR codes, reduces hardware costs, and provides dynamic positioning of moving objects and location query of static objects, making it suitable for real-time monitoring and information management in large-scale scenarios.
Smart Images

Figure CN115796207B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application belongs to the technical field of mobile object positioning, and more particularly relates to a multi- QR code recognition method, a mobile positioning method and system based on QR codes. BACKGROUND
[0002] With the development of artificial intelligence technology, object positioning has a wide range of application needs and a large number of landing projects in the fields of automated production, warehousing logistics, production line inspection, etc., and accurate positioning is an important prerequisite for completing the task.
[0003] Taking a mobile robot as an example, the current positioning technology scheme can be roughly divided into three categories: based on an odometer, based on a laser radar sensor, and based on machine vision.
[0004] (1) The technology scheme based on an odometer records the number of rotations of the wheels of the mobile robot by installing an optical encoder on the transmission shaft of the mobile robot to calculate the movement distance of the mobile robot, which only provides rough position estimation and is prone to positioning failure due to wheel skidding, error accumulation, etc.
[0005] (2) The positioning scheme based on a laser radar sensor perceives the environment using a laser radar sensor, and obtains the pose information of the mobile robot by processing the obtained point cloud set, which has a high cost and is prone to distortion.
[0006] (3) The positioning scheme based on machine vision fuses multiple sensor data, covers the positioning scene and supports accurate virtual content superimposed display. Whether in software technology development or hardware design selection, there are relatively mature solutions, and in addition, this kind of technology scheme not only has excellent positioning quality, but also has obvious cost advantage.
[0007] As a commonly used position information acquisition technology, the visual positioning based on a two-dimensional code usually uses a two-dimensional code as a ground marker or target label for storing certain position information, and a positioning system acquires a two-dimensional code image containing a mobile object by a configured camera, and analyzes and calculates the position of the object. In this process, the positioning system not only needs to shoot a large number of pictures, but also needs to screen and identify the pictures, resulting in long object positioning time, low efficiency and cost waste of hardware facilities.
[0008] According to the search, Chinese patent publication No. CN 109977714 A discloses a warehouse goods multi-QR code integrated visual positioning method; the application first filters the image, converts it to a grayscale image, binarizes it, and performs other preprocessing operations, then roughly locates the position of the position detection pattern according to the closed contour information in the binary image, and finely locates the position detection pattern according to the similar area characteristics of the three position detection patterns in the same QR code in the image, and finally locates the QR code. The application can accurately locate multiple two-dimensional codes in the scene from multiple shooting angles in a complex environment. However, the application mainly aims at the positioning of multiple QR codes on the surface of the static goods box on the warehouse shelf, the identification and detection of the two-dimensional code are based on the contour and area characteristics of the two-dimensional code, and the data processing speed of the computer will slow down with the increase of the number of two-dimensional codes, the real-time performance is poor, the high-precision positioning effect for moving objects is not good, and the two-dimensional code of the goods beyond the camera field of view cannot be tracked and recorded, so it cannot be applied to real-time positioning of objects in a large scene and providing corresponding position information service. SUMMARY
[0009] 1. Technical problems to be solved by the application
[0010] In view of the deficiencies in the prior art described above, the present application provides a multi-QR code fast identification method, a mobile positioning and tracking method and system based on QR code; the first aspect of the present application proposes a multi-QR code fast identification method, which solves the problem of fast detection and identification of multiple two-dimensional codes in a single collected image; the second aspect proposes a mobile positioning and tracking method and system based on QR code, which can obtain the position, orientation angle and number of the object only by detecting and identifying the two-dimensional code on the top of the object; and can provide real-time position information and calculate the motion trajectory for the moving object.
[0011] 2. Technical solutions
[0012] To achieve the above-mentioned purpose, the technical solutions provided by the present application are as follows:
[0013] The multi-QR code identification method of the present application has the following steps:
[0014] S11, process the collected image to filter out irrelevant image information, and only keep the two-dimensional code binary image;
[0015] S12, perform an erosion operation on the binary image, then find the smallest enclosing rectangle of each pixel region in the eroded image, roughly locate the image position of each two-dimensional code, and extract the two-dimensional code from the binary image;
[0016] S13, horizontally and vertically search the position detection pattern of the two-dimensional code to determine the center point, and then find the center point coordinates of the three position detection patterns of each two-dimensional code through a clustering algorithm;
[0017] S14. Calculate the center position of the QR code in the image based on the fact that the midpoint of the detection pattern on the diagonal is the center point of the QR code pattern.
[0018] S15. Using the vector formed by the upper left detection position point and the lower left detection position point, and the vector formed by the upper left detection position point and the upper right detection position point, perform cross product calculation to determine the order of the center points of the remaining two detection positions.
[0019] S16. Calculate the rotation angle of the QR code by using the inverse trigonometric function between the vector formed by the upper left and upper right detection patterns of the QR code and the horizontal vector.
[0020] The present invention provides a mobile positioning method based on QR codes, the specific steps of which include:
[0021] S21. Divide the entire visual detection area equally according to the camera's field of view, install the same type of image acquisition camera in each area, and construct an image acquisition matrix for the entire detection area.
[0022] S22. Perform camera calibration and focusing, and adjust the camera's field of view to establish a mapping relationship between world coordinates and pixel coordinates;
[0023] S23. Using multiple small calibration plates, rotate and translate them to unify them into the same camera world coordinate system;
[0024] S24. Set a QR code label containing its own information on the top of the object, with each QR code set in a fixed position on the object;
[0025] S25. The QR code on the object is detected and recognized using machine vision technology, and the multi-QR code recognition method is used to obtain the QR code pixel coordinates, orientation angle and storage information in the image.
[0026] S26. Calculate the position of the object in the unified coordinate system by using the mapping relationship between the unified coordinate system and the pixel coordinate system.
[0027] The present invention provides a mobile positioning system based on QR codes, comprising:
[0028] Image acquisition module: Acquires images of moving objects using all calibrated cameras and sends them to the image processing module;
[0029] Image processing module: Utilizes the multi-QR code recognition method to detect and recognize the QR codes in the acquired images, and transmits the recognition results to the information management module;
[0030] Information Management Module: Performs algorithmic processing on images of the same object captured by different cameras, as well as images of the object leaving the camera's field of view, to filter out invalid information; constructs an object location information management database and continuously updates the data based on the image processing results;
[0031] Data update query module: Set up a location server that links to the location information database and query the current location information through a wireless communication interface.
[0032] 3. Beneficial effects
[0033] Compared with existing known technologies, the technical solution provided by this invention has the following significant advantages:
[0034] (1) This invention proposes a method for rapid location and recognition of multiple QR codes. Based on the image features of the QR codes, multiple QR codes in the image are quickly detected and extracted. The feature information of the detected pattern is used to calculate the center point and rotation angle of the QR codes. While ensuring the efficiency of QR code detection, relevant information is extracted quickly, which is suitable for real-time monitoring and information management of multiple QR code patterns.
[0035] (2) This invention proposes a QR code-based motion positioning and tracking method. By installing multiple cameras within a large scene space, and utilizing the spatial information between the camera installation positions, a camera vision network covering the large scene is constructed to monitor the movement of objects across the entire field of view. This method balances global image information detection in a large scene with local image quality in a specific region.
[0036] (3) This invention proposes a mobile positioning and tracking system based on QR codes, which uses computer vision technology to identify QR code labels placed on the surface of objects to detect the location and other related information of the objects. Compared with current object positioning products, the positioning method of this invention is active, dynamic, and lightweight, and can realize the dynamic positioning of moving objects and the location query of static objects. In addition, the positioning system has low hardware cost and can be easily expanded according to the size of the scene.
[0037] (4) This invention adds a location information server to the positioning system, which transmits the detected object location information to a database for storage. Information administrators can access the database via a terminal to query the location of a specified object and track its movement trajectory. Therefore, this invention's system can be applied to the positioning and path planning of warehouse mobile robots. Attached Figure Description
[0038] Figure 1 This is a schematic diagram of the hardware configuration of the mobile positioning system in this invention;
[0039] Figure 2 This is a flowchart of the multi-QR code recognition method in this invention;
[0040] Figure 3 This is a schematic diagram of the detection pattern structure of a QR code;
[0041] Figure 4 This is a schematic diagram illustrating the calculation of the positional features of the three position detection patterns in the Q code;
[0042] Figure 5 This is a diagram illustrating the calculation of the QR code rotation angle;
[0043] Figure 6 This is a schematic diagram of the camera's imaging model;
[0044] Figure 7 This is a schematic diagram of a unified positioning coordinate system for a multi-camera system;
[0045] Figure 8 This is a diagram illustrating the QR code setup on the top of a moving object;
[0046] Figure 9 This is a flowchart for managing the location information of moving objects.
[0047] Explanation of the labels in the diagram:
[0048] 1. Image acquisition camera; 2. Moving object; 3. Data transmission cable; 4. Positioning server. Detailed Implementation
[0049] Given that existing methods for locating moving objects require collecting relevant QR code images upon the moving object reaching a specific location for identification and determination of location information, which leads to problems such as the inability to achieve precise robot positioning, this invention proposes a multi-QR code recognition method, a QR code-based mobile positioning method, and a system. To further understand the content of this invention, a detailed description is provided in conjunction with the accompanying drawings and embodiments.
[0050] Example 1
[0051] Combination Figure 2 The multi-QR code recognition method of this embodiment specifically includes the following steps:
[0052] S11. Image Preprocessing: The acquired image is processed to filter out irrelevant image information, retaining only the binary image of the QR code; specifically:
[0053] The original image is then converted to grayscale and binarized.
[0054] Grayscale conversion: Converting the original RGB color image to grayscale increases visual contrast, highlighting the QR code. Furthermore, grayscale images occupy less memory, resulting in faster image processing. Grayscale conversion uses a weighted average method, and the calculation formula is as follows:
[0055] I(x,y)=0.3×I R (x,y)+0.59×I G (x,y)+0.11×I B (x,y) (1)
[0056] Where I(x,y) represents the gray value of a pixel in the grayscale image, I R (x,y), I G (x,y), I B (x, y) represent the values of the R, G, and B channels of a pixel in an RGB image, respectively.
[0057] Binarization processing: The Ostu algorithm is used to binarize the grayscale image, eliminating shadows caused by uneven lighting and separating the QR code from the background.
[0058] S12. Rough QR code location: Perform an erosion operation on the binarized image, then find the smallest bounding rectangle of each pixel region in the eroded image, roughly locate the approximate image position of each QR code, and extract the QR code from the binary image.
[0059] The binarized QR code image basically retains the shape of the QR code. The eroded image obtained through morphological erosion operation preserves the outermost contour of each QR code. By finding the smallest rectangle enclosing each eroded pixel region, the number of QR codes in the image and the position of the QR codes can be determined and roughly located. That is, the number of QR codes is determined by calculating the number of outermost contours of the QR codes in the eroded image, and the region position of the QR code is determined by the outermost rectangle contour. Based on this position information, the QR codes in the binary image can be accurately extracted.
[0060] S13. QR Code Detection: For the extracted binary image of the QR code, horizontal and vertical retrieval of the QR code's position detection patterns is performed to determine its center point. Then, a clustering algorithm is used to find the coordinates of the center points of the three position detection patterns for each QR code; specifically:
[0061] Based on the characteristic that each QR code has three position detection patterns at a fixed position, and that these position detection patterns can be scanned from any angle, such as... Figure 3 As shown, the black and white pixel interval ratio always satisfies 1:1:3:1:1, meaning that line segments with approximate proportions obtained through horizontal or vertical scanning can be considered part of the position detection pattern. In this embodiment, the intersection of the candidate position coordinate sets obtained from horizontal and vertical scanning is performed to filter out the center coordinate set G of the detection pattern.
[0062] The same detection pattern may generate multiple center coordinates, and patterns satisfying the black-and-white pixel ratio may exist in non-QR code detection areas. Cluster analysis is performed on the selected set of center coordinates G based on distance constraints, dividing G into three subsets of detection patterns. The cluster center of each subset is used as the center position point of that detection pattern. This allows the calculation of the center position points of the three detection patterns for each QR code.
[0063] S14. Calculation of the center point of the QR code: Based on the fact that the midpoint of the detection pattern on the diagonal is the center point of the QR code pattern, calculate the center position of the QR code in the image.
[0064] like Figure 4 As shown, the center points of the QR code detection pattern are represented by the letters A, B, and C in the order of upper left, upper right, and lower left, respectively. The three center points of the QR code form a right isosceles triangle ABC. The midpoint D of the hypotenuse BC of the right isosceles triangle is equidistant from each vertex, so the midpoint D is the center point of the QR code pattern. Formula (2) calculates the coordinates of the midpoint based on the coordinates of the endpoints of the line segment, and formula (3) calculates the distance between the coordinates of two points:
[0065]
[0066]
[0067] Where P1 and P2 are the two endpoints of the line segment. P is the midpoint, and d is the distance between the endpoints of the line segment.
[0068] According to formulas (2)-(3), calculate the midpoint of the line segment formed by any two detection pattern center points, and then calculate the distance between the midpoint and the three center points respectively. If the three calculated distances are the same, then the midpoint is considered to be the center point of the QR code, and the endpoint of the line segment containing the midpoint is considered to be the center position point of detection pattern B and detection pattern C. Then the third point is the coordinate point of the center position of detection pattern A.
[0069] S15 QR code detection pattern order determination: The order of the center points of the remaining two detection positions is determined by calculating the cross product of the vector formed by the upper left detection position point and the vector formed by them.
[0070] like Figure 4 As shown, the legs of a right triangle are represented by vectors. and The cross product of the two vectors is calculated using formula (4).
[0071]
[0072] If the cross product is negative, it means that the vector... It is composed of detection pattern A and detection pattern B; if the calculation result is positive, it represents a vector. It is composed of detection pattern A and detection pattern C. Determine the vector. The center position of the upper right detection pattern of the QR code can be determined by identifying which two detection patterns it consists of.
[0073] The sign of the cross product of these two vectors is used to determine the primary and secondary importance of the two vectors, thus determining the order of the coordinates of the center points of the remaining two probe patterns.
[0074] S16. Calculation of QR code orientation angle: The rotation angle of the QR code is obtained by using the inverse trigonometric function between the vector formed by the upper left and upper right detection patterns of the QR code and the horizontal direction vector.
[0075] like Figure 5 As shown, by calculating vectors The horizontal deflection angle θ can be used to obtain the rotation angle of the QR code. Therefore, the formula for calculating the rotation angle θ is:
[0076]
[0077] Wherein, the coordinates of point P1 are (x1, y1) and the coordinates of point P2 are (x2, y2).
[0078] This embodiment rapidly detects and extracts multiple QR codes from an image based on the image features of the QR codes, and uses the feature information of the detected patterns to calculate the center point and rotation angle of the QR codes. While ensuring QR code detection efficiency, it quickly extracts relevant information, making it suitable for real-time monitoring and information management of multiple QR code patterns.
[0079] Example 2
[0080] This embodiment of a mobile positioning method based on QR codes includes the following specific steps:
[0081] S21. Detection Division and Camera Installation: Divide the entire visual detection area equally according to the camera's field of view, numbering them sequentially as 1, 2, ..., m; install the same type of image acquisition camera 1 in each division area to construct an image acquisition matrix for the entire detection area. Define the camera numbered 1 as the reference camera, and the other cameras as subordinate cameras.
[0082] S22. Camera Calibration: Perform camera calibration focusing and adjust the camera's field of view to establish the mapping relationship between world coordinates and pixel coordinates;
[0083] Positioning via machine vision technology requires establishing a complete mapping between the world coordinate system and the pixel coordinate system. For example... Figure 6 As shown, the relationship between the pixel coordinate system and the world coordinate system satisfies:
[0084]
[0085] in, f is the camera intrinsic parameter matrix. x and f y Focal length is measured in pixels. R and T are the image rotation and translation matrices, respectively. The camera intrinsic parameter matrix can be obtained by analyzing multiple images from the calibration board.
[0086] Therefore, by calibrating each camera using a calibration board, the internal parameters of each camera can be obtained.
[0087] S23. Composition of camera world coordinate system: Using multiple small calibration plates, rotate and translate them to unify them into the same coordinate system to solve the calibration problem of a multi-camera system with a large field of view.
[0088] A unified reference system for calibrating the entire positioning coordinate system is formed by using the local reference systems of multiple small calibration plates. Specific operational steps are as follows:
[0089] N small calibration plates are placed in the multi-camera system in the detection area and numbered 1, 2, ..., N in sequence; the calibration plate numbered 1 is defined as the reference plate, and the reference coordinate system of the reference camera is used as the reference of the entire positioning coordinate system.
[0090] For each small calibration plate, establish a coordinate system with the upper left checkerboard grid as the origin and the calibration plate plane as the XOY plane. The coordinate system for each calibration plate is denoted as: O i -X i Y i Z i ,i∈[1,N].
[0091] At the same time, the entire multi-camera system acquires images and establishes its own local reference coordinate system using individual camera calibration.
[0092] Based on the relative positional relationship between the calibration plates in the survey, the local reference coordinate system of all subordinate cameras is transformed to the reference coordinate system.
[0093] Figure 7 In this model, camera A is taken as the reference camera, and cameras B, C, and D are subordinate cameras. The reference coordinate system established by camera A is the reference coordinate system for these four cameras. By transforming the local coordinate systems of the subordinate cameras into the reference coordinate system, a unified coordinate system based on the reference coordinate system is constructed.
[0094] S24 Object Label Setting: Set a QR code label containing its own information on the top of the moving object 2. The position of each QR code on the moving object 2 is fixed, which makes it convenient to calculate the center position.
[0095] likeFigure 8 As shown, the QR code is placed in the center of the top of the object, with its orientation largely consistent with the object's outline. By locating the QR code, the object's position information can be obtained. Therefore, ensuring the correct placement of the QR code on the top of the object is a crucial step in achieving accurate object positioning.
[0096] S25. QR code detection and analysis: By using machine vision technology to detect and identify QR codes on objects, and using the algorithm described in Example 1 to obtain the pixel coordinates, orientation angle, and storage information of the QR code in the image, the position information of the object in the current image can be detected.
[0097] S26. Data mapping processing: Calculate the position of the object in the unified coordinate system by using the mapping relationship between the unified coordinate system and the pixel coordinate system.
[0098] By using the mapping relationship constructed by the camera calibration module in step S21, and substituting the detected coordinates of the QR code center position into the mapping function for analysis, the position of the object in the world coordinate system can be obtained.
[0099] Example 3
[0100] This embodiment of a mobile positioning system based on QR codes includes:
[0101] The image acquisition module captures positional image data of moving objects using a camera. It then uses the camera to construct a visual image matrix covering the entire detection area. When a moving object moves within the camera's field of view, the image acquisition module captures its positional image and sends it out for image recognition and detection. (See also...) Figure 1 The specific construction process is as follows:
[0102] Multiple image acquisition cameras 1 are fixedly installed above the activity area of the moving object 2 according to the division of the acquisition area. After the lens of each camera is parallel to the ground where the object is moving, the camera is focused and the light is adjusted. Each camera is numbered according to the division of the acquisition area. Before the camera acquires images, it needs to be calibrated. The world coordinate system of the entire object's activity space is calibrated using a camera matrix.
[0103] The image processing module detects and identifies the QR code in the acquired image as described in Example 1, obtains location information, and transmits the identification result to the information filtering and management module.
[0104] After recognizing all detectable QR codes in the image and obtaining information such as object number, location coordinates, and orientation angle, the information filtering and management module packages all image information and recognition results detected at the same time.
[0105] The information filtering and management module uses algorithms to process images of the same object captured by different cameras, as well as images of objects that have left the camera's field of view, to filter out invalid information.
[0106] like Figure 9 As shown, the positioning server 4 receives the original captured image and related detection and recognition results from the image acquisition camera 1 via the data transmission cable 3. This module needs to continuously process these data and write them to the database.
[0107] This module addresses situations where object images are repeatedly captured by multiple cameras simultaneously, objects enter the detection area from the outside, or objects are lost within the camera's field of view. It needs to perform discrimination and filter out usable data. For example, for objects detected repeatedly, selection should be based on the accuracy of the detection results; when a new object is identified, its information should be recorded in the database; if an object image is suddenly lost and no current information is detected, previous data records should be saved and processed, awaiting overwriting by the next corresponding data.
[0108] Data management is specifically divided into:
[0109] Data cleaning: When an object is captured and recognized by multiple cameras, data with low detection and recognition accuracy is cleaned out, while data with high accuracy is retained to avoid amplifying positioning errors.
[0110] Data writing or updating: For newly detected QR code information, allocate new memory space in the database; and for data retrieval using the object number as a keyword, update the corresponding database with the new recognition results.
[0111] Data Query: The positioning system needs to provide open database information for the server to connect to. Through the access interface provided by the server, external network devices can query the positioning information in the server.
[0112] The data update and query module updates the location information of all objects based on the information filtering results and provides a service interface for querying the location of moving objects. After the data processing is completed, the corresponding data in the database is updated. The server needs to provide a queryable service interface to the database so that moving objects can access and query location information via wireless signals when performing tasks.
[0113] The present invention and its embodiments have been described above illustratively. This description is not restrictive, and the figures shown are only one embodiment of the present invention; the actual structure is not limited thereto. Therefore, if those skilled in the art are inspired by this description and design similar structures and embodiments without departing from the spirit of the present invention, such designs should fall within the protection scope of the present invention.
Claims
1. A QR code-based mobile positioning method, characterized by, The steps are: S21, the entire visual inspection area is equally divided according to the field of view range of the camera, and the same type of image acquisition camera is installed in each area to construct an image acquisition matrix of the entire detection area; S22, camera calibration focusing and adjustment of the acquisition field of view of the camera are performed, and a mapping relationship between the world coordinates and the pixel coordinates is established; S23, a plurality of small calibration plates are rotated and translated to be unified in the same camera world coordinate system; specifically: N small calibration boards are placed under the multi-camera system in the detection area, and are numbered in sequence as 1, 2, …, N; the calibration board numbered 1 is defined as the reference board, and the reference coordinate system of the reference camera is the reference of the entire positioning coordinate system; a coordinate system is established for each small calibration board, taking the upper left chessboard as the coordinate origin and the calibration board plane as the XOY plane, and the coordinate system of each calibration board is recorded as: O i -X i Y i Z i ,i∈[1,N];At the same time, the entire multi-camera system performs image acquisition, and a local reference coordinate system belonging to each camera is established by single camera calibration; according to the relative position relationship between the surveyed calibration boards, the local reference coordinate systems of all subordinate cameras are converted to the reference coordinate system; S24, a two-dimensional code label containing its own information is arranged on the top of the object, and each two-dimensional code is arranged at a fixed position of the object; S25, the two-dimensional code on the object is detected and recognized by machine vision technology, and a multi- QR code recognition method is used to obtain the pixel coordinates, orientation angle and stored information of the two-dimensional code in the image; specifically: S11, the collected image is processed to filter out irrelevant image information, and only the two-dimensional code binary image is retained; S12, the binary image is subjected to an erosion operation, and then the smallest enclosing rectangle of each pixel region in the eroded image is found to roughly locate the image position of each two-dimensional code, and the two-dimensional code is extracted from the binary image; S13, the center point of each two-dimensional code is determined by searching the horizontal and vertical position detection patterns of the two-dimensional code, and a clustering algorithm is used to find the center point coordinates of each two-dimensional code; S14, the center position of the two-dimensional code in the image is calculated according to the fact that the midpoint of the detection pattern on the diagonal is the center point of the two-dimensional code pattern; S15, the cross product calculation is performed on the vectors formed by the upper left detection position point and the lower left detection position point, and the vectors formed by the upper left detection position point and the upper right detection position point to determine the order of the remaining two detection position center points; S16, the rotation angle of the two-dimensional code is calculated by using the inverse trigonometric function between the vector formed by the upper left and upper right detection patterns of the two-dimensional code and the horizontal direction vector; S26, the position of the object in the unified coordinate system is calculated by using the mapping relationship between the unified coordinate system and the pixel coordinate system.
2. The QR code-based mobile positioning method of claim 1, wherein: In step S11, the collected image is subjected to grayscale and binary processing, the grayscale is processed by using the weighted average method, and the Ostu algorithm is used for binary processing of the grayscale image.
3. The QR code-based mobile positioning method of claim 2, wherein: In step S13, the intersection operation is performed on the candidate position coordinate set obtained by horizontal and vertical scanning to screen out the detection pattern center coordinate set G; the center coordinate set G screened out is subjected to clustering analysis according to the distance constraint condition, and G is divided into three subsets of detection patterns, and the clustering center of each subset is taken as the center position point of the detection pattern.
4. The QR code-based mobile positioning method of claim 3, wherein: In step S14, the midpoint of the line segment formed by any two detection pattern center position points is calculated, and the distances between the midpoint and the three center position points are calculated respectively; if the three calculated distances are the same, the midpoint is considered to be the center point of the two-dimensional code, and the endpoints of the line segment are considered to be the center position points of the lower left detection pattern and the upper right detection pattern, and the third point is the center position point of the upper left detection pattern.
5. The QR code-based mobile positioning method of claim 4, wherein: Step S15 uses the cross product of the vector formed by the upper left detection position point and the upper right detection position point, and the vector formed by the upper left detection position point and the lower left detection position point, respectively represented by and to perform a cross product calculation. If the cross product calculation result is negative, it represents that the vector is formed by the upper left detection pattern and the upper right detection pattern; if the calculation result is positive, it represents that the vector is formed by the upper left detection pattern and the lower left detection pattern. The cross product of the two vectors is used to determine the primary and secondary of the two vectors, i.e., the order of the remaining two detection pattern center point coordinates is determined, so as to further determine the center position of the upper right detection pattern of the two-dimensional code.
6. A QR code-based mobile positioning system, characterized by, The mobile positioning method of any one of claims 1-5 is executed, comprising: An image acquisition module: all calibrated cameras are used to collect mobile object images and send them to the image processing module; Image processing module: using multi- QR code recognition method, the two-dimensional code in the collected image is detected and recognized, and the recognition result is transmitted to the information management module; Information management module: for the same object captured by different cameras, the algorithm is processed, and the invalid information is filtered out; the object position information management database is constructed, and the data content is continuously updated according to the image processing result; Data update query module: set up the positioning server linked with the position information database, and query the current position information through the wireless communication interface.
Citation Information
Patent Citations
Warehouse cargo multi-QR code integrated visual positioning method
CN109977714A
Two-dimensional code positioning method and device
CN110163025A
Coordinate system calibration method of multi-camera vision system
CN111986267A