Nested marker design and visual positioning method for target alignment in complex scenes

By combining nested positioning marker design with visual inspection methods, and integrating concentric circle and QR code detection, the problems of visual positioning accuracy and efficiency in environments with varying viewing angles and viewing distances were solved, achieving precise positioning in complex scenarios.

CN120894419BActive Publication Date: 2026-06-12NANJING UNIV OF AERONAUTICS & ASTRONAUTICS
View PDF 3 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
NANJING UNIV OF AERONAUTICS & ASTRONAUTICS
Filing Date
2025-07-31
Publication Date
2026-06-12

AI Technical Summary

Technical Problem

Existing visual positioning technologies are insufficient in terms of positioning accuracy and efficiency in environments with varying viewing angles and line-of-sight distances, and they also consume a lot of storage space, making it difficult to meet the precise positioning needs in complex scenarios.

Method used

The design of nested positioning markers employs concentric circle visual detection and QR code visual detection methods, combined with arc segment detection classification and projection invariant methods, to achieve precise positioning of nested positioning markers.

Benefits of technology

It improves the accuracy of visual positioning in complex lighting environments and under changing viewing angles and field of view conditions, reduces storage requirements, and adapts to precise positioning in environments with varying viewing angles and viewing distances.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120894419B_ABST
    Figure CN120894419B_ABST
Patent Text Reader

Abstract

The application relates to a nested identification design and visual positioning method for target alignment in a complex scene, which comprises nested positioning identification design, concentric circle visual detection positioning and two-dimensional code visual detection positioning. First, an outer positioning identification is designed in a mode of eccentric nesting of two concentric circles with different sizes, and an inner positioning identification is designed in a mode of nested two-dimensional codes. Second, an ellipse detection method based on arc segment detection classification is adopted to obtain a target ellipse set, a concentric ellipse constraint is designed to obtain a target concentric ellipse set, concentric circle center projection point positioning is carried out, and identification positioning calculation is realized. Finally, a target two-dimensional code is detected, an improved EPnP pose calculation method is adopted, and nested two-dimensional code pose calculation is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of visual positioning, specifically to a nested identifier design and visual positioning method for target alignment in complex scenarios. Background Technology

[0002] Visual positioning technology has important applications in autonomous landing of UAVs and robot navigation. However, common problems in existing technologies include poor adaptability to dynamic environments and low efficiency. This invention innovatively designs a cooperative identifier that integrates nested geometric shapes and QR codes, and proposes a two-stage visual relative positioning method for nested cooperative identifiers, achieving accurate positioning in environments with varying viewing angles and line-of-sight.

[0003] Currently, traditional visual positioning technologies include 2D image-based visual positioning, point cloud map-based visual positioning, and hierarchical visual positioning. 2D image-based visual positioning uses database images with absolute pose labels to retrieve nearest neighbor images and estimates the pose of the query image based on these labels. Point cloud map-based visual positioning constructs sparse point cloud maps using techniques such as SfM, establishes 2D-3D matching between the query image and the point cloud, and uses a geometry solver to estimate the camera pose. Hierarchical visual positioning narrows the search range through image retrieval and establishes matches within local point clouds, improving efficiency and accuracy. While these methods perform well in certain situations, they all suffer from significant storage limitations. For example, Chinese invention patent CN119772891A requires capturing images of the target from multiple perspectives and necessitates deep learning model processing, placing a huge storage burden on the operating device. Summary of the Invention

[0004] The purpose of this invention is to innovate in response to the defects and problems in the background technology, and to propose a nested label design and visual positioning method for target alignment in complex scenarios, which aims to overcome the problems of insufficient positioning accuracy and low efficiency in environments with varying viewing angles and viewing distances.

[0005] To achieve the above objectives, the technical solution adopted by the present invention is as follows:

[0006] This invention provides a nested identifier design and visual positioning method for target alignment in complex scenarios, specifically including a nested positioning identifier design method, a concentric circle visual detection positioning method, and a QR code visual detection positioning method:

[0007] The nested positioning identifier design method uses concentric outer and inner positioning identifiers, and includes the following design steps:

[0008] Step 1: Outer positioning mark design: The outer positioning mark is composed of two concentric circles of different sizes nested eccentrically. The outer and inner circles of the larger concentric circle are different colors, and its center is the positioning center of the nested positioning mark, used to determine the spatial position of the nested positioning mark; the smaller concentric circle is nested eccentrically between the outer and inner circles of the larger concentric circle, and the outer and inner circles of the smaller concentric circle are different colors. Its center is the yaw angle auxiliary point used to determine the yaw angle of the nested positioning mark.

[0009] Step 2: Inner positioning mark design: The inner positioning mark adopts a nested QR code method. The small QR code is nested in the white square in the center of the large QR code, and the centers of both the large and small QR codes coincide with the center of the nested positioning mark. After nesting, the white area in the white square in the center of the large QR code accounts for more than one-half.

[0010] The concentric circle visual detection and positioning method determines the position of the nested positioning marker by detecting the center of the large concentric circle, and determines the yaw angle of the nested positioning marker by detecting the line connecting the center of the small concentric circle and the center of the large concentric circle. Specifically, it includes the following steps:

[0011] Step 3: Target Ellipse Detection: Use a monocular camera to acquire the marker image with nested positioning markers. For elliptical targets that may exist in the marker image, use an ellipse detection method based on arc segment detection and classification to detect the elliptical targets in the marker image and obtain the target ellipse set.

[0012] Step 4: Detection of concentric ellipse set: Design concentric ellipse constraints, detect concentric ellipses in the target ellipse set, and obtain the target concentric ellipse set composed of large and small concentric ellipses.

[0013] Step 5: Locating the projection points of the concentric circles: For each concentric ellipse in the target set of concentric ellipses, a recursive positioning method based on projection invariants is used to locate the projection points of the concentric circles in the pixel coordinate system to obtain the pixel coordinates of the projection points of the large and small concentric circles in the pixel coordinate system.

[0014] Step 6: Identifier Positioning Calculation: Based on the pixel coordinates of the projection points of the centers of the large and small concentric circles, and combining the distance information between the monocular camera imaging model and the nested positioning identifiers, calculate the 3D position coordinates of the nested positioning identifiers in the camera coordinate system.

[0015]

[0016] In the formula , , These represent the three-dimensional position coordinates of the nested positioning identifier in the camera coordinate system. The nested positioning identifier is the pixel coordinate of the positioning center. This represents the distance between the monocular camera and the nested positioning markers. For camera intrinsic parameter matrix; yaw angle of nested positioning markers for

[0017]

[0018] In the formula The center of the concentric circle pixel coordinates, The center of the small concentric circles pixel coordinates, for and In pixel coordinate system The difference between the coordinates of the axes, for and In pixel coordinate system The difference between the coordinates of the axes;

[0019] The QR code visual detection and positioning method includes the following steps:

[0020] Step 7: Target QR Code Detection: Using a monocular camera, acquire the original image of the nested positioning markers. Apply the Otsu algorithm to threshold segmentation of the original image to obtain a binary image. Perform contour detection on the binary image to obtain an image containing all contour information. Apply the Douglas-Peucker algorithm to the image containing all contour information to perform quadrilateral fitting, obtaining the QR code quadrilateral. Apply perspective transformation to the four corner points of the QR code quadrilateral to obtain the front view of the QR code, and then use the Otsu algorithm to achieve a frontal view. Figure 2 Value-encode the QR code and obtain its ID number according to the encoding rules. For the QR code with this ID number, adjust the corner points according to the orientation of the front view of the QR code matched in the preset dictionary to obtain the pixel coordinates of the four corner points of the QR code.

