Methods, apparatus, equipment and media for measuring walls

By automating the processing and projection of wall point cloud data, the problems of low accuracy and high cost of traditional manual measurement have been solved, and high-precision automated measurement has been achieved.

CN116203585BActive Publication Date: 2026-01-30BEIJING BAIDU NETCOM SCI & TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310213607.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-03-07
Publication Date
2026-01-30
Estimated Expiration
2043-03-07

AI Technical Summary

Technical Problem

In the traditional construction field, wall measurement relies on manual tools, which leads to problems such as unreliable measurement accuracy and high labor costs.

Method used

An automated measurement method based on point cloud data is adopted. The point cloud data of the wall is collected by a 3D scanning device, projected onto a two-dimensional plane, and the three-dimensional position information of the wall points is determined by combining the measurement points on the two-dimensional image. The relative positional relationship of the wall is calculated to obtain the measurement results.

Benefits of technology

It has enabled automated and remote wall measurement, reducing measurement costs and improving measurement accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116203585B_ABST
    Figure CN116203585B_ABST
Patent Text Reader

Abstract

This disclosure provides a method, apparatus, device, and medium for measuring walls, relating to the field of artificial intelligence, specifically to computer vision and construction surveying. The specific implementation of the method for measuring walls is as follows: For each of at least one wall surface in the wall to be measured, each wall surface is projected onto a two-dimensional plane based on point cloud data of the wall to be measured, obtaining a two-dimensional image of each wall surface; for at least two measurement points on the two-dimensional image of the target wall surface, the three-dimensional position information of at least two wall points corresponding to the at least two measurement points is determined; and the measurement result for the wall to be measured is determined based on the three-dimensional position information of the at least two wall points. The measurement result is represented by the relative positional relationship of the at least two wall points.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of artificial intelligence, specifically to the technical fields of computer vision and construction surveying, and in particular to a method, apparatus, equipment, and medium for measuring walls. Background Technology

[0002] With the development of computer and electronic technologies, artificial intelligence and robotics are being applied to more and more fields. However, the traditional construction field still often uses outdated construction methods and techniques. For example, the measurement of building masonry results mainly relies on manual labor using hand tools and chalk lines, which leads to problems such as unreliable measurement accuracy and increasingly high labor costs. Summary of the Invention

[0003] This disclosure aims to provide a method, apparatus, electronic device, and storage medium for measuring walls that improves measurement accuracy and reduces labor costs.

[0004] According to one aspect of this disclosure, a method for measuring a wall is provided, comprising: for each wall surface of at least one wall surface included in the wall to be measured, projecting each wall surface onto a two-dimensional plane based on point cloud data of the wall to be measured to obtain a two-dimensional image of each wall surface; for at least two measurement points on the two-dimensional image of the target wall surface in the at least one wall surface, determining three-dimensional position information of at least two wall points on the wall to be measured that correspond to the at least two measurement points respectively; and determining a measurement result for the wall to be measured based on the three-dimensional position information of the at least two wall points, wherein the measurement result is represented by the relative positional relationship of the at least two wall points.

[0005] According to another aspect of this disclosure, an apparatus for measuring a wall is provided, comprising: a projection module for projecting each wall surface onto a two-dimensional plane based on point cloud data of the wall to be measured, for each wall surface of at least one wall surface included in the wall to be measured, to obtain a two-dimensional image of each wall surface; a wall point determination module for determining, for at least two measurement points on the two-dimensional image of the target wall surface, three-dimensional position information of at least two wall points on the wall to be measured corresponding to the at least two measurement points respectively; and a measurement result determination module for determining a measurement result for the wall to be measured based on the three-dimensional position information of the at least two wall points, wherein the measurement result is represented by the relative positional relationship of the at least two wall points.

[0006] According to another aspect of this disclosure, an electronic device is provided, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to perform the method for measuring a wall provided in this disclosure.

[0007] According to another aspect of this disclosure, a non-transitory computer-readable storage medium is provided storing computer instructions, wherein the computer instructions are used to cause a computer to perform the method for measuring a wall provided in this disclosure.

[0008] According to another aspect of this disclosure, a computer program product is provided, including a computer program / instructions stored on at least one of a readable storage medium and an electronic device, wherein the computer program / instructions, when executed by a processor, implement the method for measuring walls provided in this disclosure.

[0009] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of this disclosure, nor is it intended to limit the scope of this disclosure. Other features of this disclosure will become readily apparent from the following description. Attached Figure Description

[0010] The accompanying drawings are provided to better understand this solution and do not constitute a limitation of this disclosure. Wherein:

[0011] Figure 1 This is a schematic diagram illustrating an application scenario of the method and apparatus for measuring walls according to embodiments of this disclosure;

[0012] Figure 2 This is a flowchart illustrating a method for measuring a wall according to an embodiment of the present disclosure;

[0013] Figure 3 This is a schematic diagram illustrating the principle of acquiring point cloud data according to an embodiment of this disclosure;

[0014] Figure 4 This is a schematic diagram illustrating the principle of determining the wall point cloud data of the wall to be tested according to an embodiment of this disclosure;

[0015] Figure 5 This is a schematic diagram illustrating the principle of determining the wall point cloud data of the wall to be tested according to another embodiment of this disclosure;

[0016] Figure 6 This is a schematic diagram illustrating the principle of two-dimensional projection onto a wall surface according to an embodiment of this disclosure;

[0017] Figure 7 This is a schematic diagram of the principle of measuring the wall according to an embodiment of the present disclosure;

[0018] Figure 8 This is a structural block diagram of a device for measuring walls according to embodiments of the present disclosure; and

[0019] Figure 9 This is a block diagram of an electronic device used to implement the method for measuring a wall according to embodiments of the present disclosure. Detailed Implementation

[0020] The exemplary embodiments of this disclosure are described below with reference to the accompanying drawings, including various details of the embodiments to aid understanding, and should be considered merely exemplary. Therefore, those skilled in the art will recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of this disclosure. Similarly, for clarity and brevity, descriptions of well-known functions and structures are omitted in the following description.

[0021] The traditional construction industry faces numerous constraints, such as outdated construction methods, labor shortages, an aging workforce, and rising labor costs. With the development of artificial intelligence and robotics, it is hoped that these technologies can free construction workers from traditionally hazardous, arduous, dirty, and heavy construction jobs and environments, allowing them to engage in more manual labor-intensive tasks.

[0022] To address this problem, this disclosure provides a method, apparatus, device, and medium for measuring walls. The following will first describe these in conjunction with... Figure 1 The application scenarios of the methods and apparatus provided in this disclosure are described.

[0023] Figure 1 This is a schematic diagram illustrating an application scenario of the method and apparatus for measuring walls according to embodiments of this disclosure.

[0024] like Figure 1 As shown, the application scenario 100 of this embodiment may include a data acquisition device 110, which may be, for example, a 3D scanning device, specifically including a LiDAR, an RGB binocular camera, a 3D structured light camera, or a Time-Of-Flight (TOF) camera, etc. The data acquisition device 110 may be used to acquire point cloud data of any object in its environment.

[0025] In one embodiment, when it is necessary to measure the wall 120, a data acquisition device 110 can be installed, for example, directly in front of the wall 120 or at any location around the wall 120 as needed, to acquire point cloud data of the wall 120. The data acquisition device 110 can also be connected to an electronic device 130 via wired or wireless communication to transmit the acquired point cloud data to the electronic device 130 for processing. The location of the data acquisition device 110 can be determined based on measurement requirements, and this disclosure does not impose any limitations on this.

[0026] The electronic device 130 can be, for example, various electronic devices with processing capabilities, including but not limited to laptops, desktop computers, and servers. For instance, the electronic device 130 can also run various client applications, such as 3D modeling applications, data processing applications, quality assessment applications, cloud platform applications, etc. (this is just an example).

[0027] In one embodiment, the electronic device 130 can, for example, process the point cloud data of the wall 120 acquired by the acquisition device 110 to obtain a two-dimensional image of each wall surface in the wall 120. Based on the measurement points in the two-dimensional image, the wall points in the wall 120 corresponding to the measurement points are determined, and then the measurement result 140 for the wall 120 is determined based on the relative positional relationship between the multiple wall points.

