A method and device for evaluating indoor positioning accuracy based on visual two-dimensional codes
By providing stable relative pose reference and QR code spatial coordinates through visual QR codes, and combining the RANSAC algorithm to evaluate the pose and point cloud accuracy of the lidar positioning system for unmanned vehicles, the problem of expensive equipment and complex deployment in existing technologies is solved, and high-precision indoor positioning evaluation with low cost and easy deployment is achieved.
Patent Information
- Application Number
- CN202511258701.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-04
- Publication Date
- 2025-12-05
- Estimated Expiration
- 2045-09-04
AI Technical Summary
Existing indoor positioning accuracy assessment solutions for unmanned vehicles are expensive, complex to deploy, inflexible, or cumbersome to operate, lacking a low-cost, easy-to-deploy, and reusable high-precision positioning benchmark.
By utilizing visual QR codes to provide a stable relative pose reference and combining the spatial coordinates of the QR codes from a single measurement, the pose accuracy of the LiDAR positioning system for unmanned vehicles can be directly evaluated. Furthermore, the point cloud accuracy can be evaluated using the RANSAC algorithm, thus establishing a low-cost and easily deployable indoor positioning accuracy evaluation method.
It achieves low-cost, easy-to-deploy, and reliable indoor positioning accuracy assessment, meeting the needs of unmanned vehicles for routine, efficient, and multi-dimensional positioning accuracy assessment in indoor operating environments.
Smart Images