[0021] Step 8: Nested QR code selection: For the detected QR codes, set different pose calculation priorities: If multiple QR codes are detected, prioritize the pixel coordinates of the four corner points of the outer QR code for pose calculation;

[0022] Step 9: Nested QR code pose calculation: For the pixel coordinates of the four corner points of the QR code, the improved EPnP pose calculation method is used to calculate the three-dimensional position coordinates and yaw angle of the nested positioning mark in the camera coordinate system.

[0023] Preferably, the ellipse detection method based on arc segment detection and classification in step 3 specifically includes the following steps:

[0024] Step 3.1: Image preprocessing: For the nested positioning tag image acquired by the monocular camera, the image is converted to the HSV color model, and an image mask is created to extract specific color regions in the image. Then, the image is converted to grayscale and Gaussian filtering is performed to complete the image preprocessing and obtain the preprocessed image.

[0025] Step 3.2: Arc Segment Extraction: For the preprocessed image, the Canny edge detection algorithm is used to obtain edge information and generate an edge point set. ,in, For the first The pixel coordinates of each edge point They are the first Gradients at each edge point in the horizontal and vertical directions are discarded, with gradients along the vertical direction excluded. or horizontal direction The edge points are obtained by identifying the edge points; according to... The sign of the gradient direction at the edge points. Represented as:

[0026]

[0027] Edge points of the same category are connected by 8 neighbors to obtain arc segments. In the arc segments, edge points are sorted in ascending order according to pixel coordinate X. If the X coordinates are the same, the Y coordinates are sorted according to the positive or negative gradient direction. Points with positive gradient direction are arranged in descending order of Y axis, and points with negative gradient direction are arranged in ascending order of Y axis. The elliptical candidate arc segment extraction is completed, and the initial arc segment set is obtained.

[0028] Step 3.3: Removal of Interference Arcs: Based on the geometric characteristics of the arcs, interference arcs are removed. First, a threshold for the number of edge points of the arcs is set. First, arc segments with fewer than a certain threshold edge points are removed; second, an interference arc segment removal method based on high aspect ratio is adopted; set points and The two endpoints of the arc segment have pixel coordinates as follows: , ,point The midpoint of the arc edge point to the line segment The point of maximum distance, line segment The length is ,point to line segment The length is Then the height-to-length ratio of the arc segment for:

[0029]

[0030] Set the arc height-to-length ratio threshold. If the arc length ratio Greater than the threshold If the arc segment is true, then it is considered a true arc segment; otherwise, it is considered an interference arc segment and deleted. Traverse all arc segments in the initial arc segment set, remove interference arc segments, and obtain the ellipse candidate arc segment set.

[0031] Step 3.4: Elliptical Candidate Arc Segment Classification: Define the positive or negative sign of the arc segment based on the gradient direction of all edge points. for:

[0032]

[0033] Setting points The point is the midpoint of the line connecting the endpoints of the arc segment. On the arc segment and the point Edge points with the same x-coordinate; definition Describe the concavity / convexity of the arc segment:

[0034]

[0035] In the formula, Indicates a convex arc. Indicates a concave arc. They are points ,point The ordinate;

[0036] The arc segments in the candidate arc segment set of the ellipse are classified according to their positive or negative sign. and unevenness The arc segment is divided into , , , Four types:

[0037]

[0038] The four types correspond to the four quadrants, completing the classification of elliptical candidate arc segments and obtaining four sets of elliptical candidate arc segments;

[0039] Step 3.5: Ellipse Candidate Arc Segment Group Screening: Traverse and select from the four types of ellipse candidate arc segment sets, selecting one arc segment from each type of ellipse candidate arc segment set to form an arc segment group, thus obtaining an arc segment group set; traverse and select each arc segment group in the arc segment group set, and sequentially determine whether it satisfies the three constraints of relative position constraint, polarity constraint, and ellipse center position constraint. The arc segment group that satisfies the three constraints is the ellipse candidate arc segment group, thus obtaining the ellipse candidate arc segment group set;

[0040] The relative position constraint for:

[0041]

[0042] In the formula, express The X-axis coordinate of the left endpoint of the arc-like segment. express The Y-axis coordinate of the right endpoint of the arc-like segment. express The Y-axis coordinate of the left endpoint of the arc-like segment. express The X-axis coordinate of the right endpoint of the arc-like segment. express The Y-axis coordinate of the left endpoint of the arc-like segment. express The X-axis coordinate of the right endpoint of the arc-like segment. express The X-axis coordinate of the left endpoint of the arc-like segment. express The Y-axis coordinate of the right endpoint of the arc-like segment. The relative position threshold, This indicates that the constraint is satisfied. This indicates that the constraint is not satisfied;

[0043] The polarity constraint is:

[0044]

[0045] In the formula, express , , , Four types of arc segments, Represents arc segment The polarity of is defined by the following formula:

[0046]

[0047] In the formula, For arc segment The midpoint, The midpoint of the line connecting the endpoints of the arc segment. For point The gradient direction vector, For point arrive ;

[0048] The position constraint of the ellipse center is:

[0049]

[0050] In the formula, and These are the coordinates of the ellipse center fitted by two arc pairs consisting of three arc segments. The threshold distance to the center of the ellipse;

[0051] Step 3.6: Ellipse Parameter Fitting: Perform ellipse parameter fitting for each ellipse candidate arc segment group in the ellipse candidate arc segment group set. The ellipse parameters mainly include: the ellipse center. Long half shaft short half shaft and the angle of inclination of the ellipse Remove the shortest arc segment from the candidate arc segment group of the ellipse, and form arc pairs by pairwise fitting of the remaining three arc segments; for each arc pair, use the parallel chord theorem to determine the center of the ellipse, and calculate other ellipse parameters based on the geometric relationship between the points on the arc segment and the center of the ellipse to obtain candidate ellipses; complete the ellipse parameter fitting of all candidate arc segment groups of the ellipse to obtain a set of candidate ellipses.

[0052] Step 3.7: Ellipse Post-processing: For the candidate ellipse set, an ellipse post-processing method based on verification and clustering is adopted, and an ellipse verification index is designed; the ratio of the number of points contained in the candidate arc segment group of the ellipse to the total number of points is used. Indicating the accuracy of candidate ellipses

[0053]

[0054] In the formula, This indicates the number of points in the candidate arc segment group of the ellipse that lie on the corresponding candidate ellipse. Let represent the number of points in the four arc segments of the candidate arc segment group of the ellipse; if Less than the set threshold If the ellipse is of low quality, it is removed; the candidate ellipse set is traversed, low-quality ellipses are removed, and the remaining candidate ellipses are sorted in descending order of accuracy score to obtain the verified candidate ellipse set; for any two candidate ellipses, their ellipse parameters are... ,in The coordinates of the center of the ellipse are: They are the long half-axis and the short half-axis, respectively. To determine the similarity of five ellipse parameters for the ellipse's tilt angle, a similarity test is designed.

[0055]

[0056] In the formula , Representing images respectively direction and The sum of pixels along the direction; corresponding to the 5 parameters of the ellipse, setting 5 similarity thresholds. , , , , The final similarity index is:

[0057]

