Vehicle-mounted steel coil center position detection method based on three-dimensional laser radar
By using 3D lidar calibration and point cloud processing technology, the robustness and accuracy issues of steel coil position detection in unmanned overhead crane systems have been resolved, achieving efficient and accurate steel coil core positioning, which is suitable for complex and high-risk environments.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-08
- Publication Date
- 2026-03-31
AI Technical Summary
Existing technologies for detecting the position information of onboard steel coils in unmanned overhead crane systems suffer from poor robustness, long processing time, large calculation errors, and limited adaptability.
A method for detecting the position of the coil core on a vehicle based on a 3D LiDAR is adopted. By calibrating the 3D LiDAR, point cloud data of the vehicle body and the coil are obtained. Point cloud segmentation is performed using a pass-through filter and Euclidean clustering algorithm. Combined with cylindrical fitting and weight calculation, the coordinates of the coil core are obtained.
It improves the accuracy and stability of steel coil core positioning in complex environments, adapts to the identification of steel coils of different specifications, avoids equipment wear and safety hazards, is suitable for high-temperature and high-risk environments, simplifies sensor installation, and improves measurement accuracy and response speed.
Smart Images

Figure CN121763294A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of automatic control technology, and in particular to a method for detecting the position of a vehicle-mounted steel coil core based on a three-dimensional lidar. Background Technology
[0002] During loading operations of unmanned overhead crane systems, obtaining the position information of the steel coil core is necessary for hoisting steel coils onto the vehicle. Therefore, obtaining the position of the steel coil core on the vehicle is one of the important steps in realizing automated loading of unmanned overhead cranes.
[0003] Reference 1 (Benxi Iron and Steel Information Automation Co., Ltd. A method, device, equipment and medium for positioning steel coils based on a flatbed truck [P]. CN120318326A. 2025.08.22) provides a method, device, equipment and medium for positioning steel coils based on a flatbed truck. This patent acquires images of the flatbed truck without supplementary lighting and images with supplementary lighting from multiple directions. Through image fusion and shadow area analysis, the initial fitted coordinates and tilt angle of the steel coil are calculated, and the center coordinates of the steel coil are finally determined. However, this method has a high dependence on illumination, high deployment cost of the supplementary lighting system, information loss in the reconstruction of the three-dimensional shape of the steel coil from the two-dimensional image, and large positioning error.
[0004] Reference 2 (Yu Xiaolin. Design and Implementation of Target Detection System for Steel Coil Logistics Warehouse Based on Point Cloud Data [D]. Chongqing University, 2020.) proposes that when steel coils are out of the warehouse, the coordinates of the column center on the saddle can be calculated by fitting the plane of the saddle plate of the carrier and the geometric relationship between the steel column and the plane. However, this method does not obtain accurate saddle plane information, resulting in a large error in the calculation of the column center coordinates and weak applicability. Summary of the Invention
[0005] To address the technical problems of existing vehicle-mounted steel coil position detection schemes, such as poor robustness, long processing time, large calculation errors, and limited adaptability, this invention provides a method for detecting the core position of vehicle-mounted steel coils based on three-dimensional LiDAR, applicable to vehicle loading scenarios during warehouse material transportation by unmanned overhead cranes. The technical solution is as follows:
[0006] A method for detecting the position of a vehicle-mounted steel coil core based on a three-dimensional lidar, the method comprising: S1. Calibrate the 3D lidar to determine its position relative to the world coordinate system: S11. Use the three-dimensional lidar above the parking area to scan the vehicle, obtain the radar point cloud, and send the radar point cloud to the information processing server. S12. The information processing server transforms the radar point cloud coordinate data from the radar coordinate system to the world coordinate system to obtain the calibrated vehicle panel point cloud data. S2. Based on the calibrated vehicle panel point cloud data, obtain the vehicle panel corner information: S21. Using a pass-through filter, set the segmentation thresholds for the x and y coordinates to segment the environmental point cloud and extract the vehicle point cloud; S22. Using a layered extraction method along the z-axis, by setting a distance threshold for each layer, the vehicle point cloud is traversed to extract the layer with the most concentrated point cloud, which is then saved as the vehicle base reference point cloud. ; S23. Using a pass-through filter, the position information of the vehicle front segmentation line is calculated based on the vehicle front point cloud density and empirical values. The vehicle front point cloud information is then segmented and filtered to calculate the segmentation coordinates of the vehicle front and the vehicle panel. S24. Based on the reference point cloud of the vehicle panel, calculate the centroid of the point cloud of the vehicle panel, set the distance thresholds in the x and y directions, and extract the rectangular point cloud of the vehicle panel; use the rectangular point cloud of the vehicle panel to calculate the fitting plane of the vehicle panel. S25. Traverse the point cloud within a certain distance threshold range of the fitted plane point cloud of the vehicle panel, obtain the corner point information of the vehicle panel, determine the four quadrants on the XOY plane according to the equation of the fitted plane and the centroid, and calculate the coordinate information of the four corner points of the vehicle panel. S3. Obtain point cloud data of the vehicle-mounted steel coil: S31. Obtain the rotation matrix based on the fitting plane normal vector of the vehicle panel, and perform orientation correction on the vehicle panel point cloud after the three-dimensional lidar calibration in the world coordinate system to make the vehicle panel parallel to the ground in the world coordinate system, thereby setting the threshold range in the vertical direction of the steel coil point cloud. S32. A pass-through filter is used to filter out the point cloud of the steel coil based on the corner coordinate information of the car body and the height information of the steel coil. S33. For the point cloud of the vehicle-mounted steel coil, set the clustering threshold, minimum number of clustered point clouds, and maximum number of clustered point clouds, perform clustering and segmentation on the steel coil point cloud, and extract each group of individual steel coil point cloud data. S4. Based on the point cloud data of the vehicle-mounted steel coil, obtain the position information of the core of the steel coil to be tested: S41. Calculate the average distance of each point in the point cloud data of the steel coil, and assign a weight to each point according to the density. S42. Randomly sample all points using weight information to obtain steel coil point cloud sampling points. Fit the cylindrical model and the cylinder axis equation based on the steel coil point cloud sampling points. S43. Calculate the center coordinates based on the projected coordinates of the steel coil point cloud sampling points along the axial direction; S44. Correct the center coordinates based on the variance eigenvalues of the projection points, save the result as the center coordinates of the steel coil, and transmit the coordinate information back to the information processing server.
[0007] In step S11, a three-dimensional lidar is installed above the parking area to ensure that vehicles can be scanned by the radar within a specified range. The three-dimensional lidar is connected to the information processing server via a gigabit network cable, and the user's display is connected to the information processing server.
[0008] In step S12, a series of spatial points with known world coordinates and their image coordinates are determined by a checkerboard calibration plate.
[0009] The transformation formula between the lidar coordinate system and the world coordinate system in S12 is as follows: Where x, y, and z are the x, y, and z coordinates of the relative position between the radar origin and the target calibration point, respectively; , , These are the x, y, and z coordinates of the i-th point cloud data in the point cloud data before conversion, respectively. , , These are the x, y, and z coordinates of the i-th point cloud data after conversion, respectively; , , These represent the rotation angles of the point cloud data around the x-axis, y-axis, and z-axis, respectively.
[0010] The pass filter in S21 is defined as follows: in, , , The filters are respectively in , , The upper limit in the direction, in mm, is generally 0, 1500 mm, or 1000 mm. , , The filters are respectively in , , The lower limit in the direction, in mm, is generally taken as 19500mm, 5000mm, and 2500mm. , , The preset dimensional direction of the vehicle point cloud range; The S22 vehicle plate reference point cloud The calculation formula is: in, For the i-th layer of point cloud coordinate; The height threshold is determined based on experience and is generally taken as 100mm. Let be the point cloud density of the i-th layer of the vehicle body; This represents the initial point cloud density of the vehicle body.
[0011] The segmentation coordinates of the vehicle front and the vehicle body in S23 The calculation formula is as follows: in: It is the x-coordinate of the dividing line between the front of the vehicle and the body panel; It is the x-coordinate of the i-th point being traversed; It is the x-coordinate of the head point of the vehicle board, that is, the maximum coordinate value of the vehicle board reference point cloud in the x-direction, which is generally taken as 10000mm. It is the point cloud density of the point cloud at the front of the vehicle body; It is the point cloud density of the i-th point traversed on the horizontal axis towards the direction of the car's front.
[0012] The centroid of the point cloud on the vehicle plate in S24 for: Car panel rectangular point cloud for: in, , The center point of the vehicle body The x and y coordinates are in mm. , These are the maximum values of the x and y coordinates of the rectangular point cloud on the vehicle panel, respectively, in mm; , These are the minimum x and y coordinates of the rectangular point cloud on the vehicle panel, respectively, in mm; , These are the threshold values for the horizontal and vertical coordinate regions of the vehicle body, typically set to 5000mm and 500mm respectively. Represents the rectangular point cloud of the vehicle body; This represents the reference point cloud of the vehicle body after the front end has been segmented; Car body fitting plane The calculation formula is as follows: in: , These are the sum of squares of the abscissa and ordinate of the point cloud on the vehicle platform, respectively. , , These are the x, y, and z coordinates of the point cloud on the vehicle platform, respectively; , , These are the dot products of the x, y, and z coordinates of the point cloud on the vehicle platform, respectively. The number of point clouds on the vehicle body; The distance threshold in S25 is 200mm. The calculation process for the corner coordinates of the vehicle panel is as follows: Based on the equation of the fitted plane and the centroid Given four quadrants, calculate the four corner points of the vehicle body. The coordinate information is such that the four corner points correspond to the four quadrants of the plane in sequence, taking the first quadrant as an example: The formula is as follows: in, , These are the x and y coordinates of the centroid, respectively; It is the distance from the center of the circle within the first quadrant region centered on the centroid of the fitted plane of the vehicle body; the farthest point is the corner point of the first quadrant. ; Add clouds to the car body.
[0013] The rotation matrix in S31 The calculation formula is as follows: in, It is the normal vector of the fitted plane. The angle between the z-axis and the world coordinate system; The normal vector of the fitting plane is derived from the fitting plane of the vehicle body. We get a=A, b=B, c=-1; The pass-through filter in S32 is defined as follows: in, , These are the x-coordinates of corner point 2 and corner point 1, respectively, in mm. They are typically taken as 3800 mm and 19000 mm, respectively. , These are the ordinates of corner point 4 and corner point 1, respectively, in mm. They are typically taken as 1500 mm and 4600 mm, respectively. These are the z-coordinates of the four corner points, in mm, typically taken as 1400 mm. This is the height threshold for the vehicle-mounted steel coil, in mm, typically taken as 3000 mm.
[0014] In S33, a Euclidean clustering algorithm is used. Based on preset clustering conditions (determined according to field experience), the filtered vehicle-mounted steel coil point cloud is segmented using the Euclidean clustering algorithm. From the segmented point cloud clusters, two independent point cloud sets representing the curved surface of the steel coil are extracted, which are each group of individual steel coil point cloud data.
[0015] The Euclidean clustering parameters are set as follows: clustering threshold t, minimum number of cluster points min_size, and maximum number of cluster points max_size. Based on field experience, the clustering threshold is set to a range of (100, 200) mm; the minimum number of cluster points is set to a range of (600, 800); and the maximum number of cluster points is set to a range of (1500, 2000).
[0016] In step S41, the average distance from each point to its nearest point is calculated using K-nearest neighbor search. The density feature value of each point is defined as the reciprocal of the average distance. The density feature values are normalized into weights, and points in the point cloud are copied according to the point cloud density weights. High-density points are copied. This is to increase the number of point clouds. Take 3 experience points; The density characteristic quantity is: in, The average distance between neighboring points; The density feature weights are: in, To calculate the maximum density feature value for all points, This is the minimum density feature quantity obtained by calculating all points.
[0017] In step S42, the RANSAC random sampling consensus algorithm is used to perform cylindrical fitting on the point cloud of the steel coil, and the radius range of the fitted cylinder is set based on field experience. The unit is mm; and the axial direction of the cylinder is set to... Oriented toward the y-axis.
[0018] The calculation process for fitting the cylindrical model and the equation of the cylinder axis in S42 is as follows: Wherein, the normal vector of the fitted cylinder axis is , Let be a point on the axis of the cylinder. Let be the radius of the cylinder. To fit any point on the cylindrical surface.
[0019] The coordinates of the projection center of the sampling point in S43 along the axial direction are: The two endpoints of the point cloud projected onto the axis are respectively and ; The variance expression for S44 is as follows: in, Let be the number of all interior points. Let be the set of interior points. Let be the average value of the interior points along the x-axis. This represents the average value of the interior points along the y-axis. The average value of the interior points along the z-axis; like If the distribution is too scattered, a weighted average adjustment is needed to obtain the corrected center point. The weighted weights ω i and the center Coordinates are defined as follows: The var_threshold is the variance determination threshold, which is set to 4 based on experience. The interior points are a point cloud that conforms to the cylindrical model.
[0020] If the variance is greater than the set threshold, the above weight-based method is used for correction; if the variance is less than the threshold, no correction is needed. The formula for calculating the center of the steel coil is as follows: in, , These are the maximum and minimum x-coordinates of the point cloud of the steel coil, respectively. , These are the maximum and minimum y-coordinates of the point cloud of the steel coil, respectively. , These are the maximum and minimum z-coordinates of the point cloud of the steel coil, respectively.
[0021] The above describes the process of using a cylindrical fitting method on the point cloud after it has been processed by density feature weighting, and randomly selecting a certain number of points to obtain a point set. And calculate the normal vector of the point. Seven characteristic parameters describing the fitted cylinder can be obtained by least-squares optimization iteration. Points conforming to the cylindrical model are considered interior points, while points not conforming to the cylindrical model are considered exterior points. Interior points conforming to the cylindrical model must satisfy the following two conditions:
[0022] In the formula: Let be the distance from the point to the axis of the fitted cylinder. The calculation formula is as follows: On the other hand, the present invention also provides a vehicle-mounted steel coil position detection system based on three-dimensional lidar, applied to vehicle loading scenarios during warehouse material transportation by unmanned overhead cranes; the system includes: The 3D LiDAR calibration module is used to calibrate the 3D LiDAR and complete the calibration of the position between the LiDAR coordinate system and the world coordinate system. The point cloud data acquisition module is used to acquire point cloud data of the vehicle under test and the on-board steel coil in the world coordinate system using a calibrated 3D LiDAR. The point cloud data processing module is used for: Based on the point cloud data of the vehicle under test in the world coordinate system, obtain the point cloud data of the vehicle body and the steel coil; Based on the point cloud data, the position of the onboard steel coil core of the vehicle under test is obtained.
[0023] In another aspect, the present invention also provides an electronic device comprising a processor and a memory; wherein the memory stores at least one instruction, which is loaded and executed by the processor to implement the above-described method.
[0024] In another aspect, the present invention also provides a computer-readable storage medium storing at least one instruction that is loaded and executed by a processor to implement the above-described method.
[0025] The beneficial effects of the technical solutions provided in the embodiments of the present invention include at least the following: Compared with steel coil core identification schemes that use visible light cameras as sensors, the technical solution of this invention is more suitable for acquiring three-dimensional geometric data of steel coil cores in complex industrial environments and is unaffected by changes in workshop lighting conditions. Compared with steel coil core identification schemes that use contact measuring instruments, the technical solution of this invention is more suitable for non-contact measurement in high-temperature and high-risk environments, avoiding equipment wear and safety hazards. Compared with identification schemes that use multi-line lidar, the technical solution of this invention can acquire complete point cloud data of the steel coil end face in a fixed installation position, without the need for complex sensor motion mechanisms, significantly improving system stability. Compared with identification schemes that use vertical scanning, the technical solution of this invention, through optimized sensor installation angle design, can simultaneously acquire feature data of the steel coil end face and side face, greatly improving the accuracy of core positioning.
[0026] Furthermore, to adapt to the identification needs of steel coils of different specifications and ensure measurement accuracy, the technical solution of this invention employs a three-dimensional laser sensor with adaptive scanning range adjustment. Its scanning field of view can cover the end face of steel coils with diameters ranging from 500mm to 2500mm, and the point cloud density reaches more than 50 sampling points per square centimeter, ensuring stable extraction of coil core features under various working conditions. The system also innovatively adopts a point cloud filtering algorithm based on geometric constraints, effectively eliminating the influence of interference factors such as oxide scale on the steel coil surface on the measurement results.
[0027] In summary, this invention features easy installation, strong environmental adaptability, high measurement accuracy, and fast response speed, making it particularly suitable for automated positioning and loading / unloading operations of vehicle-mounted steel coils on steel production lines. Attached Figure Description
[0028] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0029] Figure 1 This is a flowchart of a method for detecting the position of a vehicle-mounted steel coil core based on a three-dimensional lidar, provided by an embodiment of the present invention. Figure 2 This is a vehicle point cloud information map segmented from the environmental point cloud in an embodiment of the present invention; Figure 3 It is the vehicle base point cloud containing the front point cloud obtained by segmentation in the embodiment of the present invention; Figure 4 This is the vehicle planar point cloud obtained by fitting in the embodiments of the present invention; Figure 5This is the point cloud of the vehicle-mounted steel coil obtained by segmentation in the embodiment of the present invention; Figure 6 This is a schematic diagram of the vehicle-mounted steel coil core in an embodiment of the present invention. Detailed Implementation
[0030] The technical solution of the present invention will now be described with reference to the accompanying drawings.
[0031] In embodiments of the present invention, words such as "exemplarily," "for example," etc., are used to indicate that something is an example, illustration, or description. Any embodiment or design described as "exemplary" in the present invention should not be construed as being more preferred or advantageous than other embodiments or designs. Specifically, the use of the word "exemplary" is intended to present the concept in a concrete manner. Furthermore, in embodiments of the present invention, the meaning expressed by "and / or" can be both, or either one.
[0032] In this embodiment of the invention, sometimes a subscript such as W1 may be written in a non-subscript form such as W1. When the difference is not emphasized, the meaning they express is the same.
[0033] To make the technical problems, technical solutions and advantages of the present invention clearer, a detailed description will be given below in conjunction with the accompanying drawings and specific embodiments.
[0034] This invention provides a method for detecting the position of the core of a vehicle-mounted steel coil based on a three-dimensional lidar. For example... Figure 1 The flowchart shown is a method for detecting the position of the core of a vehicle-mounted steel coil based on a three-dimensional lidar. The method may include the following steps:
[0035] S1. Calibrate the 3D lidar to determine its position relative to the world coordinate system: S11. Use the three-dimensional lidar above the parking area to scan the vehicle, obtain the radar point cloud, and send the radar point cloud to the information processing server. S12. The information processing server transforms the radar point cloud coordinate data from the radar coordinate system to the world coordinate system to obtain the calibrated vehicle panel point cloud data. S2. Based on the calibrated vehicle panel point cloud data, obtain the vehicle panel corner information: S21. Using a pass-through filter, set the segmentation thresholds for the x and y coordinates to segment the environmental point cloud and extract the vehicle point cloud; S22. Using a layered extraction method along the z-axis, by setting a distance threshold for each layer, the vehicle point cloud is traversed to extract the layer with the most concentrated point cloud, which is then saved as the vehicle base reference point cloud. ; S23. Using a pass-through filter, the position information of the vehicle front segmentation line is calculated based on the vehicle front point cloud density and empirical values. The vehicle front point cloud information is then segmented and filtered to calculate the segmentation coordinates of the vehicle front and the vehicle panel. S24. Based on the reference point cloud of the vehicle panel, calculate the centroid of the point cloud of the vehicle panel, set the distance thresholds in the x and y directions, and extract the rectangular point cloud of the vehicle panel; use the rectangular point cloud of the vehicle panel to calculate the fitting plane of the vehicle panel. S25. Traverse the point cloud within a certain distance threshold range of the fitted plane point cloud of the vehicle panel, with a distance threshold of 200mm, obtain the corner point information of the vehicle panel, determine the four quadrants on the XOY plane according to the equation of the fitted plane and the centroid, and calculate the coordinate information of the four corner points of the vehicle panel. S3. Obtain point cloud data of the vehicle-mounted steel coil: S31. Obtain the rotation matrix based on the fitting plane normal vector of the vehicle panel, and perform orientation correction on the vehicle panel point cloud after the three-dimensional lidar calibration in the world coordinate system so that the vehicle panel is parallel to the ground in the world coordinate system, thereby setting the threshold range in the vertical direction of the steel coil point cloud. S32. A pass-through filter is used to filter out the point cloud of the steel coil based on the corner coordinate information of the car body and the height information of the steel coil. S33. For the point cloud of the vehicle-mounted steel coil, set the clustering threshold, minimum number of clustered point clouds, and maximum number of clustered point clouds, perform clustering and segmentation on the steel coil point cloud, and extract each group of individual steel coil point cloud data. S4. Based on the point cloud data of the vehicle-mounted steel coil, obtain the position information of the core of the steel coil to be tested: S41. Calculate the average distance of each point in the point cloud data of the steel coil, and assign a weight to each point according to the density. S42. Randomly sample all points using weight information to obtain steel coil point cloud sampling points. Fit the cylindrical model and the cylinder axis equation based on the steel coil point cloud sampling points. S43. Calculate the center coordinates based on the projected coordinates of the steel coil point cloud sampling points along the axial direction; S44. Correct the center coordinates based on the variance eigenvalues of the projection points, save the result as the center coordinates of the steel coil, and transmit the coordinate information back to the information processing server.
[0036] The following description, in conjunction with specific embodiments, illustrates this point.
[0037] Example 1 This embodiment provides a method for detecting the position of vehicle-mounted steel coils based on three-dimensional LiDAR, used to detect the position information of vehicle-mounted steel coils during the loading process of an unmanned overhead crane in warehouse material transportation. This method can be implemented by electronic equipment, and its execution flow is as follows: Figure 1 As shown, it includes the following steps:
[0038] S1, calibrate the three-dimensional lidar to complete the calibration of the position between the radar coordinate system and the world coordinate system; Specifically, in this embodiment, the calibration process for the three-dimensional lidar is as follows: S11. A series of spatial points with known world coordinates and their image coordinates are determined using a checkerboard calibration board. The camera intrinsic and extrinsic parameters are solved using the least squares method, and the distortion parameters are solved using a fourth-order radial distortion model. The specific steps are as follows: Based on displacement formula-1, x-axis rotation formula-2, y-axis rotation formula-3, and z-axis rotation formula-4, the original radar point cloud data is transformed into the world coordinate system. (1) (2) (3) (4) Where x, y, and z are the x-coordinates, y-coordinates, and z-coordinates of the relative position between the radar origin and the target calibration point, respectively; , , These are the x, y, and z coordinates of the i-th point cloud data in the point cloud data before conversion, respectively. , , These are the x, y, and z coordinates of the i-th point cloud data after conversion, respectively; , , These represent the rotation angles of the point cloud data around the x-axis, y-axis, and z-axis, respectively.
[0039] S2, through point cloud filtering, performs plane fitting on the vehicle board point cloud data based on the hierarchical extraction method, and corrects the vehicle board point cloud data to obtain corner point information; Specifically, in this embodiment, the implementation process of S2 is as follows: S21, a 3D LiDAR is installed above the parking area to scan the vehicles under test within the parking area, acquiring vehicle point cloud data in the LiDAR coordinate system. A pass-through filter is used, and segmentation thresholds are set for the x and y coordinates to segment the environmental point cloud and extract the vehicle point cloud, as shown below. Figure 2 As shown;
[0040] Before detection, point cloud data outside the detection range needs to be filtered out. This embodiment employs pass-through filtering for this purpose. The pass-through filter is defined as follows when performing pass-through filtering on vehicle point cloud data: in, , , For the filter in , , Upper limit in direction, in mm; , , For the filter in , , Lower limit in direction, in mm; , , The preset dimensional direction of the vehicle point cloud range; Specifically, the upper and lower limits of the pass-through filter are shown in Table 1: Table 1. Upper and lower limits of the pass-through filter The installation location of the 3D LiDAR must ensure that the vehicle can be scanned by the radar within a specified range. The 3D LiDAR is connected to the information processing server via a gigabit network cable, and the user's monitor is connected to the information processing server to display relevant data.
[0041] S22 employs a layered extraction method along the z-coordinate axis. By setting a distance threshold for each layer, it traverses the vehicle point cloud, extracts the layer with the highest concentration of points, and saves it as the vehicle base point cloud z. Figure 3 As shown; the calculation formula is as follows: in, For the i-th layer of point cloud coordinate; The height threshold is set to 100mm in this embodiment; Let be the point cloud density of the i-th layer of the vehicle body; The initial point cloud density of the vehicle body is 21 points / m² in this embodiment. .
[0042] S23, the step of calculating the position information of the vehicle front segmentation line by using the point cloud density of the vehicle front and the initial set value, segmenting and filtering the point cloud information of the vehicle front, and calculating the segmentation coordinates of the vehicle front and the vehicle panel. The calculation formula is as follows: in: It is the x-coordinate of the dividing line between the front of the vehicle and the body panel; It is the x-coordinate of the i-th point being traversed; It is the x-coordinate of the head point of the vehicle platform, which is taken as 10000mm in this embodiment; This refers to the point cloud density of the head of the vehicle body; in this embodiment, its value is 21 points / ... ; It is the point cloud density of the i-th point traversed on the horizontal axis towards the direction of the car's front.
[0043] S24. Based on the reference point cloud of the vehicle panel, calculate the centroid of the point cloud of the vehicle panel, set distance thresholds in the x and y directions, extract the rectangular point cloud of the vehicle panel, calculate the fitting plane of the vehicle panel, obtain the corner point information of the vehicle panel, and extract the rectangular point cloud of the vehicle panel as follows: in, , The center point of the vehicle body The x and y coordinates are in mm. , These are the maximum values of the x and y coordinates of the rectangular point cloud on the vehicle panel, respectively, in mm; , These are the minimum x and y coordinates of the rectangular point cloud on the vehicle panel, respectively, in mm; Specifically, in this embodiment, the center coordinates and segmentation data of the vehicle panel are shown in Table 2: Table 2. Center coordinates and segmentation data of the vehicle panel This involves extracting the rectangular point cloud of the vehicle panel; using the vehicle panel point cloud to fit a plane to the vehicle panel, such as... Figure 4 As shown, the formula is as follows: in, , The threshold values for the horizontal and vertical coordinate regions of the vehicle body are set to 5000mm and 500mm, respectively. Represents the rectangular point cloud of the vehicle body; This represents the reference point cloud of the vehicle body after the front of the vehicle has been segmented.
[0044] S25, traverse the point cloud within a certain threshold range of the fitted plane point cloud of the vehicle panel, determine the four quadrants on the XOY plane according to the equation and centroid of the fitted plane, and calculate the coordinate information of the four corner points of the vehicle panel. Among them, the vehicle board fitting plane is based on the vehicle board reference point cloud computing. The calculation formula is as follows: in: , These are the sum of squares of the abscissa and ordinate of the point cloud on the vehicle platform, respectively. , , These are the x, y, and z coordinates of the point cloud on the vehicle platform, respectively; , , These are the dot products of the x, y, and z coordinates of the point cloud on the vehicle platform, respectively. The number of point clouds on the vehicle body; The process of traversing the vehicle panel fitting plane point cloud within a certain threshold range and saving the point cloud as the fitted vehicle panel point cloud to obtain vehicle panel corner point information is as follows: in, The height threshold set for the vehicle body fitting plane, in mm, is set to 200 mm in this embodiment. , These are the fitted point clouds of the vehicle body and the vehicle body point cloud, respectively, based on the equation of the fitted plane and the centroid. Given four quadrants, calculate the four corner points of the vehicle body. The coordinate information, taking the first quadrant as an example, is given by the following formula: in, , These are the x and y coordinates of the centroid, respectively; It is the distance from the center of the circle within the first quadrant region centered on the centroid of the fitted plane of the vehicle body; the farthest point is the corner point of the first quadrant. .
[0045] S3, based on the calculated fitting plane normal vector, the orientation of the calibrated point cloud is corrected, and the point cloud of the vehicle-mounted steel coil is extracted through point cloud filtering; Specifically, in this embodiment, the implementation process of S3 is as follows: S31, where the orientation correction of the calibrated point cloud is performed using the fitting plane normal vector, and the formula for calculating the rotation matrix is as follows: in, It is the normal vector of the fitted plane. The angle between the z-axis and the world coordinate system; S32 uses a pass-through filter to extract the point cloud of the steel coil based on the corner coordinates of the vehicle body and the height of the steel coil, such as... Figure 5 As shown; Specifically, the point cloud extraction of the vehicle-mounted steel coil using point cloud filtering is defined as follows: in, , Here are the x-coordinates of corner point 2 and corner point 1, respectively, in mm. , These are the ordinates of corner point 4 and corner point 1, respectively, in mm. These are the z-coordinates of the four corner points, in mm. This is the height threshold for the vehicle-mounted steel coil, in mm.
[0046] Specifically, in this embodiment, the point cloud segmentation data of the vehicle-mounted steel coil is shown in Table 3: Table 3. Point cloud segmentation data of vehicle-mounted steel coils S33: Using Euclidean clustering algorithm, each group of individual steel coil arc surface point clouds is separated from the steel coil point cloud; Specifically, the Euclidean clustering algorithm needs to consider the characteristics of the steel coil scenario, setting a clustering distance threshold t (in mm), a minimum number of cluster points min_size, and a maximum number of cluster points max_size. Specifically, in this embodiment, the Euclidean clustering parameter settings are shown in Table 4: Table 4. Euclidean Clustering Parameter Settings S4. Apply the cylindrical fitting method to the point cloud of the steel coil, set the fitting parameters, fit the equation of the cylinder axis, and calculate the center of the cylinder based on the projection points of the axis. S41: Calculate the average distance for each point and assign a weight to each point based on density; Specifically, in this embodiment, a K-nearest neighbor search is used to calculate the average distance from each point to its nearest point. The density feature of each point is defined as the reciprocal of the average distance. The density feature values are normalized into weights, and points in the point cloud are copied according to the point cloud density weights, with high-density points being copied. This is to increase the number of point clouds.
[0047] S42: Randomly sample all points using weight information and fit the equation of the cylinder axis. Specifically, in this embodiment, the expressions for the cylinder fitting model and the cylinder's central axis are set. Wherein, the normal vector of the fitted cylinder axis is , Let be a point on the axis of the cylinder. Let be the radius of the cylinder. To fit any point on the cylindrical surface.
[0048] By randomly selecting a certain number of points and performing least-squares optimization iterations, seven characteristic parameters that can describe the fitted cylinder are obtained. By calculating the two conditions that satisfy the interior points, we obtain the set of interior points that conforms to the cylindrical model.
[0049] S43: The center coordinates are calculated based on the projected coordinates of the sampling points along the axis. Specifically, in this embodiment, the collected interior points are projected onto the straight line to obtain the projected points. The two endpoints of the point cloud projected onto the axis are respectively... and ,
[0050] Calculate the coordinates of the projection center of the axis ; S44: Correct the coordinates based on the variance eigenvalues of the projection points, save the result as the coordinates of the steel coil center, and transmit the coordinate information back to the information processing server.
[0051] Specifically, in this embodiment, the variance of the three coordinate axes of the point cloud is calculated. If the variance exceeds a set threshold, the center coordinates need to be corrected. The variance expression is as follows: in, Let be the number of all interior points. Let be the set of interior points. Let be the average value of the interior points along the x-axis. This represents the average value of the interior points along the y-axis. The average value of the interior points along the z-axis; like If the distribution is too scattered, a weighted average adjustment is needed to obtain the corrected center point. The weighted weights ω i and the center Coordinates are defined as follows: The calculated representation of the vehicle-mounted steel coil core in the vehicle point cloud is as follows: Figure 6 As shown.
[0052] Example 2 This embodiment provides an electronic device, which includes a processor and a memory; wherein the memory stores at least one instruction, which is loaded and executed by the processor to implement the method of the first embodiment.
[0053] The electronic device can vary considerably depending on its configuration or performance, and may include one or more processors (central processing units, CPUs) and one or more memories, wherein the memories store at least one instruction that is loaded by the processor and executed in accordance with the above method.
[0054] Example 3 This embodiment provides a computer-readable storage medium storing at least one instruction, which is loaded and executed by a processor to implement the method of the first embodiment described above. The computer-readable storage medium may be a ROM, random access memory, CD-ROM, magnetic tape, floppy disk, or optical data storage device, etc. The instruction stored therein can be loaded and executed by a processor in a terminal.
[0055] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.
Claims
1. A method for detecting the position of a vehicle-mounted steel coil core based on a three-dimensional lidar, characterized in that, The method includes: S1. Calibrate the 3D lidar to determine its position relative to the world coordinate system: S11. Use the three-dimensional lidar above the parking area to scan the vehicle, obtain the radar point cloud, and send the radar point cloud to the information processing server. S12. The information processing server transforms the coordinate data of the radar point cloud from the radar coordinate system to the world coordinate system to obtain the calibrated vehicle panel point cloud data. S2. Based on the calibrated vehicle panel point cloud data, obtain the vehicle panel corner information: S21. Using a pass-through filter, set the segmentation thresholds for the x and y coordinates to segment the environmental point cloud and extract the vehicle point cloud; S22. Using a layered extraction method along the z-axis, by setting a distance threshold for each layer, the vehicle point cloud is traversed to extract the layer with the most concentrated point cloud, which is then saved as the vehicle base reference point cloud. ; S23. Using a pass-through filter, the position information of the vehicle front segmentation line is calculated based on the vehicle front point cloud density and empirical values. The vehicle front point cloud information is then segmented and filtered to calculate the segmentation coordinates of the vehicle front and the vehicle panel. S24. Based on the reference point cloud of the vehicle panel, calculate the centroid of the point cloud of the vehicle panel, set the distance thresholds in the x and y directions, and extract the rectangular point cloud of the vehicle panel; use the rectangular point cloud of the vehicle panel to calculate the fitted planar point cloud of the vehicle panel. S25. Traverse the point cloud within a certain distance threshold range of the fitted plane point cloud of the vehicle panel, obtain the corner point information of the vehicle panel, determine the four quadrants on the XOY plane according to the equation of the fitted plane and the centroid, and calculate the coordinate information of the four corner points of the vehicle panel. S3. Obtain point cloud data of the vehicle-mounted steel coil: S31. Obtain the rotation matrix based on the fitting plane normal vector of the vehicle panel, and perform orientation correction on the vehicle panel point cloud after the three-dimensional lidar calibration in the world coordinate system so that the vehicle panel is parallel to the ground in the world coordinate system, thereby setting the threshold range in the vertical direction of the steel coil point cloud. S32. A pass-through filter is used to filter out the point cloud of the steel coil based on the corner coordinate information of the car body and the height information of the steel coil. S33. For the point cloud of the vehicle-mounted steel coil, set the clustering threshold, minimum number of clustered point clouds, and maximum number of clustered point clouds, perform clustering and segmentation on the steel coil point cloud, and extract each group of individual steel coil point cloud data. S4. Based on the point cloud data of the vehicle-mounted steel coil, obtain the position information of the core of the steel coil to be tested: S41. Calculate the average distance of each point in the point cloud data of the steel coil, and assign a weight to each point according to the density. S42. Randomly sample all points using weight information to obtain steel coil point cloud sampling points. Fit the cylindrical model and the cylinder axis equation based on the steel coil point cloud sampling points. S43. Calculate the center coordinates based on the projected coordinates of the steel coil point cloud sampling points along the axial direction; S44. Correct the center coordinates based on the variance eigenvalues of the projection points, save the result as the center coordinates of the steel coil, and transmit the coordinate information back to the information processing server.
2. The method for detecting the position of the core of a vehicle-mounted steel coil based on three-dimensional lidar according to claim 1, characterized in that, In step S11, a three-dimensional lidar is installed above the parking area to ensure that vehicles can be scanned by the radar within a specified range. The three-dimensional lidar is connected to the information processing server via a gigabit network cable, and the user's display is connected to the information processing server.
3. The method for detecting the position of the core of a vehicle-mounted steel coil based on three-dimensional lidar according to claim 1, characterized in that, The pass filter in S21 is defined as follows: in, , , The filters are respectively in , , Upper limit in direction, in mm; , , The filters are respectively in , , Lower limit in direction, in mm; , , The preset dimensional direction of the vehicle point cloud range; The S22 vehicle plate reference point cloud The calculation formula is: in, For the i-th layer of point cloud coordinate; The height threshold is determined empirically. Let be the point cloud density of the i-th layer of the vehicle body; This represents the initial point cloud density of the vehicle body.
4. The method for detecting the position of the core of a vehicle-mounted steel coil based on three-dimensional lidar according to claim 1, characterized in that, The segmentation coordinates of the vehicle front and the vehicle body in S23 The calculation formula is as follows: in: It is the x-coordinate of the dividing line between the front of the vehicle and the body panel; It is the x-coordinate of the i-th point being traversed; It is the maximum coordinate value of the vehicle's reference point cloud in the x-direction; It is the point cloud density of the point cloud at the front of the vehicle body; It is the point cloud density of the i-th point traversed on the horizontal axis towards the direction of the car's front.
5. The method for detecting the position of the core of a vehicle-mounted steel coil based on three-dimensional lidar according to claim 1, characterized in that, The centroid of the point cloud on the vehicle plate in S24 for: Car panel rectangular point cloud for: in, , The center point of the vehicle body The x and y coordinates are in mm. , These are the maximum values of the x and y coordinates of the rectangular point cloud on the vehicle panel, respectively, in mm; , These are the minimum x and y coordinates of the rectangular point cloud on the vehicle panel, respectively, in mm; , These are the threshold values for the horizontal and vertical coordinate regions of the vehicle panel, respectively. Represents the rectangular point cloud of the vehicle body; This represents the reference point cloud of the vehicle body after the front end has been segmented; Car body fitting plane The calculation formula is as follows: in: , These are the sum of squares of the abscissa and ordinate of the point cloud on the vehicle platform, respectively. , , These are the x, y, and z coordinates of the point cloud on the vehicle platform, respectively; , , These are the dot products of the x, y, and z coordinates of the point cloud on the vehicle platform, respectively. The number of point clouds on the vehicle body; The distance threshold in S25 is 200mm. The calculation process for the corner coordinates of the vehicle panel is as follows: Based on the equation of the fitted plane and the centroid Given four quadrants, calculate the four corner points of the vehicle body. The coordinate information is such that the four corner points correspond to the four quadrants of the plane in sequence, taking the first quadrant as an example: The formula is as follows: in, , These are the x and y coordinates of the centroid, respectively; It is the distance from the center of the circle within the first quadrant region centered on the centroid of the fitted plane of the vehicle body; the farthest point is the corner point of the first quadrant. ; Add clouds to the car body.
6. The method for detecting the position of the core of a vehicle-mounted steel coil based on three-dimensional lidar according to claim 1, characterized in that, The rotation matrix in S31 The calculation formula is as follows: in, It is the normal vector of the fitted plane. The angle between the z-axis and the world coordinate system; The normal vector of the fitting plane is derived from the fitting plane of the vehicle body. We get a=A, b=B, c=-1; The pass-through filter in S32 is defined as follows: in, , Here are the x-coordinates of corner point 2 and corner point 1, respectively, in mm. , These are the ordinates of corner point 4 and corner point 1, respectively, in mm. These are the z-coordinates of the four corner points, in mm. This is the height threshold for the vehicle-mounted steel coil, in mm.
7. The method for detecting the position of the core of a vehicle-mounted steel coil based on three-dimensional lidar according to claim 1, characterized in that, In S33, the Euclidean clustering algorithm is used. Based on the preset clustering conditions, the filtered vehicle-mounted steel coil point cloud is segmented using the Euclidean clustering algorithm. From the segmented point cloud clusters, two independent point cloud sets representing the curved surface of the steel coil are extracted, which are each group of individual steel coil point cloud data.
8. The method for detecting the position of the core of a vehicle-mounted steel coil based on three-dimensional lidar according to claim 1, characterized in that, Specifically, in S41: based on K-nearest neighbor search, the average distance from each point to its nearest point is calculated, and the density feature of each point is defined as the reciprocal of the average distance. The density feature values are normalized into weights, and points in the point cloud are copied according to the point cloud density weights, with high-density points being copied. This is to increase the number of point clouds. Take 3 experience points; The density characteristic quantity is: in, The average distance between neighboring points; The density feature weights are: in, To calculate the maximum density feature value for all points, This is the minimum density feature quantity obtained by calculating all points.
9. The method for detecting the position of the core of a vehicle-mounted steel coil based on three-dimensional lidar according to claim 1, characterized in that, The calculation process for fitting the cylindrical model and the equation of the cylinder axis in S42 is as follows: Wherein, the normal vector of the fitted cylinder axis is , Let be a point on the axis of the cylinder. Let be the radius of the cylinder. To fit any point on the cylindrical surface.
10. The method for detecting the position of the core of a vehicle-mounted steel coil based on three-dimensional lidar according to claim 1, characterized in that, The coordinates of the projection center of the sampling point in S43 along the axial direction are: The two endpoints of the point cloud projected onto the axis are respectively and ; The variance expression for S44 is as follows: in, Let be the number of all interior points. Let be the set of interior points. Let be the average value of the interior points along the x-axis. This represents the average value of the interior points along the y-axis. The average value of the interior points along the z-axis; like If the distribution is too scattered, a weighted average adjustment is needed to obtain the corrected center point. The weighted weights ω i and the center Coordinates are defined as follows: The var_threshold is the variance determination threshold, which is set to 4 based on experience. The interior points are a point cloud that conforms to the cylindrical model.