Scene model establishment method and device, electronic equipment and readable storage medium

By setting the pan-tilt movement angle and trajectory for multiple scans and data splicing, the problem of low efficiency in point cloud scene modeling is solved and efficient three-dimensional model establishment is achieved.

CN118587356APending Publication Date: 2024-09-03GUANGDONG POWER GRID CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410634005.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-05-21
Publication Date
2024-09-03

AI Technical Summary

Technical Problem

When performing scene modeling, when using lidar technology to obtain point cloud data, multiple multi-angle scans result in a large amount of point cloud data and low registration efficiency and accuracy, resulting in low scene modeling efficiency.

Method used

By determining the viewing angle range of the scanning device and the target scene area, setting the moving angle and trajectory of the pan/tilt, the scanning device scans the target area multiple times to obtain multiple sets of point cloud data, and use the singular value decomposition algorithm and the rotation and translation matrix to It is converted to the same reference coordinate system for splicing.

Benefits of technology

It improves the comprehensiveness and accuracy of data collection, realizes the complete splicing of point cloud data, provides a foundation for the establishment of three-dimensional models, and improves the efficiency of point cloud scene modeling.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118587356A
    Figure CN118587356A
Patent Text Reader

Abstract

The invention discloses a scene model establishment method and device, electronic equipment and a readable storage medium. The method comprises the steps that the visual angle range of the scanning equipment is acquired, and the visual angle range is used for indicating the scanning visual angle range of the scanning equipment; based on the visual angle range of the scanning equipment and a to-be-scanned target scene area of the scanning equipment, the moving angle and the moving track of a holder used for fixing the scanning equipment are determined, and the holder is used for driving the scanning equipment to move in the target scene area; in the process that the holder moves along the moving track according to the moving angle, a scanning device is controlled to scan the target scene area, and multiple sets of point cloud data are obtained; splicing the multiple groups of point cloud data to obtain target point cloud data corresponding to the target scene area; and based on the target point cloud data, establishing a three-dimensional model corresponding to the target scene area. The technical problem of low modeling efficiency of the point cloud scene is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of three-dimensional reconstruction technology, and in particular to a method, device, electronic device and readable storage medium for establishing a scene model. Background Art

[0002] At present, when performing scene modeling, the point cloud data of the scene area is usually obtained through the LiDAR (Light Detection and Ranging) technology. However, when scanning a large-scale scene or a scene with obstructions, multiple multi-angle point cloud scans are required. Since the point cloud information under different viewing angles or measurement points corresponds to different radar coordinate systems, it is necessary to unify the point cloud data under different radar coordinate systems into the same coordinate system to complete the point cloud scene modeling. However, due to the large amount of point cloud data obtained through multiple scans, the point cloud registration efficiency and point cloud registration accuracy are low. Therefore, there is a technical problem of low efficiency in point cloud scene modeling.

[0003] To address the above-mentioned problems, no effective solution has been proposed yet. Summary of the invention

[0004] Embodiments of the present invention provide a method, device, electronic device and readable storage medium for establishing a scene model, so as to at least solve the technical problem of low modeling efficiency of point cloud scenes.

[0005] According to one aspect of an embodiment of the present invention, a method for establishing a scene model is provided. The method includes: obtaining a viewing angle range of a scanning device, wherein the viewing angle range is used to indicate the range of the viewing angle scanned by the scanning device; determining the moving angle and moving trajectory of a pan-tilt used to fix the scanning device based on the viewing angle range of the scanning device and the target scene area to be scanned by the scanning device, wherein the pan-tilt is used to drive the scanning device to move within the target scene area; in the process of the pan-tilt moving along the moving trajectory according to the moving angle, controlling the scanning device to scan the target scene area to obtain multiple sets of point cloud data, wherein the scanning device scans once each time the pan-tilt moves according to the moving angle; splicing multiple sets of point cloud data to obtain target point cloud data corresponding to the target scene area; and establishing a three-dimensional model corresponding to the target scene area based on the target point cloud data.

[0006] Optionally, the viewing angle range includes a horizontal viewing angle range scanned by the scanning device and a vertical viewing angle range scanned by the scanning device. Based on the viewing angle range of the scanning device and the target scene area to be scanned by the scanning device, a movement angle and a movement trajectory of the gimbal used to fix the scanning device are determined, including: in response to the horizontal viewing angle range being a first viewing angle range and the vertical viewing angle range being a second viewing angle range, determining that the horizontal movement angle of the gimbal is half of the first viewing angle and the vertical movement angle of the gimbal is half of the second viewing angle, wherein the first viewing angle range corresponds to the first viewing angle and is used to indicate the scanning range of the scanning device in the horizontal direction, and the second viewing angle range corresponds to the second viewing angle and is used to indicate the scanning range of the scanning device in the vertical direction; based on the horizontal movement angle of the gimbal, the vertical movement angle of the gimbal and the target scene area, the movement trajectory of the gimbal is determined.

[0007] Optionally, in the process of the pan-tilt head moving along the moving trajectory according to the moving angle, the scanning device is controlled to scan the target scene area to obtain multiple sets of point cloud data, including: in response to the pan-tilt head moving along the moving trajectory according to the moving angle, a scanning instruction is sent to the scanning device; in response to the scanning device receiving a scanning instruction, the scanning device is controlled to scan the area in the target scene area corresponding to the viewing angle range of the scanning device according to the scanning instruction to obtain multiple sets of point cloud data, wherein the multiple sets of point cloud data respectively correspond to multiple areas in the target scene area.

[0008] Optionally, multiple groups of point cloud data are spliced ​​to obtain target point cloud data corresponding to the target scene area, including: adding timestamps to the multiple groups of point cloud data in the order in which the multiple groups of point cloud data are acquired; based on the timestamps, determining a first group of point cloud data from the multiple groups of point cloud data, wherein the first group of point cloud data is a group of point cloud data acquired first among the multiple groups of point cloud data; determining a polar coordinate system corresponding to the first group of point cloud data as a reference coordinate system; converting the multiple groups of point cloud data from the corresponding polar coordinate systems to the reference coordinate system, respectively, to obtain point cloud data corresponding to the multiple groups of point cloud data under the reference coordinates; and splicing the point cloud data corresponding to the multiple groups of point cloud data under the reference coordinate system to obtain the target point cloud data corresponding to the target scene area.

[0009] Optionally, multiple groups of point cloud data are respectively converted from the corresponding polar coordinate system to the reference coordinate system to obtain point cloud data corresponding to the multiple groups of point cloud data in the reference coordinate system, including: among the multiple groups of point cloud data, determining a second group of point cloud data whose timestamp is adjacent to the timestamp corresponding to the first group of point cloud data; determining a first transformation matrix between the polar coordinate system corresponding to the second group of point cloud data and the reference coordinate system; based on the first transformation matrix, converting the second group of point cloud data from the corresponding polar coordinate system to the reference coordinate system to obtain point cloud data corresponding to the second group of point cloud data in the reference coordinate system; among the multiple groups of point cloud data, determining a third group of point cloud data whose timestamp is adjacent to the timestamp corresponding to the second group of point cloud data, and determining a second transformation matrix between the polar coordinate system corresponding to the third group of point cloud data and the reference coordinate system; based on the second transformation matrix, converting the third group of point cloud data from the corresponding polar coordinate system to the reference coordinate system to obtain point cloud data corresponding to the third group of point cloud data in the reference coordinate system.

[0010] Optionally, determining a first transformation matrix between a polar coordinate system and a reference coordinate system corresponding to the second set of point cloud data includes: determining a rotation angle of the gimbal after the gimbal moves for the first time along the moving trajectory according to the moving angle; based on the rotation angle, determining a rotation matrix of the gimbal and a translation matrix of the gimbal; and determining a first transformation matrix based on the rotation matrix and the translation matrix.

