Positioner automatic calibration method and device, electronic equipment and storage medium
Patent Information
- Application Number
- CN202611115283.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-27
- Publication Date
- 2026-10-23
AI Technical Summary
[0004]本申请实施例提供了定位仪自动标定方法、装置、电子设备和存储介质,解决了现有定位仪的标定结果精度一致性较差的技术问题
[0004]本申请实施例提供了定位仪自动标定方法、装置、电子设备和存储介质,解决了现有定位仪的标定结果精度一致性较差的技术问题。
Smart Images

Figure CN122966740A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of optical positioning technology, and in particular to automatic calibration methods, devices, electronic equipment, and storage media for positioning instruments. Background Technology
[0002] With the development of technology, in high-end application scenarios such as medical and industrial fields, the system must accurately know the specific coordinates and angles of the target in space. Based on this, near-infrared optical positioning instruments have emerged and are widely used in surgical navigation, industrial precision measurement, robot guidance and other fields.
[0003] In related technologies, operators typically use handheld calibration tools (e.g., a circular calibration point array plate with known precise geometric dimensions) to place the calibration plate at different positions, angles, and distances within the measurement field of view of the positioning instrument. The positioning instrument then captures multiple sets of images of the calibration plate and uses a stereo calibration algorithm to calculate the calibration parameters. This method is highly dependent on manual operation, resulting in poor consistency in the accuracy of the positioning instrument's calibration results. Summary of the Invention
[0004] This application provides an automatic calibration method, apparatus, electronic device, and storage medium for a positioning instrument, which solves the technical problem of poor consistency in the accuracy of calibration results of existing positioning instruments.
[0005] In a first aspect, embodiments of this application provide an automatic calibration method for a positioning device. The automatic calibration method for a positioning device includes: acquiring image data, wherein the image data includes multiple sets of image pairs acquired at each calibration point during the operation of the robotic arm along a preset trajectory, and the preset trajectory is generated based on the longitudinal and lateral distribution of the measurement space of the positioning device and the pose angle of the robotic arm. Based on the calibration plate set on the robotic arm, the correspondence between the pixel coordinates and physical coordinates of the feature points in each image pair is determined, wherein the feature points are determined based on the calibration plate; Based on the correspondence and the initial calibration parameters, the target calibration parameters are obtained, where the initial calibration parameters are the calibration parameters read from the pre-acquired configuration file.
[0006] As described above, after the robotic arm collects image data along a preset trajectory, it determines the correspondence between the pixel coordinates and physical coordinates of the feature points in each image pair based on the calibration plate set on it. Then, combined with the initial calibration parameters, the target calibration parameters are obtained. By replacing manual work with the robotic arm, interference caused by human factors is eliminated. At the same time, the accuracy of the calibration results is comprehensively improved by combining the preset trajectory that uniformly covers the entire planar field of view and depth range.
[0007] The method also includes the following steps before acquiring image data: Multiple test calibration points are selected from the preset trajectory; The robotic arm is controlled to move sequentially to each test calibration point and collect test image data. The test image data includes multiple test image pairs, and each test image pair includes a left test image and a right test image. Extract the first test feature point and the second test feature point corresponding to each pair of test images, wherein the first test feature point is the feature point extracted from the left test image and the second test feature point is the feature point extracted from the right test image. The number of first test feature points and the number of second test feature points for each group of test images are both greater than or equal to the preset minimum feature point threshold and are consistent.
[0008] The acquired image data includes: Send a running command to the robotic arm so that it runs sequentially along the calibration points on the preset trajectory; Poll the robotic arm's operating status information at a preset frequency; Once the robotic arm has been confirmed to have reached the target calibration point, wait for a preset stabilization time, and after the preset stabilization time has been met, collect image data at the target calibration point.
[0009] Each image pair includes a left image and a right image; Based on the calibration plate set on the robotic arm, the correspondence between the pixel coordinates and physical coordinates of the feature points in each image pair is determined, including: Extract the first feature point and the second feature point from each pair of images, where the first feature point is the feature point extracted from the left image and the second feature point is the feature point extracted from the right image. Sub-pixel refinement is performed on the first feature point and the second feature point respectively to obtain the pixel coordinates corresponding to the first feature point and the second feature point. Based on the physical characteristics of the calibration board, the identifiers corresponding to the first feature point and the second feature point are determined, and the physical coordinates corresponding to the first feature point and the second feature point are determined according to the identifiers. By binding the pixel coordinates corresponding to the first feature point, the pixel coordinates corresponding to the second feature point, and the physical coordinates corresponding to the first and second feature points, the correspondence between the pixel coordinates and physical coordinates of the feature points in each image pair is obtained.
[0010] The positioning device includes a left camera and a right camera, and the target calibration parameters include intrinsic and extrinsic parameters. Based on the correspondence and initial calibration parameters, the target calibration parameters are obtained, including: The intrinsic parameters of the left camera are calculated based on the pixel coordinates and physical coordinates corresponding to the first feature point. The intrinsic parameters of the right camera are calculated based on the pixel coordinates and physical coordinates corresponding to the second feature point. Based on the pixel coordinates corresponding to the first feature point, the pixel coordinates corresponding to the second feature point, the physical coordinates corresponding to the first and second feature points, the intrinsic parameters of the left camera, and the intrinsic parameters of the right camera, the extrinsic parameters of the left and right cameras are obtained. Using the initial calibration parameters as initial values, the intrinsic parameters of the left camera, the intrinsic parameters of the right camera, and the extrinsic parameters of the left and right cameras are optimized to obtain the target calibration parameters.
[0011] Specifically, using the initial calibration parameters as initial values, the intrinsic parameters of the left camera, the intrinsic parameters of the right camera, and the extrinsic parameters of both the left and right cameras are optimized to obtain the target calibration parameters, including: Merge the first feature point and the second feature point into a feature point pair; Using the initial calibration parameters as initial values, the pre-constructed objective function is calculated based on the measured pixel coordinates of the feature point pairs and the predicted pixel coordinates corresponding to the current calibration parameters, to obtain the current reprojection error; The objective function is optimized based on the current reprojection error until the preset stopping condition is met, and the target calibration parameters are obtained.
[0012] After obtaining the target calibration parameters based on the correspondence and initial calibration parameters, the method further includes: The target calibration parameters are loaded onto the positioning instrument, and the accuracy verification tool set on the robotic arm is moved into the measurement space of the positioning instrument. Multiple verification calibration point pairs are selected from the measurement space, and the corresponding verification coordinates are collected at each verification calibration point pair; Based on the verification coordinates of each verification calibration point pair, calculate the measurement distance between the two verification calibration points corresponding to the current verification calibration point pair; Based on the measured distance and the standard distance, calculate the error value corresponding to the current verification calibration point pair. The standard distance is the distance between the two verification calibration points corresponding to the current verification calibration point pair determined by the accuracy verification tool. Summarize the error values corresponding to each verification calibration point and calculate multiple error evaluation indicators; If any of the error assessment indicators fails to meet the preset pass threshold, a prompt message is generated. This prompt message is used to remind the operator to fine-tune the target calibration parameters or re-trigger the calibration process.
[0013] Secondly, embodiments of this application provide an automatic calibration device for a positioning instrument. The automatic calibration device for a positioning instrument includes: a data acquisition module for acquiring image data, wherein the image data includes multiple sets of image pairs acquired at each calibration point during the operation of the robotic arm along a preset trajectory, and the preset trajectory is generated based on the longitudinal and lateral distribution of the measurement space of the positioning instrument and the pose angle of the robotic arm. The relationship determination module is used to determine the correspondence between the pixel coordinates and physical coordinates of feature points in each image pair based on a calibration plate set on the robotic arm, wherein the feature points are determined based on the calibration plate. The parameter determination module is used to obtain the target calibration parameters based on the correspondence and the initial calibration parameters, wherein the initial calibration parameters are the calibration parameters read from the pre-acquired configuration file.
[0014] Thirdly, embodiments of this application provide an electronic device, which includes: One or more processors; Memory, used to store one or more computer programs; When one or more computer programs are executed by one or more processors, the electronic device implements the automatic calibration method of the positioning device as described in any of the first aspects.
[0015] Fourthly, embodiments of this application provide a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements an automatic calibration method for a positioning device as described in any of the first aspects. Attached Figure Description
[0016] Figure 1 A flowchart illustrating an automatic calibration method for a positioning device provided in this application embodiment; Figure 2 A flowchart illustrating a preset trajectory generation method provided in this application embodiment; Figure 3 A flowchart illustrating another automatic calibration method for a positioning device provided in this application embodiment; Figure 4 This is a schematic diagram of an automatic calibration device for a positioning instrument provided in an embodiment of this application; Figure 5 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation
[0017] The following description and accompanying drawings fully illustrate specific embodiments of this application to enable those skilled in the art to practice them. The embodiments represent only possible variations. Individual components and functions are optional unless explicitly required, and the order of operation may vary. Parts and features of some embodiments may be included in or replace parts and features of other embodiments. The scope of embodiments of this application includes the entire scope of the claims and all available equivalents of the claims. In this document, each embodiment may be referred to individually or collectively by the term "invention," which is merely for convenience and is not intended to automatically limit the scope of the application to any single invention or inventive concept if more than one invention is disclosed. Relational terms such as "first" and "second" are used herein only to distinguish one entity or operation from another, without requiring or implying any actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed. The various embodiments in this document are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the structures, products, etc., disclosed in the embodiments, since they correspond to the disclosed parts, the descriptions are relatively simple; relevant details can be found in the method section.
[0018] One of the most widely used methods in camera calibration is the Zhang calibration method. Its basic principle is to capture multiple sets of images of a planar calibration board in different poses and then use planar homography constraints to solve for the camera's intrinsic parameters, extrinsic parameters, and distortion coefficients. In practice, operators often prefer comfortable handheld angles and distances, making it difficult to systematically and uniformly cover the entire measurement space and field of view of the positioning instrument. This results in sparse or even missing data in certain areas, leading to insufficient calibration constraints and decreased 3D reconstruction accuracy in those areas.
[0019] Furthermore, Zhang's calibration method uses nonlinear optimization to solve for the parameters, which can easily lead to getting trapped in local optima and thus deteriorating calibration accuracy. When the optimization process converges to a local rather than a global optimum, the calibration parameters are not the optimal estimate of the physical true values, resulting in inconsistent calibration accuracy.
[0020] In implementing the aforementioned technologies, the inventors also discovered that in the manual calibration process, operators find it difficult to determine in real time whether each set of collected data meets the quality requirements. Inconsistent data mixed into the calibration calculations lowers the overall calibration quality, and is difficult to trace and remove afterward. Furthermore, after calibration, additional external measuring equipment is required for accuracy verification, a cumbersome and inefficient process that fails to achieve closed-loop feedback between calibration and verification.
[0021] To address the aforementioned technical problems, and based on an analysis of the underlying causes, the inventors proposed an automatic calibration method for a positioning device. After a robotic arm collects image data along a preset trajectory, it determines the correspondence between the pixel coordinates and physical coordinates of feature points in each image pair using a calibration plate mounted on it. Combined with initial calibration parameters, the target calibration parameters are obtained. By replacing manual labor with a robotic arm, interference from human factors is eliminated. Furthermore, the preset trajectory, which uniformly covers the entire planar field of view and depth, comprehensively improves the accuracy of the calibration results.
[0022] Please refer to Figure 1 This is a flowchart of an automatic calibration method for a positioning device provided in an embodiment of this application. Figure 1 As shown, the automatic calibration method of this positioning device includes, but is not limited to, S101-S103: S101, acquire image data, wherein the image data includes multiple sets of image pairs acquired at each calibration point during the operation of the robotic arm along the preset trajectory, and the preset trajectory is generated based on the longitudinal and lateral distribution of the space measured by the positioning instrument and the pose angle of the robotic arm.
[0023] Among them, the positioning device can refer to a near-infrared optical positioning device, which is a high-precision three-dimensional spatial measurement device based on the principle of binocular stereo vision; the robotic arm refers to a high-precision, repeatable positioning collaborative robot; the measurement space refers to the three-dimensional working area in which the near-infrared optical positioning device can stably identify calibration points and complete three-dimensional coordinate calculations, including the longitudinal depth range and the lateral planar field of view; the longitudinal distribution refers to the layered distribution of the measurement space along the longitudinal depth direction of the optical axis of the positioning device lens, and the lateral distribution refers to the spatial arrangement of the calibration point shooting positions on the horizontal and vertical two-dimensional planes within the same longitudinal distance shooting plane, and the pose angle index calibrator can be arbitrarily marked in the measurement space. The fixed point corresponds to the spatial position, and the robotic arm can accurately maintain the preset angle posture, avoiding calibration constraint errors caused by manual hand-held posture deviation; the preset trajectory refers to the fully automatic motion path planned by the positioning instrument for measuring spatial characteristics and pre-stored in the robotic arm control system; the calibration point refers to the discretely distributed sampling points on the preset trajectory; the image pair refers to a set of near-infrared images generated simultaneously by the left and right near-infrared sensors of the positioning instrument at the same calibration point; the image data refers to the collection of all multiple image pairs acquired at each calibration point in a stable posture during the process of the robotic arm traversing all calibration points along the complete preset trajectory.
[0024] In this embodiment, a preset trajectory is generated to achieve systematic coverage of the entire effective measurement space of the positioning device. Figure 2 A flowchart of a preset trajectory generation method provided in this application embodiment is shown below. Figure 2 As shown, the method includes: S201, Determine the reference range of the measurement space of the positioning instrument.
[0025] In this embodiment, it is first necessary to define the effective measurement space boundary of the near-infrared optical positioning instrument. Taking the center of the measurement space as the origin, the start and end range of the depth (Z-axis) is determined (e.g., 1.5m-2.4m), and the effective coverage boundary of the plane (X / Y axis) is determined by combining the horizontal field of view (HFOV) and vertical field of view (VFOV) of the positioning instrument.
[0026] S202, within a defined depth range, uniformly divide the area along the optical axis into several shooting planes perpendicular to the Z-axis.
[0027] In this embodiment of the application, five depth levels are selected, for example, D1=1.5m, D2=1.725m, D3=1.95m, D4=2.175m, and D5=2.4m. The distance between two adjacent depth levels is set to 0.225m to cover a complete depth of 0.9m.
[0028] S203, on each depth plane, design a single-layer planar nine-square grid of points.
[0029] In this embodiment, on each depth plane, with the center point of the plane as the origin, and combined with the field of view range, 3×3=9 shooting positions are uniformly selected in the horizontal and vertical directions to form a nine-square grid. These 9 points are arranged in spatial order from the upper right to the lower left to ensure that the movement path of the robotic arm is orderly and efficient, while ensuring that the data in the planar field of view achieves systematic and uniform coverage in both the horizontal and vertical directions.
[0030] S204 applies multi-angle attitude constraints to each of the nine grid points.
[0031] In this embodiment, at each of the nine grid points, in order to provide richer constraints for the calibration algorithm, the attitude of the calibration tool set on the robotic arm needs to be adjusted. Moderate variations are applied to the pitch and yaw angles, for example, 0°, ±15°, and ±30°.
[0032] S205, combine the above dimensions to generate a preset trajectory and total number of points.
[0033] In this embodiment, the shooting pose includes: a basic pose, involving 45 basic spatial poses (5 depth levels × 9 planar points); and a final pose, i.e., if each basic pose is further applied with 2 to 3 different angle poses, the total number of shooting points can reach 90 to 135. All points are arranged into an ordered traversal path according to the logic of layer by layer in depth, point by point in the plane, and pose by pose of each point, ensuring a smooth process without skipping points.
[0034] S206 configures motion execution parameters for each calibration point in the preset trajectory.
[0035] In this embodiment, the motion execution parameters may include, but are not limited to: motion type, selecting joint motion (MoveJ) or linear motion (MoveL) according to preset trajectory requirements; speed or acceleration, using higher speed during the transition phase between points to shorten the time consumption, and reducing speed when approaching the target shooting point to improve positioning accuracy; stabilization waiting time, configuring a stabilization waiting time of 0.5s-2s after the robotic arm is in position to eliminate residual vibration; number of frames acquired, triggering the positioning device to continuously acquire a preset number of image data (e.g., 20 frames) after the robotic arm end posture is completely stable, and temporarily storing it in a buffer for subsequent calculations.
[0036] In an optional implementation, before acquiring the image data as described above, the following steps can be taken: multiple test calibration points are selected from a preset trajectory; the robotic arm is controlled to sequentially move to each test calibration point to acquire test image data, wherein the test image data includes multiple test image pairs, each test image pair including a left test image and a right test image; the first test feature point and the second test feature point corresponding to each test image pair are extracted respectively, wherein the first test feature point is the feature point extracted from the left test image, and the second test feature point is the feature point extracted from the right test image; it is determined that the number of the first test feature points and the number of the second test feature points corresponding to each test image pair are both greater than or equal to a preset minimum feature point threshold and are consistent in number.
[0037] Among them, test calibration points refer to spatial points extracted from all calibration points of the preset trajectory, used for image data quality verification. Each test calibration point has independent three-dimensional spatial coordinates and a fixed pose angle; test image data refers to the set of all image samples synchronously captured at each test calibration point after the robotic arm arrives at all test calibration points in sequence; multiple test image pairs refer to several sets of binocular matching image combinations synchronously acquired at a single test calibration point. The left test image refers to the near-infrared image image captured by the near-infrared image sensor on the left side of the near-infrared optical positioning instrument when the robotic arm stops at the test calibration point, and the right image refers to the near-infrared image captured by the near-infrared image sensor on the right side of the near-infrared optical positioning instrument. An external image sensor synchronously triggers the capture of near-infrared images with the left test image, and these images correspond one-to-one with the left test image. The first test feature point refers to the optical calibration point center pixel coordinates obtained from the corresponding left test image using a sub-pixel feature extraction algorithm for a pair of test images. The second test feature point refers to the optical calibration point center pixel coordinates extracted from the corresponding right test image using the same sub-pixel extraction algorithm for the same pair of test images. The preset minimum feature point threshold refers to a pre-configured numerical standard stored in the system control program, representing the minimum number of qualified feature points that can be effectively identified in a single test image.
[0038] In this embodiment, a small number of representative points are first selected from the preset trajectory as test calibration points (for example, only the center points on the nearest distance D1 and the farthest distance D5 planes are selected, a total of 2). The robotic arm moves sequentially to these selected points. After stabilizing in place, it triggers the two near-infrared sensors of the positioning device to simultaneously take pictures, acquiring multiple sets of test image pairs. Each set of image pairs includes a left test image and a right test image (corresponding to the left and right cameras of the binocular vision, respectively). The system uses a sub-pixel feature extraction algorithm to identify the reflective calibration points or luminous points on the calibration board from the left and right test images, respectively, generating two sets of coordinate data: the first test feature point, the calibration point extracted from the left test image; and the second test feature point, the calibration point extracted from the right test image.
[0039] In addition, a dual quality judgment is set up, which means that the following two conditions must be met simultaneously to determine that the pre-check is passed: Condition 1, the number of the first feature points is greater than or equal to the preset minimum feature point threshold, and the number of the second feature points is greater than or equal to the preset minimum feature point threshold. This ensures that the calibration board in the current field of view is not occluded or severely out of focus, providing enough constraint data; Condition 2, the number of the first feature points is consistent with the number of the second feature points. In binocular stereo vision, the calibration points on the left and right images must correspond one-to-one in order to calculate the three-dimensional coordinates through triangulation. If the number of points seen on the left and right are different (for example, 20 points are seen on the left, but only 18 are seen on the right due to occlusion), it indicates that there is occlusion or missed detection. This set of data cannot be used for three-dimensional reconstruction and must be discarded.
[0040] In this embodiment, after passing the aforementioned dual quality assessment, the formal calibration process begins. If either condition is not met, the entire calibration process is automatically paused, and the operator is notified via the interface which specific point or indicator is currently unqualified. Simultaneously, common causes of anomalies are displayed to the operator, including but not limited to: data transmission problems, calibration board cleanliness, lighting conditions, and obstruction issues, thereby shortening troubleshooting time. After receiving the prompt, the operator can choose to redo the pre-check or skip the pre-check and proceed directly to the formal calibration, depending on the nature and severity of the anomaly.
[0041] In one optional implementation, the above-mentioned acquisition of image data may be: sending a running command to the robotic arm so that the robotic arm runs sequentially along the calibration points on the preset trajectory; polling the running status information of the robotic arm at a preset frequency; and, after confirming that the robotic arm has run to the target calibration point, waiting for a preset stabilization time, and after the waiting time meets the preset stabilization time, acquiring image data at the target calibration point.
[0042] Among them, the preset frequency refers to the polling cycle frequency that is pre-configured and fixed by the system, representing the sampling frequency at which the host computer controller periodically reads the robotic arm's operating status information; the operating status information refers to the complete set of motion data that the robotic arm feeds back to the host computer in real time, which may include, but is not limited to: motion status indicators (e.g., in motion, stopped, faulty, and ready), three-dimensional coordinates of the end-effector center point (TCP), angles of each joint, end-effector attitude angle, end-effector jitter offset, positioning judgment flag, and servo stability status; the preset stability duration refers to a fixed waiting time threshold that is pre-set.
[0043] In this embodiment, the host computer sends the coordinates and attitude parameters of the target pose points to the robotic arm controller in the form of instructions according to a preset trajectory (for example, traversing the 9 points of the 9x9 grid in layer D1 and then going to the 9 points of the 9x9 grid in layer D2), triggering it to move to the next target calibration point.
[0044] Furthermore, during the data acquisition phase, the current progress information is dynamically presented to the operator in a visual manner. This may include: a hierarchy, indicating the current position within the five depth planes; a pose number, displaying the specific shooting point within the nine-grid trajectory; and the number of frames acquired, reflecting the amount of image data successfully acquired at the current point. Simultaneously, based on the average time consumed by completed points and the remaining number of points, the system can automatically calculate and estimate how long the entire calibration process will take to complete.
[0045] In this embodiment, after the command is sent, the robotic arm needs a certain amount of time to complete the movement. During this time, the host computer continuously queries the robotic arm for its current status (such as position coordinates, joint angles, movement completion markers, etc.) at a fixed frequency (e.g., 10 times per second). Since the robotic arm may still have slight residual vibrations due to inertia after reaching the target calibration point, the system will wait an additional 0.5s-2s (i.e., the preset stabilization time) until the vibration has sufficiently decayed and the system is completely still before triggering the positioning device to continuously collect N frames (e.g., 20 frames) of image data, which are then temporarily stored in a memory buffer for subsequent processing.
[0046] S102, based on the calibration plate set on the robotic arm, determine the correspondence between the pixel coordinates and physical coordinates of the feature points in each set of images, wherein the feature points are determined based on the calibration plate.
[0047] Among them, the calibration plate refers to the standard target plate carrier integrated and installed on the TCP at the end of the robotic arm. The plate surface has a number of optical markers with known geometric dimensions (e.g., active LEDs or passive reflective balls) arranged in a regular manner. The back of the plate integrates an accuracy assessment kit (AAK). Pixel coordinates refer to the two-dimensional planar coordinates of the feature points in the imaging image of the left or right near-infrared camera. Physical coordinates refer to the three-dimensional spatial coordinates based on the calibration plate's own coordinate system or the global measurement space coordinate system of the optical positioning instrument.
[0048] In this embodiment, based on the calibration plate set on the robotic arm, the pixel coordinates of feature points extracted from the image and the physical coordinates of feature points obtained according to the factory standard size of the calibration plate are determined. The left pixel coordinates, right pixel coordinates and physical coordinates of the same feature point are bound together to establish a complete correspondence.
[0049] In one optional implementation, the above-mentioned determination of the correspondence between the pixel coordinates and physical coordinates of feature points in each image pair based on a calibration plate set on the robotic arm can be as follows: First feature points and second feature points are extracted from each image pair, where the first feature point is extracted from the left image and the second feature point is extracted from the right image; sub-pixel refinement is performed on the first and second feature points respectively to obtain the pixel coordinates corresponding to the first and second feature points; based on the physical characteristics of the calibration plate, identifiers corresponding to the first and second feature points are determined, and the physical coordinates corresponding to the first and second feature points are determined according to the identifiers; the pixel coordinates corresponding to the first feature point, the pixel coordinates corresponding to the second feature point, and the physical coordinates corresponding to the first and second feature points are bound together to obtain the correspondence between the pixel coordinates and physical coordinates of feature points in each image pair.
[0050] Among them, the first feature point refers to the imaging spot of the calibration board optical marker point identified from the left image using a feature extraction algorithm for a single image pair; the second feature point refers to the imaging spot of the optical marker point extracted synchronously from the paired right image for the same image pair; sub-pixel refinement refers to the optimization process that improves the positioning accuracy of the marker point center to the 0.1 pixel level by using algorithms such as sub-pixel interpolation, centroid fitting, and Gaussian surface fitting on the basis of whole-pixel coarse positioning; physical characteristic index is the set of inherent geometric and physical parameters obtained by factory curing and high-precision measurement of the calibration board, which may include, but is not limited to: the standard three-dimensional spacing between each optical marker point, the arrangement rules of the marker point array, the origin of the calibration board's own coordinate system, the standard three-dimensional coordinates of the marker point relative to the board body, the size of the marker point, etc.; identification index is the unique number or identity code corresponding to each optical marker point on the calibration board.
[0051] In this embodiment, for each pair of calibration images, feature points (first feature point and second feature point) are independently extracted from its left and right images. Sub-pixel level refinement processing is performed on the coordinates of the extracted first and second feature points to improve the positioning accuracy from integer pixels to fractional pixels, obtaining the corresponding pixel coordinates. Utilizing the known physical geometric characteristics of the calibration board itself (such as the row and column arrangement and spacing of the marker points), a unique identifier is determined for each feature point (i.e., identifying which specific physical marker point on the calibration board it is), and then the physical coordinates of that marker point in the calibration board coordinate system are obtained by looking up a table or calculation. The left pixel coordinates, right pixel coordinates, and physical coordinates of the same feature point are associated and bound to form a complete correspondence record.
[0052] S103. Based on the correspondence and the initial calibration parameters, the target calibration parameters are obtained, wherein the initial calibration parameters are the calibration parameters read from the pre-acquired configuration file.
[0053] Here, the configuration file refers to the standardized parameter file pre-stored in the host computer or local storage of the positioning device; the initial calibration parameters refer to a set of basic camera calibration parameters read from the configuration file, which serve as the initial iteration values for the calibration solution algorithm; the target calibration parameters refer to the final high-precision calibration parameters obtained by using the correspondence between pixel coordinates and physical coordinates as constraints, combined with the initial calibration parameters as initial values for iteration, and solved through the convergence of the stereo calibration and bundle adjustment global optimization algorithm. These parameters may include, but are not limited to, the optimized precise intrinsic parameters of the left and right cameras, distortion coefficients, and stereo extrinsic parameters of the binoculars.
[0054] In this embodiment, after reading the rough initial calibration parameters in the configuration file, the algorithm uses the correspondence between the pixel coordinates and physical coordinates of all feature points to continuously fine-tune the intrinsic parameters, distortion coefficients, and binocular rotation and translation extrinsic parameters until the target calibration parameters that meet the measurement accuracy requirements are obtained.
[0055] In one optional implementation, obtaining the target calibration parameters based on the correspondence and initial calibration parameters can be achieved by: calculating the intrinsic parameters of the left camera based on the pixel coordinates and physical coordinates corresponding to the first feature point; calculating the intrinsic parameters of the right camera based on the pixel coordinates and physical coordinates corresponding to the second feature point; obtaining the extrinsic parameters of the left and right cameras based on the pixel coordinates of the first and second feature points, the physical coordinates of the first and second feature points, the intrinsic parameters of the left and right cameras, and the intrinsic parameters of the right camera; and optimizing the intrinsic parameters of the left and right cameras, as well as the extrinsic parameters of the left and right cameras, using the initial calibration parameters as initial values, to obtain the target calibration parameters.
[0056] Among them, intrinsic parameters refer to the fixed set of inherent optical and imaging geometric properties of a single near-infrared camera, which are determined solely by the camera lens and image sensor hardware itself; extrinsic parameters refer to a set of transformation parameters of the spatial position and rotational attitude of the right camera relative to the left camera, describing the relative pose relationship between the two cameras.
[0057] In this embodiment, using the pixel coordinates of the same set of feature points in the image and their physical coordinates on the calibration plate plane, the intrinsic parameters of the left and right near-infrared sensors are independently solved. Specifically, these parameters may include intrinsic parameter matrices (focal length, principal point coordinates, etc.) and distortion coefficients (radial and tangential distortion correction parameters) to describe the imaging characteristics of each camera. Combining the determined feature point pairs of the corresponding left and right images, the extrinsic parameters between the left and right sensors are calculated, specifically including rotation matrices (describing the relative orientation of the two) and translation vectors (describing the baseline length and direction of the two), thereby establishing a complete binocular stereo vision geometric model.
[0058] In this embodiment, the dual intrinsic parameters, distortion coefficients, extrinsic parameters, and the pixel coordinates of all observed feature points are simultaneously incorporated into the optimization equation. After the optimization converges, the physical validity of key parameters (e.g., focal length, binocular baseline length, distortion coefficient order of magnitude, etc.) is checked to determine whether they fall within the theoretical design range of the optical device. This prevents the calculation of physically impossible parameter values due to abnormal data or algorithm degradation. If the verification fails, the system rejects the calibration results.
[0059] In one optional implementation, the above-mentioned optimization of the intrinsic parameters of the left camera, the intrinsic parameters of the right camera, and the extrinsic parameters of the left and right cameras, using the initial calibration parameters as initial values, to obtain the target calibration parameters can be achieved by: merging the first feature point and the second feature point into a feature point pair; using the initial calibration parameters as initial values, calculating the pre-constructed objective function based on the measured pixel coordinates of the feature point pair and the predicted pixel coordinates corresponding to the current calibration parameters to obtain the current reprojection error; and optimizing the objective function based on the current reprojection error until a preset stopping condition is met to obtain the target calibration parameters.
[0060] Among them, a feature point pair refers to a pairing unit formed by matching the first feature point extracted from the left image and the second feature point extracted from the right image of the same physical optical marker point on the calibration board within the same set of binocular image pairs; the measured pixel coordinates refer to the pixel coordinates of the feature points actually extracted from the left or right real-shot images after processing by the sub-pixel refinement algorithm; the predicted pixel coordinates refer to the theoretical pixel positions calculated in the forward direction by the camera imaging projection model using the calibration parameters of the current iteration stage and the physical coordinates corresponding to the feature points; the reprojection error refers to the Euclidean distance difference between the measured pixel coordinates and the predicted pixel coordinates for a single feature point pair; the objective function refers to the function value with the sum of the reprojection errors of all feature point pairs as the function value, and the optimization process aims to minimize this function value; the preset stopping condition refers to the iteration termination judgment rule written into the calibration program in advance, which can end the parameter optimization iteration and output the target calibration parameters when any one of the conditions is met. This can include: the total reprojection error of the objective function decreasing to below the set error threshold or the number of iterations reaching the preset maximum number of iterations.
[0061] In this embodiment, the pixel coordinates of the same feature point in the left and right images are first merged into a set of feature point pairs. Starting with the initial calibration parameters, in each round, based on the existing calibration parameters, the feature points on the calibration board are projected back onto the left and right images using the imaging model, and a predicted pixel coordinate is calculated. This predicted pixel coordinate is then compared with the actual pixel coordinates; the difference between the two is the reprojection error. The algorithm uses the calculated reprojection error to adjust the current calibration parameters in reverse using a nonlinear optimization method (e.g., bundle adjustment), making them change in the direction that reduces the error. The updated parameters enter the next round of the loop, repeating the above steps until a preset stopping condition is met. This set of parameters is the final output target calibration parameters.
[0062] In an optional implementation, after obtaining the target calibration parameters based on the correspondence and initial calibration parameters, the method further includes: loading the target calibration parameters onto the positioning device and moving the precision verification tool mounted on the robotic arm into the measurement space of the positioning device; selecting multiple verification calibration point pairs from the measurement space and acquiring the corresponding verification coordinates at each verification calibration point pair; calculating the measurement distance between the two verification calibration points corresponding to the current verification calibration point pair based on the verification coordinates of each verification calibration point pair; calculating the error value corresponding to the current verification calibration point pair based on the measurement distance and the standard distance, wherein the standard distance is the distance between the two verification calibration points corresponding to the current verification calibration point pair determined based on the precision verification tool; summarizing the error values corresponding to each verification calibration point pair and calculating multiple error evaluation indicators; generating a prompt message if any of the error evaluation indicators fails to meet the preset qualified threshold, wherein the prompt message is used to prompt the operator to fine-tune the target calibration parameters or re-trigger the calibration process.
[0063] Among them, the accuracy verification tool refers to the standard tool integrated on the back of the calibration plate at the end of the robotic arm, which has undergone precision calibration at the factory, and can refer to the AAK accuracy verification tool; the verification calibration point pair refers to two optical marker points set in pairs on the accuracy verification tool, which together form a set of verification units; the verification coordinate refers to the physical coordinates calculated in real time by the positioning instrument based on the target calibration parameters; the measurement distance refers to the measured spatial length calculated using the verification coordinates corresponding to the two verification calibration points and the three-dimensional spatial distance formula, representing the actual measurement result under the current calibration parameters of the positioning instrument; the standard distance refers to the distance calibrated by high-precision metrology equipment before the accuracy verification tool leaves the factory. The measured distance between two markers in the same set of verification calibration points is the actual fixed distance between them; the error value refers to the difference between the measured distance and the standard distance of a single set of verification calibration points; the error evaluation index refers to the quantitative evaluation parameter obtained by statistical calculation based on the error value calculated based on all verification calibration points; the preset qualified threshold refers to a set of quantitative judgment thresholds pre-written into the control program, corresponding to each error evaluation index, and is the basis for judging whether the calibration result is qualified; the prompt information refers to automatically generated prompt text, interface pop-up, or sound and light signals, which are triggered when the error of a verification calibration point exceeds the standard, informing the operator that the calibration accuracy is unqualified and guiding them to manually fine-tune the calibration parameters or restart the entire automated calibration process.
[0064] In this embodiment, the newly calculated calibration parameters are first loaded, and the robotic arm is rotated to present the AAK accuracy verification tool mounted on the back of the calibration plate within the positioning instrument's measurement space. Subsequently, the robotic arm moves sequentially to several representative positions within the measurement space, triggering the positioning instrument to collect multiple frames of three-dimensional coordinate data at each position. After data acquisition, the algorithm compares the measured spatial distance between the verification calibration points with their known physical standard distances, calculates the absolute and relative errors, and statistically analyzes multiple quantitative evaluation indicators, including but not limited to average error, root mean square error (RMSE), and 95th percentile error (P95), to comprehensively reflect the calibration accuracy across different dimensions. These statistical indicators are compared with preset pass thresholds. If all indicators meet the preset pass thresholds, the calibration is deemed successful, and the parameter saving process begins. If any error evaluation indicator exceeds the preset pass threshold, the system outputs a prompt message, guiding the operator to fine-tune the calibration parameters or re-execute the entire automatic calibration process.
[0065] Furthermore, the target calibration parameters, determined by accuracy, are first written into the positioner's permanent memory, and a readback verification is performed to compare the written data with the original data, ensuring that no data errors or loss occurred during the solidification process. Subsequently, a standardized calibration report is automatically generated. This report integrates complete information from this calibration round, including device information (e.g., serial number, firmware version), a summary of final calibration parameters, data quality statistics from the main calibration phase (e.g., number of feature points, reprojection error, etc.), AAK accuracy verification results (e.g., average error, RMSE, P95, etc.), and the final pass / fail judgment, providing complete traceability for quality management. The software interface notifies the operator that the calibration process is complete via pop-ups or summary panels, and intuitively displays key conclusions, allowing the operator to quickly grasp the calibration results without having to consult the full report.
[0066] As described above, after the robotic arm collects image data along a preset trajectory, it determines the correspondence between the pixel coordinates and physical coordinates of the feature points in each image pair based on the calibration plate set on it. Then, combined with the initial calibration parameters, the target calibration parameters are obtained. By replacing manual work with the robotic arm, interference caused by human factors is eliminated. At the same time, the accuracy of the calibration results is comprehensively improved by combining the preset trajectory that uniformly covers the entire planar field of view and depth range.
[0067] Based on the above, Figure 3 A flowchart of another automatic calibration method for a positioning device provided in the embodiments of this application is shown below. Figure 3 As shown, the method includes: S301, Perform system initialization.
[0068] In this embodiment, after the host computer starts, it first automatically connects to the near-infrared optical positioning device and simultaneously establishes a transmission control protocol / Internet Protocol communication connection with the collaborative robotic arm, confirming that both are in an operable state. Then, it reads the preset configuration file and performs a completeness and logical consistency check on the various calibration parameters contained therein (e.g., depth range, nine-square grid division, robotic arm movement speed or acceleration, AAK standard distance reference value, and number of frames acquired per point). If the check finds missing parameters, incorrect format, or values exceeding a reasonable range, the system automatically terminates the startup process and prompts the operator to modify the configuration file parameters. Finally, all key information of this calibration round (e.g., information on the device to be calibrated, selected distance range, spatial position parameters, and estimated completion time) is presented to the operator in a visual interface for final manual confirmation. Only after confirmation can the next stage proceed.
[0069] S302, Perform the pre-check process.
[0070] In this embodiment, after selecting a small number of representative test calibration points from the complete calibration trajectory, the robotic arm moves sequentially to each test calibration point. Once in position and stable, it triggers the positioning device to collect a small number of near-infrared image data frames. The quality of the collected image data is evaluated to check whether the number of feature points in the left and right images meets a preset minimum threshold and whether the number of feature points in the left and right images is consistent.
[0071] S303, determine whether the pre-check process is successful. If not, proceed to S304; if yes, proceed to S305.
[0072] S304 performs anomaly checks, and after the checks are completed, returns to S302 or skips the pre-check and proceeds directly to S305.
[0073] S305 controls the robotic arm to move along a preset trajectory and collects image data.
[0074] In this embodiment, the robotic arm traverses all calibration points sequentially according to a preset order, and the host computer displays the current progress information and estimated remaining time in real time. For each target calibration point, after the host computer sends the corresponding motion command, it polls the robotic arm's operating status at a fixed frequency to confirm whether it has reached the target calibration point. After confirming that the robotic arm is in place, the system waits for a preset stabilization period to fully attenuate the residual vibrations generated by the robotic arm's movement. After the robotic arm comes to a complete stop, the system triggers the positioning device to continuously acquire N frames of near-infrared image data and temporarily stores the data in a memory buffer.
[0075] S306, extract the first feature point and the second feature point from each group of image pairs respectively, and obtain the pixel coordinates corresponding to the first feature point, the pixel coordinates corresponding to the second feature point, and the physical coordinates corresponding to the first feature point and the second feature point.
[0076] In this embodiment, feature points in the left and right images are extracted from each image pair, and sub-pixel refinement is performed to obtain precise pixel coordinates. At the same time, the physical coordinates corresponding to the feature points in the left and right images are established using the known geometric arrangement and spatial coding of the calibration board.
[0077] S307. Calculate the intrinsic parameters of the left and right near-infrared sensors based on the pixel coordinates corresponding to the first feature point, the pixel coordinates corresponding to the second feature point, and the physical coordinates corresponding to the first and second feature points.
[0078] The intrinsic parameters include the intrinsic parameter matrix (focal length, principal point coordinates) and distortion coefficients (radial distortion, tangential distortion).
[0079] S308. Based on the pixel coordinates corresponding to the first feature point, the pixel coordinates corresponding to the second feature point, the physical coordinates corresponding to the first and second feature points, the intrinsic parameters of the left camera, and the intrinsic parameters of the right camera, the extrinsic parameters of the left and right cameras are obtained.
[0080] The extrinsic parameters include the rotation matrix and the translation vector.
[0081] S309 aims to minimize the total reprojection error by performing global nonlinear iterative optimization on all parameters until it converges to the optimal solution, thus obtaining the target calibration parameters.
[0082] In this embodiment, with the goal of minimizing the total reprojection error, all parameters (dual intrinsic parameters, distortion, and extrinsic parameters) are incorporated into the beam adjustment framework for global nonlinear iterative optimization until convergence to the optimal solution. The optimized key parameters (focal length, binocular baseline length, distortion coefficient, etc.) are checked to ensure they fall within the physically reasonable range of the optical device. If the verification fails, the system rejects the calibration results and prompts for recalibration.
[0083] S310 performs accuracy verification based on target calibration parameters.
[0084] In this embodiment, the target calibration parameters are loaded, and the robotic arm presents the AAK accuracy verification tool integrated on the back of the calibration plate within the measurement space of the positioning instrument. The robotic arm moves sequentially to several verification calibration points within the measurement space, triggering the positioning instrument to collect multiple frames of three-dimensional coordinate data (i.e., verification coordinates) at each verification calibration point pair. For each pair of verification calibration points, the absolute error and relative error between the measured three-dimensional distance and its known standard physical distance are calculated. All single-point errors are summarized, and multiple evaluation indicators such as average error, root mean square error (RMSE), and 95th percentile error (P95) are statistically analyzed.
[0085] S311, determine if the accuracy meets the standard. If not, proceed to S312; if yes, proceed to S313.
[0086] In this embodiment of the application, the accuracy is determined to be up to standard only when all statistical evaluation indicators meet the preset qualified threshold.
[0087] S312 prompts the operator to fine-tune the parameters or re-execute S305.
[0088] Among them, parameter fine-tuning refers to the operator manually correcting individual deviation parameters based on the existing calibration results and re-verifying them; recalibration refers to abandoning the current results and returning to S305 to re-execute the complete main calibration data acquisition and calculation process.
[0089] S313, save the target calibration parameters and generate a report.
[0090] In this embodiment, the verified calibration parameters are written into the permanent memory of the positioning instrument, and a readback verification is performed to compare the written data with the original data, ensuring that no data errors or loss occurred during the solidification process. A standardized calibration report is automatically generated, containing complete information such as equipment information, a summary of the final calibration parameters, data quality statistics from the main calibration phase, and AAK accuracy verification results, providing a traceable basis for quality management. The software interface notifies the operator that the calibration process is complete via pop-ups or summary panels, and intuitively displays key conclusions, allowing the operator to quickly grasp the calibration results without having to read the full report.
[0091] Based on the same inventive concept, this disclosure also provides an automatic calibration device for a positioning instrument, as shown in the following embodiments. Since the principle by which this device embodiment solves the problem is similar to that of the above-described method embodiments, the implementation of this device embodiment can refer to the implementation of the above-described method embodiments, and repeated details will not be elaborated further.
[0092] Figure 4 This is a schematic diagram of an automatic calibration device for a positioning instrument provided in an embodiment of this application, as shown below. Figure 4 As shown, the device includes: The data acquisition module 401 is used to acquire image data, which includes multiple sets of image pairs acquired at each calibration point during the operation of the robotic arm along the preset trajectory. The preset trajectory is generated based on the longitudinal and lateral distribution of the space measured by the positioning instrument and the pose angle of the robotic arm. The relationship determination module 402 is used to determine the correspondence between the pixel coordinates and physical coordinates of the feature points in each image pair based on the calibration plate set on the robotic arm, wherein the feature points are determined based on the calibration plate. The parameter determination module 403 is used to obtain the target calibration parameters based on the correspondence and the initial calibration parameters, wherein the initial calibration parameters are the calibration parameters read from the pre-acquired configuration file.
[0093] As described above, after the robotic arm collects image data along a preset trajectory, it determines the correspondence between the pixel coordinates and physical coordinates of the feature points in each image pair based on the calibration plate set on it. Then, combined with the initial calibration parameters, the target calibration parameters are obtained. By replacing manual work with the robotic arm, interference caused by human factors is eliminated. At the same time, the accuracy of the calibration results is comprehensively improved by combining the preset trajectory that uniformly covers the entire planar field of view and depth range.
[0094] In this embodiment of the application, the device further includes: a pre-inspection module 404, used to select multiple test calibration points from a preset trajectory; control the robotic arm to sequentially run to each test calibration point and collect test image data, wherein the test image data includes multiple test image pairs, each test image pair including a left test image and a right test image; extract the first test feature point and the second test feature point corresponding to each test image pair respectively, wherein the first test feature point is the feature point extracted from the left test image and the second test feature point is the feature point extracted from the right test image; determine that the number of the first test feature points and the number of the second test feature points corresponding to each test image pair are both greater than or equal to a preset minimum feature point threshold and are consistent in number.
[0095] In this embodiment of the application, the data acquisition module 401 is further configured to send a running instruction to the robotic arm so that the robotic arm runs sequentially along the calibration points on the preset trajectory; poll the running status information of the robotic arm at a preset frequency; and wait for a preset stabilization time after confirming that the robotic arm has run to the target calibration point, and acquire image data at the target calibration point after the waiting time meets the preset stabilization time.
[0096] In this embodiment, each image pair includes a left image and a right image. The relationship determination module 402 is further configured to extract a first feature point and a second feature point from each image pair, wherein the first feature point is a feature point extracted from the left image and the second feature point is a feature point extracted from the right image; perform sub-pixel refinement on the first feature point and the second feature point respectively to obtain the pixel coordinates corresponding to the first feature point and the second feature point; determine the identifiers corresponding to the first feature point and the second feature point based on the physical characteristics of the calibration board, and determine the physical coordinates corresponding to the first feature point and the second feature point according to the identifiers; bind the pixel coordinates corresponding to the first feature point, the pixel coordinates corresponding to the second feature point, and the physical coordinates corresponding to the first feature point and the second feature point to obtain the correspondence between the pixel coordinates and physical coordinates of the feature points in each image pair.
[0097] In this embodiment, the positioning device includes a left camera and a right camera, and the target calibration parameters include intrinsic and extrinsic parameters. The parameter determination module 403 is further configured to calculate the intrinsic parameters of the left camera based on the pixel coordinates and physical coordinates corresponding to the first feature point; calculate the intrinsic parameters of the right camera based on the pixel coordinates and physical coordinates corresponding to the second feature point; obtain the extrinsic parameters of the left and right cameras based on the pixel coordinates corresponding to the first and second feature points, the physical coordinates corresponding to the first and second feature points, the intrinsic parameters of the left camera, and the intrinsic parameters of the right camera; and optimize the intrinsic parameters of the left camera, the intrinsic parameters of the right camera, and the extrinsic parameters of the left and right cameras using the initial calibration parameters as initial values to obtain the target calibration parameters.
[0098] In this embodiment of the application, the parameter determination module 403 is further configured to merge the first feature point and the second feature point into a feature point pair; using the initial calibration parameter as the initial value, calculate the pre-constructed objective function based on the measured pixel coordinates of the feature point pair and the predicted pixel coordinates corresponding to the current calibration parameter to obtain the current reprojection error; optimize the objective function based on the current reprojection error until the preset stopping condition is met to obtain the target calibration parameter.
[0099] In this embodiment, the device further includes: a precision verification module 405, used to load target calibration parameters onto the positioning instrument and move the precision verification tool mounted on the robotic arm into the measurement space of the positioning instrument; select multiple verification calibration point pairs from the measurement space and collect corresponding verification coordinates at each verification calibration point pair; calculate the measurement distance between the two verification calibration points corresponding to the current verification calibration point pair based on the verification coordinates of each verification calibration point pair; calculate the error value corresponding to the current verification calibration point pair according to the measurement distance and the standard distance, wherein the standard distance is the distance between the two verification calibration points corresponding to the current verification calibration point pair determined based on the precision verification tool; summarize the error values corresponding to each verification calibration point pair and calculate multiple error evaluation indicators; generate a prompt message if any of the error evaluation indicators fails to meet the preset qualified threshold, wherein the prompt message is used to prompt the operator to fine-tune the target calibration parameters or re-trigger the calibration process.
[0100] Figure 5 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Figure 5 As shown, the electronic device includes a processor 510 and a memory 520. In one possible form of the electronic device, it may also include an input device 530, an output device 540, and a communication device 550. The number of processors 510 in the electronic device can be one or more. Figure 5Taking a processor 510 as an example; the processor 510, memory 520, input device 530, output device 540, and communication device 550 in the electronic device can be connected via a bus or other means. Figure 5 Taking the example of a connection between China and Israel via a bus.
[0101] The memory 520, as a computer-readable storage medium, can be used to store software programs, computer-executable programs, and modules, such as the program instructions / modules corresponding to the automatic calibration method for the positioning device in this embodiment. The processor 510 executes various functional applications and data processing of the electronic device by running the software programs, instructions, and modules stored in the memory 520, thereby realizing the aforementioned automatic calibration method for the positioning device.
[0102] The memory 520 may primarily include a program storage area and a data storage area. The program storage area may store the operating system and at least one application program required for a given function; the data storage area may store data created based on the use of the electronic device. Furthermore, the memory 520 may include high-speed random access memory and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other non-volatile solid-state storage device. In some instances, the memory 520 may further include memory remotely located relative to the processor 510, which can be connected to the electronic device via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.
[0103] Input device 530 can be used to receive network configuration information. Output device 540 may include electronic devices such as a display screen.
[0104] The aforementioned electronic equipment can be used to execute the automatic calibration method for any positioning instrument, and has the corresponding functions and beneficial effects.
[0105] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working process of the above-described apparatus and equipment can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.
[0106] Furthermore, embodiments of this application also provide a storage medium containing computer-executable instructions. When executed by a computer processor, the computer-executable instructions are used to perform relevant operations in the automatic calibration method for a positioning device provided in any embodiment of this application, and have corresponding functions and beneficial effects.
[0107] Those skilled in the art will understand that embodiments of this application may be provided as methods, systems, or computer program products.
[0108] Therefore, this application may take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application may take 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 code. This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, produce implementations of the flowchart... Figure 1 One or more processes and / or boxes Figure 1 The computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to operate in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The functions specified in one or more boxes. These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable apparatus for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0109] In a typical configuration, a computing device includes one or more processors (CPUs), input / output interfaces, network interfaces, and memory. Memory may include non-persistent memory in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.
[0110] Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can store information using any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.
[0111] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.
[0112] The above specific embodiments have further detailed the purpose, technical solution, and beneficial effects of this application. It should be understood that the above are merely specific embodiments of this application and are not intended to limit the scope of protection of this application. In particular, it should be noted that any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of protection of this application for those skilled in the art.
Claims
1. An automatic calibration method for a positioning instrument, characterized in that, include: Image data is acquired, including multiple sets of image pairs acquired at each calibration point during the operation of the robotic arm along a preset trajectory. The preset trajectory is generated based on the longitudinal and lateral distribution of the space measured by the positioning instrument and the pose angle of the robotic arm. Based on the calibration plate set on the robotic arm, the correspondence between the pixel coordinates and physical coordinates of the feature points in each image pair is determined, wherein the feature points are determined based on the calibration plate; Based on the correspondence and the initial calibration parameters, the target calibration parameters are obtained, wherein the initial calibration parameters are calibration parameters read from a pre-acquired configuration file.
2. The automatic calibration method for a positioning device according to claim 1, characterized in that, Prior to acquiring the image data, the method further includes: Multiple test calibration points are selected from the preset trajectory; The robotic arm is controlled to move sequentially to each test calibration point and collect test image data. The test image data includes multiple test image pairs, and each test image pair includes a left test image and a right test image. Extract the first test feature point and the second test feature point corresponding to each pair of test images, wherein the first test feature point is the feature point extracted from the left test image and the second test feature point is the feature point extracted from the right test image; The number of first test feature points and the number of second test feature points for each group of test images are both greater than or equal to the preset minimum feature point threshold and are consistent.
3. The automatic calibration method for a positioning device according to claim 1, characterized in that, The acquired image data includes: Send a running command to the robotic arm so that the robotic arm runs sequentially along the calibration points on the preset trajectory; The operating status information of the robotic arm is polled at a preset frequency. Once the robotic arm has been confirmed to have reached the target calibration point, a preset stabilization time is waited for, and image data at the target calibration point is acquired after the waiting time has met the preset stabilization time.
4. The automatic calibration method for a positioning device according to claim 1, characterized in that, Each image pair includes a left image and a right image; The process of determining the correspondence between the pixel coordinates and physical coordinates of feature points in each image pair based on a calibration plate mounted on the robotic arm includes: Extract a first feature point and a second feature point from each pair of images, wherein the first feature point is the feature point extracted from the left image and the second feature point is the feature point extracted from the right image; Sub-pixel refinement is performed on the first feature point and the second feature point respectively to obtain the pixel coordinates corresponding to the first feature point and the pixel coordinates corresponding to the second feature point; Based on the physical characteristics of the calibration board, the identifiers corresponding to the first feature point and the second feature point are determined, and the physical coordinates corresponding to the first feature point and the second feature point are determined according to the identifiers. The pixel coordinates corresponding to the first feature point, the pixel coordinates corresponding to the second feature point, and the physical coordinates corresponding to the first and second feature points are bound together to obtain the correspondence between the pixel coordinates and physical coordinates of the feature points in each image pair.
5. The automatic calibration method for a positioning device according to claim 4, characterized in that, The positioning device includes a left camera and a right camera, and the target calibration parameters include intrinsic and extrinsic parameters; The step of obtaining the target calibration parameters based on the correspondence and the initial calibration parameters includes: The intrinsic parameters of the left camera are calculated based on the pixel coordinates and physical coordinates corresponding to the first feature point. The intrinsic parameters of the right camera are calculated based on the pixel coordinates and physical coordinates corresponding to the second feature point. Based on the pixel coordinates corresponding to the first feature point, the pixel coordinates corresponding to the second feature point, the physical coordinates corresponding to the first and second feature points, the intrinsic parameters of the left camera, and the intrinsic parameters of the right camera, the extrinsic parameters of the left camera and the right camera are obtained. Using the initial calibration parameters as initial values, the intrinsic parameters of the left camera, the intrinsic parameters of the right camera, and the extrinsic parameters of the left and right cameras are optimized to obtain the target calibration parameters.
6. The automatic calibration method for a positioning device according to claim 5, characterized in that, The step of optimizing the intrinsic parameters of the left camera, the intrinsic parameters of the right camera, and the extrinsic parameters of both cameras, using the initial calibration parameters as initial values, to obtain the target calibration parameters includes: Merge the first feature point and the second feature point into a feature point pair; Using the initial calibration parameters as initial values, the pre-constructed objective function is calculated based on the measured pixel coordinates of the feature point pair and the predicted pixel coordinates corresponding to the current calibration parameters to obtain the current reprojection error. The objective function is optimized based on the current reprojection error until a preset stopping condition is met, thereby obtaining the target calibration parameters.
7. The automatic calibration method for a positioning instrument according to claim 1, characterized in that, After obtaining the target calibration parameters based on the correspondence and the initial calibration parameters, the method further includes: The target calibration parameters are loaded onto the positioning instrument, and the accuracy verification tool set on the robotic arm is moved into the measurement space of the positioning instrument. Multiple verification calibration point pairs are selected from the measurement space, and corresponding verification coordinates are collected at each verification calibration point pair; Based on the verification coordinates of each verification calibration point pair, calculate the measurement distance between the two verification calibration points corresponding to the current verification calibration point pair; Based on the measured distance and the standard distance, calculate the error value corresponding to the current verification calibration point pair, wherein the standard distance is the distance between the two verification calibration points corresponding to the current verification calibration point pair determined by the accuracy verification tool; Summarize the error values corresponding to each verification calibration point and calculate multiple error evaluation indicators; If any of the error assessment indicators fails to meet the preset qualified threshold, a prompt message is generated. The prompt message is used to prompt the operator to fine-tune the target calibration parameter or re-trigger the calibration process.
8. An automatic calibration device for a positioning instrument, characterized in that, include: The data acquisition module is used to acquire image data, wherein the image data includes multiple sets of image pairs acquired at each calibration point during the operation of the robotic arm along a preset trajectory. The preset trajectory is generated based on the longitudinal and lateral distribution of the space measured by the positioning instrument and the pose angle of the robotic arm. The relationship determination module is used to determine the correspondence between the pixel coordinates and physical coordinates of feature points in each image pair based on a calibration plate set on the robotic arm, wherein the feature points are determined based on the calibration plate. The parameter determination module is used to obtain the target calibration parameters based on the correspondence and the initial calibration parameters, wherein the initial calibration parameters are calibration parameters read from a pre-acquired configuration file.
9. An electronic device, characterized in that, include: One or more processors; Memory, used to store one or more computer programs; When the one or more computer programs are executed by the one or more processors, the electronic device implements the automatic calibration method for the positioning device as described in any one of claims 1-7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the automatic calibration method for the positioning device as described in any one of claims 1-7.