CN115393381A - Straightness detection method and device, computer equipment and storage medium - Google Patents

Straightness detection method and device, computer equipment and storage medium Download PDF

Info

Publication number
CN115393381A
CN115393381A CN202211070909.5A CN202211070909A CN115393381A CN 115393381 A CN115393381 A CN 115393381A CN 202211070909 A CN202211070909 A CN 202211070909A CN 115393381 A CN115393381 A CN 115393381A
Authority
CN
China
Prior art keywords
point
edge
target
determining
minimum
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211070909.5A
Other languages
Chinese (zh)
Inventor
罗瑞荣
彭斌
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Lingyun Shixun Technology Co ltd
Original Assignee
Shenzhen Lingyun Shixun Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Lingyun Shixun Technology Co ltd filed Critical Shenzhen Lingyun Shixun Technology Co ltd
Priority to CN202211070909.5A priority Critical patent/CN115393381A/en
Publication of CN115393381A publication Critical patent/CN115393381A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/13Edge detection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/60Analysis of geometric attributes

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Geometry (AREA)
  • Image Analysis (AREA)

Abstract

The application relates to the technical field of visual images, in particular to a straightness detection method, a straightness detection device, computer equipment and a storage medium, which can solve the problem of low straightness accuracy in point cloud detection to a certain extent. Acquiring point cloud of an object to be detected, and determining a target point from the point cloud; determining an edge topological relation of the target point based on the target point and a preset judgment condition; the determination of the minimum containing boundary of the target point can be realized based on the edge topological relation; further based on the minimum containment boundary, the straight line and straightness of the target point may be determined. The method and the device determine the edge topological relation of the target point through the preset determination condition, separate the edge point and the non-edge point of the target point, realize that the straight line of the target point has a topological type through the minimum contained boundary, and improve the accuracy of straightness detection.

Description