[0028] In one embodiment, the application scenario 100 may further include a server 150. The server 150 may be any type of server, such as a database server, a cloud server, or a blockchain server. The server 150 may also be a backend management server for supporting the operation of client applications installed in the electronic device 130. This disclosure does not limit this.

[0029] In one embodiment, the electronic device 130 may also send the point cloud data collected by the acquisition device 110 for the wall 120 to the server 150, which will then process the point cloud data to measure the wall 120 and obtain the measurement result 140.

[0030] It should be noted that the method for measuring walls provided in this disclosure can be executed by electronic device 130 or by server 150. Accordingly, the device for measuring walls provided in this disclosure can be installed in electronic device 130 or in server 150.

[0031] It should be understood that Figure 1 The number and type of electronic devices 130, wall 120, and server 150 shown are merely illustrative. Depending on implementation needs, any number and type of electronic devices 130, wall 120, and server 150 may be included.

[0032] The following will combine Figures 2-7 The method for measuring walls provided in this disclosure is described in detail.

[0033] Figure 2 This is a flowchart illustrating a method for measuring a wall according to an embodiment of the present disclosure.

[0034] like Figure 2 As shown, the method 200 for measuring the wall in this embodiment may include operations S210 to S230.

[0035] In operation S210, for each of the at least one wall surface included in the wall to be tested, each wall surface is projected onto a two-dimensional plane based on the point cloud data of the wall to be tested, to obtain a two-dimensional image of each wall surface.

[0036] According to embodiments of this disclosure, the point cloud data for the wall to be tested can be, for example, the point cloud data collected by the acquisition device placed directly in front of the wall surface to be tested. When there are multiple walls to be tested, a set of point cloud data can be collected for each wall surface, and the set of point cloud data collected for each wall surface can be converted from three-dimensional point cloud data to two-dimensional image to obtain a two-dimensional image of each wall surface.

[0037] For example, based on the mapping relationship between point cloud and image, three-dimensional point cloud data (x, t, z) can be converted into two-dimensional pixels (u, v), and then the image can be drawn based on the two-dimensional pixels to obtain a two-dimensional image of each wall.

[0038] For example, when obtaining a 2D image of each wall, a point cloud library can be used to read point cloud data (PCD), and the OpenCV library can be called to transform the coordinate values ​​representing the wall depth in the 3D coordinate system to obtain the grayscale value of each pixel in the image. This grayscale value represents the depth value corresponding to each pixel. In this way, each pixel in the projected 2D image has a corresponding depth value.

[0039] For example, OpenGL (Open Graphics Library) can be used to perform coordinate transformation on point cloud data to obtain two-dimensional data projected from the point cloud data, thus obtaining a two-dimensional image of each wall. Specifically, orthographic transformation can be used to convert three-dimensional point cloud data into data in a two-dimensional coordinate system, thereby obtaining a two-dimensional image. Understandably, in this orthographic transformation process, the point cloud data can first be transformed using a projection matrix to obtain clipping coordinate values ​​in the clipping space corresponding to the point cloud data, where the clipping coordinates are homogeneous coordinates. Subsequently, the point cloud data is clipped in the clipping space, and perspective division is performed on the clipped point cloud to obtain point cloud data transformed into the Normalized Device Coordinates (NDC) system. Then, viewport transformation is performed on the point cloud data transformed into the NDC coordinate system to obtain the coordinate values ​​of the corresponding pixels in the two-dimensional image, thus obtaining a two-dimensional image of each wall.

[0040] For example, point cloud data acquired in the coordinate system constructed by the acquisition device can be converted to the world coordinate system based on the intrinsic and extrinsic parameters of the acquisition device. Then, the point cloud data in the world coordinate system can be used as input to the WorldToViewportPoint() tool, which returns the viewport position of the corresponding two-dimensional pixel in the point cloud data, as well as the depth information of the wall point corresponding to the two-dimensional pixel.

[0041] According to embodiments of this disclosure, when projecting point cloud data of a wall, for example, planar fitting can be performed on the point cloud data of the wall to be measured to obtain the normal vector of each wall surface. Then, the point cloud data is projected along the direction of the normal vector of each wall surface to obtain a two-dimensional image of each wall surface.

[0042] In operation S220, for at least two measurement points on a two-dimensional image of the target wall in at least one wall surface, the three-dimensional position information of at least two wall points on the wall to be measured, corresponding to the at least two measurement points respectively, is determined.

[0043] According to embodiments of this disclosure, after projecting a two-dimensional image of each wall, the two-dimensional image can be displayed, for example, via a display device. At least two measurement points are determined by a user's selection of a target two-dimensional image within the displayed two-dimensional image. It is understood that the target two-dimensional image can be any image in the displayed two-dimensional images, and the target wall is the wall corresponding to the target two-dimensional image.

[0044] According to embodiments of this disclosure, the three-dimensional position information of wall points corresponding to measurement points on a two-dimensional image can be determined based on the transformation relationship between a coordinate system constructed for a two-dimensional image and any three-dimensional coordinate system. For example, the arbitrary three-dimensional coordinate system can be the three-dimensional coordinate system of a reference object fixed relative to the wall to be measured, or it can be the world coordinate system; this disclosure does not limit this. In one embodiment, for example, at least two measurement points can be transformed into a three-dimensional coordinate system via a transformation process that is the inverse of the projection process of operation S210, thereby obtaining the three-dimensional position information of at least two wall points corresponding to at least two measurement points respectively.

[0045] In one embodiment, to facilitate the transformation from two-dimensional coordinates to three-dimensional coordinates, this embodiment may, for example, store depth information corresponding to each pixel in the two-dimensional image during the process of projecting each wall surface onto the two-dimensional plane. Then, when determining the three-dimensional position information of at least two wall points corresponding to at least two measurement points, the transformation from two-dimensional coordinate points to three-dimensional position information can be performed based on this depth information.

[0046] In operation S230, the measurement results for the wall to be measured are determined based on the three-dimensional position information of at least two wall points.

[0047] According to embodiments of this disclosure, for example, the relative positional relationship between at least two wall points can be determined based on their three-dimensional positional information. Specifically, the distance between any two wall points can be calculated based on their three-dimensional positional information, and this calculated distance can be used as the measurement result for the wall to be measured.

[0048] According to embodiments of this disclosure, for example, the angle between the line connecting any two wall points and the horizontal (and / or vertical) direction can be determined based on the three-dimensional position information of any two wall points. The calculated angle is then used as the measurement result for the wall to be measured.

[0049] It is understood that the measurement results can also be represented by at least two indicators indicating relative positional relationships. For example, the measurement results may include both the distance between any two wall points mentioned above and the angle between the line connecting the two wall points and the horizontal (and / or vertical) direction, which is not limited in this disclosure.

[0050] The technical solution of this disclosure, by projecting point cloud data onto a two-dimensional plane and combining the correspondence between the measurement points marked on the two-dimensional plane and the three-dimensional wall points, can realize automated and remote measurement of the wall. The measurement process does not require manual measurement using measuring tools. Therefore, it can reduce measurement costs and improve measurement accuracy.

[0051] Figure 3 This is a schematic diagram illustrating the principle of point cloud data acquisition according to an embodiment of this disclosure.

[0052] According to embodiments of this disclosure, point cloud data of the wall under test can be acquired under at least two acquisition parameters. Then, by stitching together the point cloud data acquired under multiple acquisition parameters, point cloud data for the wall under test can be obtained. This eliminates situations where point cloud data is missing due to certain areas of the wall being invisible, obstructed, or due to strong reflections, thus improving the completeness of the obtained point cloud data for the wall under test.

[0053] According to embodiments of this disclosure, point cloud data can be acquired, for example, by projecting coded structured light onto the wall to be measured using a PhoXi 3D scanner or similar device under at least two acquisition parameters, and by interpreting and reconstructing the point cloud based on the received reflected light. That is, the acquisition device can be a PhoXi 3D scanner or similar device, and this disclosure does not limit its use.