[0011] Optionally, in the target scene area, there is an overlapping area between the area corresponding to the first group of point cloud data and the area corresponding to the second group of point cloud data, and based on the rotation matrix and the translation matrix, determining the first transformation matrix, including: determining the number of first point clouds in the first group of point cloud data and the number of second point clouds in the overlapping area of ​​the first group of point cloud data based on the first group of point cloud data and the overlapping area, and, based on the second group of point cloud data and the overlapping area, determining the number of third point clouds in the second group of point cloud data and the number of fourth point clouds in the overlapping area; adding the sum of the number of the second point cloud and the number of the fourth point cloud to the sum of the number of the first point cloud and the number of the third point cloud. The sum of the number of cloud data is taken as the quotient to obtain the overlapping rate between the first group of point cloud data and the second group of point cloud data; based on the overlapping rate and the target distance between each second point cloud data in the second group of point cloud data and the corresponding first point cloud data closest to the first group of point cloud data, a target number of point sets are extracted from the first point group point cloud data and the second group of point cloud data, wherein each pair of point sets in the target number of point sets includes a first point cloud data and a second point cloud data; based on the sum of the squares of the distances between the first point cloud data and the second point cloud data in the target number of point sets, the rotation matrix and the translation matrix are calculated by a singular value decomposition algorithm to obtain a first transformation matrix.

[0012] Optionally, based on the overlap rate and the target distance between each second point cloud data in the second group of point cloud data and the first point cloud data with the closest distance to the corresponding data in the first group of point cloud data, a target quantity pair point set is extracted from the first point group point cloud data and the second group of point cloud data, including: sorting the target distance between each second point cloud data in the second group of point cloud data and the first point cloud data with the closest distance to the corresponding data in the first group of point cloud data in ascending order to obtain a distance point set, wherein the distance point set includes multiple pairs of first point cloud data and second point cloud data corresponding to the target distances; determining the target quantity to be extracted from the distance set based on the overlap rate and the first point cloud quantity; and extracting the target quantity pair point set from the distance point set based on the target quantity and in ascending order of the target distances.

[0013] According to another aspect of an embodiment of the present invention, a scene model establishment device is also provided. The device includes: an acquisition unit, used to acquire the viewing angle range of a scanning device, wherein the viewing angle range is used to indicate the range of the viewing angle scanned by the scanning device; a determination unit, used to determine the moving angle and moving trajectory of the pan-tilt used to fix the scanning device based on the viewing angle range of the scanning device and the target scene area to be scanned by the scanning device, wherein the pan-tilt is used to drive the scanning device to move within the target scene area; a control unit, used to control the scanning device to scan the target scene area during the process of the pan-tilt moving along the moving trajectory according to the moving angle, and obtain multiple groups of point cloud data, wherein the scanning device scans once each time the pan-tilt moves once according to the moving angle; a splicing unit, used to splice multiple groups of point cloud data to obtain target point cloud data corresponding to the target scene area; and a building unit, used to build a three-dimensional model corresponding to the target scene area based on the target point cloud data.

[0014] According to another aspect of an embodiment of the present invention, an electronic device is provided, including: a memory storing an executable program; and a processor for running the program, wherein the method for establishing a scene model in each embodiment of the present invention is executed when the program is running.

[0015] According to another aspect of an embodiment of the present invention, a computer-readable storage medium is also provided, the computer-readable storage medium including a stored executable program, wherein when the executable program is running, the device where the computer-readable storage medium is located is controlled to execute the method for establishing the scene model in each embodiment of the present invention.

[0016] According to another aspect of an embodiment of the present invention, a computer program product is provided, including a computer program. When the computer program is executed by a processor, the method for establishing a scene model in each embodiment of the present invention is implemented.

[0017] According to another aspect of an embodiment of the present invention, a computer program product is also provided, including a non-volatile computer-readable storage medium, wherein the non-volatile computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method for establishing a scene model in each embodiment of the present invention is implemented.

[0018] According to another aspect of an embodiment of the present invention, a computer program is further provided. When the computer program is executed by a processor, the method for establishing a scene model in each embodiment of the present invention is implemented.

[0019] In an embodiment of the present invention, a viewing angle range of a scanning device is obtained, wherein the viewing angle range is used to indicate the range of the viewing angle scanned by the scanning device; based on the viewing angle range of the scanning device and the target scene area to be scanned by the scanning device, a moving angle and a moving trajectory of a pan / tilt used to fix the scanning device are determined, wherein the pan / tilt is used to drive the scanning device to move within the target scene area; in the process of the pan / tilt moving along the moving trajectory according to the moving angle, the scanning device is controlled to scan the target scene area to obtain multiple groups of point cloud data, wherein the scanning device scans once each time the pan / tilt moves once according to the moving angle; the multiple groups of point cloud data are spliced ​​to obtain target point cloud data corresponding to the target scene area; based on the target point cloud data, a three-dimensional model corresponding to the target scene area is established. That is to say, in the present invention, the moving angle and moving trajectory of the pan-tilt used to fix the scanning device can be determined through the viewing angle range of the scanning device and the target scene area to be scanned by the scanning device, which can help realize the comprehensive scanning of the scanning device in the target scene area and improve the comprehensiveness and accuracy of data collection; and the pan-tilt drives the scanning device to scan the target scene area multiple times to obtain multiple groups of point cloud data, so that the subsequent point cloud data can be easily converted to the same reference coordinate system based on the attitude angle of the pan-tilt, thereby realizing the splicing of multiple groups of point cloud data and obtaining complete point cloud data of the target scene area, which provides the necessary basic data for the subsequent three-dimensional model establishment, thereby improving the modeling efficiency of the point cloud scene, and solving the technical problem of low modeling efficiency of the point cloud scene. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of this application. 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 drawings:

[0021] Figure 1 is a flow chart of a method for establishing a scene model according to an embodiment of the present invention;

[0022] Figure 2 It is a schematic diagram of a device for establishing a scene model according to an embodiment of the present invention. DETAILED DESCRIPTION

[0023] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.

[0024] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0025] Example 1

[0026] According to an embodiment of the present invention, an embodiment of a method for establishing a scene model is provided. 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 a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0027] Figure 1 is a flow chart of a method for establishing a scene model according to an embodiment of the present invention. Figure 1 As shown, the method comprises the following steps:

[0028] Step S101, obtaining the viewing angle range of the scanning device.

[0029] In the technical solution provided in the above step S101 of the present invention, the scanning device can be a laser radar device or an optical scanning device, which is not specifically limited here. The viewing angle range of the scanning device can be used to indicate the range of the scanning viewing angle of the scanning device, that is, the range that the scanning device can cover. Among them, the viewing angle range of the scanning device can include the horizontal viewing angle range of the scanning device and the vertical viewing angle range of the scanning device. The horizontal viewing angle range is used to indicate the area that the scanning device can cover in the horizontal direction, and the vertical viewing angle range is used to indicate the area that the scanning device can cover in the vertical direction.

[0030] In this embodiment, the scanning device is used to scan the target scene area to be scanned to obtain point cloud data of the target scene area. The scanning device is installed on a pan-tilt platform, and the movement of the pan-tilt platform drives the scanning device to move to achieve scanning of a larger scene.

[0031] Step S102, based on the viewing angle range of the scanning device and the target scene area to be scanned by the scanning device, determining the moving angle and moving trajectory of the pan / tilt used to fix the scanning device.

[0032] In the technical solution provided in the above step S102 of the present invention, the pan-tilt is a device that can control the direction of the scanning device, and can move the scanning device according to a preset angle and trajectory. After the viewing angle range of the scanning device is determined in step S101, the moving angle and moving trajectory of the pan-tilt used to fix the scanning device can be determined in combination with the viewing angle range of the scanning device and the target scene area to be scanned by the scanning device, and then the scanning device is driven to scan the target scene area through the movement of the pan-tilt to obtain point cloud data of the target scene area.

[0033] In this embodiment, since the viewing angle range of the scanning device is used to indicate the range that the scanning device can cover, based on this, after determining the viewing angle range of the scanning device, the moving angle and movement trajectory of the gimbal can be determined according to the size of the target scene area and the initial position of the gimbal used to fix the scanning device, so that when the gimbal drives the scanning device to move in the target scene area, it can collect point cloud data of the target scene area.

[0034] For example, assuming that the horizontal viewing angle range of the scanning device is FOV, and the vertical viewing angle range is vFOV, then the action logic of the PTZ can be determined as: S-shaped movement from left to right and from bottom to top, that is, the movement trajectory of the PTZ is an S-shaped curve movement trajectory. When the PTZ moves left and right, the angle of each movement is FOV / 2, and when the PTZ moves up and down, the angle of each movement is vFOV / 2. This is only an illustrative example, and does not limit the movement trajectory and movement angle of the PTZ.