[0058] In the formula If the condition within the curly braces is satisfied, then... A value of 1 indicates that the two ellipses are duplicate ellipses, and the ellipse with the higher accuracy score is retained. For the verified candidate ellipse set, the candidate ellipse with the highest accuracy score is selected as the cluster center, and it is traversed and clustered with the remaining candidate ellipses to remove ellipses that are duplicates of the cluster center. The ellipse with the second highest accuracy score is selected from the remaining candidate ellipses as the new cluster center, and the above operation is repeated. This process is repeated until the ellipse with the lowest accuracy score is selected as the cluster center, and the above operation is repeated. Finally, the target ellipse set with duplicate candidate ellipses is obtained.

[0059] Preferably, in step 4, the concentric ellipse constraint means that the centers of the concentric ellipses are all inside each other's ellipses. Assuming the outer circle of the concentric circles undergoes a projection transformation, the equation of the resulting ellipse is... The center is The equation of the ellipse after the inner circle is projected is: The center is Based on the geometric properties of concentric ellipses—that is, the centers of the two ellipses should be located inside the other ellipse—the determination rule can be expressed as follows:

[0060]

[0061] Preferably, the recursive positioning method for the center projection point of concentric circles based on projection invariants in step 5 specifically includes the following steps:

[0062] Step 5.1: Parameter Initialization: Set the maximum number of recursions to 0. The recursive threshold is ;

[0063] Step 5.2: Selection of Concentric Ellipses and Recursive Center: Iterate through and select a set of concentric ellipses from the target set of concentric ellipses, and use the midpoint of the line connecting the centers of the larger and smaller concentric ellipses as the initial recursive center, denoted as . Recursion number ;

[0064] Step 5.3: Horizontal recursion of the projection point of the circle center: through the recursive circle center Draw a horizontal line intersecting the outer ellipse at point [point missing]. , The inner ellipse intersects at point . , Recursion number Add 1, recursive center The ordinate is inherited from The ordinate is used to calculate the center of the recursive circle according to the harmonic ratio theorem of cross ratios. The x-coordinate is

[0065]

[0066] in , , In the formula , , , Points , , , The x-coordinate;

[0067] Step 5.4: Vertical recursion of the projection point of the circle center: through the recursive circle center Draw a vertical line intersecting the outer ellipse at point [point missing]. , The inner ellipse intersects at point . , Recursion number Add 1, the x-coordinate of the recursive circle center is inherited from The x-axis is used to calculate the center of the recursive circle according to the harmonic ratio theorem of cross ratios. The ordinate is

[0068]

[0069] in , , In the formula , , , Points , , , The ordinate;

[0070] Step 5.5: Determining if the recursion threshold is met: Set the center of the recursion circle. and The distance between the lines is If the distance of the line Less than the recursion threshold Then the recursion ends, and the final recursion center is obtained. Otherwise, proceed to step 5.6.

[0071] Step 5.6: Determine if the recursion count has been reached: If the recursion sequence number... Less than the maximum number of recursions If the result is positive, return to step 5.3; otherwise, end the recursion and obtain the final recursion center. .

[0072] Preferably, step 9, the improved EPnP pose calculation method, uses the result of the EPnP pose calculation method as an initial estimate, and employs the Levenberg-Marquardt algorithm for iterative optimization to obtain the accurate pose. Specifically, it includes the following steps:

[0073] Step 9.1: Initial Pose Estimation: Based on the pixel coordinates of the four corner points of the QR code, the EPnP pose estimation method is used to calculate the QR code pose, obtaining the transformation matrix. This pose estimate is used as the initial pose estimate.

[0074] Step 9.2: Algorithm Initialization: Initialize the transformation matrix of the initial pose estimation. Convert to Lie algebra form, the initial Lie algebra is This is used as the initial value for iteration, and an iteration threshold is set. Initial damping coefficient Damping variation coefficient and maximum number of iterations Initialize the number of iterations =0;

[0075] Step 9.3: Solving for Lie algebra increments: Calculate the reprojection error for each single point. Regarding Lie algebras partial derivatives , Given the identity matrix, we obtain the Lie algebra increment equation.

[0076]

[0077] Solving the above equation yields the Lie algebra increment.

[0078]

[0079] Step 9.4: Lie Algebra Update: Calculate the updated Lie algebra. Number of iterations add;

[0080] Step 9.5: Error Reduction Criterion: Calculate the reprojection error of the updated Lie algebra. And the reprojection error of the original Lie algebra Compare sizes, if If yes, proceed to step 9.6; otherwise, skip to step 9.8.

[0081] Step 9.6: Iteration Threshold Determination: Determine whether the change in reprojection error is less than the iteration threshold. If... Then the result of this iteration will be If the pose estimation is optimal, the iteration ends; otherwise, proceed to step 9.7.

[0082] Step 9.7: Iteration Count Threshold Determination: Determine the number of iterations. Has the maximum number of iterations been reached? If it is not achieved, then... , If the condition remains unchanged, return to step 9.3; if the condition is met, the iteration ends. As the optimal pose estimate;

[0083] Step 9.8: Iteration Threshold Determination: Determine whether the change in reprojection error is less than the iteration threshold. If... Then the result of this iteration will be If the pose estimation is optimal, the iteration ends; otherwise, proceed to step 9.9.

[0084] Step 9.9: Iteration Count Threshold Determination: Determine the number of iterations. Has the maximum number of iterations been reached? If not achieved, then order , Return to step 9.3; if the condition is met, the iteration ends. As the optimal pose estimate.

[0085] The beneficial effects of this invention are:

[0086] This invention innovatively designs a collaborative identifier that integrates nested geometric shapes and QR codes, and proposes a concentric circle visual detection and positioning method and a QR code visual detection and positioning method. When the line-of-sight distance between the monocular camera and the nested positioning identifier is greater than... A concentric circle visual detection and localization method was adopted. This method involved constructing an ellipse detection method based on arc segment detection and classification, and employing a recursive localization method based on the projection invariant of the concentric circle center projection points. Combined with a camera imaging model, this method achieved the marker localization solution. When the line-of-sight between the monocular camera and the nested localization markers is less than... This invention employs QR code detection and recognition algorithms, along with an improved EPNP-LM pose calculation algorithm, to achieve nested QR code pose calculation. This invention improves the accuracy of visual positioning systems under complex lighting environments and changing viewing angles, possessing broad market application prospects and technological promotion value. Attached Figure Description

[0087] Figure 1 This is a system flowchart of the nested identifier design and visual positioning method for target alignment in complex scenarios in this invention.

[0088] Figure 2 This is a schematic diagram of the outer positioning mark of the present invention;

[0089] Figure 3 This is a schematic diagram of the inner layer positioning mark of the present invention;

[0090] Figure 4 This is a schematic diagram illustrating the concavity and convexity of an arc segment;

[0091] Figure 5 A schematic diagram for classifying arc segments;

[0092] Figure 6 This is a flowchart of the elliptical candidate arc segment group screening process of the present invention;

[0093] Figure 7 This is a concentric circle image;

[0094] Figure 8 This is a flowchart illustrating the positioning process of the concentric circle center projection point of the present invention.

[0095] Figure 9 This is a schematic diagram of the QR code detection process of the present invention;

[0096] Figure 10 This is a schematic diagram of the QR code recognition process of the present invention;

[0097] Figure 11 This is a flowchart of the QR code detection and recognition process of the present invention;

[0098] Figure 12 This is a flowchart of the improved EPnP pose calculation method of the present invention. Detailed Implementation