[0054] Understandably, at least two acquisition parameters for collecting point cloud data can be set, for example, based on the wall surface being measured as needed. For instance, in... Figure 3In the illustrated embodiment 300, if it is necessary to measure the exterior wall 310 with a "sailboat" pattern, at least two acquisition parameters may include at least two angles directly in front of and facing the exterior wall, or at least two heights, etc., which are not limited in this disclosure. For example, the acquisition device can be set up as follows: Figure 3 Image acquisition is performed at positions 301 to 303 as shown. At positions 301 to 303, the acquisition angle of the acquisition device may be the same or different, for example, and this disclosure does not limit this.

[0055] For example, under these at least two acquisition parameters, at least two sets of point cloud data can be acquired, which can constitute the raw point cloud data acquired for the wall under test. For example, the three sets of point cloud data acquired at positions 301 to 303 can constitute the raw point cloud data 320.

[0056] After obtaining the original point cloud data 320, this embodiment can transform at least two sets of point cloud data from different device coordinate systems to a unified target coordinate system, thereby obtaining transformed point cloud data 330. Subsequently, the transformed point cloud data can be stitched together to obtain point cloud data 340 for the wall to be measured.

[0057] The target coordinate system can be any coordinate system pre-defined according to actual needs, and this disclosure does not limit it.

[0058] In one embodiment, a reference object 350 may be fixedly set relative to the wall to be measured. The reference object 350 may be a checkerboard, a target, or the like. The reference object 350 may be set parallel to the outer wall surface 310 to be measured and may be fixed on the outer wall surface 310. This disclosure does not limit the setting position of the reference object 350.

[0059] Since the wall under test and the reference object 350 are relatively stationary, this embodiment can use the coordinate system constructed based on the reference object 350 as the target coordinate system. Thus, this embodiment can also determine the transformation relationship between the coordinate system constructed for the acquisition device and the target coordinate system constructed for the reference object 350 based on the pre-calibrated relative positional relationship between the reference object 350 and the acquisition device. Subsequently, based on this transformation relationship, at least two sets of point cloud data are transformed to a unified target coordinate system to obtain transformed point cloud data 330.

[0060] Understandably, the transformation relationship differs for acquisition devices that collect point cloud data under different acquisition parameters. For an acquisition device collecting point cloud data under any acquisition parameters, if we set the center point of the acquisition device as the origin of the coordinate system constructed for the acquisition device, and the direction perpendicular to the center point of the acquisition device pointing to the outer wall surface 310 as the Z-axis of the coordinate system constructed for the acquisition device, we can construct a coordinate system for the acquisition device that satisfies the right-hand rule. Then, based on the coordinate values ​​(x0, t0, z0) of the origin of the target coordinate system in the coordinate system constructed for the acquisition device, we can obtain the translation t = (x0, t0, z0) between the two coordinate systems. T For example, based on the coordinate values ​​of multiple feature points of reference object 350 in the target coordinate system and the coordinate values ​​of reference object 350 in the coordinate system constructed for the acquisition device, the rotation matrix r for the transformation between the two coordinate systems is obtained by using the least squares indirect adjustment principle. For example, the rotation matrix r can be expressed as the matrix shown in formula (1) below. Among them, the feature points of reference object 350 may include, for example, the center point of reference object 350, the contour points of reference object 350, etc., which are not limited in this disclosure. The above principle for solving the rotation matrix r is only used as an example to facilitate understanding of this disclosure, and is not limited in this disclosure.

[0061]

[0062] Among them, a 11 a 12 a 13 a 21 a 22 a 23 a 31 a 32 a 33 All parameters are obtained by using the least squares indirect adjustment principle. Thus, the transformation relationship T between the coordinate system constructed by the acquisition device and the target coordinate system can be expressed as follows (2).

[0063]

[0064] According to embodiments of this disclosure, point cloud data stitching refers to the process of registering overlapping portions of point cloud data at any location. When stitching transformed point cloud data, for example, a point cloud registration algorithm such as the Iterative Closest Point (ICP) algorithm can be used to determine the matching relationship between at least two sets of point cloud data unified to the target coordinate system. Then, based on this matching relationship, the point clouds are stitched together to obtain a complete point cloud P for the wall to be measured. cloud=∑P(x, y, z), where P(x, y, z) represents a single point cloud data. It is understood that the above point cloud registration algorithm is merely an example to facilitate understanding of this disclosure; this disclosure may also employ any other point cloud registration algorithm, and this disclosure does not limit its use.

[0065] This embodiment of the invention facilitates the stitching of point cloud data acquired under at least two acquisition parameters by fixing a reference object relative to the wall to be measured, thereby improving the efficiency and accuracy of point cloud stitching.

[0066] Figure 4 This is a schematic diagram illustrating the principle of determining the point cloud data of the wall to be tested according to an embodiment of this disclosure.

[0067] According to embodiments of this disclosure, when a reference object is fixedly positioned relative to the wall to be measured, the point cloud data acquired by the acquisition device correspondingly includes the point cloud data of the reference object. Therefore, when projecting the point cloud data, the point cloud data of the reference object needs to be removed from the stitched point cloud data for the wall to be measured, thereby obtaining wall point cloud data that describes only the wall to be measured. Subsequently, based on this wall point cloud data, each wall surface is projected onto a two-dimensional plane to obtain a two-dimensional image of each wall surface. For example, each wall surface can be projected onto a two-dimensional plane corresponding to that wall surface. This corresponding two-dimensional plane can be any plane in the normal direction of each wall surface; this disclosure does not limit this.

[0068] For example, this embodiment can segment the point cloud data of the wall under test based on the relative position information between the reference object and the wall under test, and use the segmented point cloud data as the wall point cloud data. Specifically, the process of segmenting the point cloud data is called point cloud segmentation, and the purpose of point cloud segmentation is to extract different objects in the point cloud data. In this embodiment, a segmentation threshold can be determined based on the relative position information. The segmentation threshold is set so that the point cloud data of the reference object is not within the threshold range, thus point cloud segmentation can be performed based on the segmentation threshold to obtain the wall point cloud data.

[0069] In one embodiment, when segmenting point cloud data, in addition to considering the relative positional information between the reference object and the wall to be measured, the three-dimensional dimensions of the wall to be measured can also be considered. These three-dimensional dimensions can be, for example, target three-dimensional dimensions determined based on a predetermined three-dimensional model of the wall to be measured. Based on these target three-dimensional dimensions and relative positional information, the coordinate range of the wall to be measured in a coordinate system constructed for the reference object can be determined. In this embodiment, the boundary values ​​of this coordinate range can be used as segmentation thresholds for point cloud segmentation. This removes point cloud data other than that describing the wall to be measured, eliminating interference from the reference object and the environment during the scanner scanning process.

[0070] For example, such as Figure 4 As shown, in this embodiment 400, if the three-dimensional dimensions of the wall to be tested 410 are set to length × width × height (L × W × H), and the origin O (0, 0, 0) of the coordinate system constructed with respect to the reference object 420 is located at a position where the length of the wall to be tested 410 is l, the width is w, and the height is h, relative to the lower left corner vertex of the wall to be tested, the coordinate range of the wall to be tested 410 in the coordinate system constructed with respect to the reference object 420 can be determined as follows: the range in the X-axis direction (Ll, -l), the range in the Y-axis direction (Ww, -w), and the range in the Z-axis direction (Hh, -h). This embodiment can then use these three ranges as segmentation thresholds 401 for the three axes, retaining the point cloud data of the wall to be tested 410 that falls within these three ranges and discarding the point cloud data that does not fall within these three ranges, thereby obtaining the wall point cloud data of the wall to be tested.

[0071] In one embodiment, the point cloud data obtained by segmenting the point cloud data 402 of the wall to be tested based on the segmentation threshold 401 can be used as the segmented point cloud data 403, and then the wall point cloud data of the wall to be tested can be determined based on the segmented point cloud data 403.