[0035] Optionally, after determining the moving angle and moving trajectory of the pan / tilt, the pan / tilt can be controlled to move along the moving trajectory according to the moving angle, thereby driving the scanning device to scan the target scene area and obtain point cloud data. These point cloud data can be used for 3D modeling, map making, engineering measurement and other applications. The entire process requires precise planning and control to ensure that accurate and complete point cloud data is obtained.

[0036] Step S103, when the pan / tilt head moves along the moving trajectory according to the moving angle, the scanning device is controlled to scan the target scene area to obtain multiple sets of point cloud data.

[0037] In the technical solution provided in the above step S103 of the present invention, since the target scene area is large, the scanning device cannot scan the entire target scene area at one time. Therefore, in the process of the pan-tilt head moving along the moving trajectory according to the moving angle, the scanning device can be controlled to scan the target scene area multiple times to obtain multiple sets of point cloud data. Among them, each time the pan-tilt head moves along the moving trajectory according to the moving angle, the scanning device scans the target scene area once to obtain a set of point cloud data. In this way, after scanning the target scene area multiple times, multiple sets of point cloud data can be obtained, wherein the multiple sets of point cloud data correspond to different areas of the target scene area.

[0038] In this embodiment, in response to the pan-tilt head moving along the moving trajectory once according to the moving angle, a scanning instruction is sent to the scanning device. After receiving the scanning instruction, the scanning device can scan the area within its viewing angle to obtain a set of point cloud data. It should be noted that after the scanning device completes the scanning, the point cloud data obtained from the scan and the horizontal and vertical (Pan-Tilt-Zoom, referred to as PT) values ​​of the pan-tilt head during the scan can be recorded. Among them, the PT value of the pan-tilt head is used to indicate the three main functions of the pan-tilt head device: horizontal rotation, vertical rotation and zoom.

[0039] Optionally, the PT value of the gimbal helps to subsequently convert point cloud data at different viewing angles into the same reference coordinate system to achieve the acquisition of complete point cloud data corresponding to the target scene area.

[0040] Optionally, the gimbal can move along the moving trajectory according to the moving angle. Each time it moves, it can drive the scanning device to scan the area in the target scene area that the scanning device currently corresponds to, so as to obtain the point cloud data of the area. Then, the gimbal moves multiple times according to the moving angle until it moves to the end of the trajectory. The scanning device can also complete multiple scans of the target scene area to achieve a comprehensive scan of the target scene area, thereby obtaining multiple sets of point cloud data corresponding to the target scene area.

[0041] Optionally, when the pan / tilt moves the scanning device, there may be overlapping areas in the viewing angle range of the scanning device in two adjacent movements, that is, there may be overlapping point cloud data in each two adjacent groups of point cloud data among the multiple groups of point cloud data.

[0042] Step S104, stitching multiple groups of point cloud data to obtain target point cloud data corresponding to the target scene area.

[0043] In the technical solution provided by the above step S104 of the present invention, after obtaining multiple groups of point cloud data corresponding to the target scene area through the above step S103, the multiple groups of point cloud data can be spliced ​​to obtain target point cloud data corresponding to the target scene area, wherein the target point cloud data is complete point cloud data corresponding to the target scene area.

[0044] In this embodiment, since multiple sets of point cloud data are obtained by moving the scanning device multiple times with the pan / tilt, that is, the scanning device has a different viewing angle each time it scans the target scene area, based on this, each set of point cloud data corresponds to a polar coordinate system. Before splicing multiple sets of point cloud data, it is necessary to convert the multiple sets of point cloud data to the same reference coordinate system to achieve splicing of the multiple sets of point cloud data. It should be noted that the scanning device can be a laser radar device, and the polar coordinate system corresponding to the point cloud data obtained by the scanning device can be a radar coordinate system.

[0045] For example, assuming that the first set of point cloud data is the first set of point cloud data acquired by the scanning device, based on this, the radar coordinate system corresponding to the first set of point cloud data can be used as the reference coordinate system, and then the second set of point cloud data and the first set of point cloud data are configured with the point cloud, and the first transformation matrix for converting the second set of point cloud data from the radar coordinate system to the reference coordinate system is determined, and then the second set of point cloud data is converted from its corresponding radar coordinate system to the reference coordinate system through the first transformation matrix. The acquisition time of the second set of point cloud data is adjacent to the acquisition time of the first set of point cloud data.

[0046] Optionally, after converting the second set of point cloud data to the reference coordinate system, the third set of point cloud data and the transformed second set of point cloud data can be configured to determine the second transformation matrix for converting the third set of point cloud data from its corresponding radar coordinate system to the reference coordinate system. Then, the third set of point cloud data is converted from its corresponding radar coordinate system to the reference coordinate system through the second transformation matrix. The acquisition time of the third set of point cloud data is adjacent to the acquisition time of the second set of point cloud data, and so on, until multiple sets of point cloud data are converted to the reference coordinate system.

[0047] Optionally, when stitching multi-view point clouds, the coordinate transformation includes rotation transformation and translation transformation. Assume that the reference point cloud coordinate system is P and the radar coordinate system is Q. The three-dimensional coordinates of the midpoint of the reference coordinate system P are denoted as p = (x p ,y p , z p ) T The three-dimensional coordinates of the point in the radar coordinate system Q are denoted as q = (x q ,y q , z q ) T, then the transformation matrix from the radar coordinate system Q to the reference coordinate system P can be determined by the following formula.

[0048]

[0049] Transforming the above formula gives:

[0050]

[0051] Where R = R x R y R z is a 3*3 rotation matrix, t=(T x , T y , T z ) T is a 3*1 translation matrix, T pq It is a 4*4 rotation and translation matrix, which can be the above-mentioned first transformation matrix or the above-mentioned second transformation matrix.

[0052] Optionally, assume that the multiple sets of point cloud data to be spliced ​​are point clouds Q under M perspectives 0 , Q 1 ...Q m-1 , there is an overlapping area between two adjacent perspectives, the stitching process is as follows: point cloud Q 0 As the reference coordinate system P; 0 is the source point cloud, Q 1 For mobile point cloud, point cloud registration calculates Q 1 Transform to Q 0 The transformation matrix T 01 ; Q 1 is the source point cloud, Q 2 For mobile point cloud, point cloud registration calculates Q 2 Transform to Q 1 The transformation matrix T 12 , then Q 2 Transform to Q 0 The transformation matrix T 02 =T 01 T 12 .

[0053] Alternatively, according to the above method, Q can be calculated i (i=2, ..., m-1) to Q 0 The transformation matrix T 0i .

[0054] Optionally, after converting multiple sets of point cloud data to the reference coordinate system through the above method, the point cloud data of the multiple sets of point cloud data in the reference coordinate system can be spliced ​​to obtain target point cloud data corresponding to the target scene area, so as to obtain complete point cloud data corresponding to the target scene area.

[0055] Step S105: establishing a three-dimensional model corresponding to the target scene area based on the target point cloud data.

[0056] In the technical solution provided by the above-mentioned step S105 of the present invention, after the target point cloud data corresponding to the target scene area is determined through step S104, the target point cloud data can be preprocessed, and then the target modeling method can be selected to establish a three-dimensional model corresponding to the target scene area based on the preprocessed target point cloud data.

[0057] In this embodiment, the target point cloud data is preprocessed, which may include operations such as denoising, filtering, and registration, so as to improve the quality and accuracy of the data and provide a reliable basis for subsequent modeling and analysis.

[0058] Optionally, the target modeling method may be voxelization, surface fitting, polygonal mesh generation, etc., which is not specifically limited here.

[0059] For example, by using the preprocessed point cloud data and adopting the selected modeling method to perform modeling and reconstruction, multiple iterations can be performed as needed to obtain a three-dimensional model that conforms to the actual scene.

[0060] Through the above steps S101 to S105, the moving angle and moving trajectory of the gimbal used to fix the scanning device can be determined through the viewing angle range of the scanning device and the target scene area to be scanned by the scanning device, which can help realize the comprehensive scanning of the scanning device in the target scene area and improve the comprehensiveness and accuracy of data collection; and the gimbal drives the scanning device to scan the target scene area multiple times to obtain multiple groups of point cloud data, so that it is easy to convert the multiple groups of point cloud data to the same reference coordinate system based on the attitude angle of the gimbal, and then realize the splicing of multiple groups of point cloud data to obtain complete point cloud data of the target scene area, which provides the necessary basic data for the subsequent three-dimensional model establishment, thereby improving the modeling efficiency of the point cloud scene, and solving the technical problem of low modeling efficiency of the point cloud scene.

