A method, apparatus, computer equipment, and storage medium for detecting straightness.

By acquiring target points in the point cloud, determining their edge topology, and calculating the minimum bounding boundary, the problem of low detection accuracy caused by straight line fitting is solved, and higher accuracy straightness detection is achieved.

CN115393381BActive Publication Date: 2026-01-30SHENZHEN LINGYUN VISION TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202211070909.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-09-01
Publication Date
2026-01-30
Estimated Expiration
2042-09-01

AI Technical Summary

Technical Problem

In existing technologies, the straightness detection accuracy determined by line fitting is low, resulting in inaccurate detection results.

Method used

By acquiring the point cloud of the object under test, the edge topology of the target points is determined, and the straightness is calculated based on the minimum enclosing boundary. Edge points and non-edge points are separated using preset judgment conditions, and the minimum enclosing boundary is used to improve the detection accuracy.

Benefits of technology

This improves the accuracy and robustness of straightness detection, reduces detection errors, and ensures the accuracy of detection results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115393381B_ABST
    Figure CN115393381B_ABST
Patent Text Reader

Abstract

This application relates to the field of visual image technology, specifically to a method, apparatus, computer device, and storage medium for straightness detection, which can, to some extent, solve the problem of low accuracy in straightness detection from point clouds. It involves acquiring a point cloud of an object to be measured and determining target points from the point cloud; determining the edge topology of the target points based on the target points and preset judgment conditions; further determining the minimum bounding boundary of the target points based on the edge topology; and further determining the straightness and straightness of the target points based on the minimum bounding boundary. This application determines the edge topology of the target points through preset judgment conditions, separating edge points from non-edge points, and achieves topological straightness of the target points through the minimum bounding boundary, thereby improving the accuracy of straightness detection.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of visual images, in particular to a straightness detection method and device, computer equipment and a storage medium. BACKGROUND

[0002] In the field of visual images, point clouds can be used to reflect the three-dimensional geometric shape of the visible surface of an object, and the coordinate values of each point in the point cloud represent the position of the point in the scene in space. In the processing of point clouds, the straightness of a part is determined by geometric and positional tolerances, and the straightness is a geometric tolerance that limits the variation of an actual straight line from an ideal straight line.

[0003] In related technologies, the straightness of a measured object is detected by obtaining the point cloud of the measured object, fitting a straight line based on the least squares method, determining the straight line corresponding to the point cloud, and then determining the straightness of the straight line.

[0004] However, the straightness determined by straight line fitting is an approximate value, resulting in low accuracy of the detected straightness. SUMMARY

[0005] To solve the technical problem of low accuracy of the detected straightness in point clouds, the present application provides a straightness detection method and device, computer equipment and a storage medium.

[0006] Embodiments of the present application are implemented as follows:

[0007] A first aspect of the embodiments of the present application provides a straightness detection method, including the following steps:

[0008] Obtaining the point cloud of a measured object and a target point in the point cloud;

[0009] Determining the edge topology relationship of the target point based on the target point and a preset determination condition;

[0010] Determining the minimum containing boundary of the target point based on the edge topology relationship;

[0011] Determining the straight line and the straightness of the target point based on the minimum containing boundary.

[0012] In combination with the first aspect, in a possible implementation manner, the edge topology relationship includes a target edge point and a topology edge, and determining the minimum containing boundary of the target point based on the edge topology relationship includes:

[0013] Determining the minimum distance topology edge and the minimum distance target edge point of the target point according to the edge topology relationship;

[0014] Determining the minimum containing boundary of the target point based on the minimum distance topology edge and the minimum distance target edge point.

[0015] With reference to the first aspect, in a possible implementation manner, the straight line and the straightness of the target point are determined based on the minimum containing boundary, and the determining comprises the following steps.

[0016] The distance between the minimum distance target edge point of the minimum containing boundary and the minimum distance topological edge of the minimum containing boundary is determined as an initial line.

[0017] The straight line and the straightness of the target point are determined based on the initial line.

[0018] With reference to the first aspect, in a possible implementation manner, the edge topological relationship of the target point is determined based on the target point and a preset determination condition, and the determining comprises the following steps.

[0019] An initial edge point of the target point is determined.

[0020] An Nth alternative edge point of the target point is determined based on the initial edge point and the preset determination condition, or an (N+1)th alternative edge point of the target point is determined based on the Nth alternative edge point and the preset determination condition.

[0021] A target edge point of the target point is determined based on the initial edge point and each Nth alternative edge point.

[0022] The edge topological relationship of the target point is determined based on the topological relationship of the target edge point.