[0099] The present invention will be further described in detail below with reference to the embodiments and accompanying drawings.

[0100] Reference Figure 1 As shown, the nested marker design and visual positioning method for target alignment in complex scenarios in this invention mainly includes three processes: nested positioning marker design, concentric circle visual detection and positioning, and QR code visual detection and positioning. Nested positioning marker design includes outer and inner positioning marker design; concentric circle visual detection and positioning includes target ellipse detection, target concentric ellipse group detection, concentric circle center projection point positioning, and marker positioning calculation; QR code visual detection and positioning includes target QR code detection, nested QR code selection, and nested QR code pose calculation.

[0101] The nested identifier design and visual positioning method for target alignment in complex scenes in this invention specifically includes:

[0102] The nested positioning identifier design method uses concentric outer and inner positioning identifiers, and includes the following design steps:

[0103] Step 1: Outer positioning mark design: The outer positioning mark is composed of two concentric circles of different sizes nested eccentrically. The outer and inner circles of the larger concentric circle are different colors, and its center is the positioning center of the nested positioning mark, used to determine the spatial position of the nested positioning mark; the smaller concentric circle is nested eccentrically between the outer and inner circles of the larger concentric circle, and the outer and inner circles of the smaller concentric circle are different colors. Its center is the yaw angle auxiliary point used to determine the yaw angle of the nested positioning mark.

[0104] Step 2: Inner positioning mark design: The inner positioning mark adopts a nested QR code method. The small QR code is nested in the white square in the center of the large QR code, and the centers of both the large and small QR codes coincide with the center of the nested positioning mark. After nesting, the white area in the white square in the center of the large QR code accounts for more than one-half.

[0105] The concentric circle visual detection and positioning method determines the position of the nested positioning marker by detecting the center of the large concentric circle, and determines the yaw angle of the nested positioning marker by detecting the line connecting the center of the small concentric circle and the center of the large concentric circle. Specifically, it includes the following steps:

[0106] Step 3: Target Ellipse Detection: Use a monocular camera to acquire the marker image with nested positioning markers. For elliptical targets that may exist in the marker image, use an ellipse detection method based on arc segment detection and classification to detect the elliptical targets in the marker image and obtain the target ellipse set.

[0107] Step 4: Detection of concentric ellipse set: Design concentric ellipse constraints, detect concentric ellipses in the target ellipse set, and obtain the target concentric ellipse set composed of large and small concentric ellipses.

[0108] Step 5: Locating the projection points of the concentric circles: For each concentric ellipse in the target set of concentric ellipses, a recursive positioning method based on projection invariants is used to locate the projection points of the concentric circles in the pixel coordinate system to obtain the pixel coordinates of the projection points of the large and small concentric circles in the pixel coordinate system.

[0109] Step 6: Identifier Positioning Calculation: Based on the pixel coordinates of the projection points of the center of the large and small concentric circles, and combined with the distance information of the monocular camera imaging model and the nested positioning identifiers, calculate the three-dimensional position coordinates and yaw angle of the nested positioning identifiers in the camera coordinate system.

[0110] The QR code visual detection and positioning method includes the following steps:

[0111] Step 7: Target QR Code Detection: Using a monocular camera, acquire the original image of the nested positioning markers. Apply the Otsu algorithm to threshold segmentation of the original image to obtain a binary image. Perform contour detection on the binary image to obtain an image containing all contour information. Apply the Douglas-Peucker algorithm to the image containing all contour information to perform quadrilateral fitting, obtaining the QR code quadrilateral. Apply perspective transformation to the four corner points of the QR code quadrilateral to obtain the front view of the QR code, and then use the Otsu algorithm to achieve a frontal view. Figure 2 Value-encode the QR code and obtain its ID number according to the encoding rules. For the QR code with this ID number, adjust the corner points according to the orientation of the front view of the QR code matched in the preset dictionary to obtain the pixel coordinates of the four corner points of the QR code.

[0112] Step 8: Nested QR code selection: For the detected QR codes, set different pose calculation priorities: If multiple QR codes are detected, prioritize the pixel coordinates of the four corner points of the outer QR code for pose calculation;

[0113] Step 9: Nested QR code pose calculation: For the pixel coordinates of the four corner points of the QR code, the improved EPnP pose calculation method is used to calculate the three-dimensional position coordinates and yaw angle of the nested positioning mark in the camera coordinate system.

[0114] First, complete the design of the nested positioning icons. The specific steps are as follows:

[0115] Outer positioning mark design: Refer to Figure 2 The outer positioning marker is composed of two concentric circles of different sizes nested eccentrically. The outer and inner circles of the larger concentric circle are different colors, and its center is the positioning center of the nested positioning marker, used to determine the spatial position of the nested positioning marker. The smaller concentric circle is nested eccentrically between the outer and inner circles of the larger concentric circle. The outer and inner circles of the smaller concentric circle are different colors, and its center is the yaw angle auxiliary point used to determine the yaw angle of the nested positioning marker.

[0116] Inner layer positioning mark design: Refer to Figure 3 The inner positioning identifier uses a nested QR code method, with a small QR code nested inside the white square in the center of the large QR code, and the centers of both the large and small QR codes coincide with the center of the nested positioning identifier. After nesting, the white area inside the white square in the center of the large QR code accounts for more than one-half.

[0117] Then, concentric circle visual detection and localization are performed. The specific steps are as follows:

[0118] Target Ellipse Detection: A monocular camera is used to acquire a marker image containing nested localization markers. For elliptical targets that may exist in the marker image, an ellipse detection method based on arc segment detection and classification is employed to detect the elliptical targets in the marker image, obtaining a set of target ellipses. The ellipse detection method based on arc segment detection and classification specifically includes the following steps:

[0119] 1) Image preprocessing: For the nested positioning marker image acquired by the monocular camera, the image is converted to the HSV color model, and an image mask is created to extract specific color regions in the image. Then, the image is converted to grayscale and Gaussian filtering is performed to complete the image preprocessing and obtain the preprocessed image.

[0120] 2) Arc segment extraction: For the preprocessed image, the Canny edge detection algorithm is used to obtain edge information and generate a set of edge points. ,in, For the first The pixel coordinates of each edge point They are the first Gradients at each edge point in the horizontal and vertical directions are discarded, with gradients along the vertical direction excluded. or horizontal direction The edge points are obtained by identifying the edge points; according to... The sign of the gradient direction at the edge points. Represented as:

[0121]

[0122] Edge points of the same category are connected by 8 neighbors to obtain arc segments. In the arc segments, edge points are sorted in ascending order according to pixel coordinate X. If the X coordinates are the same, the Y coordinates are sorted according to the positive or negative gradient direction. Points with positive gradient direction are arranged in descending order of Y axis, and points with negative gradient direction are arranged in ascending order of Y axis. The elliptical candidate arc segment extraction is completed, and the initial arc segment set is obtained.

[0123] 3) Interference arc segment removal: Interference arc segments are removed based on their geometric characteristics. First, a threshold for the number of edge points of the arc segment is set. First, arc segments with fewer than a certain threshold edge points are removed; second, an interference arc segment removal method based on high aspect ratio is adopted: [The text then abruptly shifts to a different topic:] ...set points... and The two endpoints of the arc segment have pixel coordinates as follows: , ,point The midpoint of the arc edge point to the line segment The point of maximum distance, line segment The length is ,point to line segment The length is Then the height-to-length ratio of the arc segment for:

[0124]

[0125] Set the arc height-to-length ratio threshold. If the arc length ratio Greater than the threshold If the arc segment is true, then it is considered a true arc segment; otherwise, it is considered an interference arc segment and deleted. Traverse all arc segments in the initial arc segment set, remove interference arc segments, and obtain the ellipse candidate arc segment set.

[0126] 4) Ellipse candidate arc segment classification: Define the positive or negative sign of the arc segment based on the positive or negative sign of the gradient direction at all edge points. for:

[0127]

[0128] Reference Figure 4 Connect the two endpoints of the arc to obtain a line segment. ,point For line segments The midpoint, point On the arc segment and the point Edge points with the same x-coordinate Parallel to the Y-axis; definition Describe the concavity / convexity of the arc segment:

[0129]

[0130] In the formula, Indicates a convex arc. Indicates a concave arc. They are points ,point The ordinate;

[0131] The arc segments in the candidate arc segment set of the ellipse are classified according to their positive or negative sign. and unevenness The arc segment is divided into , , , Four types:

[0132]

[0133] The four types correspond to the four quadrants, completing the classification of elliptical candidate arc segments and obtaining four sets of elliptical candidate arc segments, such as... Figure 5 As shown;

[0134] 5) Ellipse candidate arc segment group screening: Refer to Figure 6For the four types of candidate arc segments of an ellipse, we traverse and select one arc segment from each type of candidate arc segment set to form an arc segment group, thus obtaining an arc segment group set. We then traverse and select each arc segment group in the arc segment group set and determine whether it satisfies the three constraints of relative position constraint, polarity constraint, and ellipse center position constraint. The arc segment group that satisfies the three constraints is the ellipse candidate arc segment group, thus obtaining the ellipse candidate arc segment group set.

[0135] The relative position constraint for:

[0136]

[0137] Reference Figure 5 In the formula express The X-axis coordinate of the left endpoint of the arc-like segment. express The Y-axis coordinate of the right endpoint of the arc-like segment. express The Y-axis coordinate of the left endpoint of the arc-like segment. express The X-axis coordinate of the right endpoint of the arc-like segment. express The Y-axis coordinate of the left endpoint of the arc-like segment. express The X-axis coordinate of the right endpoint of the arc-like segment. express The X-axis coordinate of the left endpoint of the arc-like segment. express The Y-axis coordinate of the right endpoint of the arc-like segment. The relative position threshold, This indicates that the constraint is satisfied. This indicates that the constraint is not satisfied;

[0138] The polarity constraint is:

[0139]

[0140] In the formula, express , , , Four types of arc segments, Represents arc segment The polarity of is defined by the following formula:

[0141]

[0142] In the formula, For arc segment The midpoint, The midpoint of the line connecting the endpoints of the arc segment. For point The gradient direction vector, For point arrive ;

[0143] The position constraint of the ellipse center is:

[0144]

[0145] In the formula, and These are the coordinates of the ellipse center fitted by two arc pairs consisting of three arc segments. The threshold distance to the center of the ellipse;

[0146] 6) Ellipse parameter fitting: For each candidate ellipse arc segment group in the set of ellipse candidate arc segments, ellipse parameters are fitted. The ellipse parameters mainly include: the center of the ellipse. Long half shaft short half shaft and the angle of inclination of the ellipse Remove the shortest arc segment from the candidate arc segment group of the ellipse, and form arc pairs by pairwise fitting of the remaining three arc segments; for each arc pair, use the parallel chord theorem to determine the center of the ellipse, and calculate other ellipse parameters based on the geometric relationship between the points on the arc segment and the center of the ellipse to obtain candidate ellipses; complete the ellipse parameter fitting of all candidate arc segment groups of the ellipse to obtain a set of candidate ellipses.

[0147] 7) Ellipse Post-processing: For the candidate ellipse set, an ellipse post-processing method based on verification and clustering is adopted. An ellipse verification index is designed: the ratio of the number of points contained in the candidate arc segment group of the ellipse to the total number of points. Indicating the accuracy of candidate ellipses

[0148]

[0149] In the formula, This indicates the number of points in the candidate arc segment group of the ellipse that lie on the corresponding candidate ellipse. Let represent the number of points in the four arc segments of the candidate arc segment group of the ellipse; if Less than the set threshold If the ellipse is of low quality, it is removed; the candidate ellipse set is traversed, low-quality ellipses are removed, and the remaining candidate ellipses are sorted in descending order of accuracy score to obtain the verified candidate ellipse set; for any two candidate ellipses, their ellipse parameters are... ,in The coordinates of the center of the ellipse are: They are the long half-axis and the short half-axis, respectively. To determine the similarity of five ellipse parameters for the ellipse's tilt angle, a similarity test is designed.

[0150]

[0151] In the formula , Representing images respectively direction and The sum of pixels along the direction; corresponding to the 5 parameters of the ellipse, setting 5 similarity thresholds. , , , , The final similarity index is:

[0152]

[0153] In the formula If the condition within the curly braces is satisfied, then... A value of 1 indicates that the two ellipses are duplicate ellipses, and the ellipse with the higher accuracy score is retained. For the verified candidate ellipse set, the candidate ellipse with the highest accuracy score is selected as the cluster center, and it is traversed and clustered with the remaining candidate ellipses to remove ellipses that are duplicates of the cluster center. The ellipse with the second highest accuracy score is selected from the remaining candidate ellipses as the new cluster center, and the above operation is repeated. This process is repeated until the ellipse with the lowest accuracy score is selected as the cluster center, and the above operation is repeated. Finally, the target ellipse set with duplicate candidate ellipses is obtained.

[0154] Target concentric ellipse set detection: A concentric ellipse constraint is designed. For a target ellipse set, concentric ellipses within the set are detected, resulting in a target concentric ellipse set composed of large and small concentric ellipses. The concentric ellipse constraint requires that the centers of concentric ellipses lie within each other's ellipses. Assume the equation of the ellipse obtained after projection transformation of the outer circles of the concentric circles is... The center is The equation of the ellipse after the inner circle is projected is: The center is Based on the geometric properties of concentric ellipses—that is, the centers of the two ellipses should be located inside the other ellipse—the determination rule can be expressed as follows:

[0155]

[0156] Concentric circle center projection point localization: For each concentric ellipse in the target set of concentric ellipses, a recursive localization method based on projection invariants is used to obtain the pixel coordinates of the large and small concentric circle center projection points in the pixel coordinate system. The recursive localization method based on projection invariants specifically includes the following steps:

[0157] 1) Parameter initialization: Set the maximum number of recursions to 0. The recursive threshold is ;

[0158] 2) Selection of Concentric Ellipses and Recursive Center: Iterate through and select a set of concentric ellipses from the target set of concentric ellipses, and use the midpoint of the line connecting the centers of the larger and smaller concentric ellipses as the initial recursive center, denoted as . Recursion number ;

[0159] 3) Horizontal recursion of the projection point of the center of the circle: through the center of the recursive circle Draw a horizontal line intersecting the outer ellipse at point [point missing]. , The inner ellipse intersects at point . , (like Figure 7 (as shown), recursion sequence number Add 1, recursive center The ordinate is inherited from The ordinate is used to calculate the center of the recursive circle according to the harmonic ratio theorem of cross ratios. The x-coordinate is

[0160]

[0161] in , , In the formula , , , Points , , , The x-coordinate;

[0162] 4) Vertical recursion of the projection point of the center of the circle: through the center of the recursive circle Draw a vertical line intersecting the outer ellipse at point [point missing]. , The inner ellipse intersects at point . , Recursion number Add 1, the x-coordinate of the recursive circle center is inherited from The x-axis is used to calculate the center of the recursive circle according to the harmonic ratio theorem of cross ratios. The ordinate is