Straightness detection method and device, computer equipment and storage medium
Technical Field
The 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
In the field of visual images, point clouds can be used to reflect the three-dimensional geometry of the visible surface of an object, with the coordinate values of the points in the point cloud representing the positions of the points in the scene in space. In the point cloud processing, the qualification of the parts is judged through form and position tolerance, wherein the straightness is one form tolerance which limits the variation of an actual straight line to an ideal straight line.
In the related art, detecting the straightness of the object to be detected generally obtains a point cloud of the object to be detected, determines a straight line corresponding to the point cloud based on least square straight line fitting, and then determines the straightness of the straight line.
However, the straightness determined by the straight line fitting is an approximate value, resulting in low accuracy of the detected straightness.
Disclosure of Invention
In order to solve the technical problem that the straightness accuracy detected in the point cloud is low, the application provides a straightness detection method and device, a computer device and a storage medium.
The embodiment of the application is realized as follows:
a first aspect of an embodiment of the present application provides a method for detecting straightness, including the following steps:
acquiring a point cloud of an object to be detected and a target point in the point cloud;
determining an edge topological relation of the target point based on the target point and a preset judgment condition;
determining a minimum containing boundary of a target point based on the edge topological relation;
and determining the straight line and the straightness of the target point based on the minimum containing boundary.
With reference to the first aspect, in a possible implementation manner, the determining a minimum containment boundary of the target point based on the edge topological relation includes:
determining a minimum distance topologic edge and a minimum distance target edge point of a target point according to the edge topological relation;
and determining a minimum containing boundary of the target point based on the minimum distance topology edge and the minimum distance target edge point.
With reference to the first aspect, in a possible implementation manner, determining a straight line and a straightness of the target point based on the minimum containment boundary includes:
determining an initial line according to the distance from the minimum distance target edge point of the minimum containing boundary to the minimum distance topology edge of the minimum containing boundary;
based on the initial line, a straight line and straightness of the target point are determined.
With reference to the first aspect, in a possible implementation manner, determining an edge topological relation of a target point based on the target point and a preset determination condition includes:
determining initial edge points of the target point;
determining an Nth alternative edge point of the target point based on the initial edge point and a preset judgment condition; or determining the (N + 1) th alternative edge point of the target point based on the (N) th alternative edge point and a preset judgment condition;
determining target edge points of the target point based on the initial edge points and the N-th alternative edge points;
and determining the edge topological relation of the target point based on the topological relation of the target edge point.
With reference to the first aspect, in a possible implementation manner, when the target point is a projection point, the determining of the projection point in the point cloud includes:
determining a projection point of an initial point in the point cloud based on a preset projection direction;
determining an edge topological relation of the target point based on the target point and a preset judgment condition, wherein the step of determining the edge topological relation of the target point comprises the following steps:
and determining an edge topological relation of the projection points based on the projection points and preset judgment conditions, wherein the edge topological relation comprises target edge points and topological edges.
With reference to the first aspect, in a possible implementation manner, determining a minimum containment boundary of a target point based on an edge topological relation includes:
determining a minimum distance topologic edge of the projection point and a minimum distance target edge point according to the edge topological relation;
and determining the minimum containing boundary of the projection point based on the minimum distance topologic edge and the minimum distance target edge point.
With reference to the first aspect, in a possible implementation manner, determining a straight line and a straightness of the target point based on the minimum containment boundary includes:
determining an initial line according to the distance from the minimum distance target edge point of the minimum containing boundary to the minimum distance topology edge of the minimum containing boundary;
based on the initial line, the straight line and straightness of the projected point are determined.
A second aspect of the embodiments of the present application provides a straightness detection apparatus, including an obtaining module, a constructing module, and an analyzing module;
the acquisition module is used for acquiring the point cloud of the object to be detected and a target point in the point cloud;
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;
the analysis module is used for determining the minimum containing boundary of the target point based on the edge topological relation;
and the analysis module is also used for determining the straight line and the straightness of the target point based on the minimum containing boundary.
A third aspect of the embodiments of the present application provides a computer device, including a memory and a processor, where the memory stores a computer program, and the processor implements the steps of the straightness detection method according to the first aspect in the summary of the invention when executing the computer program.
A fourth aspect of embodiments of the present application provides a computer storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the processor is caused to execute the steps of the method for detecting straightness accuracy of the first aspect in the disclosure.
The beneficial effects of the application are that; firstly, acquiring a point cloud of an object to be detected, and determining a target point from the point cloud; determining an edge topological relation of the target point based on the target point and a preset judgment condition; the determination of the minimum containing boundary of the target point can be realized based on the edge topological relation; further based on the minimum containment boundary, a straight line and straightness of the target point may be determined. The method and the device determine the edge topological relation of the target point through the preset determination condition, separate the edge point and the non-edge point of the target point, realize that the straight line of the target point has a topological type through the minimum contained boundary, and improve the accuracy of straightness detection.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings used in the embodiments or the description of the prior art will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present application, and those skilled in the art can obtain other drawings without inventive labor.
Fig. 1 is a schematic flow chart illustrating a method for detecting straightness according to an embodiment of the present application;
fig. 2 is a schematic flowchart illustrating a process of determining a minimum containment boundary of a target point in a straightness detection method provided by an embodiment of the present application;
fig. 3 is a schematic flowchart illustrating a process of determining a minimum containment boundary of a target point in a straightness detection method provided by an embodiment of the present application;
fig. 4 is a schematic flowchart illustrating a process of determining a straight line and a straightness of a target point in a straightness detection method provided in an embodiment of the present application;
FIG. 5 is a flow chart illustrating a further method for detecting straightness according to an embodiment of the present application;
fig. 6 shows a schematic structural diagram of a straightness detection apparatus provided in an embodiment of the present application.
Detailed Description
To make the objects, embodiments and advantages of the present application clearer, the following description of exemplary embodiments of the present application will clearly and completely describe the exemplary embodiments of the present application with reference to the accompanying drawings in the exemplary embodiments of the present application, and it is to be understood that the described exemplary embodiments are only a part of the embodiments of the present application, and not all of the embodiments.
It should be noted that the brief descriptions of the terms in the present application are only for the convenience of understanding the embodiments described below, and are not intended to limit the embodiments of the present application. These terms should be understood in their ordinary and customary meaning unless otherwise indicated.
The terms "first," "second," "third," and the like in the description and claims of this application and in the above-described drawings are used for distinguishing between similar or analogous objects or entities and not necessarily for describing a particular sequential or chronological order, unless otherwise indicated. It is to be understood that the terms so used are interchangeable under appropriate circumstances.
The terms "comprises" and "comprising," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a product or apparatus that comprises a list of elements is not necessarily limited to all elements expressly listed, but may include other elements not expressly listed or inherent to such product or apparatus.
The visual image point cloud can be used for reflecting the three-dimensional geometrical shape of the visible surface of an object, and the coordinate values of all points in the point cloud represent the positions of the points in a scene in space. In the point cloud processing, the parts are detected through form and position tolerance, which is a basis for judging whether the object to be detected is qualified or not and is measurement data for improving the precision of the object to be detected.
Form and position tolerances include both shape and position tolerances, and in the case of part machining applications, the machined part will have dimensional tolerances such that the actual shape or mutual position of the points, lines, faces that make up the geometric features of the part will differ from the shape and mutual position specified for the ideal geometry, with such shape differences being form tolerances and with such mutual position differences being position tolerances.
The straightness is a shape tolerance for limiting the variation of an actual straight line to an ideal straight line, and consists of four elements of shape, size, direction and position. In straightness, shape means that the containment shape is a straight line; the size refers to the tolerance value, namely the straightness, which is a numerical value; the direction and the position refer to the direction and the position of a "point cloud corresponding straight line" or a "point straight line" and the like mentioned in the application, the straight line can be represented by a "point + direction", and the corresponding spatial coordinates represent the position of the straight line.
Taking part processing application as an example, the straightness representing data has a variation degree along a straight line within a qualified range, and can be used for measuring the shape error of point cloud, quantifying the processing state of parts, and reducing the loss of assembly failure, part failure and the like caused by part processing errors.
In some implementations, detecting the straightness of the object to be measured generally obtains a point cloud of the object to be measured, determines a straight line corresponding to the point cloud based on least square linear fitting, and then determines the straightness of the straight line. The straightness determined by the straight line fitting is an approximate value, so that the detected straightness has the possibility of too high estimation error, the robustness is low, and the measurement and detection accuracy is greatly influenced.
In order to solve the problem that the straightness accuracy detected in the point cloud is low, the embodiment of the application provides a straightness detection method, a straightness detection device, computer equipment and a storage medium, and the straightness detection method comprises the steps of firstly, acquiring the point cloud of an object to be detected, and determining a target point from the point cloud; determining an edge topological relation of the target point based on the target point and a preset judgment condition; the determination of the minimum containing boundary of the target point can be realized based on the edge topological relation; further based on the minimum containment boundary, the straight line and straightness of the target point may be determined. The method and the device determine the edge topological relation of the target point through the preset determination conditions, separate the edge point and the non-edge point of the target point, realize that the straight line of the target point has a topological type through the minimum contained boundary, and improve the accuracy of straightness detection.
The method, the apparatus, the computer device, and the storage medium for detecting linearity according to the embodiments of the present application will be described in detail below with reference to the accompanying drawings.
Fig. 1 shows a schematic flow chart of a method for detecting straightness according to an embodiment of the present application, and as shown in fig. 1, the embodiment of the present application provides a method for detecting straightness.
The straightness detection method comprises the following steps:
and S110, acquiring the point cloud of the object to be detected and a target point in the point cloud.
A collection of point data of the appearance surface of the object to be measured, that is, a point cloud, is obtained by using a measuring apparatus such as a visual measuring instrument. The number of points in the point cloud can be determined by measuring equipment for acquiring the point cloud, and the point cloud can comprise sparse point cloud and dense electric cloud, for example, the number of points obtained by using a three-dimensional coordinate measuring machine is small, and the distance between the points is large, so that the point cloud is called sparse point cloud; the point clouds obtained by using the three-dimensional laser scanner or the photographic scanner have a large and dense number, and are called dense point clouds.
The target point is determined from the point data in the point cloud.
In some embodiments, the target point may be determined by projecting the three-dimensional point cloud onto a two-dimensional plane, where the target point represents all projected points of the three-dimensional point cloud on the two-dimensional plane; the point data in the direct three-dimensional point cloud can also be determined as the target point.
Wherein, the target point is when three-dimensional point cloud is at all projection points of two-dimensional plane, can be according to predetermineeing projection direction with three-dimensional point cloud projection to two-dimensional plane, this application embodiment does not restrict predetermineeing projection direction.
And S120, determining the edge topological relation of the target point based on the target point and a preset judgment condition.
Starting from one of the edge points of the target points, the target points can be used as first edge points, and the first edge points can be used as current edge points; judging the next edge point connected with the current edge point according to preset judging conditions to obtain a second edge point and an Nth edge point in sequence; until the M-th edge point (M is greater than N), when the M-th edge point determines that the next edge point connected is the first edge point according to the preset determination condition, the edge points may be connected in sequence according to the order of determining the edge points, so as to determine the edge topology relationship of the target point.
By determining the edge topological relation of the target points, the unordered edge points can be ordered, and the subsequent searching of the target edge points in the edge points can be facilitated based on the edge topological relation.
The edge topological relation comprises an edge point zone topological relation, wherein the edge topological relation comprises a target edge point and a topology edge.
Fig. 2 shows a schematic flow chart of determining a minimum containment boundary of a target point in a straightness detection method provided by the embodiment of the present application, and as shown in fig. 2, the determining a minimum containment boundary of a target point based on an edge topological relation includes the following steps:
and S121, determining an initial edge point of the target point.
The first edge point may be defined by starting from one of the edge points of the target point as the first edge point, and defining the first edge point as the initial edge point.
The initial edge point may be, but is not limited to, a point having the largest X-coordinate value, a point having the largest Y-coordinate value, a point having the smallest X-coordinate value, and a point having the smallest Y-coordinate value.
S122, determining an Nth alternative edge point of the target point based on the initial edge point and a preset judgment condition; or, determining the (N + 1) th candidate edge point of the target point based on the (N) th candidate edge point and a preset judgment condition.
For both the initial edge point determined in step 121 and the nth candidate edge point determined in step 122, the initial edge point and the nth candidate edge point may be used as the current edge point, and the nth +1 candidate edge point is obtained through continuous update iteration in step 122.
The preset determination condition may include at least one of the following:
the neighborhood relationship of the current edge point, the spatial position of the current edge point, the slope of the connecting line of the current edge point and other points, and/or the evaluation function of the included angle between the connecting line and the coordinate axis.
And S123, determining target edge points of the target points based on the initial edge points and the N-th alternative edge points.
And taking the set of the determined initial edge points and the N-th candidate edge points as the target edge points of the target point.
And S124, determining the edge topological relation of the target point based on the topological relation of the target edge point.
The topological relation of each target edge point can be determined in the process of determining each target edge point, so that the edge topological relation of the target point is determined based on the topological relation of the target edge points.
The process of steps 121 to 124 can be explained by the following example. For example: the points (0,1), (0,0.8), (1,0), (0, -1), (-1,0), (0,0) are traversed from (1,0), the evaluation function of whether the point is an edge point is determined, the non-boundary point (0,0) with the same X coordinate is rejected, and when the point is traversed to the point (0,1) or (0, -1), the non-boundary point (0,0.8) with the same Y coordinate is rejected, and finally (0,1), (1,0), (0, -1) and (-1,0) remain. Starting from (0,1), the slopes of the connecting lines with the other points are calculated, the connecting line with the maximum/minimum slope corresponds to (1,0) (-1,0), then (0,1) is connected to (1,0), (-1,0), the other points are connected similarly, and the finally obtained edge point with topological relation is (0,1) - (-1,0) - (0, -1) - (1,0) - (0,1), and the sign "-" indicates that the two points are connected.
As shown in fig. 1, the method further comprises: s130, determining the minimum containing boundary of the target point based on the edge topological relation.
The edge topological relation comprises target edge points and topological edges, so that each topology edge and each target edge point are traversed to obtain a topology edge and a corresponding edge point which minimum contain a target point as a minimum distance topology edge and a minimum distance target edge point; the minimum distance extending edge and the minimum distance target edge point contain the target point by the minimum distance, the minimum containing boundary of the target point is represented, when the linearity is determined based on the minimum containing boundary of the target point, the linearity is not affected by non-boundary points, and the robustness of linearity detection is improved.
It should be understood that the minimum inclusion is any point and any straight line can form a segment of the inclusion space, such as the point (0,0), the straight line a, which can be expressed by the "point + direction", the point of a is (1,0), the direction is (0,1), and the included inclusion space is the space between the straight lines B and a, and the point of the straight line B is (0,0), the direction is the same as a. The minimum accommodation means that the distance of a straight line A, B corresponding to the accommodation space is the minimum.
It should also be understood that the minimum distance target edge points are those of the target edge points that satisfy the minimum inclusion, and the minimum distance topology edge is the edge of the topology that satisfies the minimum inclusion.
Any point change of the target point may cause that the straight lines corresponding to the target point are different, so that the values of the straightness are different, and the straightness detected by the minimum containment method based on the minimum distance target edge point and the minimum distance topographie is only related to the minimum distance target edge point and the minimum distance topographie.
In application scenes such as part processing, assembly and the like, the minimum distance target edge point and the minimum distance topological edge can represent the maximum boundary position of the surface of the part, so that the straightness is determined based on the maximum boundary position of the surface of the part, the maximum boundary position is not influenced by points except the maximum boundary position, and the calculation result has robustness.
Fig. 3 shows a schematic flowchart of determining a minimum containment boundary of a target point in a straightness detection method provided by an embodiment of the present application, and as shown in fig. 3, the determining a minimum containment boundary of a target point based on an edge topological relation includes the following steps:
s131, determining a minimum distance topologic edge and a minimum distance target edge point of the target point according to the edge topological relation.
The minimum distance target edge point is a point which satisfies the minimum inclusion in the target edge points, and the minimum distance topology edge is an edge which satisfies the minimum inclusion in the topology edge.
S132, determining the minimum containing boundary of the target point based on the minimum distance topologic edge and the minimum distance target edge point.
The detection of the minimum distance target edge point and the minimum distance topology edge is carried out based on all edge points, which is equivalent to global search of the minimum distance point and the minimum distance edge, so that the minimum contained distance is ensured to be small enough, and the accurate calculation of the straightness is realized.
As shown in fig. 1, the method further includes: and S140, determining the straight line and the straightness of the target point based on the minimum containing boundary.
The corresponding straight line of the target point is obtained according to the perpendicular bisector of a projection line segment (namely an initial line) formed by the minimum distance target edge point and the minimum distance topological edge; and forming a projection line segment from the minimum distance target edge point to the minimum distance topological side, taking the perpendicular bisector of the line segment as a corresponding straight line of the target point, and determining the straightness according to the maximum value and the minimum value of the distance from the target point to the corresponding straight line of the target point.
Fig. 4 shows a schematic flow chart of determining a straight line and a straightness of a target point in a straightness detection method provided by an embodiment of the present application, and as shown in fig. 4, the determining a straight line and a straightness of a target point based on a minimum containment boundary includes the following steps:
s141, determining the distance from the minimum distance target edge point of the minimum containing boundary to the minimum distance topology edge of the minimum containing boundary, and determining an initial line.
And the projection line segment formed by the minimum distance target edge point and the minimum distance topological edge is the initial line.
And S142, determining the straight line and the straightness of the target point based on the initial line.
First, the perpendicular bisector of the initial line is determined.
And secondly, determining the straightness by taking the perpendicular bisector as a 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.
In some embodiments, the minimum distance target edge point to the minimum distance topological edge forms an initial line, a perpendicular bisector of the initial line is taken as a corresponding straight line of the target point, and the straightness is determined based on a difference between a maximum value and a minimum value of the distance from the target point to the corresponding straight line of the target point.
The steps 110 to 140 are applicable to the detection of not only the two-dimensional linearity but also the three-dimensional linearity.
The embodiment of the application provides a straightness detection method, which comprises the steps of obtaining point clouds of an object to be detected and determining a target point from the point clouds; determining an edge topological relation of the target point based on the target point and a preset judgment condition; the determination of the minimum containing boundary of the target point can be realized based on the edge topological relation; further based on the minimum containment boundary, a straight line and straightness of the target point may be determined. The method and the device determine the edge topological relation of the target point through the preset determination condition, separate the edge point and the non-edge point of the target point, realize that the straight line of the target point has a topological type through the minimum contained boundary, and improve the accuracy of straightness detection.
When the method is applied to a method for detecting two-dimensional linearity, the method for detecting two-dimensional linearity may be specifically applied to the following steps, fig. 5 shows a schematic flow chart of another method for detecting linearity provided in the embodiment of the present application, and as shown in fig. 5, the embodiment of the present application provides a method for detecting linearity, which includes the following steps:
s210, point cloud of the object to be detected is obtained.
A collection of point data of the appearance surface of the object to be measured, that is, a point cloud, is obtained by using a measuring apparatus such as a visual measuring instrument.
S220, determining a projection point of an initial point in the point cloud based on a preset projection direction.
The initial point in the three-dimensional point cloud is projected to the two-dimensional plane according to the preset projection direction, and the projection point is determined.
For any direction in a three-dimensional space in the preset projection direction, subsequent straightness detection can be carried out as long as point cloud is projected to the same two-dimensional plane and coplanarity is guaranteed. Meanwhile, the position of the projected two-dimensional plane is not limited, and the relative positions of all the obtained projection points are unchanged and the detected straightness is the same as long as the projection is carried out along the same direction.
An arbitrary plane can be represented by a point + direction, the point representing the position of the plane and the direction representing the normal to the plane. For example, a spatial Plane is represented using spatial points and spatial directions, where the spatial point coordinates are (0,0,0) and the spatial directions are (0,0,1). The three-dimensional point cloud has 3 points, namely (1.1,2.2,3.3), (2,3,4) and (3.3,4,5), and the projection points obtained by projecting the three-dimensional point cloud on the Plane in space are three points (1.1,2.2), (2,3) and (3.3,4).
And S230, determining the edge topological relation of the projection points based on the projection points and preset judgment conditions.
Starting from one of the edge points of the projection points, taking the edge point as a first edge point, and taking the first edge point as a current edge point; judging the next edge point connected with the current edge point according to preset judging conditions to obtain a second edge point and an Nth edge point in sequence; until the mth edge point (M is greater than N), when the mth edge point determines that the next connected edge point is the first edge point through the preset determination condition, the edge points may be sequentially connected according to the order of determining the edge points, so as to determine the edge topology relationship of the projection point.
By determining the edge topological relation of the projection points, the unordered edge points can be ordered, and the subsequent searching of the target edge points in the edge points can be facilitated based on the edge topological relation.
The edge topological relation comprises a target edge point and a topological edge. Determining the edge topological relation of the projection points, including determining the initial edge points of the projection points; determining an Nth alternative edge point of the projection point based on the initial edge point and a preset judgment condition; or determining the (N + 1) th alternative edge point of the projection point based on the (N) th alternative edge point and a preset judgment condition; determining target edge points of the projection points based on the initial edge points and the Nth alternative edge points; and determining the edge topological relation of the projection points based on the topological relation of the target edge points.
Wherein, the first edge point can be used as the first edge point by starting from one of the edge points of the projection point, and the first edge point can be used as the initial edge point. The point for the initial edge may be, but is not limited to, the point with the largest X coordinate value, the point with the largest Y coordinate value, the point with the smallest X coordinate value, and the point with the smallest Y coordinate value.
Whether the initial edge point or the Nth candidate edge point is determined, the initial edge point or the Nth candidate edge point can be used as the current edge point, and the next edge point of the projection point is determined according to the current edge point and the preset judgment condition.
The preset determination condition may include at least one of the following: the neighborhood relation of the current edge point, the spatial position of the current edge point, the slope of the connecting line of the current edge point and other points, and/or an evaluation function of the included angle between the connecting line and the coordinate axis.
S240, determining the minimum containing boundary of the projection point based on the edge topological relation.
The edge topological relation comprises target edge points and topological edges, so that each topological edge and each target edge point are traversed, and a topological edge and a corresponding edge point which contain the minimum projection point are obtained and are used as the minimum distance topological edge and the minimum distance target edge point; the minimum distance topology edge and the minimum distance target edge point contain the projection point by the minimum distance to represent the minimum containing boundary of the projection point, and when the linearity is determined based on the minimum containing boundary of the projection point, the linearity detection method is not influenced by non-boundary points, and the robustness of the linearity detection is improved.
Determining a minimum distance topology edge and a minimum distance target edge point of the projection point according to the edge topological relation; and determining the minimum containing boundary of the projection point based on the minimum distance topologic edge and the minimum distance target edge point. The detection of the minimum distance target edge point and the minimum distance topology edge is carried out based on all edge points, which is equivalent to global search of the minimum distance point and the minimum distance edge, so that the minimum contained distance is ensured to be small enough, and the accurate calculation of the straightness is realized.
And S250, determining the straight line and the straightness of the projection point based on the minimum containing boundary.
Determining an initial line according to the distance from the minimum distance target edge point of the minimum containing boundary to the minimum distance topology edge of the minimum containing boundary; based on the initial line, the straight line and straightness of the projected point are determined.
Wherein, based on the initial line, determining the straight line and the straightness of the projection point comprises: determining a perpendicular bisector of the initial line; and the perpendicular bisector is used as a corresponding straight line of the projection point, and the straightness is determined according to the maximum value and the minimum value of the distance from the projection point to the corresponding straight line of the projection point.
In some embodiments, the minimum distance target edge point to the minimum distance topological edge forms an initial line, a perpendicular bisector of the initial line is taken as a corresponding straight line of the projected point, and the straightness is determined based on a difference between a maximum value and a minimum value of distances from the projected point to the corresponding straight line of the projected point.
The embodiment of the application provides a straightness detection method, which comprises the steps of obtaining point clouds of an object to be detected and determining projection points from the point clouds; determining an edge topological relation of the projection points based on the projection points and a preset judgment condition; the determination of the minimum containing boundary of the projection point can be realized based on the edge topological relation; further based on the minimum containment boundary, the straight line and straightness of the projected points can be determined. The method and the device determine the edge topological relation of the projection points through the preset judgment conditions, separate the edge points and the non-edge points of the projection points, realize that the straight lines of the projection points have topological types through the minimum contained boundary, and improve the accuracy of straightness detection.
Fig. 6 shows a schematic structural diagram of a straightness detection apparatus provided in an embodiment of the present application, and as shown in fig. 6, the straightness detection apparatus 600 includes an obtaining module 610, a constructing module 620, and an analyzing module 630. Wherein:
and the acquisition module is used for acquiring the point cloud of the object to be detected and a target point in the point cloud.
And 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.
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 to determine the straight line and straightness of the target point based on the minimum containment boundary.
In some embodiments, the analysis module includes a boundary analysis unit, wherein the boundary analysis unit is configured to determine a minimum distance topologic edge and a 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 topologic edge and the minimum distance target edge point.
In some embodiments, the analysis module comprises a straightness detection unit, wherein the straightness detection unit is configured to determine the initial line by a distance from a minimum distance target edge point of the minimum containment boundary to a minimum distance topological edge of the minimum containment boundary; based on the initial line, a straight line and straightness of the target point are determined.
In some embodiments, the construction module is specifically further configured to determine 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 a preset judgment condition; or determining the (N + 1) th alternative edge point of the target point based on the (N) th alternative edge point and a preset judgment condition; determining target edge points of the target point based on the initial edge points and the N-th alternative edge points; and determining the edge topological relation of the target point based on the topological relation of the target edge point.
In some embodiments, when the target point is a projection point, the obtaining module is configured to determine a projection point of the initial point in the point cloud based on a preset projection direction.
The construction module is used for determining an edge topological relation of the projection points based on the projection points and preset judgment conditions, wherein the edge topological relation comprises target edge points and topology edges.
In some embodiments, the boundary analysis unit of the analysis module is configured to determine a minimum distance topologic edge of the projection point and a minimum distance target edge point according to the edge topological relation; and determining the minimum containing boundary of the projection point based on the minimum distance topologic edge and the minimum distance target edge point.
In some embodiments, the straightness detection unit of the analysis module is configured to determine an initial line based on a distance from a minimum distance target edge point of the minimum containment boundary to a minimum distance topology edge of the minimum containment boundary; based on the initial line, the straight line and straightness of the projected points are determined.
The implementation principle and technical effect of the straightness detection device provided by the embodiment of the present application are similar to those of the method embodiments described above, and are not described herein again.
The embodiment of the application provides a straightness detection device, which comprises an acquisition module, a construction module and an analysis module; acquiring point cloud of an object to be measured, and determining a projection point from the point cloud; determining an edge topological relation of the projection points based on the projection points and a preset judgment condition; the determination of the minimum containing boundary of the projection point can be realized based on the edge topological relation; further based on the minimum containment boundary, the straight line and straightness of the projected points can be determined. The method and the device determine the edge topological relation of the projection points through the preset judgment conditions, separate the edge points and the non-edge points of the projection points, realize that the straight lines of the projection points have topological types through the minimum contained boundary, and improve the accuracy of straightness detection.
The computer device further provided in the embodiment of the present application includes a memory and a processor, where the memory stores a computer program, and the processor executes the computer program, and the computer program is used to implement the method for detecting straightness accuracy.
The embodiments of the present application further provide a computer storage medium, where a computer program is stored in the computer readable storage medium, and the computer program is executed by a processor to perform the method for detecting straightness, where the implementation principle and technical effects of the method are similar to those of the method embodiments, and are not described herein again.
The following paragraphs will comparatively list the Chinese terms referred to in this specification and their corresponding English terms for easy reading and understanding.
The foregoing description, for purposes of explanation, has been presented in conjunction with specific embodiments. However, the foregoing discussion in some embodiments is not intended to be exhaustive or to limit the implementations to the precise forms disclosed above. Many modifications and variations are possible in light of the above teaching. The embodiments were chosen and described in order to best explain the principles and the practical application, to thereby enable others skilled in the art to best utilize the embodiments and various embodiments with various modifications as are suited to the particular use contemplated.