Figure CN120800436B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of navigation positioning, in particular to an indoor positioning precision evaluation method and device based on visual two-dimensional code. BACKGROUND
[0002] All-weather, all-process, all-space unmanned operation production mode has broad prospects in the fields of smart agriculture, trade logistics, etc., and can significantly improve efficiency and reduce labor costs, which is an important way to cope with labor shortage, promote modernization, and achieve sustainable development. Unmanned vehicles such as unmanned logistics vehicles and unmanned agricultural vehicles play a key role in this regard. As a core capability for vehicles to perceive their own position and state, precise positioning is a necessary condition for intelligent navigation, control, and precise and efficient operation.
[0003] Although the global satellite navigation system can provide real-time centimeter-level positioning in open areas and provide a reference for visual laser inertial odometry, it is ineffective in indoor sheltered areas such as hangars and warehouses due to signal loss. These environments often have dense obstacles and strict space limitations, requiring high positioning accuracy to ensure the safe and reliable operation of unmanned vehicles. Therefore, it is urgent to establish a reasonable and effective indoor positioning precision evaluation scheme to provide performance feedback for unmanned vehicle positioning systems to address the safety challenges of indoor operations.
[0004] Current indoor positioning precision evaluation systems mainly use motion capture systems, high-precision laser radar scanners, and high-precision pose measurement devices for measurement, but have significant limitations. Motion capture systems based on high-speed infrared cameras can provide high-precision reference poses, but they are expensive and complex to deploy, and are more suitable for laboratory scenarios rather than obtaining true values in relatively spacious indoor environments such as warehouses and hangars. High-precision laser radar scanners can provide high-precision indoor motion trajectories, but they are difficult to effectively connect with the measured carrier and are also expensive, making them more suitable for scene modeling and offline analysis. High-precision pose measurement devices such as total stations can directly measure the coordinates of the measured points with millimeter-level precision, but they are cumbersome to operate and complex to use, requiring re-measurement each time for evaluation, which is inflexible and inefficient.
[0005] There are existing technologies for two-dimensional code positioning in the prior art, but these technologies have high requirements for the distribution and density of two-dimensional codes, and the pose trajectory calculated based on a few two-dimensional codes is not smooth, making it difficult to effectively achieve stable operation of unmanned vehicles. There is a lack of an effective method that uses two-dimensional codes as high-precision positioning references, which is low-cost, easy to deploy, and reusable, to systematically and routinely evaluate the positioning accuracy of unmanned vehicles. SUMMARY
[0006] The present application is directed to the problems of existing indoor positioning accuracy evaluation scheme of unmanned vehicle, such as expensive equipment, complex deployment, poor flexibility or cumbersome operation, etc., fully utilizes the characteristics of visual two-dimensional code that can provide high-precision relative pose, and proposes an indoor positioning accuracy evaluation method and device based on visual two-dimensional code, the core of which is to provide stable relative pose reference by visual two-dimensional code with high robustness laid on indoor wall, and to directly evaluate the pose accuracy output by the laser radar positioning system of unmanned vehicle combined with the spatial coordinates of two-dimensional code which only needs to be measured once, and further evaluate the point cloud accuracy which indirectly reflects the overall performance of the positioning system.
[0007] In order to achieve the above purpose, the technical scheme adopted by the present application is as follows:
[0008] An indoor positioning accuracy evaluation method based on visual two-dimensional code, comprising the following steps:
[0009] S1, laying AprilTag visual two-dimensional code on indoor wall, one-time measurement of spatial coordinates of each two-dimensional code center point and corner point, establishing positioning evaluation reference;
[0010] S2, collecting two-dimensional code image of AprilTag visual two-dimensional code by monocular camera installed on unmanned vehicle, identifying two-dimensional code in the image based on AprilTag detection algorithm, solving the pose of the camera through PnP algorithm, and then converting the reference true value of vehicle positioning through external parameter conversion, and comparing the reference true value with the pose output by the vehicle laser radar positioning system to directly evaluate the pose accuracy;
[0011] S3, converting the point cloud collected by the laser radar to the navigation coordinate system according to the vehicle positioning data, dividing the ROI point cloud cluster according to the two-dimensional code spatial coordinates and the pose error, obtaining the effective point cloud cluster through RANSAC plane fitting, obtaining the effective boundary point cloud of the two-dimensional code based on the intensity of the point, obtaining the effective boundary of the two-dimensional code through RANSAC boundary fitting, further calculating the two-dimensional code vertex and center point, comparing the center point with the measured spatial coordinates, and evaluating the point cloud accuracy; RANSAC represents random sample consensus algorithm, and ROI represents region of interest.
[0012] The present application also provides an indoor positioning accuracy evaluation device based on visual two-dimensional code, comprising the following modules:
[0013] The reference establishing module lays AprilTag visual two-dimensional code on indoor wall, one-time measurement of spatial coordinates of each two-dimensional code center point and corner point, and establishes positioning evaluation reference;
[0014] The pose accuracy evaluation module collects an AprilTag visual two-dimensional code image by using a monocular camera installed on the unmanned vehicle, identifies the two-dimensional code in the image based on an AprilTag detection algorithm, solves the pose of the camera through a PnP algorithm, obtains a vehicle positioning reference true value through external parameter conversion, compares the reference true value with a pose output by a vehicle laser radar positioning system, and directly evaluates the pose accuracy.
[0015] The point cloud accuracy evaluation module converts the point cloud collected by the laser radar to a navigation coordinate system according to the vehicle positioning data, delimits an ROI point cloud cluster according to the two-dimensional code space coordinates and the pose error, obtains an effective point cloud cluster through plane fitting of RANSAC, obtains effective boundary point cloud of the two-dimensional code based on the intensity of the points, obtains the effective boundary of the two-dimensional code through boundary fitting of RANSAC, further calculates the vertex and the center point of the two-dimensional code, compares the center point with the measured space coordinates, and evaluates the point cloud accuracy.
[0016] The present application also provides an electronic device, comprising a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the above-mentioned indoor positioning accuracy evaluation method based on a visual two-dimensional code.
[0017] The present application also provides a non-transitory computer readable storage medium having a computer program stored thereon, wherein the computer program is executable by a processor to implement the steps of the above-mentioned indoor positioning accuracy evaluation method based on a visual two-dimensional code.
[0018] Advantages:
[0019] The present application provides an indoor positioning accuracy evaluation scheme with low cost, simple deployment, reusable reference, reliable accuracy, comprehensive evaluation of the overall performance of the laser radar indoor positioning system through direct analysis of the pose data and comparison of the point cloud accuracy, overcoming the limitations of existing expensive, cumbersome or complicated evaluation methods, and meeting the needs of unmanned vehicles in indoor working environments for normalized, efficient and multi-dimensional positioning accuracy evaluation. The present application combines the visual two-dimensional code to provide a stable relative pose in the indoor working scene and the absolute reference measured by the total station, to solve the navigation reference coordinates and the heading angle of the vehicle positioning, and to provide a reference for indoor positioning accuracy evaluation. BRIEF DESCRIPTION OF DRAWINGS
[0020] Figure 1 The flowchart of the indoor positioning accuracy evaluation method based on a visual two-dimensional code of the present application;
[0021] Figure 2 The AprilTag visual two-dimensional code layout schematic diagram;
[0022] Figure 3 A schematic diagram of an effective point cloud cluster QR code detection result is shown in Figure 1.
[0023] Figure 4 A schematic diagram of an indoor positioning precision evaluation device based on a visual QR code is shown in Figure 2. DETAILED DESCRIPTION
[0024] In order to make the purpose, technical solutions and advantages of the present application clearer and more apparent, the present application will be further described in detail below in combination with the drawings and examples. It should be understood that the specific examples described herein are only used to explain the present application and do not limit the present application. In addition, the technical features involved in each embodiment of the present application described below can be combined with each other as long as they do not conflict with each other.
[0025] As shown in Figure 1, the indoor positioning precision evaluation method based on a visual QR code proposed by the present application provides a reference pose using a visual QR code with high robustness fixedly arranged in an indoor working space, has the advantages of low cost, easy deployment, reusable reference, and reliable precision, and provides an effective solution for evaluating the precision of the indoor positioning system of a laser radar of an unmanned vehicle, including the following steps: Figure 1
[0026] S1, establishing an indoor positioning precision evaluation reference:
[0027] As shown in Figure 2, a plurality of AprilTag visual QR codes are pasted on the walls in the indoor space as robust positioning evaluation markers, the boundaries of the AprilTag are at a certain rotation angle with the plane of the laser radar that collects the ordered point cloud, and the recommended angle is Figure 2 ; the center point and the corner point coordinates of the visual QR code are measured by a receiver / total station instrument and other measuring equipment; and the pose of the visual QR code in the navigation coordinate system and the spatial coordinates of the center point and the corner point are calculated.
[0028] S2, evaluating the pose precision of the carrier based on the recognition of the visual QR code by a monocular camera:
[0029] S2-1: a monocular camera installed on the unmanned vehicle collects an image containing a visual QR code, the ID of the visual QR code, the pixel coordinates of the center point of the visual QR code, and the pixel coordinates of the four corner points of the visual QR code are obtained based on the AprilTag detection algorithm, the relationship between the pixel coordinates of the corner points and the corresponding spatial coordinates of the corner points of the visual QR code is established based on the camera imaging model and the camera internal parameter, and the pose of the camera in the navigation coordinate system is obtained by the pixel coordinates of the four corner points of the visual QR code and their corresponding spatial coordinates using the PnP solving method (perspective-n-point algorithm);
[0030] S2-2: Based on the extrinsic relationship between the camera coordinate system and the carrier coordinate system in which the vehicle is positioned, the pose of the carrier coordinate system in the navigation coordinate system is calculated using the pose of the camera in the navigation coordinate system, and the pose is taken as the reference true value of the vehicle positioning;
[0031] S2-3: Calculate the error between the vehicle positioning data and the reference true value , wherein:
[0032] , ;
[0033] wherein, is the vehicle positioning pose rotation matrix, is the vehicle positioning position vector, is the reference true value pose rotation matrix, is the reference true value position vector, is a zero vector of 1 row and 3 columns;
[0034] The calculation formula of the position error and the attitude error is:
[0035] , ;
[0036] wherein, denotes the L2 norm, denotes the logarithmic mapping on the Lie group SO(3). Lie group represents a mathematical object that has both group structure and smooth manifold structure. Lie group SO(3) represents a 3D special orthogonal group, which is a 3D compact connected manifold.
[0037] S3, based on the vehicle positioning data and the visual two-dimensional code space coordinates, evaluate the point cloud precision:
[0038] S3-1: Convert the point cloud collected by the laser radar to the navigation coordinate system using the vehicle positioning data, called global point cloud ; based on the pose of the visual two-dimensional code in the navigation coordinate system , the vehicle positioning data and the reference true value , and the AprilTag visual two-dimensional code itself parameters, determine the point cloud ROI (region of interest) of the visual two-dimensional code in the global point cloud, and select the point cloud in each ROI as the point cloud cluster of the corresponding visual two-dimensional code. The calculation formula of each visual two-dimensional code point cloud cluster is:
[0039] ;
[0040] where the total number of selected AprilTag family is , and the AprilTag size is , represents a point cloud set falling in a cuboid region, let the intermediate parameters , , be the points in the global point cloud set , is the homogeneous representation of the point coordinates; , the intermediate parameters , is the ranging accuracy of the laser radar, , , respectively represent the components of the vector on the , , three axes.
[0041] S3-2: Random Consistency Sampling RANSAC (Random Sample Consensus) plane fitting is performed on the point cloud cluster; for the effective point cloud cluster with successful plane fitting, the intensity gradient of the points on each scan line of the global point cloud is calculated, and the points belonging to the effective boundary of the visual two-dimensional code in the point cloud cluster are obtained based on the intensity gradient, and the effective boundary is the junction of the white and black blocks outside the AprilTag. The intensity gradient of the point is calculated according to the following formula:
[0042] ;
[0043] In the formula, represents the intensity of the i-th point on the j-th scan line, , respectively represent the intensities of the i-th and j-th points on the j-th scan line;
[0044] Start searching from both ends of each scan line in the point cloud cluster until the first point that meets the intensity gradient threshold requirement is found, which is regarded as the boundary point , and the determination rule is:
[0045] ;
[0046] In the formula, is the intensity threshold of the point.
[0047] S3-3: Based on the RANSAC algorithm, the coordinates of the four vertices of the effective boundary are obtained by regressing the straight line where the boundary points are located, solving the intersection points of the two straight lines of the four straight lines, calculating the length of the four effective boundaries based on the four vertex coordinates, and calculating the angle between the two diagonals based on the four vertex coordinates. If the angle and the boundary length are within the threshold, it is considered that the two-dimensional code vertex data extracted from the point cloud cluster can be used for precision evaluation, and the point cloud cluster is called the target point cloud cluster. Further, the point cloud coordinates of the center point of the two-dimensional code are calculated based on the four vertex coordinates.
[0048] S3-4: The point cloud coordinates of the center point of the second target point cloud cluster two-dimensional code are compared with the pre-measured spatial coordinates of the visual two-dimensional code center point to evaluate the point cloud precision , and the calculation formula is:
[0049] ;
[0050] In the formula, is the number of target point cloud clusters, represents the sum of all target point cloud clusters , and j is the index value of the target point cloud cluster.
[0051] Embodiment:
[0052] TAG36H11-0 with a size of 0.8 meters is selected as the visual two-dimensional code, and the center point spatial coordinates are (0, 3, 0.758) meters. The scanning line, vertex, center point, boundary point, and fitted boundary of the point cloud cluster two-dimensional code are shown in Figure 3 , and the point cloud coordinates of the center point are calculated as (-0.0088, 3.0000, 0.7641) meters.
[0053] As shown in Figure 4 , the application also provides an indoor positioning precision evaluation device based on a visual two-dimensional code, which is used to implement the above method and includes the following modules:
[0054] The reference establishment module arranges AprilTag visual two-dimensional codes on the indoor wall surface, one-time measures the spatial coordinates of the center points and corner points of each two-dimensional code, and establishes a positioning evaluation reference;
[0055] The pose precision evaluation module uses a monocular camera installed on the unmanned vehicle to collect the two-dimensional code image of the AprilTag visual two-dimensional code, identifies the two-dimensional code in the image based on the AprilTag detection algorithm, solves the pose of the camera through the PnP algorithm, and then converts the external parameters to obtain the vehicle positioning reference true value. The reference true value is compared with the pose output by the vehicle laser radar positioning system to directly evaluate the pose precision.
[0056] The point cloud precision evaluation module converts the point cloud collected by the laser radar to a navigation coordinate system according to the vehicle positioning data, delimits the ROI point cloud cluster according to the two-dimensional code space coordinates and the pose error, obtains the effective point cloud cluster through plane fitting of RANSAC, obtains the effective boundary point cloud of the two-dimensional code based on the intensity of the point, obtains the effective boundary of the two-dimensional code through boundary fitting of RANSAC, further calculates the vertex and the center point of the two-dimensional code, compares the center point with the measured space coordinates, and evaluates the point cloud precision; RANSAC represents a random sample consensus algorithm, and ROI represents a region of interest.
[0057] The application further provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the above-mentioned indoor positioning precision evaluation method based on a visual two-dimensional code when executing the program.
[0058] The application further provides a non-transitory computer readable storage medium, which stores a computer program, wherein the computer program is executable on a processor to implement the steps of the above-mentioned indoor positioning precision evaluation method based on a visual two-dimensional code.
[0059] Those skilled in the art should understand that the embodiments of the application can be provided as a method, a system, or a computer program product. Therefore, the application can be in the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, the application can be in the form of a computer program product implemented on one or more computer usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer usable program codes. The solutions in the embodiments of the application can be implemented in various computer languages, such as the object-oriented programming language Java and the interpreted scripting language JavaScript.
Claims
1. A method for evaluating the accuracy of indoor positioning based on visual two-dimensional codes, characterized in that, The method comprises the following steps: S1, AprilTag visual two-dimensional codes are arranged on indoor walls, the spatial coordinates of the center points and corner points of the two-dimensional codes are determined at one time, and a positioning evaluation reference is established; the plane of the two-dimensional codes and the plane of the laser radar collection are at an angle of 30-60 degrees; S2, a monocular camera installed on the unmanned vehicle is used to collect two-dimensional code images of the AprilTag visual two-dimensional codes, the two-dimensional codes in the images are identified based on an AprilTag detection algorithm, the pose of the camera is solved through a PnP algorithm, a vehicle positioning reference true value is obtained through external parameter conversion, an error comparison is performed between the reference true value and the pose output by the vehicle laser radar positioning system, and the pose accuracy is directly evaluated; S3, the point cloud collected by the laser radar is converted to a navigation coordinate system according to vehicle positioning data, ROI point cloud clusters are demarcated according to the spatial coordinates of the two-dimensional codes and the pose error, effective point cloud clusters are obtained through RANSAC plane fitting, effective boundary point clouds of the two-dimensional codes are obtained based on the intensity of the points, effective boundaries of the two-dimensional codes are obtained through RANSAC boundary fitting, the vertices and center points of the two-dimensional codes are further calculated, the center points are compared with the measured spatial coordinates, and the point cloud accuracy is evaluated; RANSAC represents a random sample consensus algorithm, and ROI represents a region of interest. 2.The method of claim 1, wherein, In S1, the AprilTag visual two-dimensional codes are uniformly arranged along the walls. 3.The method of claim 1, wherein, In S2, the pose error comparison includes a comparison of the position error and the attitude error. 4.The method of claim 3, wherein, In S3, the boundary detection first calculates the intensity gradient on the scanning line, and then searches for the first point meeting the threshold as the boundary point along the two ends of the scanning line. 5.The method of claim 4, wherein, In S3, the vertices of the two-dimensional codes are obtained by intersecting the straight lines fitted through the boundary points through RANSAC. 6.The method of claim 5, wherein, In S3, the point cloud accuracy is represented by the root mean square value of the difference between all effective two-dimensional code point cloud cluster centers and the measured spatial coordinates. 7.A device for evaluating the accuracy of indoor positioning based on a visual two-dimensional code, characterized in that, The method comprises the following modules: A reference establishment module, which arranges AprilTag visual two-dimensional codes on indoor walls, determines the spatial coordinates of the center points and corner points of the two-dimensional codes at one time, and establishes a positioning evaluation reference; the plane of the two-dimensional codes and the plane of the laser radar collection are at an angle of 30-60 degrees; A pose accuracy evaluation module, which collects two-dimensional code images of the AprilTag visual two-dimensional codes by using a monocular camera installed on the unmanned vehicle, identifies the two-dimensional codes in the images based on an AprilTag detection algorithm, solves the pose of the camera through a PnP algorithm, obtains a vehicle positioning reference true value through external parameter conversion, performs an error comparison between the reference true value and the pose output by the vehicle laser radar positioning system, and directly evaluates the pose accuracy; A point cloud accuracy evaluation module, which converts the point cloud collected by the laser radar to a navigation coordinate system according to vehicle positioning data, demarcates ROI point cloud clusters according to the spatial coordinates of the two-dimensional codes and the pose error, obtains effective point cloud clusters through RANSAC plane fitting, obtains effective boundary point clouds of the two-dimensional codes based on the intensity of the points, obtains effective boundaries of the two-dimensional codes through RANSAC boundary fitting, further calculates the vertices and center points of the two-dimensional codes, compares the center points with the measured spatial coordinates, and evaluates the point cloud accuracy; RANSAC represents a random sample consensus algorithm, and ROI represents a region of interest.
8. An electronic device comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, The processor implements the steps of the method for evaluating the accuracy of indoor positioning based on visual two-dimensional codes according to any one of claims 1 to 6 when executing the program. 9.A non-transitory computer-readable storage medium having stored thereon a computer program, characterized in that, The computer program implements the steps of the method for evaluating the accuracy of indoor positioning based on visual two-dimensional codes according to any one of claims 1 to 6 when executed by the processor.
Citation Information
Patent Citations
High-precision evaluation method of SLAM algorithm in extreme scene
CN114543807A