[0072] For example, outlier filtering can be applied to the segmented point cloud data 403, and the resulting point cloud data can be used as the wall point cloud data of the wall to be measured. Outlier filtering removes noise introduced during the point cloud data acquisition process, such as dust and flying insects, thus improving the accuracy of the determined wall point cloud data. It is understood that outlier filtering is merely an example to aid in understanding this disclosure; for instance, redundant point removal and / or isolated point removal can also be performed on the segmented point cloud data to obtain the wall point cloud data.

[0073] For example, the aforementioned point cloud segmentation can be used as a coarse segmentation process, followed by fine segmentation of the segmented point cloud data 403, and the finely segmented point cloud data can be used as the wall point cloud data. During fine segmentation, for example, the basis for fine segmentation can be determined based on a predetermined 3D model of the wall to be measured, so that the final measurement results can better reflect the differences between the actual wall and the wall model, facilitating guidance for wall construction.

[0074] For example, before performing fine segmentation on the segmented point cloud data 403, outlier filtering can be performed on the segmented point cloud data 403, and then fine segmentation can be performed on the filtered point cloud data obtained after filtering.

[0075] For example, the segmented point cloud data 403 can be finely segmented based on the predetermined texture thickness of each wall surface in the wall to be tested. The predetermined texture thickness of each wall surface is determined based on the predetermined 3D model of the wall to be tested described above.

[0076] Specifically, for example, point cloud data 404 describing each wall surface in the segmented point cloud data 403 can be determined first, resulting in at least one set of point cloud data describing at least one wall surface included in the wall to be measured 410, i.e., each set of point cloud data describes one wall surface. For example, if a reference object is set to be parallel to the outer wall surface of the wall to be measured 410, and the Z-axis of the coordinate system constructed for the reference object is parallel to the normal direction of the outer wall surface, then this embodiment can divide the segmented point cloud data into at least one group according to the coordinate values ​​of each coordinate axis direction in the coordinate system constructed for the reference object, thereby obtaining at least one set of point cloud data describing at least one wall surface. Alternatively, a plane fitting algorithm can be used to perform plane fitting on the segmented point cloud data, fitting at least one plane, and dividing the point cloud data in the segmented point cloud data within a predetermined range of each fitted plane into a set of point cloud data, thereby obtaining at least one set of point cloud data.

[0077] After obtaining the point cloud data for each wall, the segmentation threshold in the normal direction of each wall can be determined based on the predetermined texture thickness 405 of each wall and the point cloud data 404 describing each wall.

[0078] For example, based on the coordinate values ​​of the point cloud data 404 describing each wall surface along the normal direction of each wall surface, the mode of the coordinate values ​​can be used as the center value V of the coordinate values ​​of each wall surface in the normal direction. c If the predetermined texture thickness of each wall surface is set to 405 as T, then this embodiment can [V c -(T+a) / 2, V c [-(T+a) / 2] serves as the segmentation threshold in the normal direction of each wall surface. Here, 'a' is a hyperparameter, and its value can be set according to actual needs. For example, 'a' can be 0, or it can be any value greater than 0. By setting 'a' to a value greater than 0, in addition to removing interference points through fine segmentation, the point cloud data describing each wall surface can be better preserved. This is because, in cases where the actual texture thickness of the wall surface deviates from the predetermined texture thickness due to poor construction quality, [V...] c -T / 2, V c Fine-grained segmentation using -T / 2] will result in the removal of edge data from the point cloud data describing each wall.

[0079] For example, when determining the segmentation threshold in the normal direction of each wall, the position information 406 of each wall in the normal direction can be determined first based on the point cloud data 404 describing each wall. That is, the coordinate values ​​of the point cloud data 404 describing each wall along the normal direction of each wall can be determined. Subsequently, the search range 407 in the normal direction of each wall can be determined based on the position information 406 of each wall in the normal direction and the predetermined texture thickness 405 of each wall. For example, the [V] described above can be used as a reference. c -(T+a) / 2, V c -(T+a) / 2] serves as the search range in the normal direction for each wall surface. In one embodiment, the center value V of the coordinates of each wall surface in the normal direction can also be determined based on the relative position information between the reference object 420 and the wall to be measured 410. c This disclosure does not limit the scope of the search. After obtaining the search range, point cloud data 404 describing each wall surface can be searched according to the search range, and extreme point cloud data 408 in the normal direction of each wall surface can be determined. For example, the point with the largest coordinate value and the point with the smallest coordinate value in the normal direction of each wall surface can be taken as two extreme point cloud data 408. This embodiment can determine the segmentation threshold 409 for each wall surface based on the coordinate values ​​in the normal direction of each wall surface included in the extreme point cloud data 408. This embodiment determines the point cloud data by searching for extreme point cloud data, which makes the determined segmentation threshold more closely match the actual masonry effect of the wall to be tested. Thus, segmenting the point cloud data based on the segmentation threshold can improve the segmentation accuracy, so that the retained point cloud data is as close as possible to the point cloud data describing the wall to be tested. Furthermore, since the predetermined texture thickness is also considered when determining the segmentation threshold, the impact of large-sized interference objects on the segmentation accuracy can be avoided, thereby further improving the accuracy of the determined segmentation threshold.

[0080] After determining the segmentation threshold in the normal direction of each wall, the point cloud data can be finely segmented based on the segmentation threshold in the normal direction of all walls included in the wall to be tested 410. For example, fine segmentation can be performed on the segmented point cloud data 403, or on the aforementioned filtered point cloud data, to obtain the wall point cloud data 410' of the wall to be tested.

[0081] Figure 5 This is a schematic diagram illustrating the principle of determining the point cloud data of the wall to be tested according to another embodiment of this disclosure.

[0082] In one embodiment, the point cloud data obtained through outlier filtering or fine segmentation can be used as the point cloud data to be registered. Then, based on this point cloud data, the wall point cloud data of the wall to be measured is determined. For example, the point cloud data to be registered can be registered and stitched together according to the acquisition parameters corresponding to the point cloud data to be registered, thereby obtaining the wall point cloud data. This registration can better eliminate registration bias. This is because during the scanning and point cloud acquisition process of the wall, the point clouds acquired at different angles may have slight deviations due to binocular camera imaging distortion, resulting in the point cloud position of the reference object not perfectly matching the ideal point cloud position.

[0083] It is understandable that if point cloud data acquired under at least two acquisition parameters has been registered and stitched before the point cloud data is segmented, then the registration criterion for the point cloud data to be registered mentioned in this embodiment is secondary registration, in order to further ensure the accuracy of registration and stitching.

[0084] like Figure 5 As shown, in one embodiment 500, the point cloud data obtained by finely segmenting the segmented point cloud data 501 mentioned above, or the point cloud data obtained by filtering the segmented point cloud data 501, can be used as the point cloud data 502 to be registered. Subsequently, this embodiment can, for example, use the Normal Iterative Closest Point (NICP) algorithm to register the point cloud data 502 acquired by the acquisition device under at least two acquisition parameters, resulting in a registered point cloud pair 503. Based on this registered point cloud pair, this embodiment can stitch together the point cloud data 502 acquired by the acquisition device under at least two acquisition parameters to obtain the wall point cloud data 504 of the wall to be measured.

[0085] To avoid getting trapped in local optima during registration, algorithms like ICP consider local features of the point cloud data (such as normal vectors and curvature) when registering. Furthermore, the error function used in the iterative process of solving the registration result involves not only the projected distance between the two sets of point clouds to be registered but also the angular difference in the normal vectors of the corresponding point cloud data. This allows for the full utilization of the characteristics of the actual curved surface to filter out erroneous point cloud matching results.

[0086] The matching rules for point cloud data in the NICP algorithm are as follows: if the point cloud data does not have a well-defined normal vector, then matching the point cloud data is rejected; if the distance between two point cloud data is greater than a distance threshold, then matching the two point cloud data is rejected; if the difference in curvature between two point cloud data is greater than a difference threshold, then matching the two point cloud data is rejected; if the angle difference between the normal vectors of two point cloud data is greater than an angle difference threshold, then matching the two point cloud data is rejected. During the iteration process of the NICP algorithm, the normal vector and curvature of the point cloud data need to be calculated. For example, a kd-tree search algorithm can be used to estimate the normal vector and curvature of the point cloud data.

[0087] Figure 6 This is a schematic diagram illustrating the principle of two-dimensional projection onto a wall surface according to an embodiment of this disclosure.

[0088] According to embodiments of this disclosure, when projecting each wall surface onto a two-dimensional plane based on the point cloud data of the wall to be measured, for example, the principle described in the embodiments above can be first used to determine the wall point cloud data of the wall to be measured based on the point cloud data of the wall to be measured. This wall point cloud data can, for example, be the point cloud data of the wall to be measured described above. Figure 4 The wall point cloud data 410' obtained from the described embodiment can also be used for the above-described embodiment. Figure 5 The wall point cloud data 504 obtained from the described embodiments is not limited in this disclosure.

[0089] like Figure 6 As shown, in one embodiment 600, the coordinate values ​​included in the determined wall point cloud data of the wall to be measured are set in a coordinate system 610 constructed relative to a reference object. When performing two-dimensional projection on each wall surface, this embodiment 600 can, for example, first transform the determined wall point cloud data 601 of the wall to be measured from the coordinate system 610 constructed relative to the reference object to the NDC coordinate system 620, thereby obtaining standard point cloud data 602. Subsequently, this embodiment can project the standard point cloud data onto a two-dimensional plane corresponding to each wall surface, thereby obtaining a two-dimensional image 603 of each wall surface.

[0090] For example, before performing coordinate transformation, the observation space (e.g., coordinate system 610 constructed for the reference object) can be set as a right-handed coordinate system with the +X axis to the right, the +Y axis upward, and the +Z axis pointing out of the screen, with the observation direction along the -Z axis, i.e., looking inwards from the screen. Through coordinate transformation, the points are transformed into a regular view volume (CVV). The CVV is also called the homogeneous clipping space, i.e., the normalized device coordinate system 620. The CVV is a left-handed coordinate system with the +X axis to the right, the +Y axis upward, and the +Z axis pointing inwards from the screen. When transferring wall point cloud data P... e =(Xe Y e Z e Transform to the NDC coordinate system to obtain the first point cloud data P in the NDC coordinate system. n =(X n Y n Z n When this happens, the projection matrix can be used to complete the process from P. e To point P in the clipping space c =(X c Y c Z c W c The transformation of ) and then the transformation of P c Perspective division can be used to obtain P. n This transformation can scale the rectangular bounding box of the wall under test into a normalized cubic bounding box.

[0091] For example, the projection matrix and perspective division can be integrated into a perspective projection matrix to perform projection transformation on the point cloud data of the wall to be measured. Through projection transformation and derivation, P can be obtained. e With P n The conversion relationship between them can be expressed by formulas (3) to (5).

[0092]

[0093]

[0094]

[0095] In this context, the left side of the rectangular region intercepted by the four side planes of the frustum on the near-view section has an X-axis coordinate of m in the coordinate system 610 relative to the reference object, the right side of the rectangular region has an X-axis coordinate of r in the coordinate system 610 relative to the reference object, the top side of the rectangular region has a Y-axis coordinate of p in the coordinate system 610 relative to the reference object, the bottom side of the rectangular region has a Y-axis coordinate of b in the coordinate system 610 relative to the reference object, the closest distance to the observation point has a Z-axis coordinate of -n in the coordinate system 610 relative to the reference object, and the farthest distance to the observation point has a Z-axis coordinate of -f in the coordinate system 610 relative to the reference object.

[0096] For example, after obtaining standard point cloud data 602, a viewport transformation can be performed on the standard point cloud data 602 to obtain the coordinate values ​​of the corresponding pixels in the two-dimensional image, thereby converting it into a two-dimensional image 603 for each wall surface. It can be understood that while performing the viewport transformation, the coordinate values ​​of the standard point cloud data 602 on the Z-axis can be used as the depth information of the corresponding pixels, thus obtaining the depth information of each wall surface in the standardized device coordinate system.

[0097] Based on embodiment 600, when determining the three-dimensional position information of at least two wall points corresponding to at least two measurement points, the pixel positions 604 of the at least two measurement points on the two-dimensional image 603 of the target wall can be transformed into three-dimensional positions based on the depth information of the target wall in the standardized equipment coordinate system, thereby obtaining the three-dimensional position information 605 of the corresponding at least two wall points. It is understood that this three-dimensional position information 605 can be, for example, position information in the coordinate system 610 relative to the reference object, or position information in the world coordinate system or any coordinate system; this disclosure does not limit it in this regard.

[0098] For example, the three-dimensional position information of a certain wall point in a coordinate system 610 constructed relative to the reference object can be set using a three-dimensional point vector v. p = (x, y, z, 1.0) T Let be the coordinate system, where x, y, and z are unknowns, representing the values ​​of the wall points along the X, Y, and Z axes in the coordinate system 610 constructed relative to the reference object, respectively, where 1.0 is a set homogeneous coordinate value. Then, the vector v in the normalized device coordinate system 620 obtained through projection transformation is... c It can be calculated using the following formula (6).

[0099] v c =T projection ×(x, y, z, 1.0) T Formula (6)

[0100] Among them, T projection This represents the projection matrix. For a measurement point on the 2D image corresponding to the target wall, let its pixel position be (w1, h1). Then, based on this pixel position, the vector v corresponding to the normalized device coordinate system 620 can be calculated. c The value of can be found in the following formula (7).

[0101]

[0102] Where col and row represent the total number of columns and rows of pixels in the two-dimensional image, respectively. This represents the depth information corresponding to a certain measurement point. Then, the three-dimensional position information v of the wall point corresponding to that measurement point can be obtained using the following formula (8). p It should be noted that, in this embodiment, in the image coordinate system constructed for the two-dimensional image, the Y-axis points downwards and the X-axis points to the right.

[0103]

[0104] Based on the above principle, the three-dimensional position information of at least two wall points corresponding to the at least two measurement points can be calculated based on the pixel positions of at least two measurement points on the two-dimensional image of the target wall and the depth information corresponding to the pixels at the pixel positions of the at least two measurement points.

[0105] In this embodiment, by projecting point cloud data based on a perspective projection matrix, the accuracy and efficiency of the final projected 2D image can be improved, and corresponding depth information can be stored. Furthermore, through a calculation process that is the inverse of the projection, the 3D position information of the wall points corresponding to the position points on the 2D image can be calculated.

[0106] Figure 7 This is a schematic diagram of the principle of measuring the wall according to an embodiment of the present disclosure.

[0107] According to the embodiments of this disclosure, after obtaining the three-dimensional position information of at least two wall points through the above embodiments, the measurement result of the wall to be measured can be determined based on the three-dimensional position information.

[0108] In one embodiment, such as Figure 7 As shown, in embodiment 700, at least two wall points are defined, including wall point 701 and wall point 702, wherein the three-dimensional position information of wall point 701 is as follows: The three-dimensional position information of wall point 702 is as follows This embodiment can use the distance D between wall point 701 and wall point 702 as a measurement result for the wall to be measured. It is understood that when there are at least two wall points and other wall points, this embodiment can also use the distance D between any two wall points among the multiple wall points as a measurement result. Among them, the distance D1 between wall point 701 and wall point 702 can be expressed by Euclidean distance, for example, that is, D1 can be calculated by the following formula (9).

[0109]

[0110] In one embodiment, such as Figure 7 As shown, at least two wall points are set, including wall point 701, wall point 702, and wall point 703, wherein the three-dimensional position information of wall point 703 is as follows: This embodiment can use the included angle between any two of the three lines connecting the three wall points as a measurement result for the wall to be measured. For example, the included angle α between the line 711 connecting wall point 701 and wall point 702 and the line 712 connecting wall point 701 and wall point 703 (for example, the acute angle formed by the angle) can be calculated using the following formula (10).

[0111]

[0112] In this context, the connection 711 can be represented by a vector pointing from wall point 701 to wall point 702. To represent this, the connection 712 can be represented by a vector pointing from wall point 701 to wall point 703. To express. Represents the dot product of two vectors. It represents the magnitude of the dot product of two vectors.

[0113] In one embodiment, such as Figure 7 As shown, at least two wall points are defined, including wall point 701, wall point 702, wall point 703, and wall point 704. Three of these wall points (e.g., wall points 702, 703, and 704) are not collinear, and the third wall point (e.g., wall point 701, designated as the wall point) is not located in the coplanar plane of the three wall points. The three-dimensional position information of wall point 704 is as follows: This embodiment can use the distance D2 from wall point 701 to the coplanar plane of the three wall points as a measurement result for the wall to be measured.

[0114] Specifically, this embodiment can use methods such as Principal Component Analysis (PCA) to fit the plane normal vector N of the coplanar plane containing wall points 702, 703, and 704. This embodiment can use the value of the component of the plane normal vector N obtained from the solution of wall point 701 as the distance D2. It is understood that the principle of solving the distance D2 described above is only an example to facilitate understanding of this disclosure, and this disclosure does not limit it.

[0115] It is understood that this embodiment may use one or more of the aforementioned distance D1, included angle α, and distance D2 as the measurement result for the wall to be measured. It is also understood that the above measurement results are merely examples to aid in understanding this disclosure, and this disclosure does not limit them.

[0116] Based on the method for measuring walls provided in this disclosure, this disclosure also provides an apparatus for measuring walls. The following will be combined with... Figure 8 The device is described in detail.

[0117] Figure 8 This is a structural block diagram of a device for measuring walls according to an embodiment of the present disclosure.

[0118] like Figure 8 As shown, the device 800 for measuring walls in this embodiment may include a projection module 810, a wall point determination module 820, and a measurement result determination module 830.

[0119] The projection module 810 is used to project each wall surface, which is one of at least one wall surfaces included in the wall to be measured, onto a two-dimensional plane based on point cloud data of the wall to be measured, to obtain a two-dimensional image of each wall surface. In one embodiment, the projection module 810 can be used to perform the operation S210 described above, which will not be repeated here.

[0120] The wall point determination module 820 is used to determine the three-dimensional position information of at least two wall points on the wall to be measured, corresponding to at least two measurement points on a two-dimensional image of a target wall in at least one wall surface. In one embodiment, the wall point determination module 820 can be used to perform the operation S220 described above, which will not be repeated here.

[0121] The measurement result determination module 830 is used to determine the measurement result for the wall to be measured based on the three-dimensional position information of at least two wall points. The measurement result is represented by the relative positional relationship of the at least two wall points. In one embodiment, the measurement result determination module 830 can be used to perform the operation S230 described above, which will not be repeated here.

[0122] According to embodiments of this disclosure, the projection module 810 may include a wall point cloud determination submodule and a projection submodule. The wall point cloud determination submodule is used to determine the wall point cloud data of the wall to be measured based on the point cloud data of the wall to be measured. The projection submodule is used to perform projection transformation and viewport transformation on the wall point cloud data of the wall to be measured, so as to project each wall surface onto a two-dimensional plane corresponding to each wall surface, obtaining a two-dimensional image of each wall surface and depth information of each wall surface in a standardized equipment coordinate system. Specifically, the wall point determination module 820 may be used to perform inverse viewport transformation and inverse projection transformation on the pixel positions of at least two measurement points on the two-dimensional image of the target wall surface based on the depth information of the target wall surface in the standardized equipment coordinate system, to obtain three-dimensional position information of at least two wall points corresponding to the at least two measurement points respectively.

[0123] According to embodiments of this disclosure, the measurement result determination module 830 can be specifically used to perform at least one of the following operations: determining the distance between any two wall points based on the three-dimensional position information of any two wall points among at least two wall points; determining the included angle between any two of the three lines connecting the three wall points based on the three-dimensional position information of three wall points among at least two wall points; determining the distance from a specified wall point among the four target wall points to the coplanar plane of the other three wall points among the four target wall points based on the three-dimensional position information of the four target wall points among at least two wall points; wherein the other three wall points are not collinear, and the specified wall point is not in the coplanar plane of the other three wall points.

[0124] According to embodiments of this disclosure, the device 800 for measuring walls may further include a point cloud acquisition module, a point cloud transformation module, and a point cloud stitching module. The point cloud acquisition module acquires raw point cloud data collected by the acquisition device for the wall to be measured under at least two acquisition parameters. The point cloud transformation module transforms the raw point cloud data to the target coordinate system according to the transformation relationship between the coordinate system constructed for the acquisition device and the target coordinate system, obtaining transformed point cloud data. The point cloud stitching module stitches the transformed point cloud data to obtain point cloud data for the wall to be measured. The target coordinate system is any predetermined three-dimensional coordinate system.

[0125] According to embodiments of this disclosure, the aforementioned raw point cloud data includes point cloud data of a reference object fixedly positioned relative to the wall to be measured. The aforementioned wall measuring device 800 may further include a transformation relationship determination module, used to determine the transformation relationship between a coordinate system constructed for the acquisition device and a target coordinate system constructed for the reference object, based on the relative positional relationship between the reference object and the acquisition device.

[0126] According to embodiments of this disclosure, the point cloud data for the wall to be tested includes the point cloud data of a reference object fixedly positioned relative to the wall. The projection module 810 described above may include, for example, a wall point cloud determination submodule and a projection submodule. The wall point cloud determination submodule is used to determine the wall point cloud data of the wall to be tested based on the point cloud data for the wall to be tested. This wall point cloud determination submodule may include a point cloud segmentation unit and a wall point cloud determination unit. The point cloud segmentation unit is used to segment the point cloud data for the wall to be tested based on the target three-dimensional dimensions of the wall to be tested and the relative position information between the reference object and the wall to be tested, obtaining segmented point cloud data. The wall point cloud determination unit is used to determine the wall point cloud data of the wall to be tested based on the segmented point cloud data. The projection submodule is used to project each wall surface onto a two-dimensional plane corresponding to each wall surface based on the wall point cloud data, obtaining a two-dimensional image of each wall surface. The target three-dimensional dimensions are determined based on a predetermined three-dimensional model of the wall to be tested.

[0127] According to embodiments of this disclosure, the wall point cloud determination unit may include a filtering subunit and a point cloud determination subunit. The filtering subunit is used to perform outlier filtering on the segmented point cloud data to obtain first point cloud data. The point cloud determination subunit is used to determine the wall point cloud data of the wall to be measured based on the first point cloud data.

[0128] According to embodiments of this disclosure, the wall point cloud determination unit may include a wall surface point cloud determination subunit, a segmentation threshold determination subunit, a point cloud segmentation subunit, and a point cloud determination subunit. The wall surface point cloud determination subunit is used to determine the point cloud data describing each wall surface in the segmented point cloud data. The segmentation threshold determination subunit is used to determine a segmentation threshold in the normal direction of each wall surface based on a predetermined texture thickness of each wall surface and the point cloud data describing each wall surface. The point cloud segmentation subunit is used to segment the point cloud data based on the segmented point cloud data according to the segmentation threshold in the normal direction of at least one wall surface to obtain second point cloud data. The point cloud determination subunit is used to determine the wall point cloud data of the wall to be tested based on the second point cloud data. The predetermined texture thickness of each wall surface is determined based on a predetermined three-dimensional model.

[0129] According to embodiments of this disclosure, the segmentation threshold determination subunit is specifically used for: determining the position information of each wall surface in the normal direction of each wall surface based on the point cloud data describing each wall surface; determining the search range in the normal direction of each wall surface based on the position information and the predetermined texture thickness of each wall surface; searching for the point cloud data describing each wall surface within the search range to determine the extreme point cloud data in the normal direction of each wall surface; and determining the segmentation threshold for each wall surface based on the coordinate values ​​along the normal direction of each wall surface included in the extreme point cloud data.

[0130] According to embodiments of this disclosure, for any one point cloud data in the first point cloud data and the second point cloud data, the any one point cloud data includes data acquired by the acquisition device under at least two acquisition parameters. Specifically, the aforementioned point cloud determination subunit can be used to: register the point cloud data acquired by the acquisition device under at least two acquisition parameters in the any one point cloud data using a normal iterative nearest point algorithm to obtain a registered point cloud pair; and, based on the registered point cloud pair, stitch together the point cloud data acquired by the acquisition device under at least two acquisition parameters in the any one point cloud data to obtain the wall point cloud data of the wall to be measured.

[0131] It should be noted that the collection, storage, use, processing, transmission, provision, disclosure, and application of user personal information in this disclosed technical solution comply with relevant laws and regulations, necessary confidentiality measures have been taken, and it does not violate public order and good morals. In this disclosed technical solution, user authorization or consent has been obtained before acquiring or collecting user personal information.

[0132] According to embodiments of this disclosure, this disclosure also provides an electronic device, a readable storage medium, and a computer program product.

[0133] Figure 9 A schematic block diagram of an example electronic device 900 that can be used to implement a method for measuring a wall according to embodiments of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the present disclosure described and / or claimed herein.

[0134] like Figure 9 As shown, device 900 includes a computing unit 901, which can perform various appropriate actions and processes based on a computer program stored in read-only memory (ROM) 902 or a computer program loaded from storage unit 908 into random access memory (RAM) 903. RAM 903 may also store various programs and data required for the operation of device 900. The computing unit 901, ROM 902, and RAM 903 are interconnected via bus 904. Input / output (I / O) interface 905 is also connected to bus 904.

[0135] Multiple components in device 900 are connected to I / O interface 905, including: input unit 906, such as keyboard, mouse, etc.; output unit 907, such as various types of monitors, speakers, etc.; storage unit 908, such as disk, optical disk, etc.; and communication unit 909, such as network card, modem, wireless transceiver, etc. Communication unit 909 allows device 900 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.

[0136] The computing unit 901 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the computing unit 901 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 901 performs the various methods and processes described above, such as the method of measuring a wall. For example, in some embodiments, the method of measuring a wall may be implemented as a computer software program tangibly contained in a machine-readable medium, such as storage unit 908. In some embodiments, part or all of the computer program may be loaded and / or installed on device 900 via ROM 902 and / or communication unit 909. When the computer program is loaded into RAM 903 and executed by computing unit 901, one or more steps of the method of measuring a wall described above may be performed. Alternatively, in other embodiments, the computing unit 901 may be configured to perform the method of measuring a wall by any other suitable means (e.g., by means of firmware).

[0137] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.

[0138] The program code used to implement the methods of this disclosure may be written in any combination of one or more programming languages. This program code may be provided to a processor or controller of a general-purpose computer, special-purpose computer, or other programmable data processing apparatus, such that when executed by the processor or controller, the program code causes the functions / operations specified in the flowcharts and / or block diagrams to be implemented. The program code may be executed entirely on a machine, partially on a machine, as a standalone software package partially on a machine and partially on a remote machine, or entirely on a remote machine or server.

[0139] In the context of this disclosure, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.

[0140] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device for displaying information to the user (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor); and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the computer. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).

[0141] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as a data server), or computing systems that include middleware components (e.g., an application server), or computing systems that include frontend components (e.g., a user computer with a graphical user interface or web browser through which a user can interact with embodiments of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., a communication network). Examples of communication networks include local area networks (LANs), wide area networks (WANs), and the Internet.

[0142] Computer systems can include clients and servers. Clients and servers are generally geographically separated and typically interact via communication networks. The client-server relationship is established by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or cloud host, a hosting product within the cloud computing service system, addressing the shortcomings of traditional physical hosts and VPS (Virtual Private Server, or simply "VPS") services, such as high management difficulty and weak business scalability. Servers can also be servers for distributed systems or servers incorporating blockchain technology.

[0143] It should be understood that the various forms of processes shown above can be used to reorder, add, or delete steps. For example, the steps described in this disclosure can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution disclosed in this disclosure can be achieved, and this is not limited herein.

[0144] The specific embodiments described above do not constitute a limitation on the scope of protection of this disclosure. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this disclosure should be included within the scope of protection of this disclosure.

Claims

1. A method for measuring a wall, comprising: projecting each wall surface included in a wall to be measured to a two-dimensional plane based on point cloud data of the wall to be measured, to obtain a two-dimensional image of the each wall surface; determining three-dimensional position information of at least two wall points on the wall to be measured corresponding to at least two measurement points on the two-dimensional image of a target wall surface of the at least one wall surface; and determining a measurement result of the wall to be measured according to the three-dimensional position information of the at least two wall points, comprising at least one of: determining a distance between any two wall points of the at least two wall points according to the three-dimensional position information of the any two wall points; determining an included angle between any two lines of connection of three wall points of the at least two wall points according to the three-dimensional position information of the three wall points; determining a distance from a specified wall point of four target wall points to a coplanar plane of other three wall points of the four target wall points according to the three-dimensional position information of the four target wall points; wherein the other three wall points are not collinear, and the specified wall point is not in the coplanar plane of the other three wall points; wherein the measurement result is represented by a relative positional relationship of the at least two wall points.

2. The method of claim 1, wherein: the projecting each wall surface included in a wall to be measured to a two-dimensional plane based on point cloud data of the wall to be measured, to obtain a two-dimensional image of the each wall surface comprises: determining wall point cloud data of the wall to be measured based on point cloud data of the wall to be measured; and performing projection transformation and viewport transformation on the wall point cloud data of the wall to be measured to project the each wall surface to a two-dimensional plane corresponding to the each wall surface, to obtain a two-dimensional image of the each wall surface and depth information of the each wall surface in a standardized device coordinate system; the determining three-dimensional position information of at least two wall points on the wall to be measured corresponding to at least two measurement points comprises: performing viewport inverse transformation and projection inverse transformation on pixel positions of the at least two measurement points on the two-dimensional image of the target wall surface based on the depth information of the target wall surface in the standardized device coordinate system, to obtain three-dimensional position information of the at least two wall points corresponding to the at least two measurement points.

3. The method of any one of claims 1-2, further comprising: obtaining original point cloud data collected by a collection device under at least two collection parameters for the wall to be measured; transforming the original point cloud data to a target coordinate system according to a transformation relationship between a coordinate system constructed for the collection device and the target coordinate system, to obtain transformed point cloud data; and stitching the transformed point cloud data to obtain point cloud data of the wall to be measured, wherein the target coordinate system is any predetermined three-dimensional coordinate system. The original point cloud data comprises point cloud data of a reference object fixedly arranged relative to the wall to be measured; and the method further comprises:

4. The method of claim 3, wherein, ​ According to a relative position relationship between the reference object and the acquisition device, a transformation relationship between a coordinate system constructed for the acquisition device and the target coordinate system constructed for the reference object is determined.

5. The method of any one of claims 1-2, wherein, The point cloud data of the to-be-measured wall includes point cloud data of a reference object fixedly arranged relative to the to-be-measured wall; and the two-dimensional image of each wall surface is obtained by projecting the point cloud data of the to-be-measured wall onto a two-dimensional plane. The wall point cloud data of the to-be-measured wall is determined based on the point cloud data of the to-be-measured wall by the following manner: The point cloud data of the to-be-measured wall is segmented based on a target three-dimensional size of the to-be-measured wall and relative position information between the reference object and the to-be-measured wall to obtain segmented point cloud data; and The wall point cloud data of the to-be-measured wall is determined based on the segmented point cloud data; and The two-dimensional image of each wall surface is obtained by projecting the wall point cloud data onto a two-dimensional plane corresponding to each wall surface, wherein the target three-dimensional size is determined based on a predetermined three-dimensional model of the to-be-measured wall.

6. The method of claim 5, wherein, The wall point cloud data of the to-be-measured wall is determined based on the segmented point cloud data by the following manner: The segmented point cloud data is subjected to outlier filtering processing to obtain first point cloud data; and The wall point cloud data of the to-be-measured wall is determined based on the first point cloud data.

7. The method of claim 5, wherein, The wall point cloud data of the to-be-measured wall is determined based on the segmented point cloud data by the following manner: Point cloud data describing each wall surface in the segmented point cloud data is determined; A segmentation threshold in a normal direction of each wall surface is determined based on a predetermined texture thickness of each wall surface and the point cloud data describing each wall surface; The segmented point cloud data is subjected to segmentation processing according to the segmentation threshold in the normal direction of the at least one wall surface to obtain second point cloud data; and The wall point cloud data of the to-be-measured wall is determined based on the second point cloud data, wherein the predetermined texture thickness of each wall surface is determined based on the predetermined three-dimensional model.

8. The method of claim 7, wherein, The segmentation threshold in the normal direction of each wall surface is determined based on the predetermined texture thickness of each wall surface and the point cloud data describing each wall surface by the following manner: Position information of each wall surface in the normal direction of each wall surface is determined according to the point cloud data describing each wall surface; A search range in the normal direction of each wall surface is determined according to the position information and the predetermined texture thickness of each wall surface; Extreme point cloud data in the normal direction of each wall surface is determined by searching for the point cloud data describing each wall surface in the search range; and A segmentation threshold for each wall surface is determined according to a coordinate value along the normal direction of each wall surface included in the extreme point cloud data.

9. The method of claim 6, wherein, For any point cloud data in the first point cloud data and the second point cloud data, the any point cloud data includes data acquired by an acquisition device under at least two acquisition parameters; The wall point cloud data of the wall to be measured is determined based on the any point cloud data, and includes: The point cloud data collected by the collection device under at least two collection parameters in the any point cloud data is registered by using a normal iterative closest point algorithm to obtain a registered point cloud pair; and The point cloud data collected by the collection device under the at least two collection parameters in the any point cloud data is spliced according to the registered point cloud pair to obtain the wall point cloud data of the wall to be measured.

10. An apparatus for measuring a wall, comprising: a projection module configured to project each wall surface of at least one wall surface included in a wall to be measured to a two-dimensional plane based on point cloud data of the wall to be measured, to obtain a two-dimensional image of the each wall surface; a wall point determination module configured to determine three-dimensional position information of at least two wall points on the wall to be measured corresponding to at least two measurement points on the two-dimensional image of a target wall surface of the at least one wall surface; and a measurement result determination module configured to determine a measurement result of the wall to be measured according to the three-dimensional position information of the at least two wall points, wherein the measurement result is represented by a relative positional relationship of the at least two wall points; wherein the measurement result determination module is configured to perform at least one of the following operations: determine a distance between any two wall points of the at least two wall points according to the three-dimensional position information of the any two wall points; determine an included angle between any two lines of connection of three wall points of the at least two wall points according to the three-dimensional position information of the three wall points; determine a distance from a specified wall point of four target wall points to a coplanar plane of other three wall points of the four target wall points according to the three-dimensional position information of the four target wall points, wherein the other three wall points are not collinear, and the specified wall point is not in the coplanar plane of the other three wall points.

11. The apparatus of claim 10, wherein: the projection module comprises: a wall point cloud determination submodule configured to determine wall point cloud data of the wall to be measured based on the point cloud data of the wall to be measured; a projection submodule configured to perform projection transformation and viewport transformation on the wall point cloud data of the wall to be measured to project the each wall surface to a two-dimensional plane corresponding to the each wall surface, to obtain a two-dimensional image of the each wall surface and depth information of the each wall surface in a standardized device coordinate system; and the wall point determination module is configured to perform viewport inverse transformation and projection inverse transformation on pixel positions of the at least two measurement points on the two-dimensional image of the target wall surface based on the depth information of the target wall surface in the standardized device coordinate system, to obtain three-dimensional position information of at least two wall points corresponding to the at least two measurement points, respectively.

12. The apparatus of any one of claims 10-11, further comprising: a point cloud acquisition module configured to acquire original point cloud data collected by a collection device under at least two collection parameters for the wall to be measured. a point cloud transformation module, configured to transform the original point cloud data to a target coordinate system according to a transformation relationship between a coordinate system constructed for the acquisition device and the target coordinate system, to obtain transformed point cloud data; and a point cloud splicing module, configured to splice the transformed point cloud data, to obtain point cloud data for the wall to be measured, wherein the target coordinate system is an arbitrary predetermined three-dimensional coordinate system.

13. The apparatus of claim 12, wherein, The original point cloud data comprises point cloud data of a reference object fixedly arranged relative to the wall to be measured; the device further comprises: a transformation relationship determination module, configured to determine the transformation relationship between the coordinate system constructed for the acquisition device and the target coordinate system constructed for the reference object according to a relative positional relationship between the reference object and the acquisition device.

14. The apparatus of any one of claims 10-11, wherein, The point cloud data for the wall to be measured comprises point cloud data of a reference object fixedly arranged relative to the wall to be measured; the projection module comprises: a wall point cloud determination sub-module, configured to determine wall point cloud data of the wall to be measured based on the point cloud data for the wall to be measured; the wall point cloud determination sub-module comprises: a point cloud segmentation unit, configured to segment the point cloud data for the wall to be measured based on a target three-dimensional size of the wall to be measured and relative positional information between the reference object and the wall to be measured, to obtain segmented point cloud data; and a wall point cloud determination unit, configured to determine the wall point cloud data of the wall to be measured based on the segmented point cloud data; and a projection sub-module, configured to project each wall surface to a two-dimensional plane corresponding to the each wall surface based on the wall point cloud data, to obtain a two-dimensional image of the each wall surface, wherein the target three-dimensional size is determined based on a predetermined three-dimensional model of the wall to be measured.

15. The apparatus of claim 14, wherein, The wall point cloud determination unit comprises: a filtering sub-unit, configured to perform outlier filtering processing on the segmented point cloud data, to obtain first point cloud data; and a point cloud determination sub-unit, configured to determine the wall point cloud data of the wall to be measured based on the first point cloud data.

16. The apparatus of claim 14, wherein, The wall point cloud determination unit comprises: a wall surface point cloud determination sub-unit, configured to determine point cloud data describing the each wall surface in the segmented point cloud data; a segmentation threshold value determination sub-unit, configured to determine a segmentation threshold value in a normal direction of the each wall surface based on a predetermined texture thickness of the each wall surface and the point cloud data describing the each wall surface; a point cloud segmentation sub-unit, configured to segment point cloud data according to the segmentation threshold value in the normal direction of the at least one wall surface based on the segmented point cloud data, to obtain second point cloud data; and a point cloud determination sub-unit, configured to determine the wall point cloud data of the wall to be measured based on the second point cloud data, wherein the predetermined texture thickness of the each wall surface is determined based on the predetermined three-dimensional model.

17. The apparatus of claim 16, wherein, The segmentation threshold value determination sub-unit is configured to: determine positional information of the each wall surface in the normal direction of the each wall surface according to the point cloud data describing the each wall surface; determine a search range in the normal direction of the each wall surface according to the positional information and the predetermined texture thickness of the each wall surface; find point cloud data describing the each wall surface in the search range, determine extreme value point cloud data in the normal direction of the each wall surface; and determine a segmentation threshold for the each wall surface according to coordinate values along the normal direction of the each wall surface included in the extreme value point cloud data.

18. The apparatus of claim 15, wherein, For any point cloud data in the first point cloud data and the second point cloud data, the any point cloud data includes data collected by a collection device under at least two collection parameters; the point cloud determining sub-unit is configured to: register point cloud data collected by the collection device under the at least two collection parameters in the any point cloud data by using a normal iterative closest point algorithm to obtain a registered point cloud pair; and splice the point cloud data collected by the collection device under the at least two collection parameters in the any point cloud data according to the registered point cloud pair to obtain wall surface point cloud data of the wall surface to be measured. 19.An electronic device comprising: at least one processor; and a memory connected to the at least one processor in communication; wherein, the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-9.

20. A non-transitory computer readable storage medium having stored thereon computer instructions, wherein, The computer instructions are used to make the computer execute the method according to any one of claims 1-9. 21.A computer program product comprising computer programs / instructions stored on at least one of a readable storage medium and an electronic device, the computer programs / instructions, when executed by a processor, implement the steps of the method according to any one of claims 1-9.

Citation Information

Patent Citations

  • Method, device and system for measuring sectional dimension of wall surface

    CN111412842A

  • Wall segmentation identification method and system based on point cloud data processing

    CN115239951A