[0163]

[0164] in , , In the formula , , , Points , , , The ordinate;

[0165] 5) Determining if the recursion threshold is reached: Set the center of the recursion circle. and The distance between the lines is If the distance of the line Less than the recursion threshold Then the recursion ends, and the final recursion center is obtained. Otherwise proceed to step 6).

[0166] 6) Determining if the recursion count is reached: If the recursion sequence number is... Less than the maximum number of recursions If the result is positive, return to step 3); otherwise, end the recursion and obtain the final recursion center. .

[0167] The entire process of locating the center projection point of the concentric circles is as follows: Figure 8 As shown.

[0168] Identifier localization calculation: Based on the pixel coordinates of the projection points of the centers of the large and small concentric circles, and combining the distance information between the monocular camera imaging model and the nested localization identifiers, the 3D position coordinates of the nested localization identifiers in the camera coordinate system are calculated.

[0169]

[0170] In the formula , , These represent the three-dimensional position coordinates of the nested positioning identifier in the camera coordinate system. The nested positioning identifier is the pixel coordinate of the positioning center. This represents the distance between the monocular camera and the nested positioning markers. For camera intrinsic parameter matrix; yaw angle of nested positioning markers for

[0171]

[0172] In the formula The center of the concentric circle pixel coordinates, The center of the small concentric circles pixel coordinates, for and In pixel coordinate system The difference between the coordinates of the axes, for and In pixel coordinate system The difference between the coordinates of the axes.

[0173] Finally, the QR code is visually detected and located, which includes the following steps:

[0174] Target QR code detection and recognition: A monocular camera is used to acquire the original image containing nested positioning markers. The Otsu algorithm is used for threshold segmentation of the original image to obtain a binary image. Contour detection is then performed on the binary image to obtain an image containing all contour information. Finally, the Douglas-Peucker algorithm is used to fit a quadrilateral to the image containing all contour information, obtaining the quadrilateral of the QR code. The QR code detection process is as follows: Figure 9 As shown; perspective transformation is applied to the four corners of the QR code quadrilateral to obtain the front view of the QR code, and the Otsu algorithm is used to realize the frontal view. Figure 2 Value-based encoding is performed to obtain the QR code's ID number according to the encoding rules. For the QR code with this ID number, the corner points are adjusted according to the orientation of the front view of the QR code matched in the preset dictionary to obtain the pixel coordinates of the four corner points of the QR code. The QR code recognition process is as follows. Figure 10 As shown. The entire QR code detection and recognition process is as follows. Figure 11 As shown;

[0175] Nested QR code selection: For the detected QR codes, different pose calculation priorities are set: If multiple QR codes are detected, the pixel coordinates of the four corner points of the outermost QR code are selected first for pose calculation.

[0176] Nested QR code pose calculation: For the pixel coordinates of the four corner points of the QR code, an improved EPnP pose calculation method is used to calculate the pose of the nested positioning marker in the camera coordinate system. The improved EPnP pose calculation method uses the result as an initial estimate, and the Levenberg-Marquardt algorithm is used for iterative optimization to obtain the accurate pose. (Refer to...) Figure 12 Specifically, it includes the following steps:

[0177] 1) Initial pose estimation: For the pixel coordinates of the four corner points of the QR code, the EPnP pose estimation method is used to calculate the QR code pose and obtain the transformation matrix. This pose estimate is used as the initial pose estimate.

[0178] 2) Algorithm initialization: Initialize the transformation matrix of the initial pose estimation. Convert to Lie algebra form, the initial Lie algebra is This is used as the initial value for iteration, and an iteration threshold is set. Initial damping coefficient Damping variation coefficient and maximum number of iterations Initialize the number of iterations =0;

[0179] 3) Solving for Lie algebra increments: Calculating the reprojection error for each single point. Regarding Lie algebras partial derivatives , Given the identity matrix, we obtain the Lie algebra increment equation.

[0180]

[0181] Solving the above equation yields the Lie algebra increment.

[0182]

[0183] 4) Lie algebra update: Calculate the updated Lie algebra. Number of iterations Add 1;

[0184] 5) Error reduction criterion: Calculate the reprojection error of the updated Lie algebra. And the reprojection error of the original Lie algebra Compare sizes, if If yes, proceed to step 6); otherwise, skip to step 8).

[0185] 6) Iteration Threshold Determination: Determine if the change in reprojection error is less than the iteration threshold. Then the result of this iteration will be If the pose estimation is optimal, the iteration ends; otherwise, proceed to step 7).

[0186] 7) Iteration Count Threshold Determination: Determine the number of iterations. Has the maximum number of iterations been reached? If it is not achieved, then... , (If the condition remains unchanged, return to step 3); if the condition is met, the iteration ends. As the optimal pose estimate;

[0187] 8) Iteration Threshold Determination: Determine if the change in reprojection error is less than the iteration threshold. Then the result of this iteration will be If the pose estimation is optimal, the iteration ends; otherwise, proceed to step 9).

[0188] 9) Iteration Count Threshold Determination: Determine the number of iterations. Has the maximum number of iterations been reached? If not achieved, then order , (Return to step 3); if the condition is met, the iteration ends. As the optimal pose estimate.

[0189] The above describes in detail specific implementation examples of the present invention. The present invention has many specific applications. The above description is only a preferred embodiment of the present invention. It should be noted that for those skilled in the art, several improvements can be made without departing from the principle of the present invention, and these improvements should also be considered within the scope of protection of the present invention.

Claims

