A method, device and storage medium for determining the measurement position of a virtual ruler
Through point cloud data processing and target wall recognition, the measurement position of the virtual ruler is determined, which solves the problem that the wall type affects the measurement position in the prior art and improves the accuracy of the measurement results.
Patent Information
- Application Number
- CN202010772589.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-08-04
- Publication Date
- 2025-05-02
- Estimated Expiration
- 2040-08-04
AI Technical Summary
The prior art fails to effectively consider the wall type in actual measurement of wall perpendicularity, resulting in the unreasonable placement of the automatically generated ruler, affecting the accuracy of the measurement results.
By obtaining point cloud data of the wall being tested, its attributes are judged, and at least one target wall is determined based on these attributes. Then, based on the point cloud data of the target wall and the ruler placement rules, the measurement position of the virtual ruler on the target wall is determined.
The accuracy of wall perpendicularity measurement results is improved, ensuring that the measurement position of the virtual ruler is reasonable and adapting to different wall types.
Smart Images

Figure CN114065334B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present invention relate to the technical field of building construction, and in particular to a method, device and storage medium for determining a measurement position of a virtual ruler. Background Art
[0002] The actual measurement of wall verticality is an important part of wall quality control in the field of construction. The current method of measuring verticality is mainly for construction workers to manually measure the wall using a 2-meter ruler. However, as the labor shortage in construction positions becomes more and more serious, the average age of the labor force increases year by year. In this context, the use of advanced technology to improve the degree of automation in the field of construction and reduce labor demand has become a new development trend.
[0003] In recent years, non-contact verticality measurement methods have been developed. Non-contact verticality measurement methods use advanced sensors such as 3D laser scanners and depth cameras to collect wall data, and analyze and process the wall data to obtain wall verticality measurement results.
[0004] However, whether it is a manual method or a non-contact method, the placement of the ruler during the actual measurement of the wall verticality must comply with the corresponding corporate standards. However, due to the variety of wall types on actual construction sites, the existing non-contact method does not take into account the influence of the wall type when automatically generating the ruler placement, which makes the generated ruler placement unreasonable and leads to inaccurate verticality measurement results. Summary of the invention
[0005] The embodiment of the present invention provides a method and device for determining the measurement position of a virtual ruler, so as to solve the problem that a fixed ruler is placed unreasonably on walls of different wall types, and improve the accuracy of subsequent verticality measurement results.
[0006] In a first aspect, an embodiment of the present invention provides a method for determining a measurement position of a virtual ruler, the method comprising:
[0007] Acquire point cloud data of the measured wall surface, and determine the properties of the measured wall surface based on the point cloud data of the measured wall surface;
[0008] Based on the properties of the measured wall surface, determining at least one target wall surface on the measured wall surface;
[0009] Based on the point cloud data of the target wall and the ruler placement rules, the measurement position of the virtual ruler on the target wall is determined.
[0010] Further, the determining the properties of the measured wall surface based on the point cloud data of the measured wall surface is specifically:
[0011] Determining whether the measured wall surface includes a hole area based on the point cloud data of the measured wall surface;
[0012] The step of determining at least one target wall surface on the measured wall surface based on the property of the measured wall surface is specifically as follows:
[0013] Based on the judgment result of the hole area, at least one target wall surface which does not include the hole area is determined on the measured wall surface.
[0014] Furthermore, based on the judgment result of the hole area, determining at least one target wall surface that does not include the hole area on the measured wall surface includes:
[0015] When the measured wall surface does not include a hole area, the measured wall surface is used as the target wall surface;
[0016] When the measured wall surface includes an opening area, the measured wall surface is divided along a preset direction to obtain sub-wall surfaces that do not include the opening area, and each of the sub-wall surfaces is used as the target wall surface.
[0017] Furthermore, the determining the measurement position of the virtual ruler on the target wall surface based on the point cloud data of the target wall surface and the ruler placement rule includes:
[0018] Determining the size of the target wall based on the point cloud data of the target wall;
[0019] Matching the size of the target wall with at least one preset size interval, and determining a ruler placement rule corresponding to the target wall based on the successfully matched preset size interval; wherein the preset size interval includes a preset height interval and / or a preset width interval;
[0020] The measuring position of the virtual ruler on the target wall is determined according to the ruler placement rule corresponding to the target wall and the point cloud data of the target wall.
[0021] Furthermore, matching the size of the target wall with at least one preset size interval, and determining a ruler placement rule corresponding to the target wall based on the successfully matched preset size interval, includes:
[0022] If the height of the target wall belongs to a first preset height range and / or the width of the target wall belongs to a first preset width range, the number of virtual rulers placed corresponding to the target wall is zero; wherein the maximum value of the first preset height range is less than the first height, and the maximum value of the first preset width range is less than the first width.
[0023] Furthermore, matching the size of the target wall with at least one preset size interval, and determining a ruler placement rule corresponding to the target wall based on the successfully matched preset size interval, includes:
[0024] If the height of the target wall does not belong to the first preset height interval and the width of the target wall does not belong to the first preset width interval, the width of the target wall is matched with at least one second preset width interval, and the placement quantity and position coordinate function of the virtual ruler corresponding to the target wall are determined based on the successfully matched second preset width interval; wherein the second preset width intervals do not intersect with each other.
[0025] The advantage of this setting is that it avoids determining unnecessary ruler positions on a target wall with a smaller size, thereby increasing the workload or calculation amount in subsequent verticality measurement.
[0026] Further, determining the measurement position of the virtual ruler on the target wall surface according to the ruler placement rule corresponding to the target wall surface and the point cloud data of the target wall surface includes:
[0027] Determine the width of the target wall and the boundary coordinates of any boundary along the vertical direction according to the point cloud data of the target wall;
[0028] The measurement position of the center point of the virtual ruler on the target wall is determined based on the width of the target wall, the boundary coordinates and a position coordinate function in a ruler placement rule corresponding to the target wall.
[0029] Furthermore, after determining the measurement position of the virtual ruler on the target wall surface based on the point cloud data of the target wall surface and the ruler placement rule, the method further includes:
[0030] If the measured wall surface includes an opening area, a virtual ruler adjacent to the opening area is used as a ruler to be calibrated, and it is determined whether the minimum horizontal boundary distance between the ruler to be calibrated and the opening boundary of the opening area is greater than a preset distance threshold;
[0031] If yes, the measurement position of the ruler to be calibrated is corrected so that the minimum horizontal boundary distance is less than or equal to the preset distance threshold.
[0032] The advantage of this setting is that it improves the rationality of the ruler position, thereby improving the accuracy of subsequent verticality measurement results.
[0033] Furthermore, the step of obtaining the point cloud data of the measured wall surface includes:
[0034] Collecting point cloud data of the measured wall, performing plane fitting based on the point cloud data to obtain a wall normal vector, and calculating an angle between the wall normal vector and the first coordinate axis;
[0035] Rotating the point cloud data according to the angle so that the wall normal vector is perpendicular to the first coordinate axis;
[0036] The rotated point cloud data is translated so that any boundary angle of the measured wall coincides with the origin of the coordinate system where the first coordinate axis is located, thereby obtaining adjusted point cloud data of the measured wall.
[0037] The advantage of this setting is that the point cloud data of the measured wall is aligned with the preset coordinate system. The measured wall is in any plane of the preset coordinate system, so that the point cloud data and the ruler placement rules are based on the same coordinate system, thereby avoiding coordinate system conversion and improving data calculation efficiency.
[0038] Further, judging whether the measured wall surface includes a hole area based on the point cloud data of the measured wall surface includes:
[0039] Mapping the point cloud data of the measured wall surface into a two-dimensional image;
[0040] Based on the pixel value of each pixel point of the two-dimensional image, determining a connected region image composed of pixel points corresponding to a preset pixel value;
[0041] If the size of the connected region image is greater than a preset region size threshold, it is determined that the measured wall surface includes a hole region.
[0042] The advantage of this setting is that it reduces the error caused by image measurement and ignores the influence of smaller hole areas on the ruler position, avoiding the determination of unnecessary ruler positions.
[0043] In a second aspect, an embodiment of the present invention further provides a device for determining a measurement position of a virtual ruler, the device comprising:
[0044] A wall attribute determination module, used to obtain point cloud data of the measured wall surface, and determine the attributes of the measured wall surface based on the point cloud data of the measured wall surface;
[0045] A target wall surface determination module, configured to determine at least one target wall surface on the measured wall surface based on the properties of the measured wall surface;
[0046] The measurement position determination module is used to determine the measurement position of the virtual ruler on the target wall based on the point cloud data of the target wall and the ruler placement rules.
[0047] In a third aspect, an embodiment of the present invention further provides a device, the device comprising:
[0048] one or more processors;
[0049] A memory for storing one or more programs;
[0050] When the one or more programs are executed by the one or more processors, the one or more processors implement any of the above-mentioned methods for determining the measurement position of the virtual ruler.
[0051] In a fourth aspect, an embodiment of the present invention further provides a storage medium comprising computer executable instructions, wherein the computer executable instructions, when executed by a computer processor, are used to execute any of the above-mentioned methods for determining the measurement position of the virtual ruler.
[0052] The prior art does not consider the influence of the wall type on the ruler position when determining the measurement position of the virtual ruler, so that the automatically generated ruler position is relatively fixed. The embodiment of the present invention determines the properties of the measured wall through the point cloud data of the measured wall, determines at least one target wall on the measured wall based on the properties of the measured wall, and determines the measurement position of the virtual ruler on the target wall according to the point cloud data of the target wall and the ruler placement rules, thereby solving the problem that the measurement position of the virtual ruler is unreasonable due to different wall types, and improving the accuracy of subsequent verticality measurement results. BRIEF DESCRIPTION OF THE DRAWINGS
[0053] Figure 1 This is a flow chart of a method for determining a measurement position of a virtual ruler provided in Embodiment 1 of the present invention.
[0054] Figure 2 It is a schematic diagram of a measured wall provided in the first embodiment of the present invention.
[0055] Figure 3 This is a flow chart of a method for determining a measurement position of a virtual ruler provided in Embodiment 2 of the present invention.
[0056] Figure 4 This is a flow chart of a method for determining a measurement position of a virtual ruler provided in Embodiment 3 of the present invention.
[0057] Figure 5 It is a schematic diagram of the measurement position of a virtual ruler provided in the third embodiment of the present invention.
[0058] Figure 6 It is a schematic diagram of a measured wall surface after division provided in the third embodiment of the present invention.
[0059] Figure 7 It is a schematic diagram of another measurement position of a virtual ruler provided in the third embodiment of the present invention.
[0060] Figure 8 It is a schematic diagram of a device for determining the measurement position of a virtual ruler provided in a fourth embodiment of the present invention.
[0061] Fig. 9 It is a structural schematic diagram of a device provided in Embodiment 5 of the present invention. DETAILED DESCRIPTION
[0062] The present invention will be further described in detail below in conjunction with the accompanying drawings and embodiments. It is to be understood that the specific embodiments described herein are only used to explain the present invention, rather than to limit the present invention. It should also be noted that, for ease of description, only parts related to the present invention, rather than all structures, are shown in the accompanying drawings.
[0063] Embodiment 1
[0064] Figure 1 This is a flow chart of a method for determining the measurement position of a virtual ruler provided in the first embodiment of the present invention. This embodiment can be applied to the case of determining the measurement position of a virtual ruler on a measured wall. The method can be performed by a device for determining the measurement position of a virtual ruler. The device can be implemented in software and / or hardware. The device can be configured in a terminal device. For example, the terminal device can be a smart device such as a smart phone, a tablet computer, a laptop computer or a desktop computer. Specifically, the following steps are included:
[0065] S110: Acquire point cloud data of the measured wall surface, and determine the properties of the measured wall surface based on the point cloud data of the measured wall surface.
[0066] Exemplarily, point cloud data of the measured wall is collected based on a three-dimensional laser scanner, and the point cloud data refers to a set of point data on the appearance surface of the measured object.
[0067] In one embodiment, optionally, the property of the measured wall surface is determined based on the point cloud data of the measured wall surface, specifically: whether the measured wall surface includes an opening area is determined based on the point cloud data of the measured wall surface.
[0068] In one embodiment, optionally, judging whether the measured wall surface includes an opening area based on the point cloud data of the measured wall surface includes: mapping the point cloud data of the measured wall surface into a two-dimensional image; determining a connected area image consisting of pixel points corresponding to preset pixel values based on the pixel value of each pixel point of the two-dimensional image; if the size of the connected area image is greater than a preset area size threshold, determining that the measured wall surface includes an opening area.
[0069] Wherein, exemplarily, each point cloud data value in the point cloud data of the measured wall is used as the pixel value of the corresponding pixel in the two-dimensional image to obtain a mapped two-dimensional image. Wherein, the type of the two-dimensional image can be a color image, a grayscale image or a black and white image, and the type of the two-dimensional image is not limited here. In one embodiment, when the two-dimensional image is a color image, the pixel value is an RGB value. In another embodiment, when the two-dimensional image is a color image, the RGB value corresponding to each pixel is gray-converted to obtain the gray value corresponding to each pixel. Wherein, exemplarily, the grayscale conversion method can be a floating point method, an integer method, a shift method or an average method. When the two-dimensional image is a grayscale image or a black and white image, the pixel value is a grayscale value, specifically, a grayscale value of 255 represents white, and a grayscale value of 0 represents black. Wherein, exemplarily, the preset pixel value can be any value in 0-255. The preset pixel value is not limited here, and the preset pixel value can be set according to the specific application scenario.
[0070] Figure 2 It is a schematic diagram of a measured wall provided in the first embodiment of the present invention. Figure 2 Figure (a) shows the wall without the opening area, and Figure (b) shows the wall including the opening area. Figure 2 The white connected areas in (a) and (b) represent the solid wall, and the black connected areas represent the opening areas. The x-axis and z-axis represent the coordinate axes in the coordinate system aligned with the rotationally calibrated point cloud data. Figure 2 As shown in the example, the preset pixel value is 0.
[0071] Among them, illustratively, the preset area size threshold can be 400mm×400mm. The advantage of such a setting is that, on the one hand, ignoring the smaller hole area can avoid determining unnecessary ruler positions. Since the smaller hole area has less impact on the subsequent measurement results, if the smaller hole area is not ignored, more ruler positions will be determined, increasing the subsequent unnecessary measurement calculation pressure. On the other hand, when measuring point cloud data, it is easy to be affected by the point cloud acquisition equipment and the surrounding environment, so that the pixel value of the two-dimensional image and the real wall surface have measurement errors. For example, pixels that meet the preset pixel size appear on the measured wall surface excluding the hole area, which makes the judgment result wrong. Setting the preset area size threshold can greatly reduce the probability of judgment result errors caused by measurement errors, thereby improving the accuracy of the measurement position determination of the virtual ruler.
[0072] On the basis of the above embodiment, optionally, point cloud data of the measured wall is obtained, including: collecting the point cloud data of the measured wall, and performing plane fitting based on the point cloud data to obtain the wall normal vector, and calculating the angle between the wall normal vector and the first coordinate axis; rotating the point cloud data according to the angle so that the wall normal vector is perpendicular to the first coordinate axis; translating the rotated point cloud data so that any boundary angle of the measured wall coincides with the origin of the coordinate system where the first coordinate axis is located, to obtain adjusted point cloud data of the measured wall.
[0073] In one embodiment, optionally, plane fitting is performed based on a least square method or a random sampling consensus algorithm (RANSAC) to obtain a plane fitting equation and a wall normal vector.
[0074] The first coordinate axis is a coordinate axis in a preset coordinate system, and the preset coordinate system may be a world coordinate system, and the first coordinate axis may be any one of an X-axis, a Y-axis, and a Z-axis. Any boundary angle may be, for example, an upper left corner, a lower left corner, an upper right corner, or a lower right corner.
[0075] Taking the first coordinate axis as the X-axis as an example, in one embodiment, optionally, a tilt sensor is provided on the point cloud acquisition device to make the Z-axis of the point cloud data in the vertical direction with the positive direction facing upward.
[0076] Specifically, the angle α between the wall unit normal vector n and the X-axis satisfies the formula:
[0077]
[0078] Among them, x represents a unit vector parallel to the X-axis and in the same direction, and z represents a unit vector parallel to the Z-axis and in the same direction. Specifically, x=(1,0,0), z=(0,0,1).
[0079] Rotate the point cloud data according to the angle α so that the wall normal vector n is perpendicular to the X axis. Specifically, rotate the point cloud data clockwise around the Z axis. Make the wall normal vector n perpendicular to the X axis. The advantage of this setting is that the point cloud data of the measured wall is aligned with the preset coordinate system, so that the point cloud data and the position information in the position placement rules are based on the same coordinate system, thereby avoiding coordinate system conversion and reducing data calculation.
[0080] S120: Determine at least one target wall surface on the measured wall surface based on the properties of the measured wall surface.
[0081] In one embodiment, optionally, based on the properties of the measured wall, at least one target wall is determined on the measured wall, specifically: based on the judgment result of the hole area, at least one target wall that does not include the hole area is determined on the measured wall.
[0082] In one embodiment, optionally, based on the judgment result of the opening area, at least one target wall that does not include the opening area is determined on the measured wall, including: when the measured wall does not include the opening area, the measured wall is used as the target wall; when the measured wall includes the opening area, the measured wall is divided along a preset direction to obtain sub-walls that do not include the opening area, and each sub-wall is used as a target wall.
[0083] Wherein, illustratively, the preset direction may be a vertical direction or a horizontal direction. For example, assuming that the preset direction is a horizontal direction, and the number of opening areas is 1. When the opening area is at the leftmost or rightmost side of the measured wall, a sub-wall surface that does not include the opening area is obtained by division. When the opening area is in the middle of the measured wall, that is, the boundary of the opening area does not overlap with the boundary of the measured wall, two sub-wall surfaces that do not include the opening area are obtained by division.
[0084] In one embodiment, the types of target walls include single-sided target walls and middle target walls. Among them, the single-sided target walls include left target walls and right target walls. Specifically, the left target wall refers to the target wall that coincides with the left boundary of the measured wall, the right target wall refers to the target wall that coincides with the right boundary of the measured wall, and the middle target wall refers to the target wall that partially or completely coincides with the boundaries of at least two opening areas. If counting starts from the left, the left target wall is the first target wall, and the right target wall is the last target wall.
[0085] S130: Determine the measurement position of the virtual ruler on the target wall based on the point cloud data of the target wall and the ruler placement rule.
[0086] In one embodiment, optionally, the size of the target wall is determined based on the point cloud data of the target wall, and the measurement position of the virtual ruler on the target wall is determined based on the size of the target wall and the ruler placement rules. Specifically, the size of the target wall is determined according to the coordinate information of the point cloud data in a preset coordinate system.
[0087] In one embodiment, optionally, a mapping relationship between the size of the target wall and the ruler placement rule is constructed, the ruler placement rule corresponding to the size of the target wall is determined based on the mapping relationship, and the measurement position of the virtual ruler on the target wall is calculated based on the determined ruler placement rule. The ruler placement rule includes the ruler placement number and the position coordinate function of the virtual ruler.
[0088] The technical solution of this embodiment determines the properties of the measured wall through the point cloud data of the measured wall, determines at least one target wall on the measured wall based on the properties of the measured wall, and determines the measurement position of the virtual ruler on the target wall according to the point cloud data of the target wall and the ruler placement rules, which solves the problem that the measurement position of the virtual ruler is unreasonable due to different wall types. When the wall includes an opening area, the generated ruler position may be in the opening area, and when the verticality measurement is performed based on the ruler position, the existence of the opening area will make the verticality measurement result inaccurate. Based on the judgment result of the opening area of the measured wall, the embodiment of the present invention determines at least one target wall that does not include the opening area on the measured wall, and determines the measurement position of the virtual ruler on the target wall, which solves the problem that the opening area on the wall causes inaccurate measurement results, so that the measurement position of the determined virtual ruler will not be in the opening area, thereby improving the accuracy of subsequent verticality measurement results.
[0089] Embodiment 2
[0090] Figure 3 It is a flow chart of a method for determining the measurement position of a virtual ruler provided in the second embodiment of the present invention. The technical solution of this embodiment is a further refinement based on the above embodiment. Optionally, the measurement position of the virtual ruler on the target wall is determined based on the point cloud data of the target wall and the ruler placement rules, including: determining the size of the target wall based on the point cloud data of the target wall; matching the size of the target wall with at least one preset size interval, and determining the ruler placement rules corresponding to the target wall based on the successfully matched preset size interval; wherein the preset size interval includes a preset height interval and / or a preset width interval; determining the measurement position of the virtual ruler on the target wall according to the ruler placement rules corresponding to the target wall and the point cloud data of the target wall.
[0091] The specific implementation steps of this embodiment include:
[0092] S210: Acquire point cloud data of the measured wall surface, and determine the properties of the measured wall surface based on the point cloud data of the measured wall surface.
[0093] S220: Determine at least one target wall surface on the measured wall surface based on the properties of the measured wall surface.
[0094] S230, determining the size of the target wall based on the point cloud data of the target wall, matching the size of the target wall with at least one preset size interval, and determining a ruler placement rule corresponding to the target wall based on the successfully matched preset size interval.
[0095] Wherein, illustratively, determining the size of the target wall based on the point cloud data of the target wall includes: determining the size of the target wall according to the coordinate information of the point cloud data in a preset coordinate system, or determining the size of the target wall based on the pixel size of the target wall in the two-dimensional image mapped by the point cloud data of the measured wall. Wherein, illustratively, the size of the target wall can be the actual size of the target wall, or the pixel size in the two-dimensional image, or the coordinate system size set in the preset coordinate system, and the type of the size of the target wall is not limited here.
[0096] In this embodiment, the preset size interval includes a preset height interval and / or a preset width interval. Exemplarily, the height refers to the length dimension of the target wall along the vertical direction, and the width refers to the length dimension of the target wall along the horizontal direction. The size of the target wall is matched with at least one preset size interval, and specifically, the height and width of the target wall are matched with the preset height interval and the preset width interval respectively, to determine the interval range of the size of the target wall.
[0097] The ruler placement rule corresponding to the target wall is determined based on the successfully matched preset size interval. Specifically, a mapping relationship between the preset size interval and the ruler placement rule is established, and the ruler placement rule corresponding to the successfully matched preset size interval is determined based on the mapping relationship. The preset size interval includes a first preset height interval, a first preset width interval, and at least one second preset width interval.
[0098] In one embodiment, optionally, the size of the target wall is matched with at least one preset size interval, and a placement rule of a ruler corresponding to the target wall is determined based on the successfully matched preset size interval, including: if the height of the target wall belongs to a first preset height interval and / or the width of the target wall belongs to a first preset width interval, then the number of virtual rulers placed corresponding to the target wall is zero; wherein the maximum value of the first preset height interval is less than the first height, and the maximum value of the first preset width interval is less than the first width.
[0099] Wherein, exemplarily, the first height is represented by h1, and the first width is represented by w1. Specifically, the first preset height interval and the first preset width interval can be represented as (0, h1) and (0, w1), respectively. If the height h of the target wall is less than the first height h1 and / or the width w of the target wall is less than the first width w1, it means that the height of the target wall belongs to the first preset height interval and / or the width of the target wall belongs to the first preset width interval, that is, the height of the target wall matches the first preset height interval and / or the width of the target wall matches the first preset width interval. In one embodiment, optionally, in the mapping relationship between the preset size interval and the ruler placement rule, the number of virtual rulers placed in the ruler placement rule corresponding to the first preset height interval and the first preset width interval is zero, that is, no virtual ruler is set on the target wall. Wherein, exemplarily, h1 = 2000mm, w1 = 400mm. The advantage of such a setting is that the smaller target wall has little effect on the verticality measurement of the measured wall, avoiding the determination of too many rulers and increasing the subsequent workload or calculation.
[0100] In one embodiment, optionally, the size of the target wall is matched with at least one preset size interval, and a placement rule of a ruler corresponding to the target wall is determined based on the successfully matched preset size interval, including: if the height of the target wall does not belong to the first preset height interval and the width of the target wall does not belong to the first preset width interval, then the width of the target wall is matched with at least one second preset width interval, and the placement quantity and position coordinate function of the virtual ruler corresponding to the target wall are determined based on the successfully matched second preset width interval; wherein the second preset width intervals do not intersect with each other.
[0101] The second preset width intervals do not intersect with each other. Specifically, in one embodiment, the second preset width intervals are sorted according to the maximum interval width or the minimum interval width, and the sorted second preset width intervals are adjacent and do not intersect with each other.
[0102] Specifically, the number of virtual rulers to be placed and the position coordinate function in the ruler placement rule corresponding to the second preset width interval that matches successfully are determined based on the mapping relationship. Specifically, the position coordinate function includes a relationship function between the width of the target wall and the measurement position of the virtual ruler along the first coordinate axis, and / or a preset measurement position. Exemplarily, the first coordinate axis is the X-axis, and the position coordinate function can be w-d1 or d. Wherein, d1 represents the preset horizontal distance between the virtual ruler and the coordinate origin along the first coordinate axis, and exemplarily, d1=200mm. d represents the preset horizontal distance between the virtual ruler and the coordinate origin along the first coordinate axis, and exemplarily, d=250mm.
[0103] S240: Determine the measurement position of the virtual ruler on the target wall according to the ruler placement rule corresponding to the target wall and the point cloud data of the target wall.
[0104] Specifically, if the position coordinate function includes a relationship function between the width of the target wall and the measurement position of the virtual ruler on the first coordinate axis, the width of the target wall is determined according to the point cloud data of the target wall, and the width is substituted into the position coordinate function to obtain the measurement position of the virtual ruler on the first coordinate axis.
[0105] On the basis of the above embodiment, optionally, after determining the measuring position of the virtual ruler on the target wall based on the point cloud data of the target wall and the ruler placement rules, it also includes: if the measured wall includes an opening area, then using the virtual ruler adjacent to the opening area as the ruler to be calibrated, and judging whether the minimum horizontal boundary distance between the ruler to be calibrated and the opening boundary of the opening area is greater than a preset distance threshold; if so, correcting the measuring position of the ruler to be calibrated so that the minimum horizontal boundary distance is less than or equal to the preset distance threshold.
[0106] Wherein, for example, the preset distance threshold may be 100 mm. The advantage of such a setting is that, when the custom position coordinate function does not take into account the distance relationship between the measurement position of the virtual ruler and the opening area, the measurement position of the current virtual ruler can be corrected to ensure that the position closer to the opening area is provided with a ruler, thereby improving the accuracy of subsequent verticality measurement results.
[0107] The technical solution of this embodiment solves the problem of unreasonable setting of the measurement position of the virtual ruler by matching the size of the target wall with at least one preset size interval and determining the ruler placement rule corresponding to the target wall based on the successfully matched preset size interval, so that the measurement position of the virtual ruler finally obtained can meet the measurement requirements of measured walls of different sizes and avoid setting a ruler on a target wall of smaller size, thereby improving the accuracy of subsequent verticality measurement results and reducing the workload or calculation amount.
[0108] Embodiment 3
[0109] Figure 4It is a flow chart of a method for determining the measurement position of a virtual ruler provided in Embodiment 3 of the present invention. The technical solution of this embodiment is a further refinement based on the above-mentioned embodiment. Optionally, the measurement position of the virtual ruler on the target wall is determined according to the ruler placement rule corresponding to the target wall and the point cloud data of the target wall, including: determining the width of the target wall and the boundary coordinates of any boundary along the vertical direction according to the point cloud data of the target wall; determining the measurement position of the center point of the virtual ruler on the target wall based on the width of the target wall, the boundary coordinates and the position coordinate function in the ruler placement rule corresponding to the target wall.
[0110] The specific implementation steps of this embodiment include:
[0111] S310: Obtain point cloud data of the measured wall surface, and determine the properties of the measured wall surface based on the point cloud data of the measured wall surface.
[0112] S320: Determine at least one target wall surface on the measured wall surface based on the properties of the measured wall surface.
[0113] In one embodiment, the target wall surface is a measured wall surface that does not include a hole area. In another embodiment, the measured wall surface includes at least one target wall surface that does not include a hole area.
[0114] S330, determining the size of the target wall based on the point cloud data of the target wall, matching the size of the target wall with at least one preset size interval, and determining a ruler placement rule corresponding to the target wall based on the successfully matched preset size interval.
[0115] In one embodiment, when the target wall is a measured wall that does not include an opening area, each second preset width interval may be [w1, w2), [w2, w3] and (w3, +∞). Specifically, w1 < w2 < w3. For example, w2 = 800 mm and w3 = 3000 mm.
[0116] In another embodiment, when the measured wall includes at least one target wall that does not include an opening area, the preset preset size interval may be different from the preset size interval in the embodiment where the measured wall does not include an opening area. Wherein, exemplarily, the first preset height interval is (0, h2), the second preset height interval is [h2, +∞), the first preset width interval is (0, w4), and the second preset width intervals are [w4, w5), [w5, w6] and (w6, +∞) respectively. Exemplarily, h2 = 2000mm, w4 = 150mm, w5 = 600mm, w6 = 3000mm.
[0117] Specifically, a mapping relationship between a preset size interval and a ruler placement rule is established, and the ruler placement rule corresponding to the successfully matched preset size interval is determined based on the mapping relationship, wherein the ruler placement rule includes the placement quantity and position coordinate function of the virtual ruler.
[0118] In one embodiment, optionally, when the target wall is a measured wall that does not include an opening area, the mapping relationship between the preset size interval and the position coordinate function in the ruler placement rule includes the position coordinate function corresponding to the interval [w1, w2) includes The corresponding placement quantity is 1. The position coordinate functions corresponding to the interval [w2,w3] include d1 and w-d1, and the corresponding placement quantity is 2. The position coordinate functions corresponding to the interval (w3,+∞) include d1, And w-d1, the corresponding number of placements is 3.
[0119] In one embodiment, the position coordinate function may also include the measured position of the virtual ruler on other coordinate axes except the first coordinate axis. For example, the first coordinate axis is the X axis, the Y axis position coordinate is set to 0, and the Z axis position coordinate is set to
[0120] Figure 5 is a schematic diagram of a measurement position of a virtual ruler provided in the third embodiment of the present invention, Figure 5 Take the area of the measured wall that does not include the opening as an example, and take the left boundary of the measured wall as an example. Figure 5 The white box in the figure represents the wall to be measured, and the black rectangle represents the ruler. Figure 5 As shown in Figure (a), when the width w of the target wall satisfies w∈[w1,w2), the position coordinate function of the target wall is like Figure 5 As shown in Figure (b), when the width w of the target wall satisfies w∈[w2,w3], the position coordinate function of the target wall includes and like Figure 5 As shown in Figure (c) in the figure, when the width w of the target wall satisfies w∈(w3,+∞), the position coordinate function of the target wall includes and
[0121] Figure 6 FIG. 1 is a schematic diagram of a measured wall surface after division provided by the third embodiment of the present invention. Figure 6 As shown in the figure, the white box represents the measured wall. Assuming that there are m opening areas on the measured wall, the measured wall can be divided into m+1 target walls, and the width of the left target wall is w (1) , the width of the middle target wall is w (i), the width of the target wall on the right is w (m +1) . Figure 6 Take the intermediate target wall i as an example for illustrative explanation, where the black connected areas in the white box represent the opening area i-1 and the opening area i adjacent to the intermediate target wall i. Specifically, the left boundary of the intermediate target wall i partially overlaps with the right boundary of the opening area i-1, and the left boundary coordinates of the intermediate target wall i are the same as the right boundary coordinates of the opening area i-1, that is, the maximum boundary coordinates of the opening area i-1, which can be expressed as The right boundary coordinate of the intermediate target wall i is the same as the left boundary coordinate of the opening area i, that is, the minimum boundary coordinate of the opening area i. The boundary coordinate can be expressed as Specifically, the width w of the intermediate target wall (i) satisfy Among them, when i = 0, When i=m, Wherein, W represents the total width of the measured wall. For example, if any boundary coordinate is the left boundary of each target wall, the boundary coordinates of different target walls are:
[0122] In another embodiment, optionally, when the measured wall surface includes at least one target wall surface that does not include an opening area, the mapping relationship between the preset size interval and the position coordinate function in the ruler placement rule includes the position coordinate function corresponding to [w4, w5) is: The corresponding placement quantity is 1. [w5,w6] corresponding position coordinate function and The corresponding placement quantity is 2. (w6,+∞) corresponding position coordinate function and The corresponding placement quantity is 3. In one embodiment, optionally, different types of target walls correspond to different preset size intervals. Among them, the type of target wall includes at least one of a left target wall, a right target wall, and a middle target wall. Specifically, only one side of the left target wall and the right target wall has an adjacent hole area, and the middle target wall has adjacent hole areas on both sides. When the type of the target wall is a left target wall or a right target wall, w5=600mm, and when the type of the target wall is a middle target wall, w5=400mm.
[0123] Figure 7 FIG. 1 is a schematic diagram of another virtual ruler measuring position provided in the third embodiment of the present invention. Figure 7As shown, the wall widths of the left target wall, the middle target wall, and the right target wall all satisfy [w4, w5). Then the right boundary coordinates of the left target wall are the target boundary coordinates, and the position coordinate function of the target wall is The right boundary coordinates of the middle target wall are the target boundary coordinates, and the position coordinate function of the target wall is The left boundary coordinates of the right target wall are the target boundary coordinates, and the position coordinate function of the target wall is
[0124] S340: Determine the width of the target wall and the boundary coordinates of any boundary along the vertical direction according to the point cloud data of the target wall.
[0125] In one embodiment, when the target wall is a measured wall that does not include an opening area, the width of the target wall is the width of the measured wall, and the boundary coordinates of any boundary of the target wall along the vertical direction are the boundary coordinates of the measured wall. Specifically, when the measured wall is aligned with the preset coordinate system, illustratively, the boundary coordinates of the measured wall on the first coordinate axis include 0 or the width of the measured wall.
[0126] In another embodiment, when the measured wall includes at least one target wall that does not include an opening area, the width of the target wall is the width of the wall obtained based on the division of the opening area. Exemplarily, any boundary of the target wall can be a left boundary or a right boundary, wherein the left boundary and / or the right boundary of the target wall partially overlaps or completely overlaps with the boundary of the adjacent opening area.
[0127] S350, determining the measurement position of the center point of the virtual ruler on the target wall based on the width of the target wall, the boundary coordinates and the position coordinate function in the ruler placement rule corresponding to the target wall.
[0128] In this embodiment, the type of the measurement position includes at least one of a left boundary position, a middle position, and a right boundary position. Exemplarily, when the number of virtual rulers is 1, the type of the measurement position is a middle position, when the number of virtual rulers is 2, the types of the measurement positions corresponding to the two rulers are respectively a left boundary position and a right boundary position, and when the number of virtual rulers is 3, the types of the measurement positions corresponding to the three rulers are respectively a left boundary position, a middle position, and a right boundary position.
[0129] Specifically, the width and boundary coordinates of the target wall are substituted into the position coordinate function to obtain the measurement position of the center point of the virtual ruler on the target wall.
[0130] On the basis of the above embodiment, optionally, when the type of the target wall is an intermediate target wall and the number of target rulers is at least two, the position coordinate functions of the leftmost and rightmost virtual rulers are respectively and Wherein, d1=100mm is exemplary. The advantage of such a setting is that, since the accuracy of the verticality measurement result of the wall near the opening area is required to be high, if the ruler is too far away from the boundary of the opening area, the measurement accuracy will be poor. When the two boundaries coinciding with the boundary of the opening area are used as the target boundaries, the measurement positions of the leftmost and rightmost virtual rulers are set to positions closer to the opening area, which can improve the accuracy of the verticality measurement result.
[0131] It should be noted that the mapping relationship is only explained here for example, and is not intended to be limiting. The specific values of the height or width in the interval are not limited here either, and can be customized according to actual needs.
[0132] The technical solution of this embodiment solves the problem of determining the measurement position of the virtual ruler on the measured wall including the opening area by determining the width of the target wall and the boundary coordinates of any boundary along the vertical direction according to the point cloud data of the target wall, and determining the measurement position of the virtual ruler corresponding to the target wall based on the width of the target wall, the boundary coordinates and the position coordinate function in the ruler placement rule corresponding to the target wall, and can further limit the measurement position of the virtual ruler near the opening area through the boundary coordinates, thereby improving the rationality of the measurement position of the virtual ruler and further improving the accuracy of subsequent verticality measurement results.
[0133] Embodiment 4
[0134] Figure 8 Schematic diagram of a device for determining the measurement position of a virtual ruler provided in the fourth embodiment of the present invention. This embodiment can be applied to the case of determining the measurement position of a virtual ruler on a measured wall. The device can be implemented in software and / or hardware. The device can be configured in a terminal device. Exemplarily, the terminal device can be a smart device such as a smart phone, a tablet computer, a laptop computer or a desktop computer. The device for determining the measurement position of the virtual ruler includes: a wall attribute determination module 410, a target wall determination module 420 and a measurement position determination module 430.
[0135] The wall attribute determination module 410 is used to obtain the point cloud data of the measured wall and determine the attributes of the measured wall based on the point cloud data of the measured wall;
[0136] A target wall surface determination module 420 is used to determine at least one target wall surface on the measured wall surface based on the properties of the measured wall surface;
[0137] The measurement position determination module 430 is used to determine the measurement position of the virtual ruler on the target wall based on the point cloud data of the target wall and the ruler placement rules.
[0138] The technical solution of this embodiment is that the embodiment of the present invention determines the properties of the measured wall through the point cloud data of the measured wall, and determines the measurement position of the virtual ruler on the target wall according to the point cloud data of the target wall and the ruler placement rules, thereby solving the problem of unreasonable position setting of the virtual ruler due to different wall types, thereby improving the accuracy of subsequent verticality measurement results.
[0139] Based on the above technical solution, optionally, the wall attribute determination module 410 includes:
[0140] The opening area determination unit is used to determine whether the measured wall surface includes the opening area based on the point cloud data of the measured wall surface;
[0141] The target wall determination module 420 is specifically used for:
[0142] Based on the judgment result of the opening area, at least one target wall surface that does not include the opening area is determined on the measured wall surface.
[0143] Based on the above technical solution, optionally, the target wall determination module 420 is specifically used for:
[0144] When the measured wall does not include the opening area, the measured wall is taken as the target wall;
[0145] When the measured wall surface includes an opening area, the measured wall surface is divided along a preset direction to obtain sub-wall surfaces that do not include the opening area, and each sub-wall surface is used as a target wall surface.
[0146] Based on the above technical solution, optionally, the measurement position determination module 430 includes:
[0147] A target wall size determination unit, used to determine the size of the target wall based on point cloud data of the target wall;
[0148] A ruler placement rule determination unit is used to match the size of the target wall with at least one preset size interval, and determine the ruler placement rule corresponding to the target wall based on the successfully matched preset size interval; wherein the preset size interval includes a preset height interval and / or a preset width interval;
[0149] The measurement position determination unit determines the measurement position of the virtual ruler on the target wall according to the ruler placement rule corresponding to the target wall and the point cloud data of the target wall.
[0150] On the basis of the above technical solution, optionally, a ruler placement rule determination unit is specifically used to:
[0151] If the height of the target wall belongs to the first preset height range and / or the width of the target wall belongs to the first preset width range, the number of virtual rulers placed corresponding to the target wall is zero; wherein the maximum value of the first preset height range is less than the first height, and the maximum value of the first preset width range is less than the first width.
[0152] On the basis of the above technical solution, optionally, a ruler placement rule determination unit is specifically used to:
[0153] If the height of the target wall does not belong to the first preset height interval and the width of the target wall does not belong to the first preset width interval, the width of the target wall is matched with at least one second preset width interval, and the placement quantity and position coordinate function of the virtual ruler corresponding to the target wall are determined based on the successfully matched second preset width interval; wherein the second preset width intervals do not intersect with each other.
[0154] On the basis of the above technical solution, optionally, the measurement position determination unit is specifically used to:
[0155] Determine the width of the target wall and the boundary coordinates of any boundary along the vertical direction according to the point cloud data of the target wall;
[0156] The measurement position of the center point of the virtual ruler on the target wall is determined based on the width of the target wall, the boundary coordinates and the position coordinate function in the ruler placement rule corresponding to the target wall.
[0157] On the basis of the above technical solution, optionally, the device further includes:
[0158] The measurement position correction module is used for, if the measured wall surface includes an opening area, using the virtual ruler adjacent to the opening area as the ruler to be calibrated, and determining whether the minimum horizontal boundary distance between the ruler to be calibrated and the opening boundary of the opening area is greater than a preset distance threshold;
[0159] If yes, the measured position of the ruler to be calibrated is corrected so that the minimum horizontal boundary distance is less than or equal to the preset distance threshold.
[0160] On the basis of the above technical solution, optionally, the hole area determination unit includes:
[0161] The point cloud data adjustment subunit is used to collect the point cloud data of the measured wall, and obtain the wall normal vector by plane fitting based on the point cloud data, and calculate the angle between the wall normal vector and the first coordinate axis; rotate the point cloud data according to the angle so that the wall normal vector is perpendicular to the first coordinate axis; translate the rotated point cloud data so that any boundary angle of the measured wall coincides with the origin of the coordinate system where the first coordinate axis is located, so as to obtain the adjusted point cloud data of the measured wall.
[0162] On the basis of the above technical solution, optionally, the opening area determination unit is specifically used to:
[0163] Map the point cloud data of the measured wall into a two-dimensional image;
[0164] Based on the pixel value of each pixel point of the two-dimensional image, determining a connected region image composed of pixel points corresponding to a preset pixel value;
[0165] If the size of the connected region image is greater than a preset region size threshold, it is determined that the measured wall surface includes a hole region.
[0166] The device for measuring the position of a virtual ruler provided in the embodiment of the present invention can be used to execute the method for measuring the position of a virtual ruler provided in the embodiment of the present invention, and has the corresponding functions and beneficial effects of the execution method.
[0167] It is worth noting that in the embodiment of the above-mentioned virtual ruler measuring position device, the various units and modules included are only divided according to functional logic, but are not limited to the above-mentioned division, as long as the corresponding functions can be achieved; in addition, the specific names of the functional units are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of the present invention.
[0168] Embodiment 5
[0169] Fig. 9 It is a structural diagram of a device provided in Embodiment 5 of the present invention. The embodiment of the present invention provides services for realizing the method for measuring the position of the virtual ruler in the above embodiment of the present invention, and can configure the measuring position device of the virtual ruler in the above embodiment. Fig. 9 A block diagram of an exemplary device 12 suitable for use in implementing embodiments of the present invention is shown. Fig. 9 The device 12 shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.
[0170] like Fig. 9 As shown, device 12 is in the form of a general purpose computing device. Components of device 12 may include, but are not limited to, one or more processors or processing units 16, system memory 28, and bus 18 that connects various system components (including system memory 28 and processing unit 16).
[0171] Bus 18 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processor or a local bus using any of a variety of bus architectures. By way of example, these architectures include, but are not limited to, an Industry Standard Architecture (ISA) bus, a Micro Channel Architecture (MAC) bus, an Enhanced ISA bus, a Video Electronics Standards Association (VESA) local bus, and a Peripheral Component Interconnect (PCI) bus.
[0172] Device 12 typically includes a variety of computer system readable media. These media can be any available media that can be accessed by device 12, including volatile and non-volatile media, removable and non-removable media.
[0173] System memory 28 may include computer system readable media in the form of volatile memory, such as random access memory (RAM) 30 and / or cache memory 32. Device 12 may further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, storage system 34 may be used to read and write non-removable, non-volatile magnetic media ( Fig. 9 not shown, usually called a "hard drive"). Although Fig. 9 Not shown in the figure, a disk drive for reading and writing to a removable non-volatile disk (e.g., a "floppy disk"), and an optical disk drive for reading and writing to a removable non-volatile optical disk (e.g., a CD-ROM, a DVD-ROM, or other optical media) may be provided. In these cases, each drive may be connected to the bus 18 via one or more data medium interfaces. The memory 28 may include at least one program product having a set (e.g., at least one) of program modules that are configured to perform the functions of the various embodiments of the present invention.
[0174] A program / utility 40 having a set (at least one) of program modules 42 may be stored, for example, in the memory 28, such program modules 42 including, but not limited to, an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment. The program modules 42 generally perform the functions and / or methods of the embodiments described herein.
[0175] The device 12 may also communicate with one or more external devices 14 (e.g., a keyboard, a pointing device, a display 24, etc.), one or more devices that enable a user to interact with the device 12, and / or any device that enables the device 12 to communicate with one or more other computing devices (e.g., a network card, a modem, etc.). Such communication may be performed through an input / output (I / O) interface 22. Furthermore, the device 12 may also communicate with one or more networks (e.g., a local area network (LAN), a wide area network (WAN), and / or a public network, such as the Internet) through a network adapter 20. Fig. 9 As shown, the network adapter 20 communicates with other modules of the device 12 via the bus 18. It should be understood that, although not shown in the figure, other hardware and / or software modules can be used in conjunction with the device 12, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.
[0176] The processing unit 16 executes various functional applications and data processing by running programs stored in the system memory 28, such as implementing the method for measuring the position of a virtual ruler provided in an embodiment of the present invention.
[0177] Through the above-mentioned equipment, the problem of unreasonable position setting of the virtual ruler caused by the hole area on the wall is solved, thereby improving the accuracy of subsequent verticality measurement results.
[0178] Embodiment 6
[0179] Embodiment 6 of the present invention further provides a storage medium including computer executable instructions. When the computer executable instructions are executed by a computer processor, they are used to execute a method for measuring a position of a virtual ruler. The method includes:
[0180] Acquire point cloud data of the measured wall surface, and determine the properties of the measured wall surface based on the point cloud data of the measured wall surface;
[0181] Based on the properties of the measured wall surface, determining at least one target wall surface on the measured wall surface;
[0182] Based on the point cloud data of the target wall and the ruler placement rules, the measurement position of the virtual ruler on the target wall is determined.
[0183] The computer storage medium of the embodiment of the present invention can adopt any combination of one or more computer-readable media. The computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. The computer-readable storage medium can be, for example, but not limited to, a system, device or device of electricity, magnetism, light, electromagnetic, infrared, or semiconductor, or any combination of the above. More specific examples (non-exhaustive list) of computer-readable storage media include: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this document, a computer-readable storage medium can be any tangible medium containing or storing a program, which can be used by an instruction execution system, a device or a device or used in combination with it.
[0184] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, which carry computer-readable program code. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.
[0185] The program code embodied on the computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
[0186] Computer program code for performing the operation of the present invention may be written in one or more programming languages or combinations thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer through any type of network including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0187] Of course, the storage medium containing computer executable instructions provided in an embodiment of the present invention is not limited to the above method operations, and the computer executable instructions can also execute related operations in the virtual ruler measurement position method provided in any embodiment of the present invention.
[0188] Note that the above are only preferred embodiments of the present invention and the technical principles used. Those skilled in the art will understand that the present invention is not limited to the specific embodiments described herein, and that various obvious changes, readjustments and substitutions can be made by those skilled in the art without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in more detail through the above embodiments, the present invention is not limited to the above embodiments, and may include more other equivalent embodiments without departing from the concept of the present invention, and the scope of the present invention is determined by the scope of the appended claims.
Claims
1. A method for determining a measurement position of a virtual ruler, characterized in that: include: Acquire point cloud data of the measured wall surface, and determine whether the measured wall surface includes properties of the opening area based on the point cloud data of the measured wall surface; Based on the properties of the measured wall surface, determining at least one target wall surface that does not include a hole area on the measured wall surface; Based on the point cloud data of the target wall and the ruler placement rule, determining the placement quantity and measurement position of the virtual ruler on the target wall; Wherein, determining the placement quantity and measurement position of the virtual ruler on the target wall surface based on the point cloud data of the target wall surface and the ruler placement rule includes: Determining the size of the target wall based on the point cloud data of the target wall; Matching the size of the target wall with at least one preset size interval, and determining a ruler placement rule corresponding to the target wall based on the successfully matched preset size interval; wherein the preset size interval includes a preset height interval and / or a preset width interval; Determining a measurement position of the virtual ruler on the target wall surface according to a ruler placement rule corresponding to the target wall surface and point cloud data of the target wall surface; The step of matching the size of the target wall with at least one preset size interval, and determining a ruler placement rule corresponding to the target wall based on the successfully matched preset size interval, includes: If the height of the target wall belongs to a first preset height interval and / or the width of the target wall belongs to a first preset width interval, the number of virtual rulers placed corresponding to the target wall is zero; wherein the maximum value of the first preset height interval is less than the first height, and the maximum value of the first preset width interval is less than the first width; The step of matching the size of the target wall with at least one preset size interval, and determining a ruler placement rule corresponding to the target wall based on the successfully matched preset size interval, further includes: If the height of the target wall does not belong to the first preset height interval and the width of the target wall does not belong to the first preset width interval, the width of the target wall is matched with at least one second preset width interval, and the placement quantity and position coordinate function of the virtual ruler corresponding to the target wall are determined based on the successfully matched second preset width interval; wherein the second preset width intervals do not intersect each other; Wherein, determining the measurement position of the virtual ruler on the target wall surface according to the ruler placement rule corresponding to the target wall surface and the point cloud data of the target wall surface includes: Determine the width of the target wall and the boundary coordinates of any boundary along the vertical direction according to the point cloud data of the target wall; The measurement position of the center point of the virtual ruler on the target wall is determined based on the width of the target wall, the boundary coordinates and a position coordinate function in a ruler placement rule corresponding to the target wall.
2. The method according to claim 1, characterized in that The property of judging whether the measured wall surface includes the opening area based on the point cloud data of the measured wall surface is specifically: Determining whether the measured wall surface includes a hole area based on the point cloud data of the measured wall surface; The step of determining at least one target wall surface on the measured wall surface based on the property of the measured wall surface is specifically as follows: Based on the judgment result of the hole area, at least one target wall surface which does not include the hole area is determined on the measured wall surface.
3. The method according to claim 2, characterized in that The step of determining at least one target wall surface that does not include a hole area on the measured wall surface based on the judgment result of the hole area comprises: When the measured wall surface does not include a hole area, the measured wall surface is used as the target wall surface; When the measured wall surface includes an opening area, the measured wall surface is divided along a preset direction to obtain sub-wall surfaces that do not include the opening area, and each of the sub-wall surfaces is used as the target wall surface.
4. The method according to claim 2, characterized in that: After determining the placement quantity and measurement position of the virtual ruler on the target wall based on the point cloud data of the target wall and the ruler placement rule, the method further includes: If the measured wall surface includes an opening area, a virtual ruler adjacent to the opening area is used as a ruler to be calibrated, and it is determined whether the minimum horizontal boundary distance between the ruler to be calibrated and the opening boundary of the opening area is greater than a preset distance threshold; If yes, the measurement position of the ruler to be calibrated is corrected so that the minimum horizontal boundary distance is less than or equal to the preset distance threshold.
5. The method according to claim 2, characterized in that: The step of obtaining the point cloud data of the measured wall surface comprises: Collecting point cloud data of the measured wall, performing plane fitting based on the point cloud data to obtain a wall normal vector, and calculating an angle between the wall normal vector and the first coordinate axis; Rotating the point cloud data according to the angle so that the wall normal vector is perpendicular to the first coordinate axis; The rotated point cloud data is translated so that any boundary angle of the measured wall coincides with the origin of the coordinate system where the first coordinate axis is located, thereby obtaining adjusted point cloud data of the measured wall.
6. The method according to claim 2, characterized in that The determining whether the measured wall surface includes a hole area based on the point cloud data of the measured wall surface includes: Mapping the point cloud data of the measured wall surface into a two-dimensional image; Based on the pixel value of each pixel point of the two-dimensional image, determining a connected region image composed of pixel points corresponding to a preset pixel value; If the size of the connected region image is greater than a preset region size threshold, it is determined that the measured wall surface includes a hole region.
7. A device for determining the measurement position of a virtual ruler, characterized in that: include: A wall attribute determination module, used to obtain point cloud data of the measured wall, and determine whether the measured wall includes attributes of the opening area based on the point cloud data of the measured wall; A target wall surface determination module, configured to determine at least one target wall surface excluding a hole area on the measured wall surface based on the properties of the measured wall surface; A measurement position determination module, used to determine the placement quantity and measurement position of the virtual ruler on the target wall surface based on the point cloud data of the target wall surface and the ruler placement rule; Wherein, the measurement position determination module includes: A target wall size determination unit, configured to determine the size of the target wall based on point cloud data of the target wall; A ruler placement rule determination unit, used to match the size of the target wall with at least one preset size interval, and determine a ruler placement rule corresponding to the target wall based on the successfully matched preset size interval; wherein the preset size interval includes a preset height interval and / or a preset width interval; A measurement position determination unit, configured to determine a measurement position of the virtual ruler on the target wall surface according to a ruler placement rule corresponding to the target wall surface and point cloud data of the target wall surface; The ruler placement rule determination unit is specifically configured to, if the height of the target wall belongs to a first preset height interval and / or the width of the target wall belongs to a first preset width interval, then the number of virtual rulers placed corresponding to the target wall is zero; wherein the maximum value of the first preset height interval is less than the first height, and the maximum value of the first preset width interval is less than the first width; The ruler placement rule determination unit is further configured to match the width of the target wall with at least one second preset width interval if the height of the target wall does not belong to the first preset height interval and the width of the target wall does not belong to the first preset width interval, and determine the placement quantity and position coordinate function of the virtual ruler corresponding to the target wall based on the successfully matched second preset width interval; wherein the second preset width intervals do not intersect each other; Among them, the measurement position determination unit is specifically used to determine the width of the target wall and the boundary coordinates of any boundary along the vertical direction according to the point cloud data of the target wall; based on the width of the target wall, the boundary coordinates and the position coordinate function in the ruler placement rule corresponding to the target wall, determine the measurement position of the center point of the virtual ruler on the target wall.
8. A storage medium containing computer executable instructions, characterized in that: The computer executable instructions are used to perform the method for determining the measurement position of the virtual ruler as claimed in any one of claims 1 to 6 when executed by a computer processor.
Citation Information
Patent Citations
Three-dimensional virtual scene generation method and device
CN112396688A
Ground feature contour extraction method based on ground laser point cloud
CN112595258A
Wall corner family semantic dimension chain construction system and method
CN117664104A
Method and system for applying three-dimensional laser scanner to foundation pit deformation monitoring
CN118327062A