[0061] The above method of this embodiment is further introduced below.

[0062] As an optional implementation, the viewing angle range includes a horizontal viewing angle range scanned by the scanning device and a vertical viewing angle range scanned by the scanning device. Step S102, based on the viewing angle range of the scanning device and the target scene area to be scanned by the scanning device, determines the movement angle and movement trajectory of the gimbal used to fix the scanning device, including: in response to the horizontal viewing angle range being a first viewing angle range and the vertical viewing angle range being a second viewing angle range, determines that the horizontal movement angle of the gimbal is half of the first viewing angle, and the vertical movement angle of the gimbal is half of the second viewing angle, wherein the first viewing angle range corresponds to the first viewing angle and is used to indicate the scanning range of the scanning device in the horizontal direction, and the second viewing angle range corresponds to the second viewing angle and is used to indicate the scanning range of the scanning device in the vertical direction; based on the horizontal movement angle of the gimbal, the vertical movement angle of the gimbal and the target scene area, determines the movement trajectory of the gimbal.

[0063] In this embodiment, the viewing angle range of the scanning device is used to indicate the range that the scanning device can cover when scanning the target scene area. The viewing angle range of the scanning device includes a water screen viewing angle range and a vertical viewing angle range, wherein the horizontal viewing angle range is used to indicate the area that the scanning device can cover in the horizontal direction, and the vertical viewing angle range is used to indicate the area that the scanning device can cover in the vertical direction.

[0064] Optionally, after determining the horizontal viewing angle range and the vertical viewing angle range of the scanning device, for the convenience of explanation, the horizontal viewing angle range may be referred to as the first viewing angle range, and the vertical viewing angle range may be referred to as the second viewing angle range. Assuming that the first viewing angle range is FOV and the second viewing angle range is vFOV, it can be determined that the horizontal movement angle of the pan / tilt is half of the first viewing angle, that is, the horizontal movement range of the pan / tilt is FOV / 2, and the vertical movement angle of the pan / tilt is half of the second viewing angle, that is, the vertical movement range of the pan / tilt is vFOV / 2.

[0065] Optionally, after determining the horizontal movement angle of the gimbal and the vertical movement angle of the gimbal, the movement trajectory of the gimbal can be determined based on the horizontal movement angle of the gimbal, the vertical movement angle of the gimbal, and the target scene area. For example, the movement trajectory of the gimbal can be an S-shaped curve movement from left to right and from bottom to top. This is only an illustrative example and does not limit the movement trajectory of the gimbal.

[0066] As an optional implementation, step S103, in the process of the pan-tilt head moving along the moving trajectory according to the moving angle, controls the scanning device to scan the target scene area to obtain multiple groups of point cloud data, including: in response to the pan-tilt head moving along the moving trajectory according to the moving angle once, sends a scanning instruction to the scanning device; in response to the scanning device receiving a scanning instruction once, controls the scanning device to scan the area in the target scene area corresponding to the viewing angle range of the scanning device according to the scanning instruction to obtain multiple groups of point cloud data, wherein the multiple groups of point cloud data respectively correspond to multiple areas in the target scene area.

[0067] In this embodiment, since the target scene area is large, the scanning device cannot scan the entire target scene area at one time. Therefore, when the pan-tilt moves along the moving trajectory according to the moving angle, the scanning device can be controlled to scan the target scene area multiple times to obtain multiple sets of point cloud data. For example, each time the pan-tilt moves along the moving trajectory according to the moving angle, a scanning instruction is sent to the scanning device. After receiving the scanning instruction each time, the scanning device can scan the target scene area within its viewing angle, thereby obtaining multiple sets of point cloud data.

[0068] As an optional implementation, step S104, stitching multiple groups of point cloud data to obtain target point cloud data corresponding to the target scene area, including: adding timestamps to the multiple groups of point cloud data in the order in which the multiple groups of point cloud data are acquired; based on the timestamp, determining a first group of point cloud data from the multiple groups of point cloud data, wherein the first group of point cloud data is a group of point cloud data acquired first among the multiple groups of point cloud data; determining a polar coordinate system corresponding to the first group of point cloud data as a reference coordinate system; converting the multiple groups of point cloud data from the corresponding polar coordinate systems to the reference coordinate system, to obtain point cloud data corresponding to the multiple groups of point cloud data under the reference coordinates; stitching the point cloud data corresponding to the multiple groups of point cloud data under the reference coordinate system, to obtain target point cloud data corresponding to the target scene area.

[0069] In this embodiment, after acquiring multiple sets of point cloud data, the multiple sets of point cloud data may be spliced ​​to obtain target point cloud data corresponding to the target scene area.

[0070] Optionally, timestamps can be added to the multiple groups of point cloud data in the order in which they are acquired, and the timestamps are used to indicate the acquisition time of the corresponding point cloud data. Then, the first group of point cloud data acquired can be determined from the multiple groups of point cloud data by the timestamps corresponding to each group of point cloud data. For the convenience of explanation, the first group of point cloud data acquired can be called the first group of point cloud data. Similarly, the group of point cloud data acquired next to the first group of point cloud data can be called the second group of point cloud data, and the group of point cloud data acquired next to the second group of point cloud data can be called the third group of point cloud data, and so on.

[0071] Optionally, after sorting multiple groups of point cloud data according to timestamps, the polar coordinate system (for example, radar coordinate system) corresponding to the first group of point cloud data can be determined as the reference coordinate system, and then the remaining multiple groups of point cloud data can be converted from the corresponding polar coordinate system to the reference coordinate system, thereby achieving the purpose of unifying multiple groups of point cloud data into the same reference coordinate system.

[0072] Optionally, after converting multiple sets of point cloud data to a reference coordinate system, the multiple sets of point cloud data in the reference coordinate system may be spliced ​​to obtain target point cloud data corresponding to the target scene area, where the target point cloud data is complete point cloud data of the target scene area.

[0073] As an optional implementation, multiple groups of point cloud data are respectively converted from corresponding polar coordinate systems to reference coordinate systems to obtain point cloud data corresponding to the multiple groups of point cloud data in reference coordinates, including: among the multiple groups of point cloud data, determining a second group of point cloud data whose timestamp is adjacent to the timestamp corresponding to the first group of point cloud data; determining a first transformation matrix between the polar coordinate system corresponding to the second group of point cloud data and the reference coordinate system; based on the first transformation matrix, converting the second group of point cloud data from the corresponding polar coordinate system to the reference coordinate system to obtain point cloud data corresponding to the second group of point cloud data in reference coordinates; among the multiple groups of point cloud data, determining a third group of point cloud data whose timestamp is adjacent to the timestamp corresponding to the second group of point cloud data, and determining a second transformation matrix between the polar coordinate system corresponding to the third group of point cloud data and the reference coordinate system; based on the second transformation matrix, converting the third group of point cloud data from the corresponding polar coordinate system to the reference coordinate system to obtain point cloud data corresponding to the third group of point cloud data in the reference coordinate system.

[0074] In this embodiment, since the polar coordinate system corresponding to the first set of point cloud data is the reference coordinate system, based on this, when converting multiple sets of point cloud data from the corresponding polar coordinate system to the reference coordinate system, the multiple sets of point cloud data can be aligned in sequence according to the order in which the point cloud data are acquired, and the transformation matrix corresponding to the multiple sets of point cloud data can be obtained, and then the multiple sets of point cloud data can be transformed to the reference coordinate system through the transformation matrix.

[0075] For example, after determining the first group of point cloud data, the second group of point cloud data adjacent to the timestamp corresponding to the first group of point cloud data can be determined according to the timestamp, and then the second group of point cloud data and the first group of point cloud data are point cloud configured, and the first transformation matrix for converting the second group of point cloud data from the radar coordinate system to the reference coordinate system is determined, and then the second group of point cloud data is converted from its corresponding radar coordinate system to the reference coordinate system through the first transformation matrix.

[0076] Optionally, after converting the second set of point cloud data to the reference coordinate system, a third set of point cloud data whose timestamp is adjacent to the timestamp corresponding to the second set of point cloud data can be further determined, and then the third set of point cloud data is configured with the transformed second set of point cloud data, and then a second transformation matrix for converting the third set of point cloud data from its corresponding radar coordinate system to the reference coordinate system is determined. Then, the third set of point cloud data is converted from its corresponding radar coordinate system to the reference coordinate system through the second transformation matrix. And so on, until multiple sets of point cloud data are converted to the reference coordinate system.