1. A nested identifier design and visual positioning method for target alignment in complex scenes, characterized in that... This includes nested positioning marker design methods, concentric circle visual inspection and positioning methods, and QR code visual inspection and positioning methods; when the line-of-sight between the monocular camera and the nested positioning marker is greater than... At that time, a concentric circle visual detection and positioning method was used to detect the position and yaw angle of the nested positioning markers; Otherwise, a QR code visual detection and positioning method is used to detect the position and yaw angle of the nested positioning markers; The nested positioning identifier design method uses concentric outer and inner positioning identifiers, and includes the following design steps: Step 1: Outer positioning mark design: The outer positioning mark is composed of two concentric circles of different sizes nested eccentrically. The outer and inner circles of the larger concentric circle are different colors, and its center is the positioning center of the nested positioning mark, used to determine the spatial position of the nested positioning mark; the smaller concentric circle is nested eccentrically between the outer and inner circles of the larger concentric circle, and the outer and inner circles of the smaller concentric circle are different colors. Its center is the yaw angle auxiliary point used to determine the yaw angle of the nested positioning mark. Step 2: Inner positioning mark design: The inner positioning mark adopts a nested QR code method. The small QR code is nested in the white square in the center of the large QR code, and the centers of both the large and small QR codes coincide with the center of the nested positioning mark. After nesting, the white area in the white square in the center of the large QR code accounts for more than one-half. The concentric circle visual detection and positioning method determines the position of the nested positioning marker by detecting the center of the large concentric circle, and determines the yaw angle of the nested positioning marker by detecting the line connecting the center of the small concentric circle and the center of the large concentric circle. Specifically, it includes the following steps: Step 3: Target Ellipse Detection: Use a monocular camera to acquire the marker image with nested positioning markers. For elliptical targets that may exist in the marker image, use an ellipse detection method based on arc segment detection and classification to detect the elliptical targets in the marker image and obtain the target ellipse set. Step 4: Detection of concentric ellipse set: Design concentric ellipse constraints, detect concentric ellipses in the target ellipse set, and obtain the target concentric ellipse set composed of large and small concentric ellipses. Step 5: Locating the projection points of the concentric circles: For each concentric ellipse in the target set of concentric ellipses, a recursive positioning method based on projection invariants is used to locate the projection points of the concentric circles in the pixel coordinate system to obtain the pixel coordinates of the projection points of the large and small concentric circles in the pixel coordinate system. Step 6: Identifier Positioning Calculation: Based on the pixel coordinates of the projection points of the centers of the large and small concentric circles, and combining the distance information between the monocular camera imaging model and the nested positioning identifiers, calculate the 3D position coordinates of the nested positioning identifiers in the camera coordinate system. In the formula , , These represent the three-dimensional position coordinates of the nested positioning identifier in the camera coordinate system. The nested positioning identifier is the pixel coordinate of the positioning center. This represents the distance between the monocular camera and the nested positioning markers. This is the camera intrinsic parameter matrix; Yaw angle of nested positioning markers for In the formula The center of the concentric circle pixel coordinates, The center of the small concentric circles pixel coordinates, for and In pixel coordinate system The difference between the coordinates of the axes, for and In pixel coordinate system The difference between the coordinates of the axes; The QR code visual detection and positioning method includes the following steps: Step 7: Target QR Code Detection: Acquire the original image of the nested positioning marker using a monocular camera. Perform threshold segmentation on the original image using the Otsu algorithm to obtain a binary image. Perform contour detection on the binary image to obtain an image containing all contour information. Perform quadrilateral fitting on the image containing all contour information to obtain the QR code quadrilateral. Perform perspective transformation on the four corner points of the QR code quadrilateral to obtain the front view of the QR code, and perform binarization of the front view using the Otsu algorithm. Obtain the QR code ID number according to the encoding rules. For the QR code with this ID number, adjust the corner point arrangement according to the front view direction of the QR code matched in the preset dictionary to obtain the pixel coordinates of the four corner points of the QR code. Step 8: Nested QR code selection: For the detected QR codes, set different pose calculation priorities: If multiple QR codes are detected, prioritize the pixel coordinates of the four corner points of the outer QR code for pose calculation; Step 9: Nested QR code pose calculation: For the pixel coordinates of the four corner points of the QR code, the improved EPnP pose calculation method is used to calculate the three-dimensional position coordinates and yaw angle of the nested positioning mark in the camera coordinate system.

2. The nested identifier design and visual positioning method for target alignment in complex scenes according to claim 1, characterized in that... The ellipse detection method based on arc segment detection and classification specifically includes the following steps: Step 3.1: Image preprocessing: For the nested positioning tag image acquired by the monocular camera, the image is converted to the HSV color model, and an image mask is created to extract specific color regions in the image. Then, the image is converted to grayscale and Gaussian filtering is performed to complete the image preprocessing and obtain the preprocessed image. Step 3.2: Arc Segment Extraction: For the preprocessed image, the Canny edge detection algorithm is used to obtain edge information and generate an edge point set. ,in, For the first The pixel coordinates of each edge point They are the first Gradients at each edge point in the horizontal and vertical directions are discarded, with gradients along the vertical direction excluded. or horizontal direction The edge points are obtained by identifying the edge points; according to... The sign of the gradient direction at the edge points. Represented as: Edge points of the same category are connected by 8 neighbors to obtain arc segments. In the arc segments, edge points are sorted in ascending order according to pixel coordinate X. If the X coordinates are the same, the Y coordinates are sorted according to the positive or negative gradient direction. Points with positive gradient direction are arranged in descending order of Y axis, and points with negative gradient direction are arranged in ascending order of Y axis. The elliptical candidate arc segment extraction is completed, and the initial arc segment set is obtained. Step 3.3: Removal of Interference Arcs: Based on the geometric characteristics of the arcs, interference arcs are removed. First, a threshold for the number of edge points of the arcs is set. First, arc segments with fewer than a certain threshold edge points are removed; second, an interference arc segment removal method based on high aspect ratio is adopted: [The text then abruptly shifts to a different topic:] ...set points... and The two endpoints of the arc segment have pixel coordinates as follows: , ,point The midpoint of the arc edge point to the line segment The point of maximum distance, line segment The length is ,point to line segment The length is Then the height-to-length ratio of the arc segment for: Set the arc height-to-length ratio threshold. If the arc length ratio Greater than the threshold If the arc segment is true, then it is considered a true arc segment; otherwise, it is considered an interference arc segment and deleted. Traverse all arc segments in the initial arc segment set, remove interference arc segments, and obtain the ellipse candidate arc segment set. Step 3.4: Elliptical Candidate Arc Segment Classification: Define the positive or negative sign of the arc segment based on the gradient direction of all edge points. for: Setting points The point is the midpoint of the line connecting the endpoints of the arc segment. On the arc segment and the point Edge points with the same x-coordinate; definition Describe the concavity / convexity of the arc segment: In the formula, Indicates a convex arc. Indicates a concave arc. They are points ,point The ordinate; The arc segments in the candidate arc segment set of the ellipse are classified according to their positive or negative sign. and unevenness The arc segment is divided into , , , Four types: The four types correspond to the four quadrants, completing the classification of elliptical candidate arc segments and obtaining four sets of elliptical candidate arc segments; Step 3.5: Ellipse Candidate Arc Segment Group Screening: Traverse and select from the four types of ellipse candidate arc segment sets, selecting one arc segment from each type of ellipse candidate arc segment set to form an arc segment group, thus obtaining an arc segment group set; traverse and select each arc segment group in the arc segment group set, and sequentially determine whether it satisfies the three constraints of relative position constraint, polarity constraint, and ellipse center position constraint. The arc segment group that satisfies the three constraints is the ellipse candidate arc segment group, thus obtaining the ellipse candidate arc segment group set; The relative position constraint for: In the formula, express The X-axis coordinate of the left endpoint of the arc-like segment. express The Y-axis coordinate of the right endpoint of the arc-like segment. express The Y-axis coordinate of the left endpoint of the arc-like segment. express The X-axis coordinate of the right endpoint of the arc-like segment. express The Y-axis coordinate of the left endpoint of the arc-like segment. express The X-axis coordinate of the right endpoint of the arc-like segment. express The X-axis coordinate of the left endpoint of the arc-like segment. express The Y-axis coordinate of the right endpoint of the arc-like segment. The relative position threshold, This indicates that the constraint is satisfied. This indicates that the constraint is not satisfied; The polarity constraint is: In the formula, express , , , Four types of arc segments, Represents arc segment The polarity of is defined by the following formula: In the formula, For arc segment The midpoint, The midpoint of the line connecting the endpoints of the arc segment. For point The gradient direction vector, For point arrive ; The position constraint of the ellipse center is: In the formula, and These are the coordinates of the ellipse center fitted by two arc pairs consisting of three arc segments. The threshold distance to the center of the ellipse; Step 3.6: Ellipse Parameter Fitting: Perform ellipse parameter fitting for each ellipse candidate arc segment group in the ellipse candidate arc segment group set. The ellipse parameters mainly include: the ellipse center. Long half shaft short half shaft and the angle of inclination of the ellipse Remove the shortest arc segment from the candidate arc segment group of the ellipse, and form arc pairs by pairwise fitting of the remaining three arc segments; for each arc pair, use the parallel chord theorem to determine the center of the ellipse, and calculate other ellipse parameters based on the geometric relationship between the points on the arc segment and the center of the ellipse to obtain candidate ellipses; complete the ellipse parameter fitting of all candidate arc segment groups of the ellipse to obtain a set of candidate ellipses. Step 3.7: Ellipse Post-processing: For the candidate ellipse set, an ellipse post-processing method based on verification and clustering is adopted, and an ellipse verification index is designed: the ratio of the number of points contained in the candidate arc segment group of the ellipse to the total number of points. Indicating the accuracy of candidate ellipses In the formula, This indicates the number of points in the candidate arc segment group of the ellipse that lie on the corresponding candidate ellipse. Let represent the number of points in the four arc segments of the candidate arc segment group of the ellipse; if Less than the set threshold If the ellipse is of low quality, it is removed; the candidate ellipse set is traversed, low-quality ellipses are removed, and the remaining candidate ellipses are sorted in descending order of accuracy score to obtain the verified candidate ellipse set; for any two candidate ellipses, their ellipse parameters are... ,in The coordinates of the center of the ellipse are: They are the long half-axis and the short half-axis, respectively. To determine the similarity of five ellipse parameters for the ellipse's tilt angle, a similarity test is designed. In the formula , Representing images respectively direction and The sum of pixels along the direction; corresponding to the 5 parameters of the ellipse, setting 5 similarity thresholds. , , , , The final similarity index is: In the formula If the condition within the curly braces is satisfied, then... A value of 1 indicates that the two ellipses are duplicate ellipses, and the ellipse with the higher accuracy score is retained. For the verified candidate ellipse set, the candidate ellipse with the highest accuracy score is selected as the cluster center, and it is traversed and clustered with the remaining candidate ellipses to remove ellipses that are duplicates of the cluster center. The ellipse with the second highest accuracy score is selected from the remaining candidate ellipses as the new cluster center, and the above operation is repeated. This process is repeated until the ellipse with the lowest accuracy score is selected as the cluster center, and the above operation is repeated. Finally, the target ellipse set with duplicate candidate ellipses is obtained.

