External parameter calibration method, device and external parameter calibration system for linear laser radar and camera
By moving the calibration plate on a two-axis mobile platform and using line lidar and cameras to determine the jump edge points, the problem of low calibration data accuracy and efficiency in the existing technology is solved, and high-accuracy external parameter calibration is achieved.
Patent Information
- Application Number
- CN202410998251.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-24
- Publication Date
- 2024-10-18
- Estimated Expiration
- 2044-07-24
AI Technical Summary
In the existing technology, it is difficult to automatically filter out accurate calibration data from line lidar point clouds and camera images, resulting in low calibration efficiency and prone to errors.
By moving the calibration plate on the two-axis mobile platform, using line lidar and cameras to collect point cloud and image data, determine the jump edge points as three-dimensional calibration points, and find the corresponding points in the image to form a calibration point pair. Repeat the steps to Obtain multiple sets of point pairs for external parameter calibration and obtain the external parameter calibration matrix.
It improves the accuracy and efficiency of calibration, ensures the accuracy of calibration data, and solves the problem of automatically screening calibration data.
Smart Images

Figure CN118549909B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of calibration technology, and in particular to an extrinsic parameter calibration method, device, computer program product and extrinsic parameter calibration system for a linear laser radar and a camera. Background Art
[0002] As the power construction industry develops towards automation, power line testing and grounding are also developing towards automation and intelligence. Multi-sensor fusion technology provides hardware support for automated power testing and grounding operations. Among them, the fusion of line lidar and camera is widely used in power testing and grounding tasks due to its small size and high precision.
[0003] At present, the collection of external parameter calibration data of line lidar and camera is mainly completed by manual collection of calibration data using specific calibration plates, which is inefficient and prone to large errors. Summary of the invention
[0004] The main purpose of this application is to provide a method, device, computer program product and external parameter calibration system for linear laser radar and camera, so as to at least solve the problem in the prior art that it is difficult to automatically filter out accurate calibration data from linear laser radar point clouds and camera images.
[0005] In order to achieve the above-mentioned purpose, according to one aspect of the present application, a method for calibrating the external parameters of a line laser radar and a camera is provided, wherein a calibration plate is located on a two-axis moving platform, and the two-axis moving platform is used to drive the calibration plate to move along an x-axis or a y-axis perpendicular to each other. In the direction of a first predetermined axis, the line laser radar and the camera are both located on one side of the calibration plate, and the first predetermined axis is one of the x-axis and the y-axis. The method comprises: an acquisition step, acquiring n calibration point clouds and n images, wherein the n calibration point clouds are respectively point clouds belonging to the calibration plate acquired by controlling the line laser radar after the calibration plate moves once when the calibration plate moves n times in sequence along a second predetermined axis, and the n images are respectively images of the calibration plate acquired by controlling the camera after the calibration plate moves once when the calibration plate moves n times in sequence along the second predetermined axis, and the second predetermined axis is one of the x-axis and the y-axis except the first predetermined axis; a first determination step , determining a three-dimensional calibration point according to n calibration point clouds, wherein the three-dimensional calibration point is an edge point of a jump calibration point cloud, wherein the jump calibration point cloud is one of the edge points in the multiple calibration point clouds where a jump occurs, and wherein the edge point is a point corresponding to the largest scanning angle in the calibration point cloud, wherein the scanning angle is an angle between a laser beam corresponding to a point of the calibration point cloud and a normal line of the line laser radar; a second determination step, determining an image calibration point according to the three-dimensional calibration point, wherein the image calibration point is a point on a target image corresponding to the three-dimensional calibration point, wherein the target image is an image corresponding to a frame of the point cloud where the three-dimensional calibration point is located; controlling the calibration plate to move multiple times along the first predetermined axis, and after each movement, repeating the acquisition step, the first determination step and the second determination step once in sequence, to obtain multiple groups of calibration point pairs, wherein a group of calibration point pairs includes one of the three-dimensional calibration points and one of the image calibration points; performing external parameter calibration according to the multiple groups of calibration point pairs, to obtain an external parameter calibration matrix.
[0006] Optionally, determining three-dimensional calibration points based on n calibration point clouds includes: organizing the edge points in each calibration point cloud into an edge point cloud according to the collection order; calculating the absolute value of the difference between the scanning angles of two adjacent edge points in the edge point cloud to obtain multiple angle differences; and determining the point with the later collection order among the two adjacent edge points corresponding to the angle difference equal to the angular resolution of the line laser radar as the three-dimensional calibration point.
[0007] Optionally, obtaining n calibration point clouds and n images includes: a control step of controlling the calibration plate to move n times in sequence along the second predetermined axis, and controlling the line laser radar to collect a frame of point cloud of the calibration plate after each movement of the calibration plate, and controlling the camera to collect an image of the calibration plate after each movement of the calibration plate; a first determination step of determining the corresponding calibration point cloud according to the position of the calibration plate n times, the calibration point cloud being the point cloud belonging to the calibration plate in one frame of the point cloud.
[0008] Optionally, controlling the calibration plate to move n times in sequence along the second predetermined axis includes: determining the intersection of the field of view of the line laser radar and the field of view of the camera as the common field of view; determining the second predetermined axis moving step length according to the common field of view and the angular resolution of the line laser radar, so that the change in the scanning angle corresponding to the calibration plate moving n times along the second predetermined axis is smaller than the angle of the common field of view, and the change in the scanning angle corresponding to the calibration plate moving once along the second predetermined axis is smaller than the angular resolution of the line laser radar; controlling the calibration plate to move n times in sequence along the second predetermined axis according to the second predetermined axis moving step length.
[0009] Optionally, the corresponding calibration point cloud is determined according to the position of the calibration plate n times, including: a first calculation step, calculating the distance between each point and the line laser radar on the first predetermined axis according to the position of the midpoint of the point cloud in one frame, to obtain multiple distance components; a combination step, forming the calibration point cloud with points whose distance components are equal to the calibration plate distance components, and the calibration plate distance component is the distance between the calibration plate and the line laser radar on the first predetermined axis; repeating the first calculation step and the combination step at least once in sequence until all the calibration point clouds corresponding to the position of the calibration plate n times are obtained.
[0010] Optionally, determining the image calibration point based on the three-dimensional calibration point includes: performing straight line detection on the laser stripes on the calibration plate in the image corresponding to a frame of the point cloud where the three-dimensional calibration point is located to obtain a laser line; and determining the intersection of the laser line and the edge of the calibration plate as the image calibration point.
[0011] Optionally, after performing extrinsic parameter calibration according to multiple groups of calibration point pairs to obtain an extrinsic parameter calibration matrix, the method further includes: a third determination step, determining the projection point of each of the three-dimensional calibration points on the corresponding image according to the extrinsic parameter calibration matrix; a second calculation step, calculating the distance between each of the projection points and the corresponding image calibration point to obtain multiple plane distances; a deletion step, deleting the calibration point pair corresponding to the largest plane distance when the largest plane distance is greater than a maximum distance threshold and / or the average of multiple plane distances is greater than an average distance threshold; a calibration step, performing extrinsic parameter calibration according to the remaining calibration point pairs to obtain a revised extrinsic parameter calibration matrix; updating the extrinsic parameter calibration matrix to the revised extrinsic parameter calibration matrix, and repeating the third determination step, the second calculation step, the deletion step and the calibration step at least once in sequence, until the largest plane distance is less than or equal to the maximum distance threshold and the average of multiple plane distances is less than or equal to the average distance threshold, and determining that the current revised extrinsic parameter calibration matrix is the optimal extrinsic parameter calibration matrix.
[0012] According to another aspect of the present application, an external parameter calibration device for a line laser radar and a camera is provided, wherein a calibration plate is located on a two-axis movable platform, and the two-axis movable platform is used to drive the calibration plate to move along an x-axis or a y-axis perpendicular to each other. In the direction of a first predetermined axis, the line laser radar and the camera are both located on one side of the calibration plate, and the first predetermined axis is one of the x-axis and the y-axis. The device comprises: an acquisition unit, used to execute an acquisition step to acquire n calibration point clouds and n images, wherein the n calibration point clouds are respectively point clouds belonging to the calibration plate acquired by controlling the line laser radar during a process in which the calibration plate moves n times in sequence along a second predetermined axis, and the n images are respectively images of the calibration plate acquired by controlling the camera during a process in which the calibration plate moves n times in sequence along the second predetermined axis, and the second predetermined axis is one of the x-axis and the y-axis except the first predetermined axis; and a first determination unit, used to execute a first determination step to determine, according to the n calibration point clouds, The point cloud determines a three-dimensional calibration point, the three-dimensional calibration point is an edge point of a jump calibration point cloud, the jump calibration point cloud is one of the edge points in the multiple calibration point clouds where the edge point jumps, the edge point is a point corresponding to the maximum scanning angle in the calibration point cloud, and the scanning angle is the angle between the laser beam corresponding to the point of the calibration point cloud and the normal of the line laser radar; a second determination unit is used to perform a second determination step, and determine an image calibration point according to the three-dimensional calibration point, the image calibration point is a point on a target image corresponding to the three-dimensional calibration point, and the target image is the image corresponding to a frame of the point cloud where the three-dimensional calibration point is located; a control unit is used to execute control of the calibration plate to move multiple times along the first predetermined axis, and after each movement, the acquisition step, the first determination step and the second determination step are repeated once in sequence to obtain multiple groups of calibration point pairs, and a group of calibration point pairs includes one of the three-dimensional calibration points and one of the image calibration points; a calibration unit is used to perform external parameter calibration according to the multiple groups of calibration point pairs to obtain an external parameter calibration matrix.
[0013] According to another aspect of the present application, a computer program product is provided, comprising a computer program, wherein when the computer program is executed by a processor, any one of the methods described above is implemented.
[0014] According to another aspect of the present application, an external parameter calibration system is provided, comprising: a calibration plate, a two-axis mobile platform, one or more processors, a memory, and one or more programs, wherein the calibration plate is located on the two-axis mobile platform, and the two-axis mobile platform is used to drive the calibration plate to move along an x-axis or a y-axis perpendicular to each other, and in a first predetermined axis direction, the line laser radar and the camera are both located on one side of the calibration plate, and the first predetermined axis is one of the x-axis and the y-axis, and the one or more programs are stored in the memory and are configured to be executed by the one or more processors, and the one or more programs include methods for executing any one of the methods described.
[0015] By applying the technical solution of the present application, the method first controls a two-axis mobile platform to drive a calibration plate to move along a second predetermined axis n times, and collects a calibration point cloud and an image each time, the calibration point cloud is the point cloud belonging to the calibration plate, and finds one where an edge point jumps from the n calibration point clouds, determines the edge point of the calibration point cloud as a three-dimensional calibration point, finds a point corresponding to the three-dimensional calibration point in the corresponding image, and obtains an image calibration point. The three-dimensional calibration point and the image calibration point form a group of calibration point pairs, and the calibration plate is controlled to move along the first predetermined axis for multiple times, and the above steps are repeated each time to obtain multiple groups of calibration point pairs. The multiple groups of calibration point pairs are subjected to external parameter calibration to obtain an external parameter calibration matrix, and the calibration is completed. Since the recognition accuracy of the edge point position where the jump occurs is high, the accuracy of the calibration data is guaranteed, thereby improving the accuracy of the calibration, and solving the problem in the prior art that it is difficult to automatically screen out accurate calibration data from line laser radar point clouds and camera images. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] Figure 1 A hardware structure block diagram of a mobile terminal for performing an external parameter calibration method of a line laser radar and a camera provided in an embodiment of the present application is shown;
[0017] Figure 2 A schematic diagram showing the positions of a line laser radar, a camera, and a calibration plate provided according to an embodiment of the present application is shown;
[0018] Figure 3 A schematic diagram of a flow chart of an extrinsic parameter calibration method for a line laser radar and a camera provided according to an embodiment of the present application is shown;
[0019] Figure 4 A structural block diagram of an extrinsic parameter calibration device for a line laser radar and a camera provided according to an embodiment of the present application is shown.
[0020] The above drawings include the following reference numerals:
[0021] 102. Processor; 104. Memory; 106. Transmission device; 108. Input and output device; 11. Fixing parts; 12. Side panel; 13. Calibration board. DETAILED DESCRIPTION
[0022] It should be noted that, in the absence of conflict, the embodiments and features in the embodiments of the present application can be combined with each other. The present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
[0023] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present application.
[0024] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequential order. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present application described here. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0025] As introduced in the background technology, it is difficult to automatically filter out accurate calibration data from line lidar point clouds and camera images in the prior art. To solve this technical problem, the embodiments of the present application provide an extrinsic parameter calibration method, device, computer program product and extrinsic parameter calibration system for a line lidar and a camera.
[0026] The technical solutions in the embodiments of the present invention will be described clearly and completely below in conjunction with the accompanying drawings in the embodiments of the present invention.
[0027] The method embodiments provided in the embodiments of the present application can be executed in a mobile terminal, a computer terminal or a similar computing device. Taking running on a mobile terminal as an example, Figure 1 1 is a hardware structure block diagram of a mobile terminal for an external parameter calibration method of a line laser radar and a camera according to an embodiment of the present invention. Figure 1 As shown, the mobile terminal may include one or more ( Figure 1Only one is shown in the figure) a processor 102 (the processor 102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA) and a memory 104 for storing data, wherein the mobile terminal may also include a transmission device 106 and an input / output device 108 for communication functions. It can be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the mobile terminal. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations are shown.
[0028] The memory 104 can be used to store computer programs, for example, software programs and modules of application software, such as the computer program corresponding to the display method of device information in the embodiment of the present invention. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, the above method is implemented. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include a memory remotely arranged relative to the processor 102, and these remote memories can be connected to the mobile terminal via a network. Examples of the above-mentioned network include but are not limited to the Internet, an intranet, a local area network, a mobile communication network, and a combination thereof. The transmission device 106 is used to receive or send data via a network. The above-mentioned specific examples of the network may include a wireless network provided by a communication provider of the mobile terminal. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, referred to as NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 may be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0029] In this embodiment, a method for calibrating the external parameters of a line laser radar and a camera running on a mobile terminal, a computer terminal or a similar computing device is provided. Figure 2As shown, the calibration plate 13 is located on a two-axis mobile platform, and the two-axis mobile platform is used to drive the calibration plate to move along the x-axis or y-axis perpendicular to each other. In the direction of the first predetermined axis, the line laser radar and the camera are both located on one side of the calibration plate, and the first predetermined axis is one of the x-axis and the y-axis. For example, the line laser radar and the camera are installed on a fixing member 11, and the fixing member 11 is fixed on the side plate 12 of the two-axis mobile platform. In the y-axis direction, the side plate of the two-axis mobile platform is located on one side of the calibration plate, that is, in the y-axis direction, the line laser radar and the camera are both located on one side of the calibration plate. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although the logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that here.
[0030] Figure 3 FIG. 1 is a flow chart of an external parameter calibration method for a line laser radar and a camera according to an embodiment of the present application. Figure 3 As shown, the method comprises the following steps:
[0031] Step S201, an acquisition step, acquiring n calibration point clouds and n images, wherein the n calibration point clouds are respectively point clouds belonging to the calibration plate acquired by controlling the line laser radar after the calibration plate moves once when the calibration plate moves n times in sequence along the second predetermined axis, and the n images are respectively images of the calibration plate acquired by controlling the camera after the calibration plate moves once when the calibration plate moves n times in sequence along the second predetermined axis, and the second predetermined axis is one of the x-axis and the y-axis except the first predetermined axis;
[0032] Step S202, a first determination step, determining a three-dimensional calibration point according to the n calibration point clouds, the three-dimensional calibration point being an edge point of a jump calibration point cloud, the jump calibration point cloud being one of the edge points in the multiple calibration point clouds where a jump occurs, the edge point being a point corresponding to the maximum scanning angle in the calibration point cloud, the scanning angle being an angle between a laser beam corresponding to a point in the calibration point cloud and a normal to the line laser radar;
[0033] Step S203, a second determination step, determining an image calibration point according to the three-dimensional calibration point, wherein the image calibration point is a point on a target image corresponding to the three-dimensional calibration point, and the target image is the image corresponding to a frame of the point cloud where the three-dimensional calibration point is located;
[0034] Step S204, controlling the calibration plate to move multiple times along the first predetermined axis, and repeating the acquisition step, the first determination step, and the second determination step once after each movement, to obtain multiple groups of calibration point pairs, wherein one group of calibration point pairs includes one of the three-dimensional calibration points and one of the image calibration points;
[0035] Step S205 , performing extrinsic parameter calibration according to the multiple groups of calibration point pairs to obtain an extrinsic parameter calibration matrix.
[0036] In the above-mentioned extrinsic parameter calibration method of the line laser radar and camera, the two-axis mobile platform is first controlled to drive the calibration plate to move along the second predetermined axis n times, and a calibration point cloud and an image are collected each time. The calibration point cloud is the point cloud belonging to the calibration plate, and one of the edge points where a jump occurs is found from the n calibration point clouds, and the edge point of the calibration point cloud is determined as a three-dimensional calibration point, and the point corresponding to the three-dimensional calibration point is found in the corresponding image to obtain the image calibration point. The three-dimensional calibration point and the image calibration point form a group of calibration point pairs, and the calibration plate is controlled to move along the first predetermined axis for multiple times, and the above steps are repeated each time to obtain multiple groups of calibration point pairs. The multiple groups of calibration point pairs are subjected to extrinsic parameter calibration to obtain an extrinsic parameter calibration matrix, and the calibration is completed. Since the recognition accuracy of the edge point position where the jump occurs is high, the accuracy of the calibration data is guaranteed, thereby improving the accuracy of the calibration, and solving the problem that it is difficult to automatically screen out accurate calibration data from the line laser radar point cloud and the camera image in the prior art.
[0037] In order to obtain the three-dimensional calibration points accurately positioned by the line laser radar, in an optional implementation, the above step S203 includes:
[0038] Step S2031, composing the edge points in each of the calibration point clouds into an edge point cloud according to the order of collection;
[0039] Step S2032, calculating the absolute value of the difference between the scanning angles of two adjacent edge points in the edge point cloud to obtain a plurality of angle differences;
[0040] Step S2033, determining the point in the collection order later in the two adjacent edge points corresponding to the angle difference equal to the angular resolution of the line laser radar as the three-dimensional calibration point.
[0041] In the above implementation, according to the point cloud data on the calibration plate at the nth frame at the m distance , take the point with the largest angle (ρ m,n ,angle m,n ), which is the calibration plate edge point cloud of the nth frame. Calculate the calibration plate edge point cloud of different frames. The set of calibration plate edge point clouds and the set of images of different frames at distance m are: , calculate points mThe angular difference between adjacent polar coordinate values in , , using the angular resolution of the line laser radar and Δangle i By comparison, we can get the frame where the angle of the calibration plate edge point cloud changes. , and its corresponding image is ,Right now .
[0042] In order to obtain the calibrated point cloud in the multi-frame point cloud, in an optional implementation, the above step S202 includes:
[0043] Step S2021, a control step, controlling the calibration plate to move n times in sequence along the second predetermined axis, and controlling the line laser radar to collect a frame of point cloud of the calibration plate after each movement of the calibration plate, and controlling the camera to collect an image of the calibration plate after each movement of the calibration plate;
[0044] Step S2022, a first determination step, determines a corresponding calibration point cloud according to the position of the calibration plate n times, wherein the calibration point cloud is a point cloud belonging to the calibration plate in a frame of the point cloud.
[0045] In the above embodiment, a line laser radar is used to collect point cloud data containing calibration plate information in real time. , the point cloud data is the data collected by the nth frame laser line lidar at a distance of m, that is , where m is the distance between the line laser radar and the calibration plate in the Y-axis direction; ρ is the length of the emitted laser beam; angle is the angle between the laser beam and the plane normal of the line laser radar, clockwise is positive and counterclockwise is negative; the line laser radar collects data at 160 points per frame. Use the camera to collect the image img containing the calibration plate in real time m,n , the image img m,n is the image captured at the nth frame when the distance between the line laser radar and the calibration plate is m. Control the two-axis mobile platform to move n steps along the x-axis direction to collect point cloud and image data, and obtain ,in, is the n frames of point cloud data collected at the distance m between the line laser radar and the calibration plate in the Y-axis direction; The n-frame image data set is collected at a distance m between the line laser radar and the calibration plate in the Y-axis direction, and then the calibration point cloud is filtered.
[0046] In order to avoid missing the hopping frame, in an optional implementation manner, the above step S2021 includes:
[0047] Step S20211, determining the intersection of the field of view of the line laser radar and the field of view of the camera as a common field of view;
[0048] Step S20212, determining the moving step length of the second predetermined axis according to the common field of view and the angular resolution of the line laser radar, so that the change in the scanning angle corresponding to the calibration plate moving n times along the second predetermined axis is less than the angle of the common field of view, and the change in the scanning angle corresponding to the calibration plate moving once along the second predetermined axis is less than the angular resolution of the line laser radar;
[0049] Step S20213, controlling the calibration plate to move n times in sequence along the second predetermined axis according to the second predetermined axis movement step.
[0050] In the above embodiment, according to the field of view range α of the line laser radar l and the camera field of view α c And the number of calibration points n collected at each distance m, determine the forward moving step length step of the two-axis mobile platform, that is, , , where α cd The angle of the field of view where the line laser radar and the camera overlap, and then the edge point angle jump threshold α is set equal to the line laser radar angle resolution to avoid missing the jump point.
[0051] In order to find the point cloud belonging to the calibration plate in the point cloud, in an optional implementation, the above step S2022 includes:
[0052] Step S20221, a first calculation step, calculating the distance between each point and the line laser radar on the first predetermined axis according to the position of the midpoint of the point cloud in one frame, to obtain a plurality of distance components;
[0053] Step S20222, a combining step, forming the calibration point cloud with points whose distance components are equal to the calibration plate distance components, wherein the calibration plate distance components are the distance between the calibration plate and the line laser radar on the first predetermined axis;
[0054] Step S20223, repeat the first calculation step and the combination step at least once in sequence until all the calibration point clouds corresponding to the positions of the calibration plates are obtained n times.
[0055] In the above implementation, according to the point cloud data of the nth frame at the m distance Each point (ρ i ,angle i ) is compared with the distance m of the line laser radar on the y axis to obtain the point cloud data on the calibration plate ,Right now ,in, The calibration point cloud can be obtained by taking the point cloud data on the calibration plate of the nth frame at a distance of m.
[0056] In order to obtain image calibration points, in an optional implementation, the above step S204 includes:
[0057] Step S2041, in the image corresponding to a frame of the point cloud where the three-dimensional calibration point is located, performing straight line detection on the laser stripes on the calibration plate to obtain laser lines;
[0058] Step S2042: determine the intersection of the laser line and the edge of the calibration plate as the image calibration point.
[0059] In the above implementation, YOLOV8 is used to recognize images. The calibration plate in the image is extracted by using the Hough line extraction method to extract the horizontal laser stripes on the calibration plate and save the image calibration points. .
[0060] In order to ensure the accuracy of the calibration result, in an optional implementation, after performing extrinsic calibration according to the plurality of groups of the calibration point pairs to obtain an extrinsic calibration matrix, the method further includes:
[0061] Step S301, a third determination step, determining the projection point of each of the three-dimensional calibration points on the corresponding image according to the extrinsic calibration matrix;
[0062] Step S302, a second calculation step, calculating the distance between each of the above-mentioned projection points and the corresponding above-mentioned image calibration points to obtain a plurality of plane distances;
[0063] Step S303, a deleting step, in which, when the largest plane distance is greater than a maximum distance threshold and / or an average of a plurality of plane distances is greater than an average distance threshold, the calibration point pair corresponding to the largest plane distance is deleted;
[0064] Step S304, a calibration step, performing extrinsic parameter calibration according to the remaining calibration point pairs to obtain a modified extrinsic parameter calibration matrix;
[0065] Step S305, updating the above-mentioned extrinsic parameter calibration matrix to the above-mentioned modified extrinsic parameter calibration matrix, repeating the above-mentioned third determination step, the above-mentioned second calculation step, the above-mentioned deletion step and the above-mentioned calibration step at least once in sequence, until the maximum above-mentioned plane distance is less than or equal to the above-mentioned maximum distance threshold and the average value of multiple above-mentioned plane distances is less than or equal to the above-mentioned average distance threshold, and determining that the current above-mentioned modified extrinsic parameter calibration matrix is the optimal extrinsic parameter calibration matrix.
[0066] In the above implementation, the point in polar coordinates obtained is Convert to Cartesian coordinate system , , where θ is the installation angle between the laser transmitter and the laser receiver of the line laser radar. Calculate the complete image calibration points and 3D calibration points at different distances m , using calib lidar With calib img Perform external parameter calibration. According to the external parameter calibration results, calculate the distance Δd between the pixel point projected on the image and the real pixel point on the image of each line lidar point. If the maximum and average values of Δd are greater than their respective expected values, remove the group of data points with the largest Δd and then recalibrate. If the maximum and average values of Δd are less than their respective expected values, stop the calibration and return the external parameter calibration matrix.
[0067] In order to enable those skilled in the art to more clearly understand the technical solution of the present application, the implementation process of the external parameter calibration method of the line laser radar and camera of the present application will be described in detail below in combination with specific embodiments.
[0068] This embodiment relates to a specific method for calibrating external parameters of a line laser radar and a camera, including the following steps:
[0069] Step 1: Fix the calibration plate on the two-axis mobile platform, and fix the line laser radar and camera to be calibrated in front of the calibration plate. The laser emission plane of the line laser radar is horizontal and perpendicular to the calibration plate. The distance between the line laser radar and the calibration plate is m.
[0070] Step 2: Use line laser radar to collect point cloud data containing calibration plate information in real time , the point cloud data is the data collected by the nth frame laser line lidar at a distance of m, that is ;
[0071] Wherein, m is the distance between the line laser radar and the calibration plate in the Y-axis direction; ρ is the length of the emitted laser beam; angle is the angle between the laser beam and the normal of the line laser radar plane, which is positive clockwise and negative counterclockwise; the line laser radar collects data of 160 points per frame.
[0072] Step 3: Use the camera to capture the image img containing the calibration plate in real time m,n , the image img m,n It is the image collected at the nth frame when the distance between the line laser radar and the calibration plate is m.
[0073] Step 4: According to the line laser radar field of view α l and the camera field of view α c And the number of calibration points n collected at each distance m, determine the forward moving step length step of the two-axis mobile platform, that is, , , where α cdThe angle of the field of view where the line laser radar and the camera overlap, and then the edge point angle jump threshold α is set to be equal to the angle resolution of the line laser radar;
[0074] Step 5: Control the two-axis mobile platform to move n steps along the x-axis direction to collect point cloud and image data. ,in, is the n-frame point cloud data collected at a distance of m; is a dataset of n frames of images collected at a distance of m;
[0075] Step 6: Control the two-axis mobile platform to move along the y-axis direction, and repeat step 5 each time to obtain a complete point cloud data set and image data set, that is, ;
[0076] Step 7: Based on the point cloud data of the nth frame at distance m Each point (ρ i ,angle i ) is compared with the distance m of the line laser radar on the y axis to obtain the point cloud data on the calibration plate
[0077] ,Right now ,in, It is the point cloud data on the calibration board of the nth frame at a distance of m;
[0078] Step 8: Calibrate the point cloud data on the board according to the nth frame at distance m
[0079] , take the point with the largest angle , which is the edge point cloud of the calibration plate in the nth frame;
[0080] Step 9: Repeat steps 7-8 to calculate the edge point clouds of the calibration plate in different frames. The set of edge point clouds of the calibration plate in different frames at distance m and the set of images are: ;
[0081] Step 10: Calculate points m The angular difference between adjacent polar coordinate values in ;
[0082] Step 11: Using the angular resolution of the line lidar and Δangle i By comparison, we can get the frame where the angle of the calibration plate edge point cloud changes. , and its corresponding image is ,Right now ;
[0083] Step 12: Recognize images using YOLOV8 The calibration plate in the image is extracted by using the Hough line extraction method to extract the horizontal laser stripes on the calibration plate and save the image calibration points. ;
[0084] Step 13: Get the points in polar coordinates Convert to Cartesian coordinate system , ; Wherein, θ is the installation angle between the laser transmitter and the laser receiver of the line laser radar;
[0085] Step 14: Repeat steps 7-13 to calculate the complete image calibration points and 3D calibration points at different distances m. ;
[0086] Step 15: Using calib lidar With calib img Perform external parameter calibration;
[0087] Step 16: Calculate the distance Δd between the pixel point where each line lidar point is projected on the image and the real pixel point on the image based on the extrinsic calibration result. If the maximum and average values of Δd are greater than their respective expected values, remove the group of data points with the largest Δd, and then return to step 15. If the maximum and average values of Δd are less than their respective expected values, stop the calibration and return to the extrinsic calibration matrix.
[0088] It should be noted that the steps shown in the flowcharts of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and that, although a logical order is shown in the flowcharts, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0089] The embodiment of the present application also provides an extrinsic calibration device for a line laser radar and a camera. It should be noted that the extrinsic calibration device for the line laser radar and the camera in the embodiment of the present application can be used to execute the extrinsic calibration method for the line laser radar and the camera provided in the embodiment of the present application. The device is used to implement the above-mentioned embodiments and preferred implementation modes, and those that have been described will not be repeated. As used below, the term "module" can implement a combination of software and / or hardware for a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceived.
[0090] The following is an introduction to the extrinsic calibration device for the line laser radar and camera provided in the embodiment of the present application. Figure 2As shown, the calibration plate 13 is located on a two-axis mobile platform, and the two-axis mobile platform is used to drive the calibration plate to move along the x-axis or y-axis perpendicular to each other. In the direction of the first predetermined axis, the line laser radar and the camera are both located on one side of the calibration plate, and the first predetermined axis is one of the x-axis and the y-axis. For example, the line laser radar and the camera are installed on the fixing member 11, and the fixing member 11 is fixed on the side plate 12 of the two-axis mobile platform. In the y-axis direction, the side plate of the two-axis mobile platform is located on one side of the calibration plate, that is, in the y-axis direction, the line laser radar and the camera are both located on one side of the calibration plate.
[0091] Figure 4 is a structural block diagram of an external parameter calibration device for a line laser radar and a camera according to an embodiment of the present application. Figure 4 As shown, the device comprises:
[0092] The acquisition unit 10 is used to execute the acquisition step to acquire n calibration point clouds and n images, wherein the n calibration point clouds are respectively point clouds belonging to the calibration plate acquired by controlling the line laser radar after the calibration plate moves once when the calibration plate moves n times in sequence along the second predetermined axis, and the n images are respectively images of the calibration plate acquired by controlling the camera after the calibration plate moves once when the calibration plate moves n times in sequence along the second predetermined axis, and the second predetermined axis is one of the x-axis and the y-axis except the first predetermined axis;
[0093] A first determination unit 20 is used to perform a first determination step, determining a three-dimensional calibration point according to the n calibration point clouds, wherein the three-dimensional calibration point is an edge point of a jump calibration point cloud, wherein the jump calibration point cloud is one of the edge points in the multiple calibration point clouds where the edge point jumps, and the edge point is a point corresponding to the maximum scanning angle in the calibration point cloud, wherein the scanning angle is an angle between a laser beam corresponding to a point of the calibration point cloud and a normal of the line laser radar;
[0094] A second determining unit 30 is used to perform a second determining step, determining an image calibration point according to the three-dimensional calibration point, wherein the image calibration point is a point on a target image corresponding to the three-dimensional calibration point, and the target image is the image corresponding to a frame of the point cloud where the three-dimensional calibration point is located;
[0095] A control unit 40 is used to control the calibration plate to move multiple times along the first predetermined axis, and after each movement, the acquisition step, the first determination step and the second determination step are sequentially repeated once to obtain multiple groups of calibration point pairs, wherein a group of calibration point pairs includes one of the three-dimensional calibration points and one of the image calibration points;
[0096] The calibration unit 50 is used to perform extrinsic parameter calibration according to the plurality of groups of calibration point pairs to obtain an extrinsic parameter calibration matrix.
[0097] In the above-mentioned external parameter calibration device of the line laser radar and camera, the two-axis mobile platform is first controlled to drive the calibration plate to move along the second predetermined axis n times, and a calibration point cloud and an image are collected each time. The calibration point cloud is the point cloud belonging to the calibration plate, and one of the edge points where a jump occurs is found from the n calibration point clouds, and the edge point of the calibration point cloud is determined as a three-dimensional calibration point, and the point corresponding to the three-dimensional calibration point is found in the corresponding image to obtain the image calibration point. The three-dimensional calibration point and the image calibration point form a group of calibration point pairs, and the calibration plate is controlled to move along the first predetermined axis for multiple times, and the above steps are repeated each time to obtain multiple groups of calibration point pairs. The multiple groups of calibration point pairs are subjected to external parameter calibration to obtain an external parameter calibration matrix, and the calibration is completed. Since the recognition accuracy of the edge point position where the jump occurs is high, the accuracy of the calibration data is guaranteed, thereby improving the accuracy of the calibration, and solving the problem that it is difficult to automatically screen out accurate calibration data from the line laser radar point cloud and the camera image in the prior art.
[0098] In order to obtain the three-dimensional calibration points accurately positioned by the line laser radar, in an optional implementation, the second determination unit includes:
[0099] A composition module, used for composing the edge points in each of the calibration point clouds into an edge point cloud according to the collection order;
[0100] A calculation module, used for calculating the absolute value of the difference between the scanning angles of two adjacent edge points in the edge point cloud to obtain a plurality of angle differences;
[0101] The first determination module is used to determine the point with the later collection order among the two adjacent edge points corresponding to the angle difference equal to the angular resolution of the line laser radar as the three-dimensional calibration point.
[0102] In the above implementation, according to the point cloud data on the calibration plate at the nth frame at the m distance , take the point with the largest angle (ρ m,n ,angle m,n ), which is the calibration plate edge point cloud of the nth frame. Calculate the calibration plate edge point cloud of different frames. The set of calibration plate edge point clouds and the set of images of different frames at distance m are: , calculate points m The angular difference between adjacent polar coordinate values in , , using the angular resolution of the line laser radar and Δangle i By comparison, we can get the frame where the angle of the calibration plate edge point cloud changes. , and its corresponding image is ,Right now .
[0103] In order to obtain the calibrated point cloud in the multi-frame point cloud, in an optional implementation manner, the first determination unit includes:
[0104] A control module, used to execute the control step, control the calibration plate to move n times in sequence along the second predetermined axis, and control the line laser radar to collect a frame of point cloud of the calibration plate after each movement of the calibration plate, and control the camera to collect an image of the calibration plate after each movement of the calibration plate;
[0105] The second determination module is used to execute the first determination step, and determine the corresponding calibration point cloud according to the position of the calibration plate n times, and the calibration point cloud is the point cloud belonging to the calibration plate in one frame of the point cloud.
[0106] In the above embodiment, a line laser radar is used to collect point cloud data containing calibration plate information in real time. , the point cloud data is the data collected by the nth frame laser line lidar at a distance of m, that is , where m is the distance between the line laser radar and the calibration plate in the Y-axis direction; ρ is the length of the emitted laser beam; angle is the angle between the laser beam and the plane normal of the line laser radar, clockwise is positive and counterclockwise is negative; the line laser radar collects data at 160 points per frame. Use the camera to collect the image img containing the calibration plate in real time m,n , the image img m,n is the image captured at the nth frame when the distance between the line laser radar and the calibration plate is m. Control the two-axis mobile platform to move n steps along the x-axis direction to collect point cloud and image data, and obtain ,in, is the n frames of point cloud data collected at the distance m between the line laser radar and the calibration plate in the Y-axis direction; The n-frame image data set is collected at a distance m between the line laser radar and the calibration plate in the Y-axis direction, and then the calibration point cloud is filtered.
[0107] In order to avoid missing the hopping frame, in an optional implementation manner, the control module includes:
[0108] A first determination submodule is used to determine the intersection of the field of view of the above-mentioned line laser radar and the field of view of the above-mentioned camera as a common field of view;
[0109] A second determination submodule is used to determine the moving step length of the second predetermined axis according to the common visual field and the angular resolution of the line laser radar, so that the change of the scanning angle corresponding to the calibration plate moving n times along the second predetermined axis is less than the angle of the common visual field, and the change of the scanning angle corresponding to the calibration plate moving once along the second predetermined axis is less than the angular resolution of the line laser radar;
[0110] The control submodule is used to control the calibration plate to move n times in sequence along the second predetermined axis according to the second predetermined axis movement step.
[0111] In the above embodiment, according to the field of view range α of the line laser radar l and the camera field of view α c And the number of calibration points n collected at each distance m, determine the forward moving step length step of the two-axis mobile platform, that is, , , where α cd The angle of the field of view where the line laser radar and the camera overlap, and then the edge point angle jump threshold α is set equal to the line laser radar angle resolution to avoid missing the jump point.
[0112] In order to find the point cloud belonging to the calibration plate in the point cloud, in an optional implementation, the second determination module includes:
[0113] A calculation submodule, configured to execute a first calculation step, to calculate the distance between each point and the line laser radar on the first predetermined axis according to the position of the midpoint of the point cloud in one frame, and obtain a plurality of distance components;
[0114] A combining submodule, used for executing the combining step, forming the calibration point cloud with the points whose distance components are equal to the calibration plate distance components, wherein the calibration plate distance components are the distance between the calibration plate and the line laser radar on the first predetermined axis;
[0115] The repeating submodule is used to repeat the first calculation step and the combination step at least once in sequence until all the calibration point clouds corresponding to the positions of the calibration plate are obtained n times.
[0116] In the above implementation, according to the point cloud data of the nth frame at the m distance Each point (ρ i ,angle i ) is compared with the distance m of the line laser radar on the y axis to obtain the point cloud data on the calibration plate ,Right now ,in, The calibration point cloud can be obtained by taking the point cloud data on the calibration plate of the nth frame at a distance of m.
[0117] In order to obtain image calibration points, in an optional implementation, the control unit includes:
[0118] A detection module, used for performing straight line detection on the laser stripes on the calibration plate in the image corresponding to a frame of the point cloud where the three-dimensional calibration point is located, to obtain a laser line;
[0119] The third determination module is used to determine the intersection of the laser line and the edge of the calibration plate as the image calibration point.
[0120] In the above implementation, YOLOV8 is used to recognize images. The calibration plate in the image is extracted by using the Hough line extraction method to extract the horizontal laser stripes on the calibration plate and save the image calibration points. .
[0121] In order to ensure the accuracy of the calibration result, in an optional implementation manner, the above device further includes:
[0122] a third determination unit, configured to execute a third determination step, after performing extrinsic calibration according to the plurality of groups of calibration point pairs to obtain an extrinsic calibration matrix, and determining a projection point of each of the three-dimensional calibration points on the corresponding image according to the extrinsic calibration matrix;
[0123] A calculation unit, used to perform a second calculation step, calculate the distance between each of the above-mentioned projection points and the corresponding above-mentioned image calibration point, and obtain a plurality of plane distances;
[0124] a deleting unit, configured to execute the deleting step, and to delete the calibration point pair corresponding to the largest plane distance when the largest plane distance is greater than a maximum distance threshold and / or an average value of the plurality of plane distances is greater than an average distance threshold;
[0125] A calibration unit, used to execute the calibration step, perform extrinsic parameter calibration according to the remaining calibration point pairs, and obtain a modified extrinsic parameter calibration matrix;
[0126] An updating unit is used to update the above-mentioned extrinsic parameter calibration matrix to the above-mentioned modified extrinsic parameter calibration matrix, and repeat the above-mentioned third determination step, the above-mentioned second calculation step, the above-mentioned deletion step and the above-mentioned calibration step at least once in sequence, until the maximum above-mentioned plane distance is less than or equal to the above-mentioned maximum distance threshold and the average value of multiple above-mentioned plane distances is less than or equal to the above-mentioned average distance threshold, and determine that the current above-mentioned modified extrinsic parameter calibration matrix is the optimal extrinsic parameter calibration matrix.
[0127] In the above implementation, the point in polar coordinates obtained is Convert to Cartesian coordinate system , , where θ is the installation angle between the laser transmitter and the laser receiver of the line laser radar. Calculate the complete image calibration points and 3D calibration points at different distances m , using calib lidar With calib imgPerform external parameter calibration. According to the external parameter calibration results, calculate the distance Δd between the pixel point projected on the image and the real pixel point on the image of each line lidar point. If the maximum and average values of Δd are greater than their respective expected values, remove the group of data points with the largest Δd and then recalibrate. If the maximum and average values of Δd are less than their respective expected values, stop the calibration and return the external parameter calibration matrix.
[0128] The above-mentioned extrinsic parameter calibration device for the line laser radar and camera includes a processor and a memory, and the above-mentioned acquisition unit, the first determination unit, the second determination unit and the calibration unit are all stored in the memory as program units, and the processor executes the above-mentioned program units stored in the memory to realize the corresponding functions. The above-mentioned modules are all located in the same processor; or, the above-mentioned modules are located in different processors in the form of any combination.
[0129] The processor includes a kernel, which retrieves the corresponding program unit from the memory. One or more kernels can be set, and the problem of automatically filtering accurate calibration data from line lidar point clouds and camera images in the prior art can be solved by adjusting kernel parameters.
[0130] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM, and the memory includes at least one memory chip.
[0131] An embodiment of the present invention provides a computer-readable storage medium, which includes a stored program, wherein when the program is running, the device where the computer-readable storage medium is located is controlled to execute the external parameter calibration method of the line laser radar and camera.
[0132] Specifically, the external parameter calibration method of the line laser radar and camera includes:
[0133] Step S201, an acquisition step, acquiring n calibration point clouds and n images, wherein the n calibration point clouds are respectively point clouds belonging to the calibration plate acquired by controlling the line laser radar after the calibration plate moves once when the calibration plate moves n times in sequence along the second predetermined axis, and the n images are respectively images of the calibration plate acquired by controlling the camera after the calibration plate moves once when the calibration plate moves n times in sequence along the second predetermined axis, and the second predetermined axis is one of the x-axis and the y-axis except the first predetermined axis;
[0134] Step S202, a first determination step, determining a three-dimensional calibration point according to the n calibration point clouds, the three-dimensional calibration point being an edge point of a jump calibration point cloud, the jump calibration point cloud being one of the edge points in the multiple calibration point clouds where a jump occurs, the edge point being a point corresponding to the maximum scanning angle in the calibration point cloud, the scanning angle being an angle between a laser beam corresponding to a point in the calibration point cloud and a normal to the line laser radar;
[0135] Step S203, a second determination step, determining an image calibration point according to the three-dimensional calibration point, wherein the image calibration point is a point on a target image corresponding to the three-dimensional calibration point, and the target image is the image corresponding to a frame of the point cloud where the three-dimensional calibration point is located;
[0136] Step S204, controlling the calibration plate to move multiple times along the first predetermined axis, and repeating the acquisition step, the first determination step, and the second determination step once after each movement, to obtain multiple groups of calibration point pairs, wherein one group of calibration point pairs includes one of the three-dimensional calibration points and one of the image calibration points;
[0137] Step S205 , performing extrinsic parameter calibration according to the multiple groups of calibration point pairs to obtain an extrinsic parameter calibration matrix.
[0138] An embodiment of the present invention provides a processor, which is used to run a program, wherein the above-mentioned program executes the above-mentioned external parameter calibration method of the line laser radar and camera when running.
[0139] Specifically, the external parameter calibration method of the line laser radar and camera includes:
[0140] Step S201, an acquisition step, acquiring n calibration point clouds and n images, wherein the n calibration point clouds are respectively point clouds belonging to the calibration plate acquired by controlling the line laser radar after the calibration plate moves once when the calibration plate moves n times in sequence along the second predetermined axis, and the n images are respectively images of the calibration plate acquired by controlling the camera after the calibration plate moves once when the calibration plate moves n times in sequence along the second predetermined axis, and the second predetermined axis is one of the x-axis and the y-axis except the first predetermined axis;
[0141] Step S202, a first determination step, determining a three-dimensional calibration point according to the n calibration point clouds, the three-dimensional calibration point being an edge point of a jump calibration point cloud, the jump calibration point cloud being one of the edge points in the multiple calibration point clouds where a jump occurs, the edge point being a point corresponding to the maximum scanning angle in the calibration point cloud, the scanning angle being an angle between a laser beam corresponding to a point in the calibration point cloud and a normal to the line laser radar;
[0142] Step S203, a second determination step, determining an image calibration point according to the three-dimensional calibration point, wherein the image calibration point is a point on a target image corresponding to the three-dimensional calibration point, and the target image is the image corresponding to a frame of the point cloud where the three-dimensional calibration point is located;
[0143] Step S204, controlling the calibration plate to move multiple times along the first predetermined axis, and repeating the acquisition step, the first determination step, and the second determination step once after each movement, to obtain multiple groups of calibration point pairs, wherein one group of calibration point pairs includes one of the three-dimensional calibration points and one of the image calibration points;
[0144] Step S205 , performing extrinsic parameter calibration according to the multiple groups of calibration point pairs to obtain an extrinsic parameter calibration matrix.
[0145] An embodiment of the present invention provides an external parameter calibration system, which includes a calibration board, a two-axis mobile platform, a processor, a memory, and a program stored in the memory and executable on the processor. The calibration board is located on the two-axis mobile platform, and the two-axis mobile platform is used to drive the calibration board to move along an x-axis or a y-axis perpendicular to each other. In the direction of a first predetermined axis, the line laser radar and the camera are both located on one side of the calibration board. The first predetermined axis is one of the x-axis and the y-axis. When the processor executes the program, at least the following steps are implemented:
[0146] Step S201, an acquisition step, acquiring n calibration point clouds and n images, wherein the n calibration point clouds are respectively point clouds belonging to the calibration plate acquired by controlling the line laser radar after the calibration plate moves once when the calibration plate moves n times in sequence along the second predetermined axis, and the n images are respectively images of the calibration plate acquired by controlling the camera after the calibration plate moves once when the calibration plate moves n times in sequence along the second predetermined axis, and the second predetermined axis is one of the x-axis and the y-axis except the first predetermined axis;
[0147] Step S202, a first determination step, determining a three-dimensional calibration point according to the n calibration point clouds, the three-dimensional calibration point being an edge point of a jump calibration point cloud, the jump calibration point cloud being one of the edge points in the multiple calibration point clouds where a jump occurs, the edge point being a point corresponding to the maximum scanning angle in the calibration point cloud, the scanning angle being an angle between a laser beam corresponding to a point in the calibration point cloud and a normal to the line laser radar;
[0148] Step S203, a second determination step, determining an image calibration point according to the three-dimensional calibration point, wherein the image calibration point is a point on a target image corresponding to the three-dimensional calibration point, and the target image is the image corresponding to a frame of the point cloud where the three-dimensional calibration point is located;
[0149] Step S204, controlling the calibration plate to move multiple times along the first predetermined axis, and repeating the acquisition step, the first determination step, and the second determination step once after each movement, to obtain multiple groups of calibration point pairs, wherein one group of calibration point pairs includes one of the three-dimensional calibration points and one of the image calibration points;
[0150] Step S205 , performing extrinsic parameter calibration according to the multiple groups of calibration point pairs to obtain an extrinsic parameter calibration matrix.
[0151] The present application also provides a computer program product, which, when executed on a data processing device, is suitable for executing a program for initializing at least the following method steps:
[0152] Step S201, an acquisition step, acquiring n calibration point clouds and n images, wherein the n calibration point clouds are respectively point clouds belonging to the calibration plate acquired by controlling the line laser radar after the calibration plate moves once when the calibration plate moves n times in sequence along the second predetermined axis, and the n images are respectively images of the calibration plate acquired by controlling the camera after the calibration plate moves once when the calibration plate moves n times in sequence along the second predetermined axis, and the second predetermined axis is one of the x-axis and the y-axis except the first predetermined axis;
[0153] Step S202, a first determination step, determining a three-dimensional calibration point according to the n calibration point clouds, the three-dimensional calibration point being an edge point of a jump calibration point cloud, the jump calibration point cloud being one of the edge points in the multiple calibration point clouds where a jump occurs, the edge point being a point corresponding to the maximum scanning angle in the calibration point cloud, the scanning angle being an angle between a laser beam corresponding to a point in the calibration point cloud and a normal to the line laser radar;
[0154] Step S203, a second determination step, determining an image calibration point according to the three-dimensional calibration point, wherein the image calibration point is a point on a target image corresponding to the three-dimensional calibration point, and the target image is the image corresponding to a frame of the point cloud where the three-dimensional calibration point is located;
[0155] Step S204, controlling the calibration plate to move multiple times along the first predetermined axis, and repeating the acquisition step, the first determination step, and the second determination step once after each movement, to obtain multiple groups of calibration point pairs, wherein one group of calibration point pairs includes one of the three-dimensional calibration points and one of the image calibration points;
[0156] Step S205 , performing extrinsic parameter calibration according to the multiple groups of calibration point pairs to obtain an extrinsic parameter calibration matrix.
[0157] Obviously, those skilled in the art should understand that the above modules or steps of the present invention can be implemented by a general computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices, they can be implemented by a program code executable by a computing device, so that they can be stored in a storage device and executed by the computing device, and in some cases, the steps shown or described can be executed in a different order than here, 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.
[0158] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.
[0159] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0160] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0161] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0162] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0163] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.
[0164] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules 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 technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.
[0165] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
[0166] From the above description, it can be seen that the above embodiments of the present application achieve the following technical effects:
[0167] 1) In the extrinsic parameter calibration method of the line laser radar and camera of the present application, the two-axis mobile platform is first controlled to drive the calibration plate to move along the second predetermined axis n times, and a calibration point cloud and an image are collected each time. The calibration point cloud is the point cloud belonging to the calibration plate, and one edge point jump occurs from the n calibration point clouds is found, and the edge point of the calibration point cloud is determined as a three-dimensional calibration point, and the point corresponding to the three-dimensional calibration point is found in the corresponding image to obtain the image calibration point. The three-dimensional calibration point and the image calibration point form a group of calibration point pairs, and the calibration plate is controlled to move along the first predetermined axis for multiple times, and the above steps are repeated each time to obtain multiple groups of calibration point pairs. The multiple groups of calibration point pairs are subjected to extrinsic parameter calibration to obtain an extrinsic parameter calibration matrix to complete the calibration. Since the recognition accuracy of the edge point position where the jump occurs is high, the accuracy of the calibration data is guaranteed, thereby improving the accuracy of the calibration, and solving the problem that it is difficult to automatically screen out accurate calibration data from the line laser radar point cloud and the camera image in the prior art.
[0168] 2) In the extrinsic parameter calibration device of the line laser radar and camera of the present application, the two-axis mobile platform is first controlled to drive the calibration plate to move along the second predetermined axis n times, and a calibration point cloud and an image are collected each time. The calibration point cloud is the point cloud belonging to the calibration plate, and one of the edge points where a jump occurs is found from the n calibration point clouds, and the edge point of the calibration point cloud is determined as a three-dimensional calibration point, and the point corresponding to the three-dimensional calibration point is found in the corresponding image to obtain the image calibration point. The three-dimensional calibration point and the image calibration point form a group of calibration point pairs, and the calibration plate is controlled to move along the first predetermined axis for multiple times, and the above steps are repeated each time to obtain multiple groups of calibration point pairs. The multiple groups of calibration point pairs are subjected to extrinsic parameter calibration to obtain an extrinsic parameter calibration matrix to complete the calibration. Since the recognition accuracy of the edge point position where the jump occurs is high, the accuracy of the calibration data is guaranteed, thereby improving the accuracy of the calibration, and solving the problem that it is difficult to automatically screen out accurate calibration data from the line laser radar point cloud and the camera image in the prior art.
[0169] The above description is only the preferred embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.
Claims
1. A method for calibrating the external parameters of a line laser radar and a camera, characterized in that: The calibration plate is located on a two-axis mobile platform, and the two-axis mobile platform is used to drive the calibration plate to move along an x-axis or a y-axis perpendicular to each other. In the direction of a first predetermined axis, the line laser radar and the camera are both located on one side of the calibration plate, and the first predetermined axis is one of the x-axis and the y-axis. The method includes: an acquisition step, acquiring n calibration point clouds and n images, wherein the n calibration point clouds are respectively point clouds belonging to the calibration plate acquired by controlling the line laser radar after the calibration plate moves once when the calibration plate moves n times in sequence along a second predetermined axis, and the n images are respectively images of the calibration plate acquired by controlling the camera after the calibration plate moves once when the calibration plate moves n times in sequence along the second predetermined axis, and the second predetermined axis is one of the x-axis and the y-axis except the first predetermined axis; In a first determination step, a three-dimensional calibration point is determined according to n calibration point clouds, wherein the three-dimensional calibration point is an edge point of a jump calibration point cloud, wherein the jump calibration point cloud is one of the edge points in the multiple calibration point clouds where a jump occurs, and the edge point is a point corresponding to the maximum scanning angle in the calibration point cloud, wherein the scanning angle is an angle between a laser beam corresponding to a point of the calibration point cloud and a normal line of the line laser radar; A second determination step is to determine an image calibration point according to the three-dimensional calibration point, wherein the image calibration point is a point on a target image corresponding to the three-dimensional calibration point, and the target image is an image corresponding to a frame of the point cloud where the three-dimensional calibration point is located; Controlling the calibration plate to move multiple times along the first predetermined axis, and repeating the acquisition step, the first determination step, and the second determination step once in sequence after each movement to obtain multiple groups of calibration point pairs, wherein a group of calibration point pairs includes one of the three-dimensional calibration points and one of the image calibration points; Perform external parameter calibration according to multiple groups of calibration point pairs to obtain an external parameter calibration matrix; obtain n calibration point clouds and n images, including: a control step, controlling the calibration plate to move n times in sequence along the second predetermined axis, and controlling the line laser radar to collect a frame of point cloud of the calibration plate after each movement of the calibration plate, and controlling the camera to collect an image of the calibration plate after each movement of the calibration plate; a first determination step, determining the corresponding calibration point cloud according to the position of the calibration plate n times, the calibration point cloud being the point cloud belonging to the calibration plate in one frame of the point cloud; controlling the calibration plate to move n times in sequence along the second predetermined axis n times, including: determining the intersection of the field of view of the linear laser radar and the field of view of the camera as the common field of view; determining the second predetermined axis movement step according to the common field of view and the angular resolution of the linear laser radar, so that the change in the scanning angle corresponding to the calibration plate moving n times along the second predetermined axis is less than the angle of the common field of view, and the change in the scanning angle corresponding to the calibration plate moving once along the second predetermined axis is less than the angular resolution of the linear laser radar; controlling the calibration plate to move n times along the second predetermined axis in sequence according to the second predetermined axis movement step.
2. The method according to claim 1, characterized in that Determining three-dimensional calibration points according to the n calibration point clouds includes: The edge points in each of the calibration point clouds are combined into an edge point cloud according to the order of collection; Calculating the absolute value of the difference between the scanning angles of two adjacent edge points in the edge point cloud to obtain a plurality of angle differences; The point in the collection order later than the two adjacent edge points corresponding to the angle difference equal to the angular resolution of the line laser radar is determined as the three-dimensional calibration point.
3. The method according to claim 1, characterized in that Determining the corresponding calibration point cloud according to the positions of the calibration plate n times, including: A first calculation step is to calculate the distance between each point and the line laser radar on the first predetermined axis according to the position of the point in the point cloud of one frame, so as to obtain a plurality of distance components; A combining step, forming the calibration point cloud with points whose distance component is equal to the calibration plate distance component, wherein the calibration plate distance component is the distance between the calibration plate and the line laser radar on the first predetermined axis; The first calculating step and the combining step are sequentially repeated at least once until all the calibration point clouds corresponding to the positions of the calibration plate are obtained n times.
4. The method according to claim 1, characterized in that: Determining image calibration points according to the three-dimensional calibration points includes: In the image corresponding to a frame of the point cloud where the three-dimensional calibration point is located, performing straight line detection on the laser stripes on the calibration plate to obtain laser lines; The intersection point of the laser line and the edge of the calibration plate is determined as the image calibration point.
5. The method according to any one of claims 1 to 4, characterized in that After performing extrinsic parameter calibration according to the plurality of groups of calibration point pairs to obtain an extrinsic parameter calibration matrix, the method further includes: A third determination step is to determine the projection point of each of the three-dimensional calibration points on the corresponding image according to the extrinsic calibration matrix; A second calculation step is to calculate the distance between each of the projection points and the corresponding image calibration point to obtain a plurality of plane distances; a deleting step, deleting the calibration point pair corresponding to the largest plane distance when the largest plane distance is greater than a maximum distance threshold and / or an average value of a plurality of plane distances is greater than an average distance threshold; A calibration step, performing extrinsic parameter calibration according to the remaining calibration point pairs to obtain a modified extrinsic parameter calibration matrix; The extrinsic parameter calibration matrix is updated to the modified extrinsic parameter calibration matrix, and the third determining step, the second calculating step, the deleting step and the calibration step are sequentially repeated at least once until the maximum plane distance is less than or equal to the maximum distance threshold and the average value of multiple plane distances is less than or equal to the average distance threshold, and the current modified extrinsic parameter calibration matrix is determined to be the optimal extrinsic parameter calibration matrix.
6. An external parameter calibration device for a line laser radar and a camera, characterized in that: The calibration plate is located on a two-axis mobile platform, and the two-axis mobile platform is used to drive the calibration plate to move along an x-axis or a y-axis perpendicular to each other. In the direction of a first predetermined axis, the line laser radar and the camera are both located on one side of the calibration plate, and the first predetermined axis is one of the x-axis and the y-axis. The device includes: an acquisition unit, configured to execute the acquisition step, to acquire n calibration point clouds and n images, wherein the n calibration point clouds are respectively point clouds belonging to the calibration plate acquired by controlling the line laser radar after the calibration plate moves once when the calibration plate moves n times in sequence along the second predetermined axis, and the n images are respectively images of the calibration plate acquired by controlling the camera after the calibration plate moves once when the calibration plate moves n times in sequence along the second predetermined axis, and the second predetermined axis is one of the x-axis and the y-axis except the first predetermined axis; A first determination unit is used to perform a first determination step, determining a three-dimensional calibration point according to n calibration point clouds, wherein the three-dimensional calibration point is an edge point of a jump calibration point cloud, wherein the jump calibration point cloud is one of the edge points in the multiple calibration point clouds where a jump occurs, and wherein the edge point is a point corresponding to a maximum scanning angle in the calibration point cloud, wherein the scanning angle is an angle between a laser beam corresponding to a point of the calibration point cloud and a normal line of the line laser radar; A second determining unit is used to perform a second determining step, determining an image calibration point according to the three-dimensional calibration point, wherein the image calibration point is a point on a target image corresponding to the three-dimensional calibration point, and the target image is the image corresponding to a frame of the point cloud where the three-dimensional calibration point is located; A control unit, configured to control the calibration plate to move multiple times along the first predetermined axis, and to repeat the acquisition step, the first determination step, and the second determination step once in sequence after each movement, to obtain multiple groups of calibration point pairs, wherein a group of calibration point pairs includes one of the three-dimensional calibration points and one of the image calibration points; The calibration unit is used to perform external parameter calibration according to multiple groups of calibration point pairs to obtain an external parameter calibration matrix; the first determination unit includes: a control module, which is used to execute a control step, control the calibration plate to move n times in sequence along the second predetermined axis, and control the line laser radar to collect a frame of point cloud of the calibration plate after each movement of the calibration plate, and control the camera to collect an image of the calibration plate after each movement of the calibration plate; the second determination module is used to execute the first determination step, and determine the corresponding calibration point cloud according to the position of the calibration plate n times, and the calibration point cloud is the point cloud belonging to the calibration plate in one frame of the point cloud; the control module includes: the first determination sub A module is used to determine the intersection of the field of view of the line laser radar and the field of view of the camera as the common field of view; a second determination submodule is used to determine the second predetermined axis movement step according to the common field of view and the angular resolution of the line laser radar, so that the change in the scanning angle corresponding to the calibration plate moving n times along the second predetermined axis is less than the angle of the common field of view, and the change in the scanning angle corresponding to the calibration plate moving once along the second predetermined axis is less than the angular resolution of the line laser radar; a control submodule is used to control the calibration plate to move n times along the second predetermined axis in sequence according to the second predetermined axis movement step.
7. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the method according to any one of claims 1 to 5 is implemented.
8. An external parameter calibration system, characterized in that: include: A calibration plate, a two-axis mobile platform, one or more processors, a memory, and one or more programs, wherein the calibration plate is located on the two-axis mobile platform, the two-axis mobile platform is used to drive the calibration plate to move along an x-axis or a y-axis perpendicular to each other, in the direction of a first predetermined axis, the line laser radar and the camera are both located on one side of the calibration plate, the first predetermined axis is one of the x-axis and the y-axis, the one or more programs are stored in the memory and are configured to be executed by the one or more processors, the one or more programs include methods for executing any one of claims 1 to 5.
Citation Information
Patent Citations
Calibration method of laser radar and camera
CN113253246A
Laser radar external parameter calibration device
CN220730421U