[0077] As an optional implementation, determining a first transformation matrix between a polar coordinate system and a reference coordinate system corresponding to a second set of point cloud data includes: determining the rotation angle of the gimbal after the gimbal moves for the first time along the moving trajectory according to the moving angle; based on the rotation angle, determining the rotation matrix of the gimbal and the translation matrix of the gimbal; based on the rotation matrix and the translation matrix, determining the first transformation matrix.

[0078] In this embodiment, the process of determining the transformation matrix is ​​further introduced by taking the determination of the first transformation matrix as an example. Since the reference coordinate system is the polar coordinate system corresponding to the first set of point cloud data, and the first set of point cloud data is obtained by the driving scanning device after the gimbal moves along the moving trajectory according to the moving angle for the first time, based on this, the rotation matrix of the gimbal and the translation matrix of the gimbal can be determined according to the rotation angle of the gimbal when the first set of point cloud data is obtained, and then the first transformation matrix is ​​determined based on the rotation matrix of the gimbal and the translation matrix of the gimbal.

[0079] For example, the rotation angle of the gimbal after the gimbal moves along the moving trajectory for the first time according to the moving angle may include the rotation angle of the gimbal along the x-axis, the rotation angle of the gimbal along the y-axis, and the rotation angle of the gimbal along the z-axis. The rotation angle of the gimbal along the x-axis may be recorded as α, the rotation angle of the gimbal along the y-axis may be recorded as β, and the rotation angle of the gimbal along the z-axis may be recorded as γ.

[0080] Optionally, after determining the rotation angle α of the gimbal along the x-axis, the rotation angle β of the gimbal along the y-axis, and the rotation angle γ of the gimbal along the z-axis, the rotation matrix of the gimbal may be determined by the following formula.

[0081]

[0082] Among them, the change of the gimbal PT value ΔPT is the rotation angle along the z-axis and x-axis respectively, and the rotation angle of the y-axis is 0. Substitute it into the above formula to calculate the initial rotation matrix R 0 , since the gimbal is a fixed-point measurement, the initial translation matrix t 0 =(0,0,0) T .

[0083] Optionally, after determining the initial rotation matrix R 0 , and the initial translation matrix t 0 After that, we can use the initial rotation matrix R 0 , and the initial translation matrix t 0 , determine the first transformation matrix. For example, the initial rotation matrix R 0 and the initial translation matrix t 0 Multiplying them together to obtain a first transformation matrix is ​​only an illustrative example and does not limit the specific method for obtaining the first transformation matrix.

[0084] As an optional implementation, in the target scene area, there is an overlapping area between the area corresponding to the first group of point cloud data and the area corresponding to the second group of point cloud data, and based on the rotation matrix and the translation matrix, a first transformation matrix is ​​determined, including: based on the first group of point cloud data and the overlapping area, determining the number of first point clouds in the first group of point cloud data and the number of second point clouds in the overlapping area of ​​the first group of point cloud data, and, based on the second group of point cloud data and the overlapping area, determining the number of third point clouds in the second group of point cloud data and the number of fourth point clouds in the second group of point cloud data in the overlapping area; adding the sum of the second point cloud number and the fourth point cloud number to the first point cloud number Taking the quotient of the sum of the third point cloud numbers, the overlap rate between the first point cloud data and the second point cloud data is obtained; based on the overlap rate and the target distance between each second point cloud data in the second point cloud data and the first point cloud data with the closest corresponding distance in the first point cloud data, a target number of point pairs are extracted from the first point cloud data and the second point cloud data, wherein each pair of point sets in the target number of point pairs includes a first point cloud data and a second point cloud data; based on the sum of the squares of the distances between the first point cloud data and the second point cloud data in the target number of point pairs, the rotation matrix and the translation matrix are calculated by a singular value decomposition algorithm to obtain a first transformation matrix.

[0085] In this embodiment, when the pan-tilt head drives the scanning device to move, there may be overlapping areas in the viewing angle range of the scanning device in two adjacent movements. Based on this, when splicing multiple groups of point cloud data, the point cloud data obtained by splicing the two groups of point cloud data can be determined according to the overlap rate between the two adjacent groups of point cloud data.

[0086] Optionally, taking determining the overlap rate between the first set of point cloud data and the second set of point cloud data as an example, a method for determining the overlap rate between the two sets of point cloud data is introduced.

[0087] Optionally, assuming that there is overlap between the first set of point cloud data and the second set of point cloud data, for the convenience of explanation, the number of point cloud data included in the first set of point cloud data can be recorded as the first point cloud number, and the number of point cloud data in the first point cloud data that overlaps with the second point cloud data can be recorded as the second point cloud number. Similarly, the number of point cloud data included in the second set of point cloud data can be recorded as the third point cloud number, and the number of point cloud data in the second point cloud data that overlaps with the first point cloud data can be recorded as the fourth point cloud number.

[0088] Optionally, after determining the number of the first point cloud, the number of the second point cloud, the number of the third point cloud, and the number of the fourth point cloud, the overlap rate between the first group of point cloud data and the second group of point cloud data may be determined by the following formula.

[0089]

[0090] in, Used to indicate the overlap ratio, N P Used to indicate the number of the first point cloud, N Pc Used to indicate the number of the second point cloud, N Q Used to indicate the number of the third point cloud, N Qc Used to indicate the fourth point cloud quantity.

[0091] Optionally, after determining the overlap rate between each two adjacent groups of point cloud data, the target distance between each second point cloud data in the second group of point cloud data and the first point cloud data in the first group of point cloud data that is closest to the second point cloud data can be further determined, and then based on the overlap rate and the distance between the point cloud data in the second group of point cloud data and the point cloud data in the first group of point cloud data, a target number of point sets can be extracted from the first point group point cloud data and the second group of point cloud data.

[0092] For example, for any point in the second set of point cloud data, denoted as q i , find the first set of point cloud data that matches point q i The closest point is denoted as p i According to this method, after determining the closest point in the first set of point cloud data corresponding to each point in the second set of point cloud data, the square of the distance between each point pair can be calculated.

[0093] Optionally, after determining the squared distance between each pair of points After that, we can calculate the overlap ratio and the squared distance between each pair of points. A target number of point pairs are extracted from the first point group point cloud data and the second point cloud data. Then, based on the square sum of the distances between the first point cloud data and the second point cloud data in the target number of point pairs, a rotation matrix and a translation matrix are calculated by a singular value decomposition algorithm to obtain a first transformation matrix.

[0094] For example, the sum of squares of distances between the first point cloud data and the second point cloud data in the target quantity point set may be determined by the following formula.

[0095]

[0096] Optionally, the transformation matrix (R, t) is calculated by singular value decomposition so that the distance square sum function D sum Minimum.

[0097] Among them, the transformation matrix (R, t) calculated by the singular value decomposition method can be determined by the following formula.

[0098]

[0099] Optionally, a 3D transformation Q'=RQ+t is performed on the moving point cloud Q, and the registration error is calculated. The above steps are repeated to perform iterative calculations, and when the registration error is less than a given threshold or reaches a maximum number of iterations, the precise registration is completed.

[0100] As an optional implementation, based on the overlap rate and the target distance between each second point cloud data in the second group of point cloud data and the first point cloud data with the closest distance to the corresponding data in the first group of point cloud data, a target quantity pair point set is extracted from the first point group point cloud data and the second group of point cloud data, including: sorting the target distance between each second point cloud data in the second group of point cloud data and the first point cloud data with the closest distance to the corresponding data in the first group of point cloud data in order from small to large to obtain a distance point set, wherein the distance point set includes multiple pairs of first point cloud data and second point cloud data corresponding to the target distances; determining the target quantity to be extracted from the distance set based on the overlap rate and the first point cloud quantity; and extracting the target quantity pair point set from the distance point set based on the target quantity and in order of the target distances from small to large.

[0101] In this embodiment, the closest point in the second set of point cloud data corresponding to each point in the first set of point cloud data is determined, and the square value of the distance between each point pair is calculated. After that, you can sort them in order from small to large. Sort and get Afterwards, the top N 0 The point set corresponding to the squared distance value. 0 Each point set in the N point sets includes a first point cloud data and a second point cloud data. 0 It can be determined by the following formula:

[0102]

[0103] In the above steps, multiple sets of point cloud data can be converted to the same reference coordinate system, and then the multiple sets of point cloud data in the reference coordinate system can be spliced ​​to obtain complete point cloud data corresponding to the target scene area. After that, the target scene area can be modeled according to the complete point cloud data to obtain a three-dimensional model corresponding to the target scene area, thereby improving the modeling efficiency of the point cloud scene and solving the technical problem of low modeling efficiency of the point cloud scene.

[0104] Example 2

[0105] The technical solution of the embodiment of the present invention is illustrated below in conjunction with preferred implementation modes.

[0106] At present, when performing scene modeling, LiDAR technology is usually used to obtain point cloud data of the scene area. However, when scanning a large-scale scene or a scene with obstructions, multiple multi-angle point cloud scans are required. Since the point cloud information under different viewing angles or measurement points corresponds to different radar coordinate systems, the point cloud data under different radar coordinate systems need to be unified into the same coordinate system to complete the point cloud scene modeling. However, due to the large amount of point cloud data obtained by multiple scans, the point cloud registration efficiency and point cloud registration accuracy are low. Therefore, there is a technical problem of low efficiency in point cloud scene modeling.

[0107] However, the present invention provides a method for establishing a scene model, which obtains the viewing angle range of a scanning device, wherein the viewing angle range is used to indicate the range of the viewing angle scanned by the scanning device; based on the viewing angle range of the scanning device and the target scene area to be scanned by the scanning device, determines the moving angle and moving trajectory of a pan-tilt used to fix the scanning device, wherein the pan-tilt is used to drive the scanning device to move within the target scene area; in the process of the pan-tilt moving along the moving trajectory according to the moving angle, controls the scanning device to scan the target scene area to obtain multiple groups of point cloud data, wherein the scanning device scans once each time the pan-tilt moves once according to the moving angle; splices the multiple groups of point cloud data to obtain target point cloud data corresponding to the target scene area; and establishes a three-dimensional model corresponding to the target scene area based on the target point cloud data. That is, through the viewing angle range of the scanning device and the target scene area to be scanned by the scanning device, the moving angle and movement trajectory of the gimbal used to fix the scanning device can be determined, which can help realize the comprehensive scanning of the scanning device in the target scene area and improve the comprehensiveness and accuracy of data collection; and the gimbal drives the scanning device to scan the target scene area multiple times to obtain multiple groups of point cloud data, so that the subsequent point cloud data can be easily converted to the same reference coordinate system based on the attitude angle of the gimbal, thereby realizing the splicing of multiple groups of point cloud data and obtaining complete point cloud data of the target scene area, which provides the necessary basic data for the subsequent three-dimensional model establishment, thereby improving the modeling efficiency of the point cloud scene, and solving the technical problem of low modeling efficiency of the point cloud scene.

[0108] Next, the method of obtaining point cloud data at different viewing angles and the corresponding gimbal PT values ​​is further introduced.

[0109] In this embodiment, the scanning device is fixed by a gimbal, and by controlling the rotation of the gimbal, point cloud information of different perspectives is obtained when the scanning device scans the target area, ensuring that the point cloud information has sufficient overlap when performing point cloud registration.

[0110] Optionally, assuming that the viewing angle of the radar is horizontal FOV and vertical vFOV, the gimbal action logic is: S-shaped movement from left to right and from bottom to top. When the gimbal moves left and right, the angle of each movement is FOV / 2, and when the gimbal moves up and down, the angle of each movement is vFOV / 2.

[0111] Optionally, each time a scan is performed, a PT value of the pan / tilt device corresponding to the scanned point cloud data is recorded, wherein the PT value is used to indicate three main functions of the pan / tilt device: horizontal rotation, vertical rotation and zoom.

[0112] Next, the stitching process of point clouds from different perspectives based on the PT value of the gimbal is further introduced.

[0113] In this embodiment, the radar coordinate system of the first group of point clouds is used as the reference coordinate system, the second group of point clouds is aligned with the first group, the transformation matrix from the radar coordinate system of the second group of point clouds to the reference coordinate system is obtained, the third group of point clouds is aligned with the transformed second group of point clouds, and so on, and finally all point clouds are converted to the reference coordinate system.

[0114] Optionally, when stitching multi-view point clouds, the coordinate transformation includes rotation transformation and translation transformation. Assume that the reference point cloud coordinate system is P and the radar coordinate system is Q. The three-dimensional coordinates of the midpoint of the reference coordinate system P are denoted as p = (x p ,y p , z p ) T The three-dimensional coordinates of the point in the radar coordinate system Q are denoted as q = (x q ,y q , z q ) T , then the transformation matrix from the radar coordinate system Q to the reference coordinate system P can be determined by the following formula.

[0115]

[0116] Transforming the above formula gives:

[0117]

[0118] Where R = R x Ry R z is a 3*3 rotation matrix, t=(T x , T y , T z ) T is a 3*1 translation matrix, T pq It is a 4*4 rotation and translation matrix.

[0119] Optionally, assume that the multiple sets of point cloud data to be spliced ​​are point clouds Q under M perspectives 0 , Q 1 ...Q m-1 , there is an overlapping area between two adjacent perspectives, the stitching process is as follows: point cloud Q 0 As the reference coordinate system P; 0 is the source point cloud, Q 1 For mobile point cloud, point cloud registration calculates Q 1 Transform to Q 0 The transformation matrix T 01 ; Q 1 is the source point cloud, Q 2 For mobile point cloud, point cloud registration calculates Q 2 Transform to Q 1 The transformation matrix T 12 , then Q 2 Transform to Q 0 The transformation matrix T 02 =T 01 T 12 .

[0120] Alternatively, according to the above method, Q can be calculated i (i=2, ..., m-1) to Q 0 The transformation matrix T 0i .

[0121] Optionally, the point cloud registration process includes a coarse registration process and a fine registration process. Next, the coarse registration process and the fine registration process are introduced respectively.

[0122] Optionally, when performing coarse registration, the initial transformation matrix of the point cloud may be obtained based on the PT value of the gimbal.

[0123] Optionally, assuming that α, β, and γ represent the rotation angles of the gimbal along the x, y, and z axes, respectively, the rotation matrix R is:

[0124]

[0125] Among them, the change of the gimbal PT value ΔPT is the rotation angle along the z-axis and x-axis respectively, and the rotation angle of the y-axis is 0. Substitute it into the above formula to calculate the initial rotation matrix R 0 , since the gimbal is a fixed-point measurement, the initial translation matrix t0 =(0,0,0) T .

[0126] Optionally, when performing fine registration, an iterative closest point (ICP) algorithm may be used to obtain the transformation matrix.

[0127] Optionally, according to the change ΔPT of the PT value of the pan / tilt platform, the overlapping area of ​​the source point cloud P and the moving point cloud Q is obtained; the overlapping rate is determined Assume that the number of overlapping point clouds in the source point cloud P is N Pc , the number of overlapping point clouds in the moving point cloud Q is N Qc , the number of source point cloud P is N P , the number of mobile point cloud Q is N Q ,but

[0128]

[0129] Optionally, for each point q of the moving point cloud Q i , find q i The nearest neighbor point p in the source point cloud P i , calculate the square of the distance between each pair of points And sort them, that is, According to the overlap rate Extract the top N 0 The corresponding point set of And calculate their distance square sum D sum .

[0130]

[0131] Optionally, the transformation matrix (R, t) is calculated by singular value decomposition so that the distance square sum function D sum Minimum, that is

[0132]

[0133] Optionally, a 3D transformation Q'=RQ+t is performed on the moving point cloud Q, and the registration error is calculated. The above steps are repeated to perform iterative calculations, and when the registration error is less than a given threshold or reaches a maximum number of iterations, the precise registration is completed.

[0134] In this embodiment, by combining the pan-tilt action with the laser radar to perform scene scanning, the pan-tilt is controlled to rotate according to the imaging angle of the laser radar to perform overlapping scene scanning, so as to obtain point cloud information under different viewing angles. Then, the point cloud registration method is used to stitch the point clouds of different viewing angles to obtain complete point cloud data of the target scene area. After that, the complete point cloud data is used to construct a three-dimensional model of the target scene area, so as to improve the modeling efficiency of the point cloud scene and solve the technical problem of low modeling efficiency of point cloud data.

[0135] Example 3

[0136] According to an embodiment of the present invention, a scene model establishment device is also provided. It should be noted that the scene model establishment device can be used to execute the scene model establishment method in embodiment 1.

[0137] Figure 2 FIG. 1 is a schematic diagram of a device for establishing a scene model according to an embodiment of the present invention. Figure 2 As shown, the scene model establishment device 200 may include: an acquisition unit 201, a determination unit 202, a control unit 203, a splicing unit 204 and an establishment unit 205.

[0138] The acquisition unit 201 is used to acquire the viewing angle range of the scanning device, wherein the viewing angle range is used to indicate the range of the viewing angle scanned by the scanning device.

[0139] The determination unit 202 is used to determine the movement angle and movement trajectory of the pan-tilt used to fix the scanning device based on the viewing angle range of the scanning device and the target scene area to be scanned by the scanning device, wherein the pan-tilt is used to drive the scanning device to move within the target scene area.

[0140] The control unit 203 is used to control the scanning device to scan the target scene area and obtain multiple groups of point cloud data when the pan-tilt head moves along the moving trajectory according to the moving angle, wherein the scanning device scans once each time the pan-tilt head moves once according to the moving angle.

[0141] The stitching unit 204 is used to stitch multiple sets of point cloud data to obtain target point cloud data corresponding to the target scene area.

[0142] The establishing unit 205 is used to establish a three-dimensional model corresponding to the target scene area based on the target point cloud data.

[0143] Optionally, the determination unit 202 includes: a first determination module, used to determine, in response to the horizontal viewing angle range being the first viewing angle range and the vertical viewing angle range being the second viewing angle range, that the horizontal movement angle of the gimbal is half of the first viewing angle, and the vertical movement angle of the gimbal is half of the second viewing angle, wherein the first viewing angle range corresponds to the first viewing angle, and is used to indicate the scanning range of the scanning device in the horizontal direction, and the second viewing angle range corresponds to the second viewing angle, and is used to indicate the scanning range of the scanning device in the vertical direction; a second determination module, used to determine the movement trajectory of the gimbal based on the horizontal movement angle of the gimbal, the vertical movement angle of the gimbal and the target scene area.

[0144] Optionally, the control unit 203 includes: a sending module, used to send a scanning instruction to the scanning device in response to the pan-tilt head moving along the moving trajectory according to the moving angle each time; a control module, used to control the scanning device to scan the area in the target scene area corresponding to the viewing angle range of the scanning device according to the scanning instruction each time the scanning device receives the scanning instruction, so as to obtain multiple groups of point cloud data, wherein the multiple groups of point cloud data respectively correspond to multiple areas in the target scene area.

[0145] Optionally, the stitching unit 204 includes: an adding module, used to add timestamps to multiple groups of point cloud data according to the order in which the multiple groups of point cloud data are acquired; a third determining module, used to determine a first group of point cloud data from the multiple groups of point cloud data based on the timestamp, wherein the first group of point cloud data is a group of point cloud data acquired first among the multiple groups of point cloud data; a fourth determining module, used to determine the polar coordinate system corresponding to the first group of point cloud data as the reference coordinate system; a conversion module, used to convert the multiple groups of point cloud data from the corresponding polar coordinate system to the reference coordinate system, and obtain the point cloud data corresponding to the multiple groups of point cloud data under the reference coordinate system; a stitching module, used to stitch the point cloud data corresponding to the multiple groups of point cloud data under the reference coordinate system, and obtain the target point cloud data corresponding to the target scene area.

[0146] Optionally, the conversion module includes: a first determination submodule, used to determine, among multiple groups of point cloud data, a second group of point cloud data whose timestamps are adjacent to the timestamps corresponding to the first group of point cloud data; a second determination submodule, used to determine a first transformation matrix between the polar coordinate system and the reference coordinate system corresponding to the second group of point cloud data; a first conversion submodule, used to convert the second group of point cloud data from the corresponding polar coordinate system to the reference coordinate system based on the first transformation matrix, to obtain point cloud data corresponding to the second group of point cloud data in the reference coordinate system; a third determination submodule, used to determine, among multiple groups of point cloud data, a third group of point cloud data whose timestamps are adjacent to the timestamps corresponding to the second group of point cloud data, and determine the second transformation matrix between the polar coordinate system and the reference coordinate system corresponding to the third group of point cloud data; a second conversion submodule, used to convert the third group of point cloud data from the corresponding polar coordinate system to the reference coordinate system based on the second transformation matrix, to obtain point cloud data corresponding to the third group of point cloud data in the reference coordinate system.

[0147] Optionally, the first determination submodule is also used to: determine the rotation angle of the gimbal after the gimbal moves for the first time along the moving trajectory according to the moving angle; determine the rotation matrix and translation matrix of the gimbal based on the rotation angle; determine the first transformation matrix based on the rotation matrix and the translation matrix.

[0148] Optionally, the first determination submodule is also used to: determine the first point cloud number in the first group of point cloud data and the second point cloud number in the overlapping area based on the first group of point cloud data and the overlapping area, and determine the third point cloud number in the second group of point cloud data and the fourth point cloud number in the overlapping area based on the second group of point cloud data and the overlapping area; obtain the overlap rate between the first group of point cloud data and the second group of point cloud data by dividing the sum of the second point cloud number and the fourth point cloud number by the sum of the first point cloud number and the third point cloud number; extract a target number of point pairs from the first point group point cloud data and the second group of point cloud data based on the overlap rate and the target distance between each second point cloud data in the second group of point cloud data and the first point cloud data with the nearest corresponding distance in the first group of point cloud data, wherein each pair of point sets in the target number of point pairs includes a first point cloud data and a second point cloud data; calculate the rotation matrix and the translation matrix based on the sum of the squares of the distances between the first point cloud data and the second point cloud data in the target number of point pairs by a singular value decomposition algorithm to obtain a first transformation matrix.

[0149] Optionally, the first determination submodule is also used to: sort the target distances between each second point cloud data in the second group of point cloud data and the corresponding first point cloud data with the closest distance in the first group of point cloud data in ascending order to obtain a distance point set, wherein the distance point set includes multiple pairs of first point cloud data and second point cloud data corresponding to the target distances; determine the number of targets to be extracted from the distance set based on the overlap rate and the number of first point clouds; and extract the target number pair point set from the distance point set based on the number of targets and in ascending order of the target distances.

[0150] In this embodiment, the moving angle and movement trajectory of the gimbal used to fix the scanning device can be determined through the viewing angle range of the scanning device and the target scene area to be scanned by the scanning device, which can help achieve a comprehensive scan of the scanning device in the target scene area and improve the comprehensiveness and accuracy of data collection; and the gimbal drives the scanning device to scan the target scene area multiple times to obtain multiple groups of point cloud data, so that the subsequent point cloud data can be easily converted to the same reference coordinate system based on the attitude angle of the gimbal, thereby realizing the splicing of multiple groups of point cloud data and obtaining complete point cloud data of the target scene area, which provides the necessary basic data for the subsequent three-dimensional model establishment, thereby improving the modeling efficiency of the point cloud scene, and solving the technical problem of low modeling efficiency of the point cloud scene.

[0151] Example 4

[0152] An embodiment of the present application further provides an electronic device, comprising: a memory storing an executable program; and a processor for running the program, wherein the method for establishing a scene model in each embodiment of the present invention is executed when the program is running.

[0153] Example 5

[0154] An embodiment of the present application further provides a computer-readable storage medium, which includes a stored executable program, wherein when the executable program is running, the device where the computer-readable storage medium is located is controlled to execute the method for establishing the scene model in each embodiment of the present invention.

[0155] Example 6

[0156] The embodiments of the present application also provide a computer program product, including a computer program, which implements the method for establishing a scene model in each embodiment of the present invention when executed by a processor.

[0157] Example 7

[0158] An embodiment of the present application also provides a computer program product, including a non-volatile computer-readable storage medium, wherein the non-volatile computer-readable storage medium is used to store a computer program, and when the computer program is executed by a processor, the method for establishing a scene model in each embodiment of the present invention is implemented.

[0159] Example 8

[0160] The embodiments of the present application also provide a computer program, which, when executed by a processor, implements the method for establishing a scene model in each of the embodiments of the present invention described above.

[0161] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.

[0162] In the above embodiments of the present invention, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0163] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of the units can be a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.

[0164] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.

[0165] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0166] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, magnetic disk or optical disk and other media that can store program codes.

[0167] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principle of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.

Claims

1. A method for establishing a scene model, characterized in that: include: Acquire a viewing angle range of a scanning device, wherein the viewing angle range is used to indicate a range of a viewing angle scanned by the scanning device; Based on the viewing angle range of the scanning device and the target scene area to be scanned by the scanning device, determining the moving angle and moving trajectory of the pan-tilt platform used to fix the scanning device, wherein the pan-tilt platform is used to drive the scanning device to move within the target scene area; In the process of the pan-tilt platform moving along the moving trajectory according to the moving angle, controlling the scanning device to scan the target scene area to obtain multiple groups of point cloud data, wherein the scanning device scans once each time the pan-tilt platform moves once according to the moving angle; Splicing the multiple sets of point cloud data to obtain target point cloud data corresponding to the target scene area; Based on the target point cloud data, a three-dimensional model corresponding to the target scene area is established.

2. The method according to claim 1, characterized in that: The viewing angle range includes a horizontal viewing angle range scanned by the scanning device and a vertical viewing angle range scanned by the scanning device. Based on the viewing angle range of the scanning device and the target scene area to be scanned by the scanning device, a moving angle and a moving trajectory of a pan / tilt for fixing the scanning device are determined, including: In response to the horizontal viewing angle range being a first viewing angle range and the vertical viewing angle range being a second viewing angle range, determining that the horizontal movement angle of the pan / tilt is half of the first viewing angle and the vertical movement angle of the pan / tilt is half of the second viewing angle, wherein the first viewing angle range corresponds to the first viewing angle and is used to indicate the scanning range of the scanning device in the horizontal direction, and the second viewing angle range corresponds to the second viewing angle and is used to indicate the scanning range of the scanning device in the vertical direction; The movement trajectory of the gimbal is determined based on the horizontal movement angle of the gimbal, the vertical movement angle of the gimbal, and the target scene area.

3. The method according to claim 1, characterized in that In the process of the pan / tilt platform moving along the moving trajectory according to the moving angle, the scanning device is controlled to scan the target scene area to obtain multiple sets of point cloud data, including: In response to the pan / tilt platform moving once along the moving trajectory according to the moving angle, sending a scanning instruction to the scanning device; In response to each time the scanning device receives the scanning instruction, the scanning device is controlled to scan the area in the target scene area corresponding to the viewing angle range of the scanning device according to the scanning instruction, so as to obtain multiple groups of point cloud data, wherein the multiple groups of point cloud data respectively correspond to multiple areas in the target scene area.

4. The method according to claim 1, characterized in that: The multiple sets of point cloud data are stitched together to obtain target point cloud data corresponding to the target scene area, including: Adding timestamps to the multiple sets of point cloud data respectively according to the acquisition order of the multiple sets of point cloud data; Based on the timestamp, determining a first set of point cloud data from the multiple sets of point cloud data, wherein the first set of point cloud data is a set of point cloud data acquired first among the multiple sets of point cloud data; Determine the polar coordinate system corresponding to the first set of point cloud data as a reference coordinate system; Respectively converting the multiple sets of point cloud data from the corresponding polar coordinate system to the reference coordinate system to obtain point cloud data corresponding to the multiple sets of point cloud data in the reference coordinate system; The point cloud data corresponding to the multiple groups of point cloud data in the reference coordinate system are spliced ​​to obtain the target point cloud data corresponding to the target scene area.

5. The method according to claim 4, characterized in that The plurality of sets of point cloud data are respectively converted from the corresponding polar coordinate system to the reference coordinate system to obtain point cloud data corresponding to the plurality of sets of point cloud data in the reference coordinate system, including: Determine, among the plurality of groups of point cloud data, a second group of point cloud data having a timestamp adjacent to a timestamp corresponding to the first group of point cloud data; Determine a first transformation matrix between the polar coordinate system and the reference coordinate system corresponding to the second set of point cloud data; Based on the first transformation matrix, transform the second set of point cloud data from the corresponding polar coordinate system to the reference coordinate system to obtain point cloud data corresponding to the second set of point cloud data in the reference coordinate system; Determine, among the plurality of groups of point cloud data, a third group of point cloud data having a timestamp adjacent to the timestamp corresponding to the second group of point cloud data, and determine a second transformation matrix between the polar coordinate system and the reference coordinate system corresponding to the third group of point cloud data; Based on the second transformation matrix, the third set of point cloud data is transformed from the corresponding polar coordinate system to the reference coordinate system to obtain point cloud data corresponding to the third set of point cloud data in the reference coordinate system.

6. The method according to claim 5, characterized in that Determining a first transformation matrix between the polar coordinate system and the reference coordinate system corresponding to the second set of point cloud data includes: Determining a rotation angle of the pan / tilt platform after the pan / tilt platform moves for the first time along the moving trajectory according to the moving angle; Based on the rotation angle, determining a rotation matrix of the gimbal and a translation matrix of the gimbal; The first transformation matrix is ​​determined based on the rotation matrix and the translation matrix.

7. The method according to claim 6, characterized in that In the target scene area, there is an overlapping area between an area corresponding to the first group of point cloud data and an area corresponding to the second group of point cloud data, and determining the first transformation matrix based on the rotation matrix and the translation matrix includes: Based on the first group of point cloud data and the overlapping area, determining the number of first point clouds in the first group of point cloud data and the number of second point clouds in the overlapping area of ​​the first group of point cloud data, and, based on the second group of point cloud data and the overlapping area, determining the number of third point clouds in the second group of point cloud data and the number of fourth point clouds in the second group of point cloud data in the overlapping area; The sum of the second point cloud quantity and the fourth point cloud quantity is divided by the sum of the first point cloud quantity and the third point cloud quantity to obtain an overlap rate between the first set of point cloud data and the second set of point cloud data; Based on the overlap rate and the target distance between each second point cloud data in the second point cloud data group and the first point cloud data group with the closest corresponding distance in the first point cloud data group, extracting a target number of point pairs from the first point cloud data group and the second point cloud data group, wherein each pair of point sets in the target number of point pairs includes one first point cloud data group and one second point cloud data group; Based on the sum of squares of distances between the first point cloud data and the second point cloud data in the target number pair point set, the rotation matrix and the translation matrix are calculated by a singular value decomposition algorithm to obtain the first transformation matrix.

8. The method according to claim 7, characterized in that Extracting a target number of point sets from the first point group point cloud data and the second point cloud data based on the overlap rate and the target distance between each second point cloud data in the second point cloud data group and the first point cloud data group corresponding to the closest point cloud data in the first point cloud data group, including: Sort the target distances between each second point cloud data in the second group of point cloud data and the first point cloud data with the closest corresponding distance in the first group of point cloud data in ascending order to obtain a distance point set, wherein the distance point set includes a plurality of pairs of the first point cloud data and the second point cloud data corresponding to the target distances; Determining the number of the targets to be extracted from the distance set based on the overlap rate and the number of the first point clouds; Based on the target quantity, the target quantity pair point set is extracted from the distance point set in the order of the target distance from small to large.

9. A device for establishing a scene model, characterized in that: include: An acquisition unit, used for acquiring a viewing angle range of a scanning device, wherein the viewing angle range is used for indicating a range of a viewing angle scanned by the scanning device; a determining unit, configured to determine a moving angle and a moving trajectory of a pan-tilt platform for fixing the scanning device based on the viewing angle range of the scanning device and the target scene area to be scanned by the scanning device, wherein the pan-tilt platform is configured to drive the scanning device to move within the target scene area; A control unit, configured to control the scanning device to scan the target scene area to obtain multiple sets of point cloud data when the pan-tilt head moves along the moving trajectory according to the moving angle, wherein the scanning device scans once each time the pan-tilt head moves once according to the moving angle; A stitching unit, used for stitching the multiple sets of point cloud data to obtain target point cloud data corresponding to the target scene area; The establishing unit is used to establish a three-dimensional model corresponding to the target scene area based on the target point cloud data.

10. An electronic device, characterized in that: include: A memory storing an executable program; A processor, configured to run the program, wherein the program executes the method according to any one of claims 1 to 8 when running.

11. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored executable program, wherein when the executable program is executed, the device where the storage medium is located is controlled to execute the method according to any one of claims 1 to 8.

12. A computer program product, characterized in that The invention comprises a computer program which, when executed by a processor, implements the method according to any one of claims 1 to 8.