3. The nested identifier design and visual positioning method for target alignment in complex scenes according to claim 1, characterized in that... The concentric elliptical constraint means that the centers of the concentric ellipses are all inside each other's ellipses. Assuming the equation of the ellipse obtained after projection transformation of the outer circles of the concentric circles is... The center is The equation of the ellipse after the inner circle is projected is: The center is Based on the geometric properties of concentric ellipses—that is, the centers of the two ellipses should be located inside the other ellipse—the determination rule can be expressed as follows: 。 4. The nested identifier design and visual positioning method for target alignment in complex scenes according to claim 1, characterized in that... The recursive localization method for the center projection point of concentric circles based on projection invariants specifically includes the following steps: Step 5.1: Parameter Initialization: Set the maximum number of recursions to 0. The recursive threshold is ; Step 5.2: Selection of Concentric Ellipses and Recursive Center: Iterate through and select a set of concentric ellipses from the target set of concentric ellipses, and use the midpoint of the line connecting the centers of the larger and smaller concentric ellipses as the initial recursive center, denoted as . Recursion number ; Step 5.3: Horizontal recursion of the projection point of the circle center: through the recursive circle center Draw a horizontal line intersecting the outer ellipse at point [point missing]. , The inner ellipse intersects at point . , Recursion number Add 1, recursive center The ordinate is inherited from The ordinate is used to calculate the center of the recursive circle according to the harmonic ratio theorem of cross ratios. The x-coordinate is in , , In the formula , , , Points , , , The x-coordinate; Step 5.4: Vertical recursion of the projection point of the circle center: through the recursive circle center Draw a vertical line intersecting the outer ellipse at point [point missing]. , The inner ellipse intersects at point . , Recursion number Add 1, the x-coordinate of the recursive circle center is inherited from The x-axis is used to calculate the center of the recursive circle according to the harmonic ratio theorem of cross ratios. The ordinate is in , , In the formula , , , Points , , , The ordinate; Step 5.5: Determining if the recursion threshold is met: Set the center of the recursion circle. and The distance between the lines is If the distance of the line Less than the recursion threshold Then the recursion ends, and the final recursion center is obtained. Otherwise, proceed to step 5.

6. Step 5.6: Determine if the recursion count has been reached: If the recursion sequence number... Less than the maximum number of recursions If the result is positive, return to step 5.3; otherwise, end the recursion and obtain the final recursion center. .

5. The nested identifier design and visual positioning method for target alignment in complex scenes according to claim 1, characterized in that... The improved EPnP pose calculation method uses the result of the EPnP pose calculation method as the initial estimate, and then uses the Levberg-Marquardt algorithm for iterative optimization to obtain the accurate pose. Specifically, it includes the following steps: Step 9.1: Initial Pose Estimation: Based on the pixel coordinates of the four corner points of the QR code, the EPnP pose estimation method is used to calculate the QR code pose, obtaining the transformation matrix. This pose estimate is used as the initial pose estimate. Step 9.2: Algorithm Initialization: Initialize the transformation matrix of the initial pose estimation. Convert to Lie algebra form, the initial Lie algebra is This is used as the initial value for iteration, and an iteration threshold is set. Initial damping coefficient Damping variation coefficient and maximum number of iterations Initialize the number of iterations =0; Step 9.3: Solving for Lie algebra increments: Calculate the reprojection error for each single point. Regarding Lie algebras partial derivatives , Given the identity matrix, we obtain the Lie algebra increment equation. Solving the above equation yields the Lie algebra increment. Step 9.4: Lie Algebra Update: Calculate the updated Lie algebra. Number of iterations Add 1; Step 9.5: Error Reduction Criterion: Calculate the reprojection error of the updated Lie algebra. And the reprojection error of the original Lie algebra Compare sizes, if If yes, proceed to step 9.6; otherwise, skip to step 9.

8. Step 9.6: Iteration Threshold Determination: Determine whether the change in reprojection error is less than the iteration threshold. If... Then the result of this iteration will be If the pose estimation is optimal, the iteration ends; otherwise, proceed to step 9.

7. Step 9.7: Iteration Count Threshold Determination: Determine the number of iterations. Has the maximum number of iterations been reached? If it is not achieved, then... , If the condition remains unchanged, return to step 9.3; if the condition is met, the iteration ends. As the optimal pose estimate; Step 9.8: Iteration Threshold Determination: Determine whether the change in reprojection error is less than the iteration threshold. If... Then the result of this iteration will be If the pose estimation is optimal, the iteration ends; otherwise, proceed to step 9.

9. Step 9.9: Iteration Count Threshold Determination: Determine the number of iterations. Has the maximum number of iterations been reached? If not achieved, then order , Return to step 9.3; if the condition is met, the iteration ends. As the optimal pose estimate.

Citation Information

Patent Citations

  • Spatial heterogeneous visual positioning system of tomato picking robot

    CN119772891A

  • Visual positioning method for precision material transfer platform

    CN107014291A

  • Calibration parameter determination method and apparatus, hybrid calibration board, device, and medium

    WO2024011764A1