[0023] With reference to the first aspect, in a possible implementation manner, when the target point is a projection point, the determination of the projection point in the point cloud comprises the following steps.

[0024] A projection point of an initial point in the point cloud is determined based on a preset projection direction.

[0025] The edge topological relationship of the target point is determined based on the target point and a preset determination condition, and the determining comprises the following steps.

[0026] The edge topological relationship of the projection point is determined based on the projection point and the preset determination condition, wherein the edge topological relationship comprises a target edge point and a topological edge.

[0027] With reference to the first aspect, in a possible implementation manner, the minimum containing boundary of the target point is determined based on the edge topological relationship, and the determining comprises the following steps.

[0028] The minimum distance topological edge and the minimum distance target edge point of the projection point are determined according to the edge topological relationship.

[0029] The minimum containing boundary of the projection point is determined based on the minimum distance topological edge and the minimum distance target edge point.

[0030] With reference to the first aspect, in a possible implementation manner, the straight line and the straightness of the target point are determined based on the minimum containing boundary, and the determining comprises the following steps.

[0031] a distance between the minimum distance target edge point of the minimum distance target edge and the minimum distance topology edge of the minimum containing boundary, to determine an initial line;

[0032] Based on the initial line, a straight line and straightness of the projection point are determined.

[0033] A second aspect of the embodiment of the application provides a straightness detection device, comprising an acquisition module, a construction module and an analysis module.

[0034] The acquisition module is configured to acquire a point cloud of a to-be-detected object and a target point in the point cloud.

[0035] The construction module is configured to determine an edge topology relationship of the target point based on the target point and a preset determination condition.

[0036] The analysis module is configured to determine a minimum containing boundary of the target point based on the edge topology relationship.

[0037] The analysis module is further configured to determine a straight line and straightness of the target point based on the minimum containing boundary.

[0038] A third aspect of the embodiment of the application provides a computer device, comprising a memory and a processor, the memory stores a computer program, and the processor implements the steps of the straightness detection method of the first aspect in the summary when executing the computer program.

[0039] A fourth aspect of the embodiment of the application provides a computer storage medium, the computer readable storage medium stores a computer program, and the computer program is executed by the processor to make the processor execute the steps of the straightness detection method of the first aspect in the summary.

[0040] The beneficial effects of the application are as follows: firstly, the point cloud of the to-be-detected object is acquired, and the target point is determined from the point cloud; the edge topology relationship of the target point is determined based on the target point and the preset determination condition; the minimum containing boundary of the target point is determined based on the edge topology relationship; and the straight line and straightness of the target point are determined based on the minimum containing boundary. The edge points and non-edge points of the target point are separated by determining the edge topology relationship of the target point based on the preset determination condition, and the straight line of the target point has a topology type by the minimum containing boundary, thereby improving the precision of the straightness detection. BRIEF DESCRIPTION OF DRAWINGS

[0041] In order to more clearly illustrate the technical solutions of the embodiments of the application or the prior art, the following will briefly introduce the drawings needed to be used in the embodiments or the prior art description. Obviously, the drawings in the following description are some embodiments of the application, and other drawings can also be obtained by those skilled in the art without any creative labor.

[0042] Figure 1 A flowchart of a straightness detection method is shown.

[0043] Figure 2 A flowchart of a straightness detection method is shown.

[0044] Figure 3 A flowchart of a straightness detection method is shown.

[0045] Figure 4 A flowchart of a straightness detection method is shown.

[0046] Figure 5 A flowchart of a straightness detection method is shown.

[0047] Figure 6 A flowchart of a straightness detection method is shown. DETAILED DESCRIPTION

[0048] In order to make the objectives, implementations and advantages of the present application clearer, the following will describe the exemplary embodiments of the present application with reference to the accompanying drawings. Obviously, the described exemplary embodiments are only a part of the embodiments of the present application, but not all embodiments of the present application.

[0049] It should be noted that the brief description of the terms in the present application is only for the convenience of understanding the following described embodiments, and is not intended to limit the embodiments of the present application. Unless otherwise specified, these terms should be understood according to their ordinary and general meanings.

[0050] The terms "first", "second", "third" and the like in the specification and claims of the present application and the above-described drawings are used to distinguish similar or similar objects or entities, and do not necessarily mean a specific order or sequence, unless otherwise specified. It should be understood that the terms used in this way can be interchanged under appropriate circumstances.

[0051] The terms "include" and "have" and any variations thereof are intended to cover but not exclusive inclusion, for example, a product or device including a series of components does not necessarily limit to all components clearly listed, but can include other components not clearly listed or inherent to these products or devices.