Claims (10)

1. A straightness detection method is characterized by comprising the following steps:
acquiring a point cloud of an object to be detected and a target point in the point cloud;
determining an edge topological relation of the target point based on the target point and a preset judgment condition;
determining a minimum containment boundary of the target point based on the edge topological relation;
and determining the straight line and the straightness of the target point based on the minimum containing boundary.
2. The straightness detection method according to claim 1, wherein the edge topological relation comprises a target edge point and a topological edge, and the determining the minimum containment boundary of the target point based on the edge topological relation comprises:
determining a minimum distance topologic edge and a minimum distance target edge point of the target point according to the edge topological relation;
and determining a minimum containing boundary of the target point based on the minimum distance topology edge and the minimum distance target edge point.
3. The straightness detection method according to claim 1 or 2, wherein the determining the straight line and the straightness of the target point based on the minimum containment boundary comprises:
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;
based on the initial line, a straight line and a straightness of the target point are determined.
4. The straightness detection method according to claim 1, wherein the determining the edge topological relation of the target point based on the target point and a preset judgment condition comprises:
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 candidate edge point of the target point based on the nth candidate 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;
and determining the edge topological relation of the target point based on the topological relation of the target edge point.
5. The straightness detection method according to claim 1, wherein when the target point is a projected point, the determining of the projected 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 determining the edge topological relation of the target point based on the target point and a preset judgment condition comprises the following steps:
and determining an edge topological relation of the projection points based on the projection points and a preset judgment condition, wherein the edge topological relation comprises target edge points and topological edges.
6. The straightness detection method according to claim 5, wherein the determining the minimum containment boundary of the target point based on the edge topological relation comprises:
determining a minimum distance topology edge and a minimum distance target edge point of the projection point according to the edge topological relation;
and determining the minimum containing boundary of the projection point based on the minimum distance topologic edge and the minimum distance target edge point.
7. The straightness detection method according to claim 5 or 6, wherein the determining the straight line and the straightness of the target point based on the minimum containment boundary comprises:
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;
based on the initial line, a straight line and a straightness of the projected point are determined.
8. A straightness detecting device, comprising:
the acquisition module is used for acquiring a point cloud of an object to be detected and a target point in the point cloud;
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;
the analysis module is used for determining the minimum containing boundary of the target point based on the edge topological relation;
the analysis module is further used for determining the straight line and the straightness of the target point based on the minimum containing boundary.
9. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor implements the steps of the method for detecting straightness according to any one of claims 1 to 7 when executing the computer program.
10. A computer storage medium, characterized in that a computer program is stored on the computer readable storage medium, which, when executed by a processor, causes the processor to perform the steps of the method for detecting straightness according to any one of claims 1 to 7.
CN202211070909.5A 2022-09-01 2022-09-01 Straightness detection method and device, computer equipment and storage medium Pending CN115393381A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211070909.5A CN115393381A (en) 2022-09-01 2022-09-01 Straightness detection method and device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211070909.5A CN115393381A (en) 2022-09-01 2022-09-01 Straightness detection method and device, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
CN115393381A true CN115393381A (en) 2022-11-25

