External parameter calibration method, device, equipment and storage medium
By acquiring point cloud data and calibration images of the calibration space, determining the position coordinates of the tool intersection point, and calculating the external parameters of the image acquisition device, the problems of cumbersome and low accuracy of external parameters calibration in the prior art are solved, and high-precision external parameters calibration is achieved.
Patent Information
- Application Number
- CN202210551940.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-05-18
- Publication Date
- 2025-02-28
- Estimated Expiration
- 2042-05-18
AI Technical Summary
The calibration process of foreign parameters in the prior art is complicated and it is impossible to determine the camera external parameters with high accuracy, which affects the accuracy of image perception results.
By acquiring point cloud data and calibration images of the calibration space, the position coordinates of the tool intersection point under the equipment coordinate system and pixel coordinate system are determined, and the external parameters of the image acquisition device are then calculated.
The steps of external parameter calibration are simplified, the accuracy of external parameter calibration is improved, and the accuracy of image perception results is ensured.
Smart Images

Figure 00000000_0000_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present invention relate to electronic equipment technology, and in particular to an external parameter calibration method, device, equipment and storage medium. Background Art
[0002] With the rapid development of automation technology and artificial intelligence, robots have been applied in many scenarios. Intelligent floor-cleaning robots can complete simple and repetitive cleaning tasks through unmanned driving technology, greatly reducing labor costs and realizing the automation of cleaning work. In complex and changing working scenarios, environmental perception is an important prerequisite for the safe and stable operation of robots, among which image perception is an important part of environmental perception.
[0003] In the prior art, it is necessary to combine camera data and other sensor data to determine the image perception result. Of course, in the process of determining the image perception result, accurate camera internal and external parameters are required for coordinate transformation. The external parameter calibration process in the prior art is cumbersome and it is impossible to determine high-precision camera external parameters. Summary of the invention
[0004] The present invention provides an external parameter calibration method, device, equipment and storage medium to reduce the difficulty of external parameter calibration and improve the accuracy of external parameter calibration.
[0005] In a first aspect, an embodiment of the present invention provides an external parameter calibration method, including:
[0006] Acquire point cloud data of the calibration space, and determine the first position coordinates of the tooling intersection in the device coordinate system according to the point cloud data; wherein a plurality of calibration tools are arranged in the calibration space, and the intersection of the first plane and the second plane included in each calibration tool and the ground is the tooling intersection, and a marking code is arranged in the first plane for a corner point to coincide with the tooling intersection;
[0007] Acquire a calibration image of the calibration space, determine a priori corner points in the calibration image based on the first position coordinates, determine a target marking code according to the priori corner points, and determine the pixel coordinates of the tooling intersection in a pixel coordinate system according to the target marking code;
[0008] The external parameters of the image acquisition device are determined according to the first position coordinates and the pixel coordinates.
[0009] The technical solution of an embodiment of the present invention provides an external parameter calibration method, including: acquiring point cloud data of a calibration space, and determining a first position coordinate of a tooling intersection in a device coordinate system based on the point cloud data; wherein a plurality of calibration tools are arranged in the calibration space, and an intersection point of an intersection line of a first plane and a second plane included in each of the calibration tools and the ground is the tooling intersection point, and a marking code whose corner point coincides with the tooling intersection point is arranged in the first plane; acquiring a calibration image of the calibration space, determining a priori corner points in the calibration image based on the first position coordinates, determining a target marking code based on the prior corner points, and determining the pixel coordinates of the tooling intersection point in a pixel coordinate system based on the target marking code; and determining the external parameters of an image acquisition device based on the first position coordinates and the pixel coordinates. The above technical scheme can first determine the first position coordinates of the tooling intersection of the calibration tooling in the calibration space in the device coordinate system based on the point cloud data of the calibration space, and secondly determine the pixel coordinates of the tooling intersection in the pixel coordinate system based on the calibration image of the calibration space, and then determine the external parameters of the image acquisition device based on the first position coordinates and pixel coordinates of the tooling intersection. Through the calibration tooling in the calibration space, the external parameter calibration of the image acquisition device is realized, and the steps are simple and the accuracy is high.
[0010] Furthermore, before determining the first position coordinates of the tooling intersection point in the equipment coordinate system according to the point cloud data, the method further includes:
[0011] Determining a priori position of the tooling intersection point relative to the electronic device including the image acquisition device;
[0012] Correspondingly, determining the first position coordinates of the tooling intersection in the equipment coordinate system according to the point cloud data includes: performing straight line fitting or plane fitting in the point cloud data according to the prior position, and determining the first position coordinates according to the fitting result.
[0013] Further, performing straight line fitting or plane fitting in the point cloud data according to the priori position, and determining the first position coordinates according to the fitting result, includes:
[0014] Determine a priori frame according to the priori position, and perform straight line fitting based on preset points within the range of the priori frame according to the point cloud data to obtain two straight line equations, or perform plane fitting to obtain two plane equations;
[0015] The coordinates of the intersection of the two fitted straight line equations, or the coordinates of the intersection of the intersection of the two plane equations and the ground equation, are determined as the first position coordinates of the intersection of the tooling.
[0016] Further, determining a priori corner points in the calibration image based on the first position coordinates includes:
[0017] Determine, according to the prior external parameters of the image acquisition device, the second position coordinates of the tooling intersection point in the camera coordinate system corresponding to the first position coordinates of the tooling intersection point in the device coordinate system;
[0018] Based on the first position coordinates and the second position coordinates, the tooling intersection is projected onto the calibration image to obtain the priori corner point.
[0019] Further, determining a target mark code according to the priori corner point, and determining the pixel coordinates of the tooling intersection in a pixel coordinate system according to the target mark code, includes:
[0020] In the calibration image, a detection frame is generated with the priori corner point as the geometric center and a pixel distance determined according to the side length of the plane included in the calibration tool as the detection side length;
[0021] The detection frame is subjected to a mark code detection, and the pixel coordinates of the tooling intersection in the pixel coordinate system are determined according to the detected target mark code.
[0022] Further, performing a mark code detection on the detection frame, and determining the pixel coordinates of the tooling intersection in the pixel coordinate system according to the detected target mark code, comprises:
[0023] Performing marker code detection on the detection frame to determine the circumscribed vertices of the detected target marker code;
[0024] The interval between each of the circumscribed vertices and the tooling intersection is determined, and the pixel coordinates of the tooling intersection are determined according to the pixel coordinates of the circumscribed vertex having the smallest interval distance with the tooling intersection.
[0025] Further, determining the external parameters of the image acquisition device according to the first position coordinates and the pixel coordinates includes:
[0026] Determining the first position coordinates and the pixel coordinates as a feature point pair;
[0027] The solvePnp function is used to calculate multiple sets of feature point pairs to obtain external parameters of the image acquisition device.
[0028] In a second aspect, an embodiment of the present invention further provides an external parameter calibration device, comprising:
[0029] A point cloud data acquisition module is used to acquire point cloud data of the calibration space, and determine the first position coordinates of the tooling intersection in the device coordinate system according to the point cloud data; wherein a plurality of calibration tools are arranged in the calibration space, and the intersection of the first plane and the second plane included in each calibration tool and the ground is the tooling intersection, and a marking code is arranged in the first plane for the corner point to coincide with the tooling intersection;
[0030] a calibration image acquisition module, configured to acquire a calibration image of the calibration space, determine a priori corner points in the calibration image based on the first position coordinates, determine a target marking code according to the priori corner points, and determine the pixel coordinates of the tooling intersection in a pixel coordinate system according to the target marking code;
[0031] An external parameter determination module is used to determine the external parameters of the image acquisition device according to the first position coordinates and the pixel coordinates.
[0032] In a third aspect, an embodiment of the present invention further provides an electronic device, the device comprising:
[0033] One or more processors; a storage device for storing one or more programs; a radar for acquiring point cloud data; an image acquisition device for acquiring a calibration image;
[0034] When the one or more programs are executed by the one or more processors, the one or more processors implement the external parameter calibration method as described in any one of the first aspects.
[0035] In a fourth aspect, an embodiment of the present invention further provides a storage medium comprising computer executable instructions, wherein the computer executable instructions, when executed by a computer processor, are used to execute the external parameter calibration method as described in any one of the first aspects.
[0036] In a fifth aspect, the present application provides a computer program product, which includes computer instructions. When the computer instructions are executed on a computer, the computer executes the external parameter calibration method provided in the first aspect.
[0037] It should be noted that the above-mentioned computer instructions may be stored in whole or in part on a computer-readable storage medium. The computer-readable storage medium may be packaged together with the processor of the external parameter calibration device, or may be packaged separately from the processor of the external parameter calibration device, and this application does not limit this.
[0038] The description of the second, third, fourth and fifth aspects in this application can refer to the detailed description of the first aspect; and the beneficial effects of the description of the second, third, fourth and fifth aspects can refer to the beneficial effect analysis of the first aspect, which will not be repeated here.
[0039] In this application, the name of the external parameter calibration device does not limit the device or functional module itself. In actual implementation, these devices or functional modules may appear with other names. As long as the functions of each device or functional module are similar to those of this application, they fall within the scope of the claims of this application and their equivalent technologies.
[0040] These and other aspects of the present application will become more apparent from the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0042] Figure 1 A flowchart of an external parameter calibration method provided in Embodiment 1 of the present invention;
[0043] Figure 2 A flowchart of an external parameter calibration method provided in Embodiment 2 of the present invention;
[0044] Figure 3 A schematic diagram of a calibration space in an external parameter calibration method provided in Embodiment 2 of the present invention;
[0045] Figure 4 A schematic diagram of a calibration tool in an external parameter calibration method provided in Embodiment 2 of the present invention;
[0046] Figure 5 A schematic diagram of determining the intersection of tooling within a priori frame in an external parameter calibration method provided in the second embodiment of the present invention;
[0047] Figure 6 A schematic diagram of a calibration image in an external parameter calibration method provided in Embodiment 2 of the present invention;
[0048] Figure 7 A schematic diagram of the structure of an external parameter calibration device provided in Embodiment 3 of the present invention;
[0049] Figure 8 A schematic diagram of the structure of an electronic device provided in Embodiment 4 of the present invention. DETAILED DESCRIPTION
[0050] The present invention will be further described in detail below in conjunction with the accompanying drawings and embodiments. It is to be understood that the specific embodiments described herein are only used to explain the present invention, rather than to limit the present invention. It should also be noted that, for ease of description, only parts related to the present invention, rather than all structures, are shown in the accompanying drawings.
[0051] The term "and / or" in this article is merely a description of the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone.
[0052] The terms "first" and "second" and the like in the specification and drawings of this application are used to distinguish different objects, or to distinguish different processing of the same object, rather than to describe a specific order of objects.
[0053] In addition, the terms "including" and "having" and any variations thereof mentioned in the description of the present application are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but may optionally include other steps or units that are not listed, or may optionally include other steps or units that are inherent to these processes, methods, products or devices.
[0054] It should be mentioned before discussing exemplary embodiments in more detail that some exemplary embodiments are described as processes or methods depicted as flow charts. Although the flow charts describe various operations (or steps) as sequential processes, many operations therein can be implemented in parallel, concurrently or simultaneously. In addition, the order of various operations can be rearranged. The process can be terminated when its operation is completed, but can also have additional steps not included in the accompanying drawings. The process can correspond to methods, functions, procedures, subroutines, subprograms, etc. In addition, the embodiments in the present invention and the features in the embodiments can be combined with each other without conflict.
[0055] It should be noted that, in the embodiments of the present application, words such as "exemplary" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a specific way.
[0056] In the description of the present application, unless otherwise specified, “plurality” means two or more.
[0057] The cleaning robot may include an image acquisition device, which is used to acquire an environmental image and cooperate with the sensor data acquired by the sensor to determine the position information of a preset object in the environment where the cleaning robot is located, so as to realize the perception of the environment where the cleaning robot is located. In the process of determining the position information of the preset object, it is necessary to accurately convert the internal and external parameters of the image acquisition device into coordinates in the device coordinate system, the pixel coordinate system and the camera coordinate system to determine the position information of the preset object.
[0058] In the prior art, the Zhang Zhengyou calibration method can be used to calibrate the precise camera intrinsic parameters using the calibrateCamera function and related demo provided by OpenCv, but the camera extrinsic parameters cannot be accurately calibrated. Therefore, the present invention provides an extrinsic parameter calibration method.
[0059] The external parameter calibration method will be described in detail below with reference to the diagrams and embodiments.
[0060] Embodiment 1
[0061] Figure 1 This is a flow chart of an external parameter calibration method provided in the first embodiment of the present invention. This embodiment is applicable to the situation where the external parameters of the image acquisition device included in the electronic device need to be accurately calibrated. The method can be executed by the external parameter calibration device, such as Figure 1 As shown, the specific steps include:
[0062] Step 110: Acquire point cloud data of the calibration space, and determine the first position coordinates of the tooling intersection in the equipment coordinate system according to the point cloud data.
[0063] There are multiple calibration fixtures in the calibration space. In practical applications, four calibration fixtures can be set. The layout of the calibration fixtures in the calibration space needs to take into account the common field of view coverage of the different image acquisition devices and the main laser radar that need to be calibrated for the electronic equipment. When the image acquisition device and the main laser field of view can cover the calibration fixtures, ensure that the calibration fixtures are symmetrically dispersed in the four corners, and ensure that the distant calibration fixtures in the images acquired by the laser and image acquisition devices will not be blocked by the nearby calibration fixtures. The calibration place can be located on one side of the calibration space. For electronic devices of the same model, the calibration fixtures are arranged in the calibration space in advance, and the electronic device is set at the calibration place to achieve one-click calibration of the external parameters of the image acquisition device contained in the electronic device.
[0064] The calibration tool includes a first plane and a second plane, the intersection of the first plane and the second plane and the ground is the tool intersection, and a marking code is set in the first plane or the second plane, where the corner point coincides with the tool intersection. The marking code can be a QR code or an ArUco code.
[0065] Specifically, after the electronic device is set at the calibration location, the priori position of each tooling intersection relative to the electronic device including the image acquisition device to be calibrated can be determined. First, the point cloud data of the calibration space can be acquired based on the laser scanner, and then a straight line fitting can be performed in the point cloud data according to the priori position to obtain a straight line equation group consisting of four pairs of first straight line equations representing the bottom of the first plane and second straight line equations representing the bottom of the second plane, and the first position coordinates of the tooling intersection corresponding to the straight line equation group in the device coordinate system are determined according to the coordinates of the intersection of the first straight line equation and the second straight line equation in each straight line equation group; or, plane fitting can be performed in the point cloud data according to the priori position to obtain four pairs of first plane equations representing the first plane and second plane equation groups representing the second plane, and the first position coordinates of the tooling intersection corresponding to the plane equation group in the device coordinate system are determined according to the coordinates of the intersection of the first plane equation and the second plane equation in each plane equation group and the ground equation.
[0066] If the electronic device includes a 2D laser scanner, the point cloud data obtained is 2D point cloud data, so straight line fitting can be performed; if the electronic device includes a 3D laser scanner, the point cloud data obtained is 3D point cloud data, so plane fitting can be performed.
[0067] In an embodiment of the present invention, linear fitting or plane fitting is performed in the point cloud data of the calibration space based on the prior position of the calibration tool relative to the image acquisition device, thereby accurately determining the first position coordinates of each calibration tool in the calibration space in the device coordinate system.
[0068] Step 120, obtaining a calibration image of the calibration space, determining a priori corner points in the calibration image based on the first position coordinates, determining a target marking code according to the prior corner points, and determining the pixel coordinates of the tooling intersection in a pixel coordinate system according to the target marking code.
[0069] Specifically, the second position coordinates in the camera coordinate system corresponding to the first position coordinates of each calibration tool in the device coordinate system can be determined based on the prior external parameters of the image acquisition device. After the calibration image of the calibration space is acquired, the prior corner points are determined according to the second position coordinates. Then, the detection frame can be determined according to the prior corner points, and the marker code detection can be performed in the detection frame to determine the target marker code in the detection frame. The detection result of the marker code detection is the pixel coordinates of the four vertices of the target marker code. For the marker codes contained in each calibration tool, calibration parameters are set. The calibration parameters can indicate that the lower left corner or the lower right corner of the marker code is the final corner point, and the final corner point can correspond to the tool intersection point determined by the point cloud space. Therefore, after determining the pixel coordinates of the four vertices of the target marker code, the pixel coordinates of the final corner point can be determined according to the calibration parameters, and the pixel coordinates of the tool intersection point in the pixel coordinate system can be determined according to the pixel coordinates of the final corner point.
[0070] In an embodiment of the present invention, in the calibration image of the calibration space, a marker code detection is performed on the detection frame determined by the prior corner points corresponding to the first position coordinates to determine the pixel coordinates of each vertex of the target marker code, and the pixel coordinates of the tooling intersection in the pixel coordinate system are accurately determined based on the pixel coordinates of one of the vertices determined by preset parameters.
[0071] Step 130: Determine an external parameter of an image acquisition device according to the first position coordinates and the pixel coordinates.
[0072] Specifically, step 110 can determine the first position coordinates of the four tooling intersections in the device coordinate system, and step 120 can determine the pixel coordinates of the four tooling intersections in the pixel coordinate system, and then the corresponding four sets of first position coordinates and pixel coordinates can be obtained, and then the external parameters can be calculated based on the solvePnp function provided by OpenCv to obtain the 6-degree-of-freedom external parameters. Of course, multiple calibrations can be performed to determine multiple initial external parameters, and the initial external parameters with the smallest mean square error are determined as the final external parameters of the image acquisition device.
[0073] In the embodiment of the present invention, step 110 can determine the precise first position coordinates, and step 120 can determine the precise pixel coordinates. Therefore, the extrinsic parameter with the minimum mean square error determined based on the first position coordinates and the pixel coordinates is the precise extrinsic parameter of the image acquisition device.
[0074] A method for calibrating external parameters provided in a first embodiment of the present invention includes: acquiring point cloud data of a calibration space, and determining first position coordinates of a tooling intersection in a device coordinate system based on the point cloud data; wherein a plurality of calibration tools are arranged in the calibration space, and the intersection of a first plane and a second plane included in each calibration tooling and the ground is the tooling intersection, and a marking code whose corner point coincides with the tooling intersection is arranged in the first plane; acquiring a calibration image of the calibration space, determining a priori corner points in the calibration image based on the first position coordinates, determining a target marking code based on the prior corner points, and determining pixel coordinates of the tooling intersection in a pixel coordinate system based on the target marking code; and determining external parameters of an image acquisition device based on the first position coordinates and the pixel coordinates. The above technical scheme can first determine the first position coordinates of the tooling intersection of the calibration tooling in the calibration space in the device coordinate system based on the point cloud data of the calibration space, and secondly determine the pixel coordinates of the tooling intersection in the pixel coordinate system based on the calibration image of the calibration space, and then determine the external parameters of the image acquisition device based on the first position coordinates and pixel coordinates of the tooling intersection. Through the calibration tooling in the calibration space, the external parameter calibration of the image acquisition device is realized, and the steps are simple and the accuracy is high.
[0075] Embodiment 2
[0076] Figure 2 This is a flow chart of an external parameter calibration method provided in the second embodiment of the present invention. This embodiment is specific based on the above embodiment. Figure 2 As shown, in this embodiment, the method may further include:
[0077] Step 210: Determine the a priori position of the tooling intersection point relative to the electronic device including the image acquisition device.
[0078] Specifically, after the electronic device is placed at the calibration location, the a priori position of each tooling intersection point relative to the image acquisition device to be calibrated included in the electronic device may be determined.
[0079] Step 220: Acquire point cloud data of the calibration space, and determine the first position coordinates of the tooling intersection in the equipment coordinate system according to the point cloud data.
[0080] Figure 3 A schematic diagram of a calibration space in an external parameter calibration method provided in the second embodiment of the present invention, such as Figure 3 As shown, the first angle range determined by the solid line represents the field of view of the image acquisition device to be calibrated, and the second angle range determined by the dotted line represents the field of view of the laser. The second angle range needs to ensure that the laser beam will not be blocked when it scans the four fixtures. The distance between the near calibration fixture and the image acquisition device can be 1.2m, and the distance between the far calibration fixture and the image acquisition device can be 7.2m.
[0081] Figure 4 A schematic diagram of a calibration tool in an external parameter calibration method provided in the second embodiment of the present invention, such as Figure 4 As shown, the calibration tool includes a first plane and a second plane, both of which are squares with a side length of 30 cm, and the angle between the first plane and the second plane can be 90 degrees. The intersection point of the tool formed by the intersection line of the first plane and the second plane of the calibration tool and the ground, and the corner point of the marking code included in the first plane or the second plane can be determined as a set of feature point pairs for calibrating external parameters.
[0082] In one implementation, step 220 may specifically include:
[0083] Acquire point cloud data of the calibration space, perform straight line fitting or plane fitting in the point cloud data according to the prior position, and determine the first position coordinates according to the fitting result.
[0084] Further, performing straight line fitting or plane fitting in the point cloud data according to the priori position, and determining the first position coordinates according to the fitting result, includes:
[0085] A priori frame is determined according to the prior position, and according to the point cloud data, a straight line fitting is performed based on preset points within the range of the prior frame to obtain two straight line equations, or a plane fitting is performed to obtain two plane equations; the coordinates of the intersection of the two fitted straight line equations, or the coordinates of the intersection of the intersection of the two plane equations and the ground equation, are determined as the first position coordinates of the intersection of the tooling.
[0086] Specifically, a straight line is fitted in the point cloud data according to the a priori position determined above to obtain four groups of right angles formed by the first line segment and the second line segment, and then the vertex of each right angle can be determined as the intersection point of the tooling. In the embodiment of the present invention, the laser scanner included in the electronic device is a 2D laser scanner. When the 2D laser scanner scans the calibration space, 2D point cloud data can be obtained. Figure 5 A schematic diagram of determining the intersection of tooling within a priori frame in an external parameter calibration method provided in the second embodiment of the present invention, such as Figure 5As shown, with the a priori position determined above as the center, the side length of the plane contained by the calibration tooling twice as the a priori side length, a priori box is generated near each calibration tooling, and then the first line segment and the second line segment are obtained by fitting a straight line through the RANSAC algorithm in the vicinity of each priori box. If the length of the first line segment and the second line segment is close to 60cm, the angle is close to 90 degrees, and the distance between the intersection and the a priori position is less than 5cm, then the intersection of the first line segment and the second line segment can be determined as the tooling intersection, and then the first position coordinates of the tooling intersection corresponding to the first line segment and the second line segment in the device coordinate system can be determined according to the first straight line equation corresponding to the first line segment obtained by fitting and the second straight line equation corresponding to the second line segment.
[0087] When the laser scanner included in the electronic device is a 3D laser scanner, a plane fitting can be performed in the 3D point cloud data according to the prior position, thereby determining the first position coordinates of the tooling intersection in the device coordinate system.
[0088] In an embodiment of the present invention, a first line segment and a second line segment can be obtained by fitting a straight line within a range near a priori frame determined according to the prior position based on the point cloud data, and the tooling intersection point is determined based on the intersection of the first line segment and the second line segment. The priori frame limits the fitting range, thereby improving the accuracy of determining the tooling intersection point, and then the first position coordinates of the tooling intersection point can be determined based on the first straight line equation corresponding to the first line segment and the second straight line equation corresponding to the second line segment. The position coordinates are determined based on the straight line equations, and the accuracy of the first position coordinates of the tooling corner points is also improved.
[0089] Step 230: Acquire a calibration image of the calibration space, and determine a priori corner points in the calibration image based on the first position coordinates.
[0090] In one implementation, step 230 may specifically include:
[0091] Acquire a calibration image of the calibration space; determine the second position coordinates of the tooling intersection point in the camera coordinate system corresponding to the first position coordinates of the tooling intersection point in the device coordinate system according to the prior external parameters of the image acquisition device; based on the first position coordinates and the second position coordinates, project the tooling intersection point to the calibration image to obtain the prior corner point.
[0092] Specifically, the prior external parameters of the image acquisition device can be obtained according to the installation position and angle of the image acquisition device relative to the origin of the device coordinate system in the dimension diagram of the electronic device. The prior external parameters may include six degrees of freedom: x, y, z, roll, pitch, and yaw. If the installation position of the image acquisition device in the electronic device remains unchanged, it is only necessary to determine the prior external parameters of the image acquisition device when the external parameters of the image acquisition device are calibrated for the first time. Based on the prior external parameters of the image acquisition device, the second position coordinates of the tooling intersection point in the camera coordinate system corresponding to the first position coordinates of the tooling intersection point in the device coordinate system can be determined, and then the pinhole perspective model expressed by the internal parameters of the image acquisition device can be used to project each tooling intersection point corresponding to each second position coordinate onto the calibration image to obtain the prior corner point.
[0093] Figure 6 A schematic diagram of calibrating an image in an external parameter calibration method provided in the second embodiment of the present invention, such as Figure 6 As shown, the four crosses can project the four tooling intersection points to the four prior corner points obtained from the calibration image.
[0094] In an embodiment of the present invention, coordinate conversion between the device coordinate system and the camera coordinate system can be performed based on the prior external parameters, that is, the first position coordinates of the tooling intersection in the device coordinate system can be converted into the second position coordinates in the camera coordinate system to determine more accurate second position coordinates, and then more accurate prior corner points can be obtained based on the second position coordinates.
[0095] Step 240: determine a target marking code according to the priori corner point, and determine the pixel coordinates of the tooling intersection in a pixel coordinate system according to the target marking code.
[0096] In one implementation, step 240 may specifically include:
[0097] In the calibration image, a detection frame is generated with the prior corner point as the geometric center and the pixel distance determined according to the side length of the plane included in the calibration tooling as the detection side length; the detection frame is subjected to marker code detection, and the pixel coordinates of the tooling intersection in the pixel coordinate system are determined according to the detected target marker code.
[0098] Further, performing a mark code detection on the detection frame, and determining the pixel coordinates of the tooling intersection in the pixel coordinate system according to the detected target mark code, comprises:
[0099] Perform marker code detection on the detection frame to determine the circumscribed vertices of the detected target marker code; determine the spacing distance between each of the circumscribed vertices and the tooling intersection, and determine the pixel coordinates of the tooling intersection based on the pixel coordinates of the circumscribed vertex with the smallest spacing distance from the tooling intersection.
[0100] Specifically, the angle error of the image acquisition device during installation is determined to be 10 degrees. The pixel distance can be determined in the calibration image based on the side length of the plane included in the calibration tool and the installation error. In the calibration image, the a priori corner point determined above is used as the geometric center, and the pixel distance is used as the detection side length. The following is generated by expanding near the geometric center: Figure 6 The four detection frames including the marker code are shown in the dotted box. Then, the marker code detection is performed on the detection frame, and the detection result can be the pixel coordinates of the four circumscribed vertices of the target marker code.
[0101] The calibration parameters of the marker code may include the side length of the marker code and the final corner point position information. After determining the pixel coordinates of the four circumscribed vertices, the center pixel corresponding to the four circumscribed vertices may be calculated through the anchor point, and according to the final corner point position information contained in the calibration parameters, the center pixel may be translated to the lower left or lower right corner of the marker code by the side length ratio of the marker code, that is, the final corner point is aligned with the tooling intersection point, and the pixel coordinates of the tooling intersection point in the pixel coordinate system are obtained.
[0102] Of course, if multiple marking codes are detected in the detection frame, the interval distance between each circumscribed vertex of each marking code and the tooling intersection is determined, the marking code at the circumscribed vertex corresponding to the interval distance is determined as the target marking code, and the pixel coordinates of the tooling intersection are determined based on the target marking code.
[0103] In an embodiment of the present invention, in the calibration image of the calibration space, a marker code detection is performed on the detection frame determined by the prior corner points corresponding to the first position coordinates to determine the pixel coordinates of each vertex of the target marker code, and the pixel coordinates of the tooling intersection in the pixel coordinate system are accurately determined based on the pixel coordinates of one of the vertices determined by preset parameters.
[0104] Step 250: Determine the external parameters of the image acquisition device according to the first position coordinates and the pixel coordinates.
[0105] In one implementation, step 250 may specifically include:
[0106] The first position coordinates and the pixel coordinates are determined as feature point pairs; multiple groups of feature point pairs are calculated using a solvePnp function to obtain external parameters of the image acquisition device.
[0107] Specifically, one calibration fixture can determine a feature point pair consisting of a first position coordinate and a pixel coordinate. Four calibration fixtures in the calibration space can determine four feature point pairs, that is, one calibration can determine four feature point pairs. The solvePnp function provided by OpenCv can be used to calculate the four feature point pairs separately to obtain the initial external parameters, which include the 6 degrees of freedom x, y, z, yaw, pitch and roll relative to the device coordinate system.
[0108] In practical applications, the image acquisition device can be calibrated three times for external parameters, and three initial external parameters can be determined. The mean square error of each initial external parameter is calculated, and the initial external parameter with the smallest mean square error is determined as the final external parameter of the image acquisition device.
[0109] Step 220 can determine the precise first position coordinates, and step 240 can determine the precise pixel coordinates. Therefore, the extrinsic parameter with the minimum mean square error determined based on the first position coordinates and the pixel coordinates is the precise extrinsic parameter of the image acquisition device.
[0110] In practical applications, after calibrating the intrinsic parameters and extrinsic parameters of the image acquisition device, when the coordinates in the pixel coordinate system and the coordinates in the camera coordinate system are known, the coordinates in the device coordinate system are determined. Specifically, the coordinates of the point in the pixel coordinate system are known to be (u, v), and the corresponding coordinates of the point in the camera coordinate system are [Xc, Yc, Zc, 1]. The coordinates of the point in the device coordinate system (X, Y, Z, 1) can be determined. K represents the intrinsic parameters of the image acquisition device, and R and t represent the rotation and translation matrices in the extrinsic parameters of the image acquisition device, respectively.
[0111] Since the point is on the ground, Z=0. Based on Formula 1, the coordinates of the point in the camera coordinate system can be determined to be (Xc, Yc, Zc).
[0112]
[0113] Formula 1 can then be simplified to Formula 2.
[0114]
[0115] Based on Formula 3, the coordinates of the point in the camera coordinate system can be determined as (Xc, Yc, Zc) according to the coordinates (u, v) of the point in the pixel coordinate system.
[0116]
[0117] Combining Formula 2, Formula 3, and Formula 4, it can be determined that the coordinates of the point in the device coordinate system are (X, Y).
[0118]
[0119] It should be noted that the above formula directly calculates [X / Zc, Y / Zc, 1 / Zc]. In practical applications, there is no need to determine Zc. The determined three-dimensional coordinates can be divided by the third dimension 1 / Zc to obtain the final [X, Y, 1], and then the coordinates (X, Y) in the device coordinate system can be determined.
[0120] In the embodiment of the present invention, based on the precise intrinsic and extrinsic parameters of the image acquisition device, when the coordinates of a point in the pixel coordinate system and the camera coordinate system are known, the coordinates of the point in the device coordinate system can be precisely determined.
[0121] A second embodiment of the present invention provides an external parameter calibration method, including: determining the a priori position of a tooling intersection relative to an electronic device including an image acquisition device; acquiring point cloud data of a calibration space, and determining a first position coordinate of the tooling intersection in a device coordinate system based on the point cloud data; wherein a plurality of calibration tools are arranged in the calibration space, and the intersection of the intersection line of a first plane and a second plane included in each of the calibration tools and the ground is the tooling intersection, and a marking code whose corner point coincides with the tooling intersection is arranged in the first plane; acquiring a calibration image of the calibration space, determining a priori corner points in the calibration image based on the first position coordinates, determining a target marking code based on the prior corner points, and determining the pixel coordinates of the tooling intersection in a pixel coordinate system based on the target marking code; and determining the external parameters of the image acquisition device based on the first position coordinates and the pixel coordinates. The above technical scheme, after determining the prior position of the tooling intersection relative to the electronic device including the image acquisition device, can first determine the first position coordinates of the tooling intersection of the calibration tooling in the calibration space in the device coordinate system based on the point cloud data of the calibration space, and secondly determine the pixel coordinates of the tooling intersection in the pixel coordinate system based on the calibration image of the calibration space, and then determine the external parameters of the image acquisition device based on the first position coordinates and pixel coordinates of the tooling intersection, and achieve external parameter calibration of the image acquisition device through the calibration tooling in the calibration space, with simple steps and high accuracy.
[0122] In addition, multiple external parameter calibrations are performed multiple times to obtain multiple initial external parameters, and the initial external parameters with the smallest mean square error are determined as the final external parameters of the image acquisition device, which further improves the accuracy of the external parameters.
[0123] Embodiment 3
[0124] Figure 7 This is a schematic diagram of the structure of an external parameter calibration device provided in Embodiment 3 of the present invention, which can be applied to situations where it is necessary to accurately calibrate the external parameters of an image acquisition device included in an electronic device. The device can be implemented by software and / or hardware and is generally integrated in an electronic device, such as a cleaning robot.
[0125] like Figure 7 As shown, the device comprises:
[0126] The point cloud data acquisition module 710 is used to acquire the point cloud data of the calibration space, and determine the first position coordinates of the tooling intersection in the device coordinate system according to the point cloud data; wherein a plurality of calibration tools are arranged in the calibration space, and the intersection of the first plane and the second plane included in each calibration tool and the ground is the tooling intersection, and a marking code is arranged in the first plane for the corner point to coincide with the tooling intersection;
[0127] A calibration image acquisition module 720 is used to acquire a calibration image of the calibration space, determine a priori corner points in the calibration image based on the first position coordinates, determine a target mark code according to the priori corner points, and determine the pixel coordinates of the tooling intersection in a pixel coordinate system according to the target mark code;
[0128] The external parameter determination module 730 is used to determine the external parameters of the image acquisition device according to the first position coordinates and the pixel coordinates.
[0129] The external parameter calibration device provided in this embodiment obtains point cloud data of the calibration space, and determines the first position coordinates of the intersection of the tooling in the equipment coordinate system according to the point cloud data; wherein, a plurality of calibration tools are arranged in the calibration space, and the intersection of the intersection line of the first plane and the second plane included in each of the calibration tools and the ground is the tooling intersection, and a marking code whose corner point coincides with the tooling intersection is arranged in the first plane; a calibration image of the calibration space is obtained, and a priori corner points are determined in the calibration image based on the first position coordinates, a target marking code is determined according to the prior corner points, and the pixel coordinates of the tooling intersection in the pixel coordinate system are determined according to the target marking code; and the external parameters of the image acquisition device are determined according to the first position coordinates and the pixel coordinates. The above technical scheme can first determine the first position coordinates of the tooling intersection of the calibration tooling in the calibration space in the device coordinate system based on the point cloud data of the calibration space, and secondly determine the pixel coordinates of the tooling intersection in the pixel coordinate system based on the calibration image of the calibration space, and then determine the external parameters of the image acquisition device based on the first position coordinates and pixel coordinates of the tooling intersection. Through the calibration tooling in the calibration space, the external parameter calibration of the image acquisition device is realized, and the steps are simple and the accuracy is high.
[0130] Based on the above embodiment, the device further includes:
[0131] The a priori position determination module is used to determine the a priori position of the tooling intersection relative to the electronic device including the image acquisition device.
[0132] Based on the above embodiment, the point cloud data acquisition module 710 is specifically used for:
[0133] Acquire point cloud data of the calibration space, perform straight line fitting or plane fitting in the point cloud data according to the prior position, and determine the first position coordinates according to the fitting result.
[0134] In one implementation, performing straight line fitting or plane fitting in the point cloud data according to the priori position, and determining the first position coordinates according to the fitting result, includes:
[0135] Determine a priori frame according to the priori position, and perform straight line fitting based on preset points within the range of the priori frame according to the point cloud data to obtain two straight line equations, or perform plane fitting to obtain two plane equations;
[0136] The coordinates of the intersection of the two fitted straight line equations, or the coordinates of the intersection of the intersection of the two plane equations and the ground equation, are determined as the first position coordinates of the intersection of the tooling.
[0137] Based on the above embodiment, the calibration image acquisition module 720 is specifically used for:
[0138] Acquire a calibration image of the calibration space, determine a second position coordinate of the tooling intersection point in the camera coordinate system corresponding to a first position coordinate of the tooling intersection point in the device coordinate system according to a priori external parameters of an image acquisition device; project the tooling intersection point onto the calibration image based on the first position coordinate and the second position coordinate to obtain the priori corner point;
[0139] In the calibration image, a detection frame is generated with the prior corner point as the geometric center and the pixel distance determined according to the side length of the plane included in the calibration tooling as the detection side length; the detection frame is subjected to marker code detection, and the pixel coordinates of the tooling intersection in the pixel coordinate system are determined according to the detected target marker code.
[0140] In one implementation, performing a mark code detection on the detection frame, and determining the pixel coordinates of the tooling intersection in the pixel coordinate system according to the detected target mark code, includes:
[0141] Performing marker code detection on the detection frame to determine the circumscribed vertices of the detected target marker code;
[0142] The interval between each of the circumscribed vertices and the tooling intersection is determined, and the pixel coordinates of the tooling intersection are determined according to the pixel coordinates of the circumscribed vertex having the smallest interval distance with the tooling intersection.
[0143] Based on the above embodiment, the external parameter determination module 730 is specifically used for:
[0144] The first position coordinates and the pixel coordinates are determined as feature point pairs; multiple groups of feature point pairs are calculated using a solvePnp function to obtain external parameters of the image acquisition device.
[0145] The external parameter calibration device provided in the embodiment of the present invention can execute the external parameter calibration method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.
[0146] It is worth noting that in the embodiment of the above-mentioned external parameter calibration device, the various units and modules included are only divided according to functional logic, but are not limited to the above-mentioned division, as long as the corresponding functions can be achieved; in addition, the specific names of the functional units are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of the present invention.
[0147] Embodiment 4
[0148] Figure 8 A schematic diagram of the structure of an electronic device provided in Embodiment 4 of the present invention. Figure 8 A block diagram of an exemplary electronic device 8 suitable for use in implementing embodiments of the present invention is shown. Figure 8 The electronic device 8 shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.
[0149] like Figure 8 As shown, the electronic device 8 is in the form of a general purpose computing electronic device. The components of the electronic device 8 may include, but are not limited to: one or more processors or processing units 16, a system memory 28, and a bus 18 connecting different system components (including the system memory 28 and the processing unit 16).
[0150] Bus 18 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processor or a local bus using any of a variety of bus architectures. By way of example, these architectures include, but are not limited to, an Industry Standard Architecture (ISA) bus, a Micro Channel Architecture (MAC) bus, an Enhanced ISA bus, a Video Electronics Standards Association (VESA) local bus, and a Peripheral Component Interconnect (PCI) bus.
[0151] The electronic device 8 typically includes a variety of computer system readable media. These media can be any available media that can be accessed by the electronic device 8, including volatile and non-volatile media, removable and non-removable media.
[0152] The system memory 28 may include computer system readable media in the form of volatile memory, such as random access memory (RAM) 30 and / or cache memory 32. The electronic device 8 may further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, the storage system 34 may be used to read and write non-removable, non-volatile magnetic media ( Figure 8 not shown, usually called a "hard drive"). Although Figure 8 Not shown in the figure, a disk drive for reading and writing to a removable non-volatile disk (e.g., a "floppy disk"), and an optical disk drive for reading and writing to a removable non-volatile optical disk (e.g., a CD-ROM, a DVD-ROM, or other optical media) may be provided. In these cases, each drive may be connected to the bus 18 via one or more data medium interfaces. The system memory 28 may include at least one program product having a set (e.g., at least one) of program modules that are configured to perform the functions of the various embodiments of the present invention.
[0153] A program / utility 40 having a set (at least one) of program modules 42 may be stored, for example, in system memory 28, such program modules 42 including, but not limited to, an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment. Program modules 42 generally perform the functions and / or methods of the embodiments described herein.
[0154] The electronic device 8 may also communicate with one or more external devices 14 (e.g., keyboards, pointing devices, displays 24, etc.), one or more devices that enable a user to interact with the electronic device 8, and / or any device that enables the electronic device 8 to communicate with one or more other computing devices (e.g., network cards, modems, etc.). Such communication may be performed via an input / output (I / O) interface 22. Furthermore, the electronic device 8 may also communicate with one or more networks (e.g., local area networks (LANs), wide area networks (WANs), and / or public networks, such as the Internet) via a network adapter 20. Figure 8 As shown, the network adapter 20 communicates with other modules of the electronic device 8 via the bus 18. It should be understood that although Figure 8 Not shown, other hardware and / or software modules may be used in conjunction with electronic device 8, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.
[0155] The processing unit 16 executes various functional applications and page displays by running the program stored in the system memory 28, for example, implementing the external parameter calibration method provided in the embodiment of the present invention, the method comprising:
[0156] Acquire point cloud data of the calibration space, and determine the first position coordinates of the tooling intersection in the device coordinate system according to the point cloud data; wherein a plurality of calibration tools are arranged in the calibration space, and the intersection of the first plane and the second plane included in each calibration tool and the ground is the tooling intersection, and a marking code is arranged in the first plane for a corner point to coincide with the tooling intersection;
[0157] Acquire a calibration image of the calibration space, determine a priori corner points in the calibration image based on the first position coordinates, determine a target marking code according to the priori corner points, and determine the pixel coordinates of the tooling intersection in a pixel coordinate system according to the target marking code;
[0158] The external parameters of the image acquisition device are determined according to the first position coordinates and the pixel coordinates.
[0159] Of course, those skilled in the art can understand that the processor can also implement the technical solution of the external parameter calibration method provided by any embodiment of the present invention.
[0160] Embodiment 5
[0161] Embodiment 5 of the present invention provides a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, the external parameter calibration method provided in the embodiment of the present invention is implemented, for example, and the method includes:
[0162] Acquire point cloud data of the calibration space, and determine the first position coordinates of the tooling intersection in the device coordinate system according to the point cloud data; wherein a plurality of calibration tools are arranged in the calibration space, and the intersection of the first plane and the second plane included in each calibration tool and the ground is the tooling intersection, and a marking code is arranged in the first plane for a corner point to coincide with the tooling intersection;
[0163] Acquire a calibration image of the calibration space, determine a priori corner points in the calibration image based on the first position coordinates, determine a target marking code according to the priori corner points, and determine the pixel coordinates of the tooling intersection in a pixel coordinate system according to the target marking code;
[0164] The external parameters of the image acquisition device are determined according to the first position coordinates and the pixel coordinates.
[0165] The computer storage medium of the embodiment of the present invention can adopt any combination of one or more computer-readable media. The computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. The computer-readable storage medium can be, for example, but not limited to: an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples (non-exhaustive list) of computer-readable storage media include: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this document, a computer-readable storage medium can be any tangible medium containing or storing a program, which can be used by an instruction execution system, device or device or used in combination with it.
[0166] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, which carry computer-readable program code. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.
[0167] The program code embodied on the computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
[0168] Computer program code for performing the operations of the present invention may be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0169] It should be understood by those skilled in the art that the modules or steps of the present invention described above can be implemented by a general-purpose computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices, optionally, they can be implemented by a program code executable by a computer device, so that they can be stored in a storage device and executed by the computing device, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. Thus, the present invention is not limited to any specific combination of hardware and software.
[0170] Note that the above are only preferred embodiments of the present invention and the technical principles used. Those skilled in the art will understand that the present invention is not limited to the specific embodiments herein, and that various obvious changes, readjustments and substitutions can be made by those skilled in the art without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in more detail through the above embodiments, the present invention is not limited to the above embodiments, and may include more other equivalent embodiments without departing from the concept of the present invention, and the scope of the present invention is determined by the scope of the appended claims.
Claims
1. A method for calibrating an external parameter, characterized in that: include: Acquire point cloud data of the calibration space, and determine the first position coordinates of the tooling intersection in the device coordinate system according to the point cloud data; wherein a plurality of calibration tools are arranged in the calibration space, and the intersection of the first plane and the second plane included in each calibration tool and the ground is the tooling intersection, and a marking code is arranged in the first plane for a corner point to coincide with the tooling intersection; Acquire a calibration image of the calibration space, determine a priori corner points in the calibration image based on the first position coordinates, determine a target marking code according to the priori corner points, and determine the pixel coordinates of the tooling intersection in a pixel coordinate system according to the target marking code; The external parameters of the image acquisition device are determined according to the first position coordinates and the pixel coordinates.
2. The external parameter calibration method according to claim 1, characterized in that: Before determining the first position coordinates of the tooling intersection point in the equipment coordinate system according to the point cloud data, the method further includes: Determining a priori position of the tooling intersection point relative to the electronic device including the image acquisition device; Accordingly, determining the first position coordinates of the tooling intersection point in the equipment coordinate system according to the point cloud data includes: According to the priori position, straight line fitting or plane fitting is performed in the point cloud data, and the first position coordinates are determined according to the fitting result.
3. The external parameter calibration method according to claim 2, characterized in that: Performing straight line fitting or plane fitting in the point cloud data according to the priori position, and determining the first position coordinates according to the fitting result, includes: Determine a priori frame according to the priori position, and perform straight line fitting based on preset points within the range of the priori frame according to the point cloud data to obtain two straight line equations, or perform plane fitting to obtain two plane equations; The coordinates of the intersection of the two fitted straight line equations, or the coordinates of the intersection of the intersection of the two plane equations and the ground equation, are determined as the first position coordinates of the intersection of the tooling.
4. The external parameter calibration method according to claim 1, characterized in that: Determining a priori corner points in the calibration image based on the first position coordinates includes: Determine, according to the prior external parameters of the image acquisition device, the second position coordinates of the tooling intersection point in the camera coordinate system corresponding to the first position coordinates of the tooling intersection point in the device coordinate system; Based on the first position coordinates and the second position coordinates, the tooling intersection is projected onto the calibration image to obtain the priori corner point.
5. The external parameter calibration method according to claim 4, characterized in that: Determining a target mark code according to the priori corner point, and determining the pixel coordinates of the tooling intersection in a pixel coordinate system according to the target mark code, including: In the calibration image, a detection frame is generated with the priori corner point as the geometric center and a pixel distance determined according to the side length of the plane included in the calibration tool as the detection side length; The detection frame is subjected to a mark code detection, and the pixel coordinates of the tooling intersection in the pixel coordinate system are determined according to the detected target mark code.
6. The external parameter calibration method according to claim 5, characterized in that: Performing mark code detection on the detection frame, and determining the pixel coordinates of the tooling intersection in the pixel coordinate system according to the detected target mark code, includes: Performing marker code detection on the detection frame to determine the circumscribed vertices of the detected target marker code; The interval distance between each of the circumscribed vertices and the tooling intersection is determined, and the pixel coordinates of the tooling intersection are determined according to the pixel coordinates of the circumscribed vertex having the smallest interval distance with the tooling intersection.
7. The external parameter calibration method according to claim 1, characterized in that: Determining an external parameter of an image acquisition device according to the first position coordinates and the pixel coordinates includes: Determine the first position coordinates and the pixel coordinates as a feature point pair; The solvePnp function is used to calculate multiple sets of feature point pairs to obtain the external parameters of the image acquisition device.
8. An external parameter calibration device, characterized in that: include: A point cloud data acquisition module is used to acquire point cloud data of the calibration space, and determine the first position coordinates of the tooling intersection in the device coordinate system according to the point cloud data; wherein a plurality of calibration tools are arranged in the calibration space, and the intersection of the first plane and the second plane included in each calibration tool and the ground is the tooling intersection, and a marking code is arranged in the first plane for the corner point to coincide with the tooling intersection; a calibration image acquisition module, configured to acquire a calibration image of the calibration space, determine a priori corner points in the calibration image based on the first position coordinates, determine a target marking code according to the priori corner points, and determine the pixel coordinates of the tooling intersection in a pixel coordinate system according to the target marking code; An external parameter determination module is used to determine the external parameters of the image acquisition device according to the first position coordinates and the pixel coordinates.
9. An electronic device, characterized in that: The device comprises: One or more processors; a storage device for storing one or more programs; a radar for acquiring point cloud data; an image acquisition device for acquiring a calibration image; When the one or more programs are executed by the one or more processors, the one or more processors implement the external parameter calibration method as described in any one of claims 1-7.
10. A storage medium comprising computer executable instructions, wherein the computer executable instructions are used to execute the external parameter calibration method as described in any one of claims 1 to 7 when executed by a computer processor.
Citation Information
Patent Citations
TOF camera calibration method for automated guided vehicle and automated guided vehicle
CN110852180A
External parameter calibration method and device for image acquisition equipment, equipment and storage medium
CN111815719A