[0052] The visual image point cloud can be used to reflect the three-dimensional geometric shape of the visible surface of an object, and the coordinate values of each point in the point cloud represent the position of the point in the scene in space. In the processing of the point cloud, the detection of the part through the geometric tolerance is the basis for determining whether the measured object is qualified, and is also the measurement data for improving the precision of the measured object.

[0053] The geometric tolerance includes shape tolerance and position tolerance. Taking the processing of a part as an example, the processed part will have a size tolerance, so there is a difference between the actual shape or mutual position of the points, lines and surfaces constituting the geometric features of the part and the shape and mutual position specified by the ideal geometric body. This difference in shape is the shape tolerance, and the difference in mutual position is the position tolerance.

[0054] Among them, straightness is a shape tolerance that limits the variation of an actual straight line from an ideal straight line, which consists of four elements: shape, size, direction and position. In straightness, the shape refers to the containing shape being a straight line; the size refers to the tolerance value, i.e., the straightness in the present application, which is a numerical value; the direction and position refer to the direction and position of the “point cloud corresponding straight line” or “point straight line” mentioned in the present application. A straight line can be represented by “point + direction”, and the spatial coordinates of the point represent the position of the straight line.

[0055] Taking the processing of a part as an example, straightness indicates that the variation of the data along the straight line is within the qualified range, which can be used to measure the shape error of the point cloud, quantify the processing state of the part, and reduce the loss caused by the processing error of the part, such as the inability to assemble and the inability to use the part.

[0056] In some implementations, the detection of the straightness of the measured object usually obtains the point cloud of the measured object, determines the straight line corresponding to the point cloud based on the least square method straight line fitting, and then determines the straightness of the straight line. The straightness determined by the straight line fitting is an approximate value, which may cause overestimation error in the detection of the straightness, has low robustness, and greatly affects the accuracy of measurement and detection.

[0057] To solve the low precision of the straightness detected in the point cloud, the embodiments of the present application provide a straightness detection method and device, a computer device and a storage medium. First, the point cloud of the measured object is obtained, and a target point is determined from the point cloud. The edge topological relationship of the target point can be determined based on the target point and a preset determination condition. The minimum containing boundary of the target point can be determined based on the edge topological relationship. The straight line and the straightness of the target point can be determined based on the minimum containing boundary. The edge points and non-edge points of the target point are separated by determining the edge topological relationship of the target point based on the preset determination condition, and the straight line of the target point has a topological type by using the minimum containing boundary, which improves the precision of the straightness detection.

[0058] The straightness detection method, device, computer device and storage medium are described in detail below with reference to the accompanying drawings.

[0059] Figure 1 A flowchart of a straightness detection method provided by an embodiment of the present application is shown in FIG. 1. Figure 1 A straightness detection method is provided by an embodiment of the present application.

[0060] The straightness detection method comprises the following steps:

[0061] S110, obtaining a point cloud of a to-be-measured object and a target point in the point cloud.

[0062] The point cloud is a set of point data of the appearance surface of the to-be-measured object obtained by using a visual measurement instrument or other measurement equipment. The number of points in the point cloud can be determined by the measurement equipment used to obtain the point cloud, and can include sparse point clouds and dense point clouds. For example, the number of points obtained by using a three-dimensional coordinate measuring machine is relatively small, and the distance between points is also relatively large, which is referred to as a sparse point cloud. The point cloud obtained by using a three-dimensional laser scanner or a photographic scanner has a relatively large number of points and is relatively dense, which is referred to as a dense point cloud.

[0063] The target point is determined from the point data in the point cloud.

[0064] In some embodiments, the target point can be determined by projecting the three-dimensional point cloud onto a two-dimensional plane, in which case the target point represents all the projection points of the three-dimensional point cloud on the two-dimensional plane. Alternatively, the target point can be directly determined from the point data in the three-dimensional point cloud.

[0065] When the target point is all the projection points of the three-dimensional point cloud on the two-dimensional plane, the three-dimensional point cloud can be projected onto the two-dimensional plane according to a preset projection direction, which is not limited in the present application.

[0066] S120, determining the edge topology relationship of the target point based on the target point and a preset determination condition.

[0067] In this case, one of the edge points of the target point can be taken as a first edge point, and the first edge point can be taken as a current edge point. The next edge point connected to the current edge point can be determined by the preset determination condition, and the second edge point, the Nth edge point and the Mth edge point can be obtained in sequence. When the next edge point connected to the Mth edge point is determined to be the first edge point by the preset determination condition, the edge topology relationship of the target point can be determined by connecting the edge points in the above-mentioned order in sequence.

[0068] By determining the edge topology relationship of the target point, the disordered edge points can be made to have an order, and the target edge point in the edge points can be searched based on the edge topology relationship.

[0069] The edge topological relation includes an edge point zone topological relation, wherein the edge topological relation includes a target edge point and a topological edge.

[0070] Figure 2 A flowchart of determining a minimum containing boundary of a target point in a straightness detection method is shown, as shown in Figure 2 Based on the edge topological relation, a minimum containing boundary of the target point is determined, including the following steps:

[0071] S121, an initial edge point of the target point is determined.

[0072] The initial edge point can be determined by taking one of the edge points of the target point as a first edge point, and taking the first edge point as the initial edge point.

[0073] The initial edge point can be, but is not limited to, a point with the maximum X coordinate value, a point with the maximum Y coordinate value, a point with the minimum X coordinate value, or a point with the minimum Y coordinate value.

[0074] S122, based on the initial edge point and a preset judgment condition, an Nth alternative edge point of the target point is determined; or, based on the Nth alternative edge point and the preset judgment condition, an N+1th alternative edge point of the target point is determined.

[0075] The initial edge point determined in step 121 or the Nth alternative edge point determined in step 122 can be taken as a current edge point, and the N+1th alternative edge point is obtained through continuous updating and iteration of step 122.

[0076] The preset judgment condition can include at least one of the following:

[0077] A neighborhood relation of the current edge point, a spatial position of the current edge point, a slope of a connecting line between the current edge point and other points, and / or an evaluation function of an angle between the connecting line and a coordinate axis.

[0078] S123, based on the initial edge point and each Nth alternative edge point, a target edge point of the target point is determined.

[0079] The set of the determined initial edge point and each Nth alternative edge point is taken as the target edge point of the target point.

[0080] S124, based on a topological relation of the target edge point, an edge topological relation of the target point is determined.

[0081] The topological relation of each target edge point can be determined in the process of determining each target edge point, so the edge topological relation of the target point is determined based on the topological relation of the target edge point.

[0082] The process of steps 121 to 124 can be explained by the following examples. For example: points (0, 1), (0, 0.8), (1, 0), (0, -1), (-1, 0), (0, 0), starting from (1, 0), judging whether the point is an edge point by the evaluation function, eliminating non-boundary points (0, 0) with the same X coordinate, when traversing to point (0, 1) or (0, -1), eliminating non-boundary points (0, 0.8) with the same Y coordinate, and finally leaving (0, 1), (1, 0), (0, -1), (-1, 0). Starting from (0, 1), the slope of the line connecting with other points is calculated, and the points corresponding to the maximum / minimum slope are (1, 0) and (-1, 0), then (0, 1) is connected with (1, 0) and (-1, 0), and other points are connected in the same way, and finally the edge points with topological relationship are obtained as (0, 1)-(-1, 0)-(0, -1)-(1, 0)-(0, 1), and the symbol "-" represents that two points are connected.

[0083] As Figure 1 Further comprising: S130, determining the minimum containing boundary of the target point based on the edge topological relationship.

[0084] The edge topological relationship includes target edge points and topological edges, so that each topological edge and each target edge point is traversed to obtain a topological edge and a corresponding edge point that minimally contain the target point, as a minimum distance topological edge and a minimum distance target edge point; the minimum distance topological edge and the minimum distance target edge point minimally contain the target point, indicating the minimum containing boundary of the target point, and the straightness determination based on the minimum containing boundary of the target point is not affected by non-boundary points, improving the robustness of the straightness detection.

[0085] It should be understood that the minimum containing is that any point and any straight line can form a containing space, for example, point (0, 0), straight line A, the straight line can be represented by "point + direction", the point of A is (1, 0) and the direction is (0, 1), then the containing space formed is the space between straight line B and A, the point of straight line B is (0, 0) and the direction is the same as A. Containing means that the containing space contains all target points, and there are countless such containing spaces, and the minimum containing means that the distance between the straight lines A and B corresponding to the containing space is the minimum.

[0086] It should also be understood that the minimum distance target edge point is the point in the target edge point that satisfies the minimum containing, and the minimum distance topological edge is the edge in the topological edge that satisfies the minimum containing.

[0087] Any change of any point of the target point may cause the corresponding straight line of the target point to be different, resulting in different values of straightness, and the straightness detected by the minimum containing method based on the minimum distance target edge point and the minimum distance topological edge is only related to the minimum distance target edge point and the minimum distance topological edge.

[0088] In the application scenarios such as part processing and assembly, the minimum distance target edge point and the minimum distance topological edge can represent the maximum boundary position of the part surface, therefore, the straightness is determined based on the maximum boundary position of the part surface, and is not affected by the points other than the maximum boundary position, and the calculation result has robustness.

[0089] Figure 3 A flowchart of determining the minimum containment boundary of the target point in the straightness detection method provided by the embodiment of the application is shown in FIG. 1. Figure 3 As shown in FIG. 1, the minimum containment boundary of the target point is determined based on the edge topological relationship, including the following steps.

[0090] S131, the minimum distance topological edge and the minimum distance target edge point of the target point are determined according to the edge topological relationship.

[0091] The minimum distance target edge point is the point in the target edge point that satisfies the minimum containment, and the minimum distance topological edge is the edge in the topological edge that satisfies the minimum containment.

[0092] S132, the minimum containment boundary of the target point is determined based on the minimum distance topological edge and the minimum distance target edge point.

[0093] The detection of the minimum distance target edge point and the minimum distance topological edge is based on all edge points, which is equivalent to globally searching the minimum distance point and the minimum distance edge, so as to ensure that the obtained minimum containment distance is small enough to realize accurate calculation of the straightness.

[0094] As shown in FIG. 1, the method further includes S140, determining the straight line and the straightness of the target point based on the minimum containment boundary. Figure 1

[0095] The corresponding straight line of the target point is obtained according to the perpendicular bisector of the projection line segment (i.e., the initial line) formed by the minimum distance target edge point to the minimum distance topological edge; the minimum distance target edge point forms the projection line segment to the minimum distance topological edge, the perpendicular bisector of the line segment is taken as the corresponding straight line of the target point, and the maximum value and the minimum value of the distance from the target point to the corresponding straight line of the target point are determined as the straightness.

[0096] Figure 4 A flowchart of determining the straight line and the straightness of the target point in the straightness detection method provided by the embodiment of the application is shown in FIG. 2. Figure 4 As shown in FIG. 2, the straight line and the straightness of the target point are determined based on the minimum containment boundary, including the following steps.

[0097] S141, the distance from the minimum distance target edge point of the minimum containment boundary to the minimum distance topological edge of the minimum containment boundary determines the initial line.

[0098] ​The minimum distance target edge point to the projection line segment formed by the minimum distance topological edge is the initial line.

[0099] S142, determining a straight line of the target point and straightness based on the initial line.

[0100] First, the median of the initial line is determined.

[0101] Second, the median is used as the corresponding straight line of the target point, and the maximum and minimum values of the distance from the target point to the corresponding straight line of the target point are used to determine the straightness.

[0102] In some embodiments, the minimum distance target edge point to the minimum distance topological edge forms the initial line, the median of the initial line is used as the corresponding straight line of the target point, and the straightness is determined based on the difference between the maximum and minimum values of the distance from the target point to the corresponding straight line of the target point.

[0103] It should be noted that the above steps 110 to 140 are not only applicable to the detection of two-dimensional straightness, but also applicable to the detection of three-dimensional straightness.

[0104] The embodiments of the present application provide a straightness detection method, which obtains a point cloud of a measured object and determines a target point from the point cloud. The edge topological relationship of the target point is determined based on the target point and a preset determination condition. The minimum containing boundary of the target point is determined based on the edge topological relationship. The straight line of the target point and the straightness are determined based on the minimum containing boundary. The edge points and non-edge points of the target point are separated by determining the edge topological relationship of the target point based on the preset determination condition. The straight line of the target point has a topological type by using the minimum containing boundary, which improves the precision of straightness detection.

[0105] When applied to a two-dimensional straightness detection method, the above straightness detection method can be specifically applied to the following steps, Figure 5 The flowchart of another straightness detection method provided by the embodiments of the present application is shown in FIG. 2. Figure 5 The straightness detection method provided by the embodiments of the present application includes the following steps:

[0106] S210, obtaining a point cloud of a measured object.

[0107] The point cloud is obtained by using a visual measuring instrument or other measuring equipment to obtain a set of point data of the appearance surface of the measured object.

[0108] S220, determining a projection point of an initial point in the point cloud based on a preset projection direction.

[0109] The initial point in the three-dimensional point cloud is projected onto a two-dimensional plane according to the preset projection direction to determine the projection point. The preset projection direction is not limited in the embodiments of the present application.

[0110] For the preset projection direction can be any direction in three-dimensional space, as long as the point cloud is projected to the same two-dimensional plane, guarantee coplanar, that is, the straightness detection can be carried out subsequently. At the same time, the position of the projected two-dimensional plane is not limited, because as long as the projection is carried out along the same direction, the relative positions of the obtained projection points are unchanged, and the straightness to be detected is the same.

[0111] Any plane can be represented by a point + direction, where the point represents the position of the plane, and the direction represents the normal of the plane. For example, a space plane Plane is represented by a space point and a space direction, where the space point coordinates are (0, 0, 0), and the space direction is (0, 0, 1). A three-dimensional point cloud has three points, which are (1.1, 2.2, 3.3), (2, 3, 4), and (3.3, 4, 5). The projection points obtained by projecting the three-dimensional point cloud to the space plane Plane are (1.1, 2.2), (2, 3), and (3.3, 4).

[0112] S230, based on the projection point and the preset determination condition, determining the edge topology relationship of the projection point.

[0113] Starting from one of the edge points of the projection point as the first edge point, and taking the first edge point as the current edge point; determining the next edge point connected to the current edge point through the preset determination condition, and sequentially obtaining the second edge point, the Nth edge point; until the Mth edge point (M is greater than N), when the next edge point connected to the Mth edge point is determined to be the first edge point through the preset determination condition, the edge points can be sequentially connected in the order of determining the edge points as described above, and the edge topology relationship of the projection point is determined.

[0114] By determining the edge topology relationship of the projection point, the disordered edge points can be made to have order, and the target edge point in the edge points can be conveniently searched based on the edge topology relationship.

[0115] The edge topology relationship includes a target edge point and a topology edge. The determination of the edge topology relationship of the projection point includes determining an initial edge point of the projection point; determining an Nth alternative edge point of the projection point based on the initial edge point and the preset determination condition; or, determining an N+1th alternative edge point of the projection point based on the Nth alternative edge point and the preset determination condition; determining a target edge point of the projection point based on the initial edge point and each Nth alternative edge point; and determining the edge topology relationship of the projection point based on the topology relationship of the target edge point.

[0116] The first edge point can be obtained by starting from one of the edge points of the projection point as the first edge point, and taking the first edge point as the initial edge point. The initial edge point can be, but is not limited to, the point with the maximum X coordinate value, the point with the maximum Y coordinate value, the point with the minimum X coordinate value, or the point with the minimum Y coordinate value.

[0117] The initial edge point or the Nth alternative edge point is determined as a current edge point, and a next edge point of the projection point is determined by the current edge point and a preset determination condition.

[0118] The preset determination condition can include at least one of the following: neighborhood relationship of the current edge point, spatial position of the current edge point, slope of a connection line between the current edge point and other points, and / or evaluation function of an angle between the connection line and a coordinate axis.

[0119] S240, a minimum containing boundary of the projection point is determined based on the edge topology relationship.

[0120] The edge topology relationship includes target edge points and topology edges, so that each topology edge and each target edge point is traversed to obtain a minimum distance topology edge and a minimum distance target edge point corresponding to the topology edge containing the projection point, as the minimum distance topology edge and the minimum distance target edge point. The minimum distance topology edge and the minimum distance target edge point contain the projection point with the minimum distance, and represent the minimum containing boundary of the projection point. When the straightness is determined based on the minimum containing boundary of the projection point, the influence of non-boundary points is reduced, and the robustness of the straightness detection is improved.

[0121] The minimum distance topology edge and the minimum distance target edge point of the projection point are determined according to the edge topology relationship, and the minimum containing boundary of the projection point is determined based on the minimum distance topology edge and the minimum distance target edge point. The detection of the minimum distance target edge point and the minimum distance topology edge is based on all edge points, which is equivalent to globally searching for the minimum distance point and the minimum distance edge, so that the obtained minimum containing distance is small enough to realize accurate calculation of the straightness.

[0122] S250, a straight line and straightness of the projection point are determined based on the minimum containing boundary.

[0123] The minimum distance target edge point of the minimum containing boundary to the minimum distance topology edge of the minimum containing boundary determines an initial line, and the straight line and the straightness of the projection point are determined based on the initial line.

[0124] The minimum distance target edge point of the minimum containing boundary to the minimum distance topology edge of the minimum containing boundary determines an initial line, and the straight line and the straightness of the projection point are determined based on the initial line.

[0125] In some embodiments, the minimum distance target edge point to the minimum distance topology edge forms an initial line, the perpendicular bisector of the initial line is the corresponding straight line of the projection point, and the straightness is determined based on the difference between the maximum value and the minimum value of the distance from the projection point to the corresponding straight line of the projection point.

[0126] The embodiment of the present application provides a straightness detection method, acquires point cloud of a to-be-detected object, and determines a projection point from the point cloud; the edge topological relation of the projection point can be determined based on the projection point and a preset judgment condition; the minimum containing boundary of the projection point can be determined based on the edge topological relation; and the straight line and straightness of the projection point can be determined based on the minimum containing boundary. The edge point and non-edge point of the projection point are separated by determining the edge topological relation of the projection point based on the preset judgment condition, and the straight line of the projection point has a topological type by the minimum containing boundary, so that the precision of straightness detection is improved.

[0127] Figure 6 The structure diagram of the straightness detection device provided by the embodiment of the present application is shown in the figure, as shown in the figure, the straightness detection device 600 comprises an acquisition module 610, a construction module 620 and an analysis module 630. Wherein: Figure 6

[0128] The acquisition module is used for acquiring the point cloud of the to-be-detected object and a target point in the point cloud.

[0129] The construction module is used for determining the edge topological relation of the target point based on the target point and a preset judgment condition.

[0130] The analysis module is used for determining the minimum containing boundary of the target point based on the edge topological relation, and is also used for determining the straight line and straightness of the target point based on the minimum containing boundary.

[0131] In some embodiments, the analysis module comprises a boundary analysis unit, wherein the boundary analysis unit is used for determining the minimum distance topological edge and the minimum distance target edge point of the target point according to the edge topological relation, and determining the minimum containing boundary of the target point based on the minimum distance topological edge and the minimum distance target edge point.

[0132] In some embodiments, the analysis module comprises a straightness detection unit, wherein the straightness detection unit is used for determining an initial line according to the distance from the minimum distance target edge point of the minimum containing boundary to the minimum distance topological edge of the minimum containing boundary, and determining the straight line and straightness of the target point based on the initial line.

[0133] In some embodiments, the construction module is specifically used for determining an initial edge point of the target point, determining an Nth alternative edge point of the target point based on the initial edge point and the preset judgment condition, or determining an (N+1)th alternative edge point of the target point based on the Nth alternative edge point and the preset judgment condition, determining a target edge point of the target point based on the initial edge point and each Nth alternative edge point, and determining the edge topological relation of the target point based on the topological relation of the target edge point.

[0134] ​In some embodiments, when the target point is a projection point, the acquisition module is configured to determine, based on a preset projection direction, the projection point of the initial point in the point cloud.

[0135] The construction module is configured to determine, based on the projection point and a preset determination condition, an edge topological relationship of the projection point, wherein the edge topological relationship comprises a target edge point and a topological edge.

[0136] In some embodiments, the boundary analysis unit of the analysis module is configured to determine, according to the edge topological relationship, a minimum distance topological edge and a minimum distance target edge point of the projection point; and determine, based on the minimum distance topological edge and the minimum distance target edge point, a minimum containing boundary of the projection point.

[0137] In some embodiments, the straightness detection unit of the analysis module is configured to determine, based on a distance from the minimum distance target edge point of the minimum containing boundary to the minimum distance topological edge of the minimum containing boundary, an initial line; and determine, based on the initial line, a straight line and straightness of the projection point.

[0138] The implementation principle and technical effects of the straightness detection device provided in the embodiments of the present application are similar to those of the above method embodiments, and will not be repeated here.

[0139] The embodiments of the present application provide a straightness detection device, which comprises an acquisition module, a construction module and an analysis module; a point cloud of a to-be-detected object is acquired, and a projection point is determined from the point cloud; based on the projection point and a preset determination condition, an edge topological relationship of the projection point can be determined; based on the edge topological relationship, a minimum containing boundary of the projection point can be determined; based on the minimum containing boundary, a straight line and straightness of the projection point can be determined. The edge topological relationship of the projection point is determined by the preset determination condition, the edge points and non-edge points of the projection point are separated, and the straight line of the projection point has a topological type by the minimum containing boundary, thereby improving the precision of straightness detection.

[0140] The embodiments of the present application also provide a computer device, which comprises a memory and a processor, the memory stores a computer program, and the processor executes the computer program. The computer program is used to implement the above straightness detection method, and the implementation principle and technical effects are similar to those of the above method embodiments, and will not be repeated here.

[0141] The embodiments of the present application also provide a computer storage medium, which stores a computer program. The computer program is executed by a processor to implement the above straightness detection method, and the implementation principle and technical effects are similar to those of the above method embodiments, and will not be repeated here.

[0142] The following paragraphs will compare and list the Chinese terms involved in the specification of the present application and their corresponding English terms, so as to facilitate reading and understanding.

[0143] For the sake of explanation, the foregoing descriptions have been presented in terms of specific embodiments. However, it is to be appreciated that specific embodiments described herein are not intended to limit the scope of the present application, which is defined with reference to the following claims. Various modifications and changes can be made thereto by those skilled in the art which fall within the scope of the present application as defined by the following claims. The embodiments were chosen and described in order to explain the principles of the application and the practical application and to enable others skilled in the art to understand for implementing various embodiments and with various modifications as are suited to the particular use contemplated.

Claims

1. A method of detecting straightness, characterized by, The method comprises the following steps: acquiring a point cloud of a to-be-tested object and a target point in the point cloud; determining an edge topological relationship of the target point based on the target point and a preset determination condition, comprising: determining an initial edge point of the target point; determining an Nth alternative edge point of the target point based on the initial edge point and the preset determination condition, or determining an (N+1) th alternative edge point of the target point based on the Nth alternative edge point and the preset determination condition; determining a target edge point of the target point based on the initial edge point and each Nth alternative edge point; determining the edge topological relationship of the target point based on the topological relationship of the target edge point; when the target point is a projection point, the determination of the projection point in the point cloud comprises: determining a projection point of an initial point in the point cloud based on a preset projection direction; the determination of the edge topological relationship of the target point based on the target point and the preset determination condition comprises: determining an edge topological relationship of the projection point based on the projection point and the preset determination condition, wherein the edge topological relationship comprises a target edge point and a topological edge; the preset determination condition comprises at least one of the following: a neighborhood relationship of a current edge point, a spatial position of the current edge point, a slope of a connection line between the current edge point and other points, and / or an evaluation function of an angle between the connection line and a coordinate axis; determining a minimum containing boundary of the target point based on the edge topological relationship; determining a straight line and straightness of the target point based on the minimum containing boundary.

2. The straightness detection method according to claim 1, characterized by, the edge topological relationship comprises a target edge point and a topological edge, and the determination of the minimum containing boundary of the target point based on the edge topological relationship comprises: determining a minimum distance topological edge and a minimum distance target edge point of the target point according to the edge topological relationship; determining the minimum containing boundary of the target point based on the minimum distance topological edge and the minimum distance target edge point.

3. The straightness detection method according to claim 1 or 2, characterized by, the determination of the straight line and the straightness of the target point based on the minimum containing boundary comprises: a distance between the minimum distance target edge point of the minimum containing boundary and the minimum distance topological edge of the minimum containing boundary determines an initial line; determining the straight line and the straightness of the target point based on the initial line.

4. The straightness detection method according to claim 1, characterized by, the determination of the minimum containing boundary of the target point based on the edge topological relationship comprises: determining a minimum distance topological edge and a minimum distance target edge point of the projection point according to the edge topological relationship; determining the minimum containing boundary of the projection point based on the minimum distance topological edge and the minimum distance target edge point.

5. The straightness detection method according to claim 1 or 4, characterized by, the determination of the straight line and the straightness of the target point based on the minimum containing boundary comprises: a distance between the minimum distance target edge point of the minimum containing boundary and the minimum distance topological edge of the minimum containing boundary determines an initial line; determining the straight line and the straightness of the target point based on the initial line.

6. A straightness detecting device characterized by comprising: The method comprises the following steps: an acquiring module is configured to acquire a point cloud of a to-be-tested object and a target point in the point cloud; a constructing module is configured to determine an edge topological relationship of the target point based on the target point and a preset determination condition, comprising: determining an initial edge point of the target point; determine an Nth alternative edge point of the target point based on the initial edge point and the preset determination condition; or, determine an N+1th alternative edge point of the target point based on the Nth alternative edge point and the preset determination condition; determine a target edge point of the target point based on the initial edge point and each Nth alternative edge point; determine an edge topology of the target point based on a topology relationship of the target edge point; when the target point is a projection point, the determination of the projection point in the point cloud comprises: determine a projection point of an initial point in the point cloud based on a preset projection direction; the determination of the edge topology of the target point based on the target point and the preset determination condition comprises: determine an edge topology of the projection point based on the projection point and the preset determination condition, wherein the edge topology comprises a target edge point and a topology edge; the preset determination condition comprises at least one of the following: a neighborhood relationship of a current edge point, a spatial position of the current edge point, a slope of a connection line between the current edge point and other points, and / or, an evaluation function of an angle between the connection line and a coordinate axis; an analysis module is configured to determine a minimum containing boundary of the target point based on the edge topology; the analysis module is further configured to determine a straight line and straightness of the target point based on the minimum containing boundary. 7.A computer device, comprising a memory and a processor, wherein the memory stores a computer program, and the computer device is configured to perform the method according to any one of claims 1-6 when the computer program is executed by the processor. the processor executes the computer program to implement the steps of the straightness detection method in any one of claims 1 to 5.

8. A computer storage medium, characterized in that the computer storage medium stores the computer program, and the computer program is executed by the processor to make the processor execute the steps of the straightness detection method in any one of claims 1 to 5.

Citation Information

Patent Citations

  • Straightness estimation method and system based on minimum containing area

    CN114117315A