Object size measurement method for complex environment
Through lidar acquisition equipment and point cloud processing technology, a three-dimensional panoramic point cloud map is generated and object size information is extracted, solving the problem of high-precision object size measurement in complex environments and achieving high-precision and simple operation measurement effects.
Patent Information
- Application Number
- CN202510391642.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-31
- Publication Date
- 2025-04-25
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The prior art is difficult to achieve high-precision object size measurement in complex environments, especially in huge objects and complex environments, with low measurement accuracy and cumbersome operation and ineffective deployment.
Lidar acquisition equipment is used to generate three-dimensional panoramic point cloud maps, and the precise dimension information of the object is extracted through technical means such as spatial conversion, point cloud cutting, plane correction, clustering and denoising.
It realizes high-precision object size measurement in complex environments, which is easy to operate, short time to consume, and the measurement accuracy reaches about 2cm, making it suitable for large-scale deployment.
Smart Images

Figure CN119879736A_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the field of measurement technology, and in particular relates to a method for measuring the size of an object in a complex environment. Background Art
[0002] With the continuous improvement of the requirements for the size, shape and position accuracy of objects in industrial manufacturing, scientific research and daily life, high-precision measurement technology has emerged and developed rapidly. At present, most technical means focus on solving the measurement of objects in static and simple environments, and achieve high-precision measurement of object sizes through manual and preset environmental prior conditions such as the absolute level of the ground on which the object is placed and the absence of debris around the object. However, this mainstream method is contrary to traditional engineering application environments such as freight yards and stations. Not only does it consume a lot of manpower due to the huge size of the measured objects, but the measurement accuracy is also greatly reduced due to the complex environment, making it completely impossible to deploy in practice. Therefore, it is necessary to develop a high-precision object size measurement technology that is suitable for complex environments and easy to operate. Summary of the invention
[0003] In view of this, the present invention aims to overcome the shortcomings of the above-mentioned problems in the prior art and proposes a method for measuring the size of an object in a complex environment. The measuring method of the present invention has the advantages of easy operation, anti-interference, and high precision.
[0004] To achieve the above object, the technical solution of the present invention is achieved as follows:
[0005] A method for measuring the size of an object in a complex environment comprises the following steps:
[0006] Step 1: Use the laser radar acquisition device to generate a three-dimensional panoramic cloud map PC1 with the initial acquisition position as the zero point, including the object to be measured and the surrounding environment;
[0007] Step 2: Use the spatial transformation relationship to transform the collection positions at different times into the coordinate space of the panoramic point cloud map to generate the collection trajectory;
[0008] Step 3: Use the acquisition trajectory to crop the full point cloud image PC1, and keep the point cloud image that falls within the acquisition trajectory, recorded as PC2;
[0009] Step 4: Remove outliers and noise points from the point cloud image PC2 to obtain the denoised point cloud image PC3;
[0010] Step 5: Perform ground fitting on the point cloud image PC3 to obtain the plane model corresponding to the ground. The X-axis and Y-axis are parallel to the ground, and the Z-axis is perpendicular to the ground. The angle between the normal vector of the fitted plane model and the Z-axis is calculated to generate the point cloud rotation matrix, perform horizontal correction on the point cloud, and obtain the point cloud image PC4.
[0011] Step 6: Using the point-to-plane distance formula, remove the point clouds whose distance to the fitted plane model in the point cloud image PC3 is less than the set threshold, and obtain the point cloud image PC5;
[0012] Step 7: perform point cloud clustering on the point cloud image PC5, and select the point cloud cluster with the largest cluster volume and the highest reflection intensity as the point cloud cluster of the object to be tested, recorded as point cloud image PC6;
[0013] Step 8: Change the Z axis of the point cloud image PC6 to 0, project the modified point cloud image to the XY plane, obtain the 2D point cloud top view of the object, calculate the minimum bounding rectangle of the 2D point cloud top view, and use the length and width of the minimum bounding rectangle as the length and width of the object to be measured;
[0014] Step 9: Using the length and width information of the object to be measured, the horizontally corrected point cloud image PC4 is cropped to obtain the point cloud image PC7;
[0015] Step 10: Change the Y values in the point cloud image PC7 to 0, project the modified point cloud image to the XZ plane, obtain the 2D point cloud left view of the object, calculate the minimum bounding rectangle of the 2D point cloud left view, and use the width of the minimum bounding matrix as the height of the object to be measured.
[0016] Furthermore, the step 1 comprises:
[0017] Place the laser radar acquisition device at any position 1 to 2 meters around the object to be measured for a period of time to initialize the acquisition position;
[0018] After the acquisition position is initialized, the acquisition device is moved around the object to be measured to generate a panoramic point cloud map PC1 with the initial acquisition position as the zero point, including the object to be measured and its surrounding environment.
[0019] Furthermore, the step 2 comprises:
[0020] The translation transformation relationship between the collection position at different times and the initial collection position is recorded. The collection positions at different times are converted into the coordinate space of the panoramic point cloud map using the translation transformation relationship. The converted collection positions are used as trajectory points to generate collection trajectories.
[0021] Furthermore, the laser radar beam of the laser radar acquisition device is 32 lines.
[0022] Furthermore, in step 8, high-reflective stickers of irregular shapes and colors are affixed to the surface of the object to be tested, and the position of the high-reflective stickers is determined by reflectivity filtering and shape and color recognition. The point cloud cluster with the largest cluster volume and the presence of high-reflective stickers is taken as the point cloud cluster of the object to be tested.
[0023] Furthermore, the measurement results are outputted through a laser radar acquisition device.
[0024] Compared with the prior art, the object size measurement method for complex environments described in the present invention has the following advantages:
[0025] The present invention supports surveyors to obtain accurate size information of the object to be measured by simply circling the object to be measured with a handheld laser radar acquisition device. The operation is convenient and simple, and does not require any professional knowledge. Generally, only one surveyor and a dozen seconds of measurement time are required to complete the measurement, which is conducive to large-scale deployment and application.
[0026] The present invention adopts technical means such as coarse and fine cropping, plane correction, clustering denoising, etc. to perform robust enhanced measurement processing on point clouds, which can effectively deal with conditions such as ground depression, tilted placement, and clutter around objects in complex environments. The overall processing process takes about 300ms, and the object measurement size accuracy is about 2cm. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] The accompanying drawings constituting a part of the present invention are used to provide a further understanding of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the accompanying drawings:
[0028] Figure 1 It is a schematic diagram of the acquisition trajectory and the rough cropping of the point cloud of the object to be measured of the present invention;
[0029] Figure 2 A schematic diagram of the present invention for removing ground point clouds and extracting point clouds of objects to be measured by cluster analysis;
[0030] Figure 3 It is a schematic diagram of measuring the size of an object to be measured using the minimum circumscribed matrix of the present invention.
[0031] Figure 4 It is the overall flow chart of the present invention. DETAILED DESCRIPTION
[0032] It should be noted that, in the absence of conflict, the embodiments of the present invention and the features in the embodiments may be combined with each other.
[0033] In the description of the present invention, it should be understood that the terms "center", "longitudinal", "lateral", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside", "outside" and the like indicate positions or positional relationships based on the positions or positional relationships shown in the accompanying drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as limiting the present invention. In addition, the terms "first", "second", and the like are only used for descriptive purposes, and cannot be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, features defined as "first", "second", and the like may explicitly or implicitly include one or more of the features. In the description of the present invention, unless otherwise specified, "multiple" means two or more.
[0034] In the description of the present invention, it should be noted that, unless otherwise clearly specified and limited, the terms "installed", "connected", and "connected" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or it can be indirectly connected through an intermediate medium, or it can be the internal communication of two components. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood by specific circumstances.
[0035] The present invention will be described in detail below with reference to the accompanying drawings and in conjunction with embodiments.
[0036] like Figure 4 As shown, the present invention provides a method for measuring the size of an object in a complex environment, comprising the following steps:
[0037] Step 1: Select a flat location within 1m~2m around the object to be measured as the initial acquisition location, and place the lidar acquisition device at this location to initialize the zero point of the panoramic point cloud map;
[0038] Step 2: After the zero point position is initialized, the surveyor picks up the acquisition device and circles around the object to be measured to generate a panoramic point cloud map PC1 with the acquisition initial position as the zero point, including the object to be measured and its surrounding environment;
[0039] Step 3: Using the translation transformation relationship between the acquisition positions at different times and the initial acquisition positions, the acquisition positions are converted into the coordinate space of the panoramic point cloud map at regular intervals as trajectory points, thereby generating an acquisition trajectory after circling the object to be measured;
[0040] Step 4: Use the acquisition trajectory to crop the full point cloud image PC1, and keep the point cloud image that falls within the acquisition trajectory, recorded as PC2;
[0041] Step 5: Remove outliers and noise points from the point cloud image PC2 to obtain the denoised point cloud image PC3;
[0042] Step 6: Perform ground fitting on the point cloud image PC3 to obtain the plane model corresponding to the ground. Generate the point cloud rotation matrix by calculating the angle between the normal vector of the fitted plane model and the Z axis, perform horizontal correction on the point cloud, and obtain the point cloud image PC4;
[0043] Step 7: Using the point-to-plane distance formula, remove the point clouds whose distance to the fitted plane model in the point cloud image PC3 is less than the set threshold, and obtain the point cloud image PC5;
[0044] Step 8: Perform point cloud clustering on the point cloud image PC5, and select the point cloud cluster with the largest cluster volume and the highest reflection intensity as the point cloud cluster of the object to be tested, recorded as point cloud image PC6;
[0045] Step 9: Change the Z axis of the point cloud image PC6 to 0, project the modified point cloud image onto the XY plane, and obtain the 2D point cloud top view of the object. Then, calculate the minimum bounding rectangle of the 2D point cloud top view, and the length and width of the minimum bounding rectangle are the length and width of the object to be measured;
[0046] Step 10: Using the length and width information of the object to be measured, point cloud cropping is performed on the horizontally corrected point cloud image PC4 to obtain a point cloud image PC7;
[0047] Step 11: Change the Y values in the point cloud image PC7 to 0, project the modified point cloud image to the XZ plane, and obtain the 2D point cloud left view of the object. Then, calculate the minimum bounding rectangle of the 2D point cloud left view, and the width of the minimum bounding matrix is the height of the object to be measured.
[0048] The working process of the present invention is as follows: the surveyor places the laser radar acquisition device on the ground 1m~2m away from the object to be measured to initialize the acquisition position. After the indicator light of the acquisition device changes from red to green, the surveyor picks up the device and circles the object to be measured at a speed of 3~5km / h to generate a panoramic point cloud map with the acquisition position as the zero point, including the object to be measured and its surrounding environment. The handheld height of the laser radar acquisition device is 1-1.5 meters from the ground. Through the point cloud visualization algorithm, the surveyor can check the quality of the point cloud map in real time to ensure that the subtle features of the object to be measured can be preserved. If the generated point cloud map is of poor quality, it will be deleted and re-recorded.
[0049] When the panoramic point cloud map is generated, the acquisition positions at different times are converted into the panoramic point cloud map to obtain the corresponding point cloud coordinates. By using these converted acquisition positions as trajectory points, the acquisition trajectory is generated, and the point cloud map within the acquisition trajectory is retained through the point cloud cropping algorithm. After that, the cropped point cloud map is ground fitted, and the fitted plane model is used to perform point cloud horizontal correction and ground point cloud removal. Then, cluster analysis is performed on the non-ground point cloud, and the length, width and height information of the object to be measured is obtained through plane projection and minimum circumscribed rectangle methods. Finally, the size information of the object to be measured is directly output on the screen of the acquisition device.
[0050] In actual operation, the surveyor only needs to hold the laser radar acquisition device and walk around the object to be measured, and the accurate size information of the object to be measured can be output on the screen. There is no strict restriction on the initial position of the acquisition device, but in order to be consistent with common sense, the initial position is generally set at the back, left rear, or right rear of the object to be measured, and it is circled in a clockwise direction.
[0051] It takes time for the acquisition device to generate a point cloud map, which is generally 5 to 10 times the acquisition time. During this process, the method of the present invention continuously subscribes to the point cloud map in the device until the point cloud map to be measured that meets the measurement personnel's requirements is input.
[0052] The point cloud visualization and final object size output during the working process of the present invention are both completed on the screen provided by the acquisition device.
[0053] The specific implementation method of the present invention is described below in conjunction with specific embodiments.
[0054] like Figure 1 As shown in the figure on the left, the laser radar acquisition device is used to generate the point cloud acquisition trajectory. The point cloud image obtained by roughly cutting the acquisition trajectory is as follows: Figure 1 As shown in the figure on the right.
[0055] Specifically, Figure 1 The object to be measured is a stone cow with a base, surrounded by trees and a complex environment. The initial position of the laser radar acquisition device is directly behind the base of the stone cow, and it circles clockwise to generate a collection trajectory.
[0056] Specifically, the acquisition device needs to stay still at the acquisition initial point for a period of time, and after circling the object to be measured, generate a panoramic point cloud map with the acquisition initial position as the zero point, including the object to be measured and the surrounding environment. In the process of circling the object to be measured, the translation matrix between the acquisition position and the initial acquisition position is calculated every 50ms, and the acquisition position is converted into the point cloud coordinates in the panoramic point cloud map through the translation transformation relationship, and the converted acquisition position is used as the trajectory point to generate the acquisition trajectory.
[0057] Specifically, in the rough clipping process, in order to ensure that the point cloud of the object to be measured is not lost, the point cloud is clipped only on the XY plane, and the length and width of the maximum circumscribed rectangle are selected as the range of the point cloud clipping.
[0058] like Figure 2 As shown, the present invention utilizes point cloud plane fitting technology to extract the plane model corresponding to the ground, performs ground point cloud filtering and horizontal plane alignment, and then extracts the point cloud of the object to be measured through point cloud clustering analysis and using preset feature rules of the object to be measured.
[0059] Specifically, when the point cloud of the object to be measured is tilted in the horizontal direction, the measured size is likely to be smaller than the actual size, so the point cloud needs to be corrected in the horizontal direction. The point cloud ground fitting technology in the present invention uses the principle of three points being coplanar, randomly selects three points in different arrangements and combinations to construct a plane model, and selects a plane model that is vertical to the Z axis or approximately vertical to the Z axis and contains the largest number of point clouds as the ground to complete the fitting of the point cloud ground. Afterwards, the angle between the normal vector of the fitted plane model and the Z axis is calculated to generate a rotation matrix, and the point cloud rotation technology is used to achieve horizontal correction of the point cloud.
[0060] Specifically, when clustering point clouds, in order to get rid of the interference of point clouds of surrounding objects, it is necessary to stick high-reflective stickers of irregular shapes and colors on the surface of the object to be tested, and then use reflectivity filtering and shape and color recognition to determine the position of the high-reflective stickers. The point cloud cluster with the largest cluster volume and the presence of high-reflective stickers is the clustered point cloud cluster of the object to be tested.
[0061] like Figure 3 As shown, the present invention projects the point cloud image of the object to be measured on the XY plane and the XZ plane to obtain the top view and the left view of the object, and uses the common minimum circumscribed matrix algorithm in the two-dimensional plane to achieve accurate measurement of the size of the three-dimensional point cloud cluster.
[0062] Specifically, after the point cloud is horizontally corrected, its Z value is set to 0, and the projection of the point cloud on the XY plane can be obtained. Then, the rotating caliper technique is used to find the rectangular box that best fits the shape of the point cloud, that is, the minimum circumscribed rectangle. At this time, the length and width of the rectangular box are the length and width of the object to be measured. Then, the length and width information is used to crop the panoramic point cloud image, and the cropped point cloud image is projected on the XZ plane. The width of the minimum circumscribed matrix of the projected point cloud is the height information of the object to be measured.
[0063] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A method for measuring the size of an object in a complex environment, characterized in that: The steps include: Step 1: Use the laser radar acquisition device to generate a three-dimensional panoramic cloud map PC1 with the initial acquisition position as the zero point, including the object to be measured and the surrounding environment; Step 2: Use the spatial transformation relationship to transform the collection positions at different times into the coordinate space of the panoramic point cloud map to generate the collection trajectory; Step 3: Use the acquisition trajectory to crop the full point cloud image PC1, and keep the point cloud image that falls within the acquisition trajectory, recorded as PC2; Step 4: Remove outliers and noise points from the point cloud image PC2 to obtain the denoised point cloud image PC3; Step 5: Perform ground fitting on the point cloud image PC3 to obtain the plane model corresponding to the ground. The X-axis and Y-axis are parallel to the ground, and the Z-axis is perpendicular to the ground. The angle between the normal vector of the fitted plane model and the Z-axis is calculated to generate the point cloud rotation matrix, perform horizontal correction on the point cloud, and obtain the point cloud image PC4. Step 6: Using the point-to-plane distance formula, remove the point clouds whose distance to the fitted plane model in the point cloud image PC3 is less than the set threshold, and obtain the point cloud image PC5; Step 7: perform point cloud clustering on the point cloud image PC5, and select the point cloud cluster with the largest cluster volume and the highest reflection intensity as the point cloud cluster of the object to be tested, recorded as point cloud image PC6; Step 8: Change the Z axis of the point cloud image PC6 to 0, project the modified point cloud image to the XY plane, obtain the 2D point cloud top view of the object, calculate the minimum bounding rectangle of the 2D point cloud top view, and use the length and width of the minimum bounding rectangle as the length and width of the object to be measured; Step 9: Using the length and width information of the object to be measured, the horizontally corrected point cloud image PC4 is cropped to obtain the point cloud image PC7; Step 10: Change the Y values in the point cloud image PC7 to 0, project the modified point cloud image to the XZ plane, obtain the 2D point cloud left view of the object, calculate the minimum bounding rectangle of the 2D point cloud left view, and use the width of the minimum bounding matrix as the height of the object to be measured.
2. The method for measuring the size of an object in a complex environment according to claim 1, characterized in that: The step 1 comprises: Place the laser radar acquisition device at any position 1 to 2 meters around the object to be measured for a period of time to initialize the acquisition position; After the acquisition position is initialized, the acquisition device is moved around the object to be measured to generate a panoramic point cloud map PC1 with the initial acquisition position as the zero point, including the object to be measured and its surrounding environment.
3. The method for measuring the size of an object in a complex environment according to claim 1, characterized in that: The step 2 comprises: The translation transformation relationship between the collection position at different times and the initial collection position is recorded. The collection positions at different times are converted into the coordinate space of the panoramic point cloud map using the translation transformation relationship. The converted collection positions are used as trajectory points to generate collection trajectories.
4. The method for measuring the size of an object in a complex environment according to claim 1, characterized in that: The laser radar beam of the laser radar acquisition device is 32 lines.
5. The method for measuring the size of an object in a complex environment according to claim 1, characterized in that: In step 7, high-reflective stickers of irregular shapes and colors are pasted on the surface of the object to be tested, and the position of the high-reflective stickers is determined by using reflectivity filtering and shape and color recognition. The point cloud cluster with the largest cluster volume and the presence of high-reflective stickers is taken as the point cloud cluster of the object to be tested.
6. The method for measuring the size of an object in a complex environment according to claim 1, characterized in that: The measurement results are output through the lidar acquisition device.
Citation Information
Patent Citations
A target object size measurement method of sparse point cloud
CN109903327A
Pig body size measuring system based on stereoscopic vision
CN115546282A
Object overall dimension measuring device based on laser radar and measuring method thereof
CN117075129A
Ship size measurement method based on laser radar three-dimensional point cloud algorithm
CN117706577A
Automobile size measuring method and system based on mobile acquisition device
CN118247295A