Family

ID=84125270

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211070909.5A Pending CN115393381A (en) 2022-09-01 2022-09-01 Straightness detection method and device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN115393381A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116109632A (en) * 2023-04-11 2023-05-12 成都飞机工业(集团)有限责任公司 Method, device, equipment and medium for detecting geometric accuracy of aircraft surface

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116109632A (en) * 2023-04-11 2023-05-12 成都飞机工业(集团)有限责任公司 Method, device, equipment and medium for detecting geometric accuracy of aircraft surface
CN116109632B (en) * 2023-04-11 2023-07-21 成都飞机工业(集团)有限责任公司 Method, device, equipment and medium for detecting geometric accuracy of aircraft surface

Similar Documents

Publication Publication Date Title
CN109300162B (en) Multi-line laser radar and camera combined calibration method based on refined radar scanning edge points
CN109961468B (en) Volume measurement method and device based on binocular vision and storage medium
TWI607412B (en) Measurement systems and methods for measuring multi-dimensions
US8290305B2 (en) Registration of 3D point cloud data to 2D electro-optical image data
WO2018142900A1 (en) Information processing device, data management device, data management system, method, and program
CN109801333B (en) Volume measurement method, device and system and computing equipment
US7246034B2 (en) Surveying apparatus and method of analyzing measuring data
CN111123242B (en) Combined calibration method based on laser radar and camera and computer readable storage medium
CN110728753B (en) Target point cloud 3D bounding box fitting method based on linear fitting
CN103994755B (en) A kind of space non-cooperative object pose measuring method based on model
Canciani et al. From point clouds to architectural models: algorithms for shape reconstruction
CN113256729A (en) External parameter calibration method, device, equipment and storage medium for laser radar and camera
CN116433737A (en) Method and device for registering laser radar point cloud and image and intelligent terminal
CN115393381A (en) Straightness detection method and device, computer equipment and storage medium
CN112215958A (en) Laser radar point cloud data projection method based on distributed computation
Zhu et al. Triangulation of well-defined points as a constraint for reliable image matching
KR100933304B1 (en) An object information estimator using the single camera, a method thereof, a multimedia device and a computer device including the estimator, and a computer-readable recording medium storing a program for performing the method.
CN114882118A (en) Method and device for calibrating laser radar and camera external parameters and electronic equipment
CN113203424B (en) Multi-sensor data fusion method and device and related equipment
CN113538556B (en) Volume measuring device based on IR diagram
CN115147561A (en) Pose graph generation method, high-precision map generation method and device
CN112991372A (en) 2D-3D camera external parameter calibration method based on polygon matching
AU2020294279A1 (en) Image association method, system and apparatus
CN116124032A (en) Three-dimensional profiler, three-dimensional profile establishing method and device and electronic equipment
Garcia et al. 3D inspection system for manufactured machine parts

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination