CN117078891A - Laser contour mesh reconstruction method and device, electronic equipment and storage medium - Google Patents

Laser contour mesh reconstruction method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN117078891A
CN117078891A CN202311338170.6A CN202311338170A CN117078891A CN 117078891 A CN117078891 A CN 117078891A CN 202311338170 A CN202311338170 A CN 202311338170A CN 117078891 A CN117078891 A CN 117078891A
Authority
CN
China
Prior art keywords
contour
point
current
contour point
points
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.)
Granted
Application number
CN202311338170.6A
Other languages
Chinese (zh)
Other versions
CN117078891B (en
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.)
Xi'an Glasssix Network Technology Co ltd
Original Assignee
Xi'an Glasssix Network 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 Xi'an Glasssix Network Technology Co ltd filed Critical Xi'an Glasssix Network Technology Co ltd
Priority to CN202311338170.6A priority Critical patent/CN117078891B/en
Publication of CN117078891A publication Critical patent/CN117078891A/en
Application granted granted Critical
Publication of CN117078891B publication Critical patent/CN117078891B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T17/00Three dimensional [3D] modelling, e.g. data description of 3D objects
    • G06T17/20Finite element generation, e.g. wire-frame surface description, tesselation
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01BMEASURING LENGTH, THICKNESS OR SIMILAR LINEAR DIMENSIONS; MEASURING ANGLES; MEASURING AREAS; MEASURING IRREGULARITIES OF SURFACES OR CONTOURS
    • G01B11/00Measuring arrangements characterised by the use of optical techniques
    • G01B11/24Measuring arrangements characterised by the use of optical techniques for measuring contours or curvatures
    • G01B11/25Measuring arrangements characterised by the use of optical techniques for measuring contours or curvatures by projecting a pattern, e.g. one or more lines, moiré fringes on the object
    • G01B11/2518Projection by scanning of the object
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01BMEASURING LENGTH, THICKNESS OR SIMILAR LINEAR DIMENSIONS; MEASURING ANGLES; MEASURING AREAS; MEASURING IRREGULARITIES OF SURFACES OR CONTOURS
    • G01B11/00Measuring arrangements characterised by the use of optical techniques
    • G01B11/24Measuring arrangements characterised by the use of optical techniques for measuring contours or curvatures
    • G01B11/25Measuring arrangements characterised by the use of optical techniques for measuring contours or curvatures by projecting a pattern, e.g. one or more lines, moiré fringes on the object
    • G01B11/2545Measuring arrangements characterised by the use of optical techniques for measuring contours or curvatures by projecting a pattern, e.g. one or more lines, moiré fringes on the object with one projection direction and several detection directions, e.g. stereo
    • 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/70Determining position or orientation of objects or cameras
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/30Computing systems specially adapted for manufacturing

Landscapes

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

Abstract

The invention relates to the technical field of laser detection, and provides a laser contour mesh reconstruction method, a device, electronic equipment and a storage medium, wherein the method comprises the following steps: acquiring multi-frame contour points of a part to be tested, wherein each frame of contour point is obtained by combining contour points obtained by scanning the part to be tested from a plurality of different angles simultaneously by a plurality of line laser profilers; carrying out ordered treatment according to the position of each contour point in each frame of contour points on the part to be tested to obtain a contour point sequence of each frame of contour points, wherein the positions of any two adjacent contour points in the contour point sequence of each frame of contour points on the part to be tested are also adjacent; and generating triangles between every two contour point sequences according to the contour point sequences of contour points adjacent to each other in every two frame acquisition time so as to reconstruct the laser contour mesh of the part to be tested. The invention can improve the efficiency and accuracy of the laser contour mesh reconstruction by utilizing the point cloud data.

Description

Laser contour mesh reconstruction method and device, electronic equipment and storage medium
Technical Field
The invention relates to the technical field of laser detection, in particular to a laser profile mesh reconstruction method, a device, electronic equipment and a storage medium.
Background
The line laser profiler is used for scanning parts or equipment workpieces to obtain point cloud data of the surfaces of the parts or equipment workpieces, and analyzing the point cloud data, so that the line laser profiler is one of the mainstream technologies adopted in industrial surface quality detection in recent years. For example, the point cloud data is used to reconstruct the contour of a component or a piece of equipment. One contour reconstruction technique is mesh reconstruction, which refers to the process of generating a three-dimensional mesh model from a set of discrete points or point cloud data.
However, in a practical industrial scenario, it is difficult to obtain point cloud data of a full-profile surface by a single line laser profiler for large parts or equipment workpieces. At this time, it is often necessary to collect surface point cloud data of a component or a device workpiece from multiple angles by using multiple line laser profilers, and splice the collected point cloud data to obtain point cloud data of a full-profile surface.
How to improve the efficiency and accuracy of laser profile mesh reconstruction by using the point cloud data of the spliced full-profile surface is a problem to be solved by the technicians in the field.
Disclosure of Invention
The invention aims to provide a laser profile mesh reconstruction method, a device, electronic equipment and a storage medium, which can improve the efficiency and accuracy of performing laser profile mesh reconstruction by utilizing point cloud data.
Embodiments of the invention may be implemented as follows:
in a first aspect, the present invention provides a laser profile mesh reconstruction method, the method comprising:
acquiring multi-frame contour points of a part to be tested, wherein each frame of contour point is obtained by combining contour points obtained by simultaneously scanning the part to be tested from a plurality of different angles by a plurality of line laser profilers;
carrying out ordered treatment according to the position of each contour point in each frame of contour points on the part to be tested to obtain a contour point sequence of the contour points of each frame, wherein the positions of any two adjacent contour points in the contour point sequence of the contour points of each frame on the part to be tested are also adjacent;
and generating triangles between every two contour point sequences according to the contour point sequences of every two adjacent contour points in the acquisition time of frames so as to reconstruct the laser contour grid mesh of the part to be detected.
In an alternative embodiment, the step of obtaining the contour point sequence of the contour points of each frame includes:
classifying contour points on the same plane in the part to be tested into a set according to the position of each contour point in each frame on the part to be tested, so as to obtain a plurality of sets of the contour points of each frame;
Carrying out ordered treatment on the contour points in each set of the contour points of each frame to obtain an ordered sequence of the contour points in each set of the contour points of each frame;
and arranging all the ordered sequences of the contour points of each frame according to a preset sequence to obtain a contour point sequence of the contour points of each frame.
In an alternative embodiment, the step of performing an ordering process on the contour points in each set of contour points in each frame to obtain an ordered sequence of contour points in each set of contour points in each frame includes:
for any target set, dividing the plane of the part to be tested, where the contour points in the target set are located, into a plurality of grids;
selecting a starting grid from grids with outline points in the grids;
the initial grid is taken as a center, a long-side grid positioned at the same first coordinate axis position as the initial grid and a short-side grid positioned at the same second coordinate axis position as the initial grid are determined, and the number of grids with contour points in the long-side grid is larger than the number of grids with contour points in the short-side grid within a preset range of the initial grid;
Adding all grids with outline points in the initial grid and the short-side grid to a result point set;
selecting a grid which is closest to the initial grid and has contour points from the long-side grids, and adding the grid to a pre-established search queue, wherein the search queue is empty;
according to the first-in first-out sequence, a candidate grid is taken out from the current search queue;
if the candidate grids are not in the result point set, adding the candidate grids into the result point set, adding the grids which have outline points in a preset neighborhood range of grids adjacent to the candidate grids and are not in the current search queue and the result point set into the current search queue according to a first preset direction, returning to the step of taking out one candidate grid from the current search queue according to the first-in first-out sequence until the current search queue is empty;
if the result point set does not include all grids with outline points in the grids, taking the initial grid as a candidate grid, adding the grids which have outline points in a preset neighborhood range of grids adjacent to the candidate grid and are not in the current search queue and the result point set to the current search queue according to a second preset direction, returning to the step of taking out one candidate grid from the current search queue according to the first-in first-out sequence until the search queue is empty;
And sequencing the contour points in the grids in the result point set according to the sequence of adding the grids in the result point set into the result point set, so as to obtain an ordered sequence of the contour points in the target set.
In an alternative embodiment, the step of ordering the contour points in the grids in the result point set according to the order in which the grids in the result point set are added to the result point set, and obtaining the ordered sequence of contour points in the target set includes:
for any target grid in the result point set, if the target grid comprises a contour point, taking the contour point as a target contour point of the target grid;
if the target grid comprises a plurality of contour points, determining each target contour point of the target grid according to the position information of the contour points in the result point set;
generating a sequence number of each target contour point of the target grid in the ordered sequence according to the sequence numbers of the target grid in the result point set;
and traversing each target grid in the result point set to obtain the sequence number of each target contour point of each target grid in the ordered sequence, and generating the ordered sequence.
In an alternative embodiment, the step of generating a triangle between each two contour point sequences according to the contour point sequences of each two neighboring contour points in the acquisition time of the frames includes:
for a first contour point sequence and a second contour point sequence which are adjacent in any two frame acquisition time, taking a first contour point in the first contour point sequence as a first current contour point and taking a first contour point in the second contour point sequence as a second current contour point;
determining a current triangle according to the first current contour point, a next contour point of the first current contour point, the second current contour point and a next contour point of the second current contour point;
updating the first current contour point and the second current contour point according to the vertex of the current triangle;
and repeating the step of determining the current triangle according to the first current contour point, the next contour point of the first current contour point, the second current contour point and the next contour point of the second current contour point until the first current contour point is the last contour point of the first contour point sequence or the second current contour point is the last contour point of the second contour point sequence, thereby obtaining the triangle between the first contour point sequence and the second contour point sequence.
In an alternative embodiment, the step of determining the current triangle according to the first current contour point, the next contour point of the first current contour point, the second current contour point, and the next contour point of the second current contour point includes:
taking a straight line formed by connecting the first current contour point and the second current contour point as one side of a current triangle;
acquiring a next contour point of the first current contour point and acquiring a next contour point of the second current contour point;
calculating a first distance between the first current contour point and a next contour point of the second current contour point, and calculating a second distance between the second current contour point and a next contour point of the first current contour point;
and taking the smaller distance from the first distance to the second distance as the other side of the current triangle, and finally determining the current triangle.
In an alternative embodiment, the step of updating the first current contour point and the second current contour point according to the vertex of the current triangle includes:
updating the contour point with the largest sequence number in the first contour point sequence in the vertex of the current triangle to be a first current contour point;
And updating the contour point with the largest sequence number in the second contour point sequence in the vertex of the current triangle to be the second current contour point.
In a second aspect, the present invention provides a laser profile mesh reconstruction apparatus, the apparatus comprising:
the acquisition module is used for acquiring multi-frame contour points of the part to be tested, and each frame of contour point is obtained by combining contour points obtained by simultaneously scanning the part to be tested from a plurality of different angles by a plurality of line laser profilers;
the processing module is used for carrying out ordered processing according to the position of each contour point in each frame of contour points on the component to be tested to obtain a contour point sequence of the contour points of each frame, and the positions of any two adjacent contour points in the contour point sequence of the contour points of each frame on the component to be tested are also adjacent;
the generating module is used for generating triangles between every two contour point sequences according to the contour point sequences of every two contour points adjacent to each other in the acquisition time of frames so as to reconstruct the laser contour grid mesh of the part to be detected.
In a third aspect, the present invention provides an electronic device, including a processor and a memory, where the memory is configured to store a program, and the processor is configured to implement the laser profile mesh reconstruction method according to any one of the foregoing embodiments when the program is executed.
In a fourth aspect, the present invention provides a computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements the laser profile mesh reconstruction method of any one of the preceding embodiments.
According to the method, each frame of profile points of the multi-frame profile points is obtained by combining profile points obtained by scanning a part to be detected from a plurality of different angles at the same time by a plurality of line laser profilers, the profile point sequence of each frame of profile points is obtained by carrying out ordered processing according to the position of each profile point in each frame of profile points on the part to be detected, the searching speed can be increased when the laser profile mesh is reconstructed based on each frame of profile points orderly arranged in the profile point sequence, and a triangle between each two profile point sequences is generated according to the profile point sequences of each two adjacent profile points, and as the profile points of the two adjacent profile points of the acquisition time are utilized, the priori structure information of the profile point sequence of each frame of the profile points is fully utilized, the time consumption of laser profile mesh reconstruction is reduced, the false creation of the triangle is effectively avoided, and the technical effects of improving the efficiency and accuracy of laser profile mesh reconstruction by utilizing point cloud data are achieved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings that are needed in the embodiments will be briefly described below, it being understood that the following drawings only illustrate some embodiments of the present invention and therefore should not be considered as limiting the scope, and other related drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a comparison of a true profile and a poisson reconstruction profile of a part to be tested according to an embodiment of the present invention.
Fig. 2 is a flowchart illustrating a method for reconstructing a laser profile mesh according to an embodiment of the present invention.
Fig. 3 is a diagram of a comparison example before and after ordering contour points according to an embodiment of the present invention.
Fig. 4 is an exemplary diagram of a long-side grid and a short-side grid provided in the present embodiment.
Fig. 5 is an exemplary diagram of a result point set generation process provided in the present embodiment.
Fig. 6 is an exemplary diagram of ordering a plurality of contour points in a target mesh according to an embodiment of the present invention.
Fig. 7 is an exemplary diagram of a triangle generation process provided in the present embodiment.
Fig. 8 is an exemplary diagram of a contour reconstructed by the laser contour mesh reconstruction method in the embodiment of the present invention.
Fig. 9 is a block diagram illustrating a laser profile mesh reconstruction apparatus according to an embodiment of the present invention.
Fig. 10 is a block diagram of an electronic device according to an embodiment of the present invention.
Icon: 10-an electronic device; 11-a processor; 12-memory; 13-bus; 100-a laser profile mesh reconstruction device; 110-an acquisition module; 120-a processing module; 130-a generation module.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present invention more apparent, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention, and it is apparent that the described embodiments are some embodiments of the present invention, but not all embodiments of the present invention. The components of the embodiments of the present invention generally described and illustrated in the figures herein may be arranged and designed in a wide variety of different configurations.
Thus, the following detailed description of the embodiments of the invention, as presented in the figures, is not intended to limit the scope of the invention, as claimed, but is merely representative of selected embodiments of the invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
It should be noted that: like reference numerals and letters denote like items in the following figures, and thus once an item is defined in one figure, no further definition or explanation thereof is necessary in the following figures.
In the description of the present invention, it should be noted that, if the terms "upper", "lower", "inner", "outer", and the like indicate an azimuth or a positional relationship based on the azimuth or the positional relationship shown in the drawings, or the azimuth or the positional relationship in which the inventive product is conventionally put in use, it is merely for convenience of describing the present invention and simplifying the description, and it is not indicated or implied that the apparatus or element referred to must have a specific azimuth, be configured and operated in a specific azimuth, and thus it should not be construed as limiting the present invention.
Furthermore, the terms "first," "second," and the like, if any, are used merely for distinguishing between descriptions and not for indicating or implying a relative importance.
It should be noted that the features of the embodiments of the present invention may be combined with each other without conflict.
When the laser contour is reconstructed, the contour points of different planes acquired at different angles are mainly overlapped, and then the mesh reconstruction is carried out through the overlapped contour points, and the existing mesh reconstruction scheme is mainly divided into an implicit method and a display method. The implicit method thinking is as follows: inputting a contour point cloud, constructing an isosurface, creating a mesh (a triangle generated by a point set) by using a marking cube, and reconstructing by using a typical implicit method. The explicit method thinking is: the outline point cloud is input, the whole space is triangulated, a proper triangular surface is selected to be used as a final surface (the triangle is directly generated by point-to-point connection lines), and a typical display method is Delaunay triangulation.
Whether the method is an implicit method or a display method, prior structural information of the laser contour point cloud cannot be effectively utilized, so that structuring operation is needed to be carried out on the contour point cloud, and time consumption is serious. In addition, other conditions are considered in the algorithm aiming at the unordered point cloud, the design is complex, the poisson reconstruction and Delaunay use complex mathematical knowledge and graph theory related algorithms, and the code implementation and debugging are relatively difficult. In addition, the more complex the algorithm, the more difficult it is to set the parameters, and the more unstable the algorithm. For example, in the poisson reconstruction, an unnecessary triangle may be generated for the non-closed contour point cloud, referring to fig. 1, fig. 1 is a comparison diagram of the true contour of the part to be measured and the poisson reconstruction contour provided in the embodiment of the present invention, and as can be seen from fig. 1, an erroneous mesh reconstruction result is obtained due to the unnecessary triangle generated during the poisson reconstruction.
In view of this, the present embodiment provides a laser profile mesh reconstruction method, apparatus, electronic device, and storage medium, which can improve efficiency and accuracy of performing laser profile mesh reconstruction using point cloud data by using prior structure information of laser profile point clouds, and will be described in detail below.
Referring to fig. 2, fig. 2 is a flowchart illustrating a laser profile mesh reconstruction method according to an embodiment of the present invention, where the method includes the following steps:
step S101, obtaining multi-frame contour points of a part to be tested, wherein each frame of contour point is obtained by combining contour points obtained by scanning the part to be tested from a plurality of different angles by a plurality of line laser profilers at the same time.
In this embodiment, the line laser profilers are installed at different positions relative to the part to be measured, so that different planes of the part to be measured are scanned from a plurality of different angles at the same time, and when the line laser profilers are installed, the line laser profilers are scanned once as much as possible, so that the profile point of the whole surface of the part to be measured can be obtained after the planes of the part to be measured which are scanned once are combined, which is called a frame profile point, and a plurality of frames of profile points can be obtained after the scanning for a plurality of times.
Step S102, carrying out ordered processing according to the position of each contour point in each frame of contour points on the part to be tested to obtain a contour point sequence of each frame of contour points, wherein the positions of any two adjacent contour points in the contour point sequence of each frame of contour points on the part to be tested are also adjacent.
In this embodiment, when a plurality of line laser profilers are used, there is overlap in the fields of view of adjacent profilers, resulting in repeated acquisition of profile points of the workpiece surface where the fields of view overlap. The contour points at the overlapping positions of the visual field are always not completely overlapped and a certain thickness is usually present due to the fact that the contour points at the overlapping positions of the visual field are not orderly, the disordered contour points affect the speed of searching the contour points when the triangle is generated by the subsequent mesh reconstruction, in order to improve the speed of searching the contour points, the contour points of each frame are orderly processed to obtain a contour point sequence of each frame, adjacent contour points in the contour point sequence are also adjacent on a part to be tested, and referring to fig. 3, fig. 3 is a comparison example diagram before and after the ordering of the contour points, for example, the smaller the sequence number is, the shallower the gray is, the greater the sequence number is, the gray is deep, the contour points before the ordering are completely disordered, the shallower the gray is disordered, and the gray is the ordered and gradually changed.
And step S103, generating triangles between every two contour point sequences according to the contour point sequences of contour points adjacent to each other in every two frame acquisition time so as to reconstruct the laser contour grid mesh of the part to be detected.
In the present embodiment, for example, there are 5 frames in total: and generating triangles between the frames 1-5, generating triangles between the frames 1-2, generating triangles between the frames 2-3, generating triangles between the frames 3-4, generating triangles between the frames 4-5, and completing the laser contour mesh reconstruction of the part to be tested after generating triangles between contour point sequences of every two frames. Further, the outline of the part to be tested can be visually displayed according to all triangles.
According to the method provided by the embodiment, the triangle between every two contour point sequences is generated according to the contour point sequences of every two adjacent contour points, and the contour points of every two adjacent contour points are acquired, so that the prior structure information of the contour point sequences of the contour points of every frame is fully utilized, the time consumption of laser contour mesh reconstruction is reduced, the false creation of the triangle is effectively avoided, and the efficiency and the accuracy of laser contour mesh reconstruction by utilizing point cloud data are improved.
In this embodiment, in order to achieve ordering of each contour point in each frame contour point, so as to quickly search for each contour point during subsequent processing, there are two main methods of the existing contour point ordering algorithm:
the method comprises the following steps: the contour points of the image are detected and tracked by utilizing the findContour function in OpenCV. This method finds another outer boundary pixel found first in the neighborhood of this pixel 8 clockwise/counterclockwise by giving the starting outer boundary pixel (which can be arbitrarily set) with it as the center pixel. And then, taking the newly found outer boundary pixel as a central pixel, repeating the steps until the position of the initial outer boundary pixel is returned, and thus finishing the ordering of the image contour points. According to the method, the distance between the contour points is not required to be calculated, and the search of the adjacent contour points is realized according to the pixel grid positions.
For method one, the findcontours of OpenCV operates on image contours, not applicable to discrete points. When ordering the point cloud contour, the point needs to be converted into pixels, in this case, if contour point ordering processing needs to achieve the original point cloud acquisition precision, a very large storage space is needed. For example: contour point spacing of 0.1mm, contour point precision of 0.01mm, contour length of 100mm, contour width of 100mm, and for the preservation of precision, each pixel represents a size of less than 0.01, and then at least (100/0.01) × (100/0.01) =1 hundred million pixel images are required. In addition to the huge memory requirements, such huge image processing can also greatly reduce the algorithm processing speed.
The second method is as follows: ordering of contour points is achieved by using a neighbor search mode. A typical approach to neighbor searching is a kdtree-based nearest neighbor search algorithm.
For method two, the search complexity of the neighbor search algorithm is typically O (n≡2). The complexity of searching for O (Nlog) using kdtrees, however, it still takes a lot of time to build kdtrees.
The above-mentioned method one or method two, the efficiency of the ordering treatment cannot meet the requirement, and for this problem, this embodiment provides an ordering treatment method, which can improve the efficiency of the ordering treatment, and the following details are described in this way:
firstly, classifying contour points on the same plane in a part to be tested into a set according to the position of each contour point in each frame on the part to be tested, and obtaining a plurality of sets of contour points of each frame.
And secondly, carrying out ordering treatment on the contour points in each set of contour points of each frame to obtain an ordered sequence of the contour points in each set of contour points of each frame.
And finally, arranging all the ordered sequences of the contour points of each frame according to a preset sequence to obtain a contour point sequence of the contour points of each frame.
In this embodiment, in order to increase the processing speed, the contour points of the same plane of each frame are grouped into a set, so that the ordering processing can be performed on each plane in parallel, and finally, the results of the ordering processing on each plane are combined, thereby improving the ordering processing efficiency.
It should be noted that not only the planes of one frame may be processed in parallel and ordered, but also the planes of each frame may be processed in parallel and ordered as the processing performance allows.
In order to improve the ordering efficiency of each set of contour points of each frame, in this embodiment, any set of contour points of any frame is taken as a target set, and an implementation manner of ordering contour points of the target set is provided:
(1) Dividing the plane of the part to be tested, where the contour points in the target set are located, into a plurality of grids;
(2) Selecting a starting grid from grids with outline points in a plurality of grids;
(3) The method comprises the steps of taking an initial grid as a center, determining a long-side grid positioned at the same first coordinate axis position as the initial grid and a short-side grid positioned at the same second coordinate axis position as the initial grid, wherein the number of grids with contour points in the long-side grid is larger than that of grids with contour points in the short-side grid within a preset range of the initial grid;
in this embodiment, in order to more clearly illustrate the long-side grid and the short-side grid, this embodiment provides an example diagram of the long-side grid and the short-side grid, please refer to fig. 4, fig. 4 is an example diagram of the long-side grid and the short-side grid provided in this embodiment, in fig. 4, for convenience of illustration, the grid with the number identification is the grid with the outline point, the blank grid without the number identification is the grid without the outline point, the initial grid is the grid 9, as the grid with the number identification 9 in fig. 4, for example, the preset range is the grid in the 48 adjacent area centered on the initial grid, as the grid in the dotted line box in fig. 4, wherein the long-side grid is the grid located at the same x coordinate axis position as the grid 9, and the short-side grid is the grid located at the same y coordinate axis position as the grid 9.
(4) Adding all grids with outline points in the initial grid and the short-side grid to a result point set;
(5) Selecting a grid which is closest to the initial grid and has contour points from the long-side grids, adding the grid to a pre-established search queue, and enabling the search queue to be empty;
(6) According to the first-in first-out sequence, a candidate grid is taken out from the current search queue;
(7) If the candidate grids are not in the result point set, adding the candidate grids into the result point set, adding the grids which are provided with outline points in a preset neighborhood range of grids adjacent to the candidate grids and are not in the current search queue and the result point set into the current search queue according to a first-in first-out sequence, and returning to the step of taking out one candidate grid from the current search queue until the current search queue is empty;
(8) If the result point set does not comprise all grids with outline points in the multiple grids, taking the initial grid as a candidate grid, adding the grids which have outline points in a preset neighborhood range of grids adjacent to the candidate grid and are not in the current search queue and the result point set into the current search queue according to a second preset direction, and returning to the step of taking out one candidate grid from the current search queue according to the first-in first-out sequence until the search queue is empty;
In this embodiment, according to the distribution of the multiple grids, the first preset direction and the second preset direction may be different, for example, the first preset direction may be a positive direction of the x-axis, where the second preset direction is a negative direction of the x-axis, or vice versa, the first preset direction is a negative direction of the x-axis, the second preset direction is a positive direction of the x-axis, and the first preset direction may be a clockwise direction, where the second preset direction is a counterclockwise direction, or vice versa.
In this embodiment, for any target set, the result point set and the search queue are initialized to be empty, the grids in the result point set and the search queue are continuously changed along with the traversing process in the ordering process, and when the traversing is finished, the search queue is empty, the result point set includes grids of all outline points in a plurality of grids divided by a plane of a part to be tested where the outline points in the target set are located, and in order to more clearly describe the processing processes (1) - (8), this embodiment provides an example diagram of the result point set generating process, please refer to fig. 5, fig. 5 is an example diagram of the result point set generating process provided in this embodiment, and fig. 4 illustrates the generating process of the result point set by taking the grids in fig. 5 as an example:
Initially, the result point set is empty, and the search queue is empty;
taking the grid 9 as a starting grid, taking the grid 2 and the grid 19 as short-side grids, adding 9,2 and 19 into a result point set, wherein the current result point set is as follows: {9,2,19} selecting the grid 18 closest to the short-side grid from the long-side grids, and adding the grid 18 with the contour points into a search queue, wherein the current search queue is: {18};
and (3) taking out candidate grids 18, 18 from the current search queue, wherein the candidate grids are not in the result point set, adding the candidate grids 18 into the result point set, and the current result point set is as follows: {9,2,19,18}, adding a grid 1,7,17 which is in the 8 neighborhood range adjacent to 18, has contour points, is not in the current search queue and is not in the current result point set to the search queue in the clockwise direction, wherein the current search queue is: {1,7,17};
and (5) taking out the candidate grid 1 from a current search queue, wherein the current search queue is as follows: {7,17},1 is not in the result point set, add 1 to the result point set, the current result point set is: {9,2,19,18,1}, according to the first direction, there is no grid within 8 neighborhoods adjacent to 1, there is a contour point, and not in the current search queue, nor in the current result point set;
and (5) taking out the candidate grid 7 from a current search queue, wherein the current search queue is as follows: {17},7 is not in the result point set, 7 is added to the result point set, and the current result point set is: {9,2,19,18,1,7}, adding grids 6,16 which are in the 8 neighborhood range adjacent to 7, have contour points and are not in the current search queue and are not in the current result point set to the search queue according to the first direction, wherein the current search queue is: {17,6,16};
Candidate grid 17 is fetched from the current search queue, which is: {6,16},17 is not in the result point set, add 17 to the result point set, the current result point set is: {9,2,19,18,1,7,17}, according to the first direction, there is no grid within 8 neighborhoods adjacent to 17, there is a contour point, and not in the current search queue, nor in the current result point set;
and (5) taking out the candidate grids 6 from a current search queue, wherein the current search queue is as follows: {16},6 is not in the result point set, add 6 to the result point set, the current result point set is: {9,2,19,18,1,7,17,6}, adding grids 5,15 which are in the 8 neighborhood range adjacent to 6, have contour points and are not in the current search queue and are not in the current result point set to the search queue according to the first direction, wherein the current search queue is: {16,5,15};
candidate grid 16 is fetched from the current search queue, which is: {5,15},16 is not in the result point set, add 16 to the result point set, the current result point set is: {9,2,19,18,1,7,17,6,16}, according to the first direction, there is no grid within 8 neighborhoods adjacent to 16, there is a contour point, and not in the current search queue, nor in the current result point set;
And (5) taking out the candidate grid 5 from a current search queue, wherein the current search queue is as follows: {15},5 is not in the result point set, add 5 to the result point set, the current result point set is: {9,2,19,18,1,7,17,6,16,5}, according to the first direction, there is no grid within 8 neighborhoods adjacent to 5, there is a contour point, and not in the current search queue, nor in the current result point set;
and (3) taking out the candidate grids 15 from a current search queue, wherein the current search queue is empty, 15 is not in the result point set, and adding 15 into the result point set, and the current result point set is as follows: {9,2,19,18,1,7,17,6,16,5,15}, according to the first direction, there is no grid within 8 neighborhoods adjacent to 15, there is a contour point, and not in the current search queue, nor in the current result point set;
at this time, the current search queue is empty, but the result point set is a mesh including all the existing contour points in fig. 4, the initial mesh 9 is used as a candidate mesh, and according to the second direction, meshes 3,10,20 which are in the 8 neighborhood range adjacent to 9, have contour points, are not in the current search queue, and are not in the current result point set are added to the search queue, and the current search queue is: {3,10,20}; thereafter, in a similar manner to the first direction, until the current search queue is empty, the current set of result points includes all the grids of existing contour points in fig. 4, and the final set of result points is: {9,2,19,18,1,7,17,6,16,5,15,3,10,20,4,11,21,12,22,13,23,14,24}.
(9) And sequencing the contour points in the grids in the result point set according to the sequence of adding the grids in the result point set into the result point set, so as to obtain an ordered sequence of the contour points in the target set.
In this embodiment, each grid in the result point set may be sequentially processed, and the contour points in each grid are ordered to obtain an ordered sequence of contour points in the target set, where the contour points in the grids in the result point set may be one or more, so as to be capable of uniformly processing one or more two different situations, this embodiment further provides an implementation manner:
(9.1) for any one of the target grids in the result point set, if the target grid comprises a contour point, taking the contour point as a target contour point of the target grid;
(9.2) if the target grid comprises a plurality of contour points, determining each target contour point of the target grid according to the position information of the contour points in the result point set;
in this embodiment, when a plurality of contour points are included in the target mesh, the manner of determining each of the target contour points may be any one of the following four processing manners:
mode one:
calculating an average value of position information of a plurality of contour points in the target grid, wherein the average value is used as a point of the position information and used as a target contour point;
For example, the target mesh includes 3 contour points, and coordinates of the contour points are respectively: a (xa, ya), B (xb, yb), C (xc, yc), and calculating average values x and y of xa, xb, xc and ya, yb, yc, respectively, taking a point with (x, y) as a coordinate as a target contour point.
Mode two:
and taking the contour point closest to the center point of the target grid among the contour points in the target grid as the target contour point.
Mode three:
and sequencing the contour points in the target grid by taking each contour point in the contour points in the target grid as a target contour point, wherein the sequencing direction is a normal direction from a connecting line of two grids adjacent to the target grid (namely, the projection of each target contour point on the connecting line). Referring to fig. 6, fig. 6 is an exemplary diagram of ordering a plurality of contour points in a target grid according to an embodiment of the present invention, in fig. 6, a contour point x is located in grid 1, contour points a, b, c are located in grid 2, contour points y, z are located in grid 3, grid 1 is located in front of grid 2, grid 3 is located behind grid 2, a straight line is fitted with contour points x, y, z, the direction of the straight line is shown by an arrow in fig. 6, projections of three points a, b, c of the contour points a, b, c to the straight line are calculated respectively, the sequence of contour points a, b, c is determined according to the directions of the projections and the straight line, and the determined sequence of a, b, c is sequentially as follows: a. b, c. It should be noted that, in fig. 6, an example is taken before and after the grid 2 as an example, in fact, in some cases, since the straight line fitted by the front and the rear grids is far from the actual straight line, a straight line may be fitted by using k formats before and after to improve accuracy, and a specific manner is similar to that of fig. 6, and will not be repeated here.
Mode four:
one contour point is randomly selected from a plurality of contour points as a target contour point.
(9.3) generating a sequence number of each target contour point of the target grid in the ordered sequence according to the sequence numbers of the target grid in the result point set;
in this embodiment, the sequence number of each target contour point in the result point set of the target mesh may be equal to the sequence number of each target contour point in the result point set of the target mesh, for example, the sequence number of each target contour point in the result point set of the target mesh is 1, and then the sequence number of each contour point in the target mesh in the sequence is also 1, and the sequence number of each target contour point in the result point set of the target mesh may not be equal to the sequence number of each target contour point in the target mesh in the sequence number of the result point set of the target mesh, but the sequence number of each target contour point in the target mesh in the sequence number is consistent with the sequence number of each target contour point in the result point set of the target mesh, for example, the target mesh is between the mesh 1 and the mesh 2, and then each target contour point in the target mesh is also between the last target contour point in the mesh 1 and the first target contour point in the mesh 2.
And (9.4) traversing each target grid in the result point set to obtain the sequence number of each target contour point of each target grid in the ordered sequence, and generating the ordered sequence.
In the present embodiment, for example, the result point set includes 3 grids: A. b, C the target contour points in the grid a are a, the target contour points in the grid B are B1 and B2, the target contour points in the grid C are C1, C2 and C3, and the generated ordered sequence is: a. b1, b2, c1, c2, c3.
In this embodiment, in the sorting process, the breadth-first search complexity is O (n), so that the sorting speed is further increased, and in practical application, the contour point processing requirement often reaches a thousand frames per second level, that is, the time consumption of single contour processing is less than 1ms, so that the sorting method provided in this embodiment has practical significance in application scenarios with high practical requirements on efficiency.
In an alternative embodiment, after the contour point sequence of the contour point of each frame is obtained, a triangle between every two contour point sequences may be generated according to the contour point sequences of contour points adjacent to each other at every two frame acquisition times.
It should be noted that, if the part to be tested swings or vibrates during the scanning process of the online laser instrument, the two frames of contour points are dislocated, which affects the accuracy of mesh reconstruction, and for this case, when the contour point sequence of each frame of contour point is obtained, contour registration can be performed on contour points adjacent to each other in time, and then the registered contour point sequence is utilized to generate a triangle. If the contour points adjacent in time are not staggered or the preset registration requirement is met, contour registration is not needed, and the obtained contour point sequence is directly utilized to generate a triangle.
Before generating the triangle, the ordered contour point data can be sampled from the contour point sequence by adopting fixed interval sampling, and then the triangle is generated by utilizing the ordered contour point data, so that the ordered contour point data adopted for generating the triangle are more uniformly distributed, and overlapping of the spliced contour points is further avoided, and the mesh reconstruction effect is further influenced.
One implementation of generating triangles is given below:
firstly, regarding a first contour point sequence and a second contour point sequence which are adjacent in any two frame acquisition time, taking a first contour point in the first contour point sequence as a first current contour point and taking a first contour point in the second contour point sequence as a second current contour point;
secondly, determining a current triangle according to the first current contour point, a next contour point of the first current contour point, the second current contour point and a next contour point of the second current contour point;
in this embodiment, one way to determine the current triangle is: taking a straight line formed by connecting the first current contour point and the second current contour point as one side of the current triangle; acquiring a next contour point of the first current contour point, and acquiring a next contour point of the second current contour point; calculating a first distance between a first current contour point and a next contour point of a second current contour point, and calculating a second distance between the second current contour point and the next contour point of the first current contour point; and taking the smaller distance from the first distance and the second distance as the other side of the current triangle, and finally determining the current triangle.
The smaller distance of the first distance and the second distance is selected as the other edge of the current triangle, so that the contour points in the first contour point sequence and the second contour point sequence can be aligned and combined, the triangle with longer hypotenuse is avoided, and further, the error triangle in the reconstruction process is avoided.
Thirdly, updating the first current contour point and the second current contour point according to the vertex of the current triangle;
in this embodiment, one way to update the first current contour point and the second current contour point is: updating the contour point with the largest sequence number in the first contour point sequence in the vertex of the current triangle to be the first current contour point; and updating the contour point with the largest sequence number in the second contour point sequence in the vertex of the current triangle to be the second current contour point.
And finally, repeating the step of determining the current triangle according to the first current contour point, the next contour point of the first current contour point, the second current contour point and the next contour point of the second current contour point until the first current contour point is the last contour point of the first contour point sequence or the second current contour point is the last contour point of the second contour point sequence, and obtaining the triangle between the first contour point sequence and the second contour point sequence.
For a more clear explanation of the triangle generating process, please refer to fig. 7, fig. 7 is an exemplary diagram of the triangle generating process provided in the present embodiment, and in fig. 7, the first contour point sequence is: { Pa0, pa1, pa2, pa3, pa4}, the second contour point sequence is: { Pb0, pb1, pb2, pb3, pb4}, pa0 and Pb0 are two contour points aligned, respectively used as a first current contour point and a second current contour point, a straight line formed by connecting Pa0 and Pb0 is used as one side of the current triangle, the next contour point Pa1 of Pa0 is obtained, the next contour point Pb1 of Pb0 is obtained, a first distance between Pa0 and Pb1 is calculated, a second distance between Pb0 and Pa1 is calculated, the first distance with smaller distance is selected as the other side of the triangle, and finally the current triangle is determined. Updating Pa0 in the vertex of the current triangle to be a first current contour point, taking Pb1 in the vertex of the current triangle as a second current contour point, and continuing to determine the next triangle until all triangles are determined.
In the embodiment, the triangle is directly generated by utilizing the structural information between the two frames of contour points, compared with an implicit method, the method does not need to carry out octree and other structuring operations on the point cloud, and for the Delaunay method, a complex triangle generation method and a triangle selection method are not needed, so that the time consumption of an algorithm is reduced. The embodiment utilizes the prior structure information, has strong control capability on triangle generation, can effectively avoid the generation of error triangles, and has good effect.
In order to demonstrate the effect of the reconstruction of the laser contour mesh reconstruction method provided by the embodiment of the present invention, please refer to fig. 8, fig. 8 is an exemplary diagram of the contour reconstructed by the laser contour mesh reconstruction method in the embodiment of the present invention, and as can be seen from fig. 8, the contour reconstructed by the laser contour mesh reconstruction method in the embodiment of the present invention has complete edge, no false triangle is generated, and the effect is good.
In order to perform the above embodiments and the corresponding steps in each possible implementation manner, an implementation manner of the laser profile mesh reconstruction device is given below. Referring to fig. 9, fig. 9 is a block diagram illustrating a laser profile mesh reconstruction device according to an embodiment of the present invention. It should be noted that, the basic principle and the technical effects of the laser profile mesh reconstruction device 100 provided in this embodiment are the same as those of the foregoing embodiments, and for brevity, this embodiment is not mentioned in the description.
The laser profile mesh reconstruction device 100 comprises an acquisition module 110, a processing module 120 and a generation module 130.
The obtaining module 110 is configured to obtain multiple frames of contour points of the part to be tested, where each frame of contour point is obtained by combining contour points obtained by scanning the part to be tested from multiple different angles simultaneously by multiple line laser profilers.
The processing module 120 is configured to perform an ordering process according to a position of each contour point in each frame contour point on the part to be tested, so as to obtain a contour point sequence of each frame contour point, where positions of any two neighboring contour points in the contour point sequence of each frame contour point are also adjacent.
In an alternative embodiment, the processing module 120 is specifically configured to: classifying contour points in the same plane in the part to be tested into a set according to the position of each contour point in each frame on the part to be tested, so as to obtain a plurality of sets of contour points of each frame; carrying out ordering treatment on the contour points in each set of contour points of each frame to obtain an ordered sequence of the contour points in each set of contour points of each frame; and arranging all the ordered sequences of the contour points of each frame according to a preset order to obtain a contour point sequence of the contour points of each frame.
In an alternative embodiment, the processing module 120 is specifically configured to, when performing the ordering processing on the contour points in each set of contour points of each frame to obtain the ordered sequence of the contour points in each set of contour points of each frame: for any target set, dividing the plane of the part to be tested, where the contour points in the target set are located, into a plurality of grids; selecting a starting grid from grids with outline points in a plurality of grids; the method comprises the steps of taking an initial grid as a center, determining a long-side grid positioned at the same first coordinate axis position as the initial grid and a short-side grid positioned at the same second coordinate axis position as the initial grid, wherein the number of grids with contour points in the long-side grid is larger than that of grids with contour points in the short-side grid within a preset range of the initial grid; adding all grids with outline points in the initial grid and the short-side grid to a result point set; selecting a grid which is closest to the initial grid and has contour points from the long-side grids, adding the grid to a pre-established search queue, and enabling the search queue to be empty; according to the first-in first-out sequence, a candidate grid is taken out from the current search queue; if the candidate grids are not in the result point set, adding the candidate grids into the result point set, adding the grids which are provided with outline points in a preset neighborhood range of grids adjacent to the candidate grids and are not in the current search queue and the result point set into the current search queue according to a first-in first-out sequence, and returning to the step of taking out one candidate grid from the current search queue until the current search queue is empty; if the result point set does not comprise all grids with outline points in the multiple grids, taking the initial grid as a candidate grid, adding the grids which have outline points in a preset neighborhood range of grids adjacent to the candidate grid and are not in the current search queue and the result point set into the current search queue according to a second preset direction, and returning to the step of taking out one candidate grid from the current search queue according to the first-in first-out sequence until the search queue is empty; and sequencing the contour points in the grids in the result point set according to the sequence of adding the grids in the result point set into the result point set, so as to obtain an ordered sequence of the contour points in the target set.
In an alternative embodiment, the processing module 120 is specifically configured to, when ordering the contour points in the grids in the result point set according to the order in which the grids in the result point set are added to the result point set, obtain an ordered sequence of contour points in the target set: for any target grid in the result point set, if the target grid comprises a contour point, taking the contour point as a target contour point of the target grid; if the target grid comprises a plurality of contour points, determining each target contour point of the target grid according to the position information of the contour points in the result point set; generating a sequence number of each target contour point of the target grid in the ordered sequence according to the sequence numbers of the target grid in the result point set; traversing each target grid in the result point set to obtain the sequence number of each target contour point of each target grid in the ordered sequence, and generating the ordered sequence.
The generating module 130 is configured to generate triangles between every two contour point sequences according to the contour point sequences of contour points adjacent to each other in every two frame acquisition times, so as to reconstruct a laser contour grid mesh of the component to be tested.
In an alternative embodiment, the generating module 130 is specifically configured to: for a first contour point sequence and a second contour point sequence which are adjacent in any two frame acquisition time, taking a first contour point in the first contour point sequence as a first current contour point and taking a first contour point in the second contour point sequence as a second current contour point; determining a current triangle according to the first current contour point, a next contour point of the first current contour point, the second current contour point and a next contour point of the second current contour point; updating the first current contour point and the second current contour point according to the vertex of the current triangle; and repeating the step of determining the current triangle according to the first current contour point, the next contour point of the first current contour point, the second current contour point and the next contour point of the second current contour point until the first current contour point is the last contour point of the first contour point sequence or the second current contour point is the last contour point of the second contour point sequence, thereby obtaining the triangle between the first contour point sequence and the second contour point sequence.
In an alternative embodiment, the generating module 130 is specifically configured to determine the current triangle according to the first current contour point, a next contour point of the first current contour point, the second current contour point, and a next contour point of the second current contour point, and is specifically configured to: taking a straight line formed by connecting the first current contour point and the second current contour point as one side of the current triangle; acquiring a next contour point of the first current contour point, and acquiring a next contour point of the second current contour point; calculating a first distance between a first current contour point and a next contour point of a second current contour point, and calculating a second distance between the second current contour point and the next contour point of the first current contour point; and taking the smaller distance from the first distance and the second distance as the other side of the current triangle, and finally determining the current triangle.
In an alternative embodiment, the generating module 130 is specifically configured to, when updating the first current contour point and the second current contour point according to the vertex of the current triangle, specifically: updating the contour point with the largest sequence number in the first contour point sequence in the vertex of the current triangle to be the first current contour point; and updating the contour point with the largest sequence number in the second contour point sequence in the vertex of the current triangle to be the second current contour point.
Referring to fig. 10, fig. 10 is a schematic block diagram of the electronic device 10 according to the embodiment of the present invention, and the electronic device 10 includes a processor 11, a memory 12, and a bus 13. The processor 11 and the memory 12 communicate via a bus 13.
The processor 11 may be an integrated circuit chip with signal processing capabilities. In implementation, the steps of the above method may be performed by integrated logic circuits of hardware in the processor 11 or by instructions in the form of software. The processor 11 may be a general-purpose processor, including a central processing unit (Central Processing Unit, CPU for short), a network processor (Network Processor, NP for short), and the like; but may also be a Digital Signal Processor (DSP), application Specific Integrated Circuit (ASIC), an off-the-shelf programmable gate array (FPGA) or other programmable logic device, discrete gate or transistor logic device, discrete hardware components.
The memory 12 is used for storing a program, for example, a laser profile mesh reconstruction device in the embodiment of the present invention, where the laser profile mesh reconstruction device includes at least one software functional module that may be stored in the memory 12 in a form of software or firmware (firmware), and the processor 11 executes the program after receiving an execution instruction to implement the laser profile mesh reconstruction method in the embodiment of the present invention.
The memory 12 may include high-speed random access memory (RAM: random Access Memory) and may also include non-volatile memory (nonvolatile memory). Alternatively, the memory 12 may be a storage device built into the processor 11, or may be a storage device independent of the processor 11.
The bus 13 may be an ISA bus, a PCI bus, an EISA bus, or the like. Fig. 10 is represented by only one double-headed arrow, but does not represent only one bus or one type of bus.
An embodiment of the present invention provides a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements the laser profile mesh reconstruction method of any one of the foregoing embodiments.
In summary, the embodiment of the invention provides a laser profile mesh reconstruction method, a device, an electronic device and a storage medium, wherein the method comprises the following steps: acquiring multi-frame contour points of a part to be tested, wherein each frame of contour point is obtained by combining contour points obtained by scanning the part to be tested from a plurality of different angles simultaneously by a plurality of line laser profilers; carrying out ordered treatment according to the position of each contour point in each frame of contour points on the part to be tested to obtain a contour point sequence of each frame of contour points, wherein the positions of any two adjacent contour points in the contour point sequence of each frame of contour points on the part to be tested are also adjacent; and generating triangles between every two contour point sequences according to the contour point sequences of every two contour point sequences adjacent to the acquisition time of each frame so as to reconstruct the laser contour grid mesh of the part to be tested. Compared with the prior art, the embodiment of the invention has at least the following advantages: (1) The contour points of two frames adjacent in acquisition time are utilized, the prior structural information of the contour point sequence of the contour point of each frame is fully utilized, the time consumption of laser contour mesh reconstruction is reduced, the false creation of triangles is effectively avoided, and the efficiency and the accuracy of laser contour mesh reconstruction by utilizing point cloud data are improved; (2) Each contour point in each frame of contour points is ordered, so that rapid search of each contour point in subsequent processing is realized, effective geometric structure information is provided for analysis of point cloud based on the contour points, and the effects of data processing, feature extraction accuracy, visualization and interaction can be improved; (3) The contour points of the same plane of each frame are classified into a set, so that the ordering treatment can be performed on each plane in parallel, and finally, the results of the ordering treatment of each plane are combined, and the ordering treatment can be performed on each plane of each frame in parallel, thereby improving the ordering treatment efficiency; (4) The ordered point clouds of the outline points can utilize the sequence information thereof to encode and decode the point clouds based on the distance increment, so that the storage of the point cloud data is greatly compressed, and the transmission of the point cloud data is accelerated; (5) The ordered outline points can also well process the condition of outline structure information damage and outline deletion, so that the completion of the deletion outline is realized; (6) When the triangle is created, the created triangle is ensured to be the smallest triangle by searching the next nearest contour point, so that the precision of mesh reconstruction is improved; (7) The contour points of two adjacent frames are aligned by using a registration technology, so that the problem of contour dislocation caused by vibration and swing of the measured object can be well solved; (8) The size of the created triangle is controlled through the distance threshold value, so that erroneous creation of the triangle is effectively prevented.
The foregoing is merely illustrative of the present invention, and the present invention is not limited thereto, and any changes or substitutions easily contemplated by those skilled in the art within the scope of the present invention should be included in the present invention. Therefore, the protection scope of the invention is subject to the protection scope of the claims.

Claims (10)

1. A laser profile mesh reconstruction method, the method comprising:
acquiring multi-frame contour points of a part to be tested, wherein each frame of contour point is obtained by combining contour points obtained by simultaneously scanning the part to be tested from a plurality of different angles by a plurality of line laser profilers;
carrying out ordered treatment according to the position of each contour point in each frame of contour points on the part to be tested to obtain a contour point sequence of the contour points of each frame, wherein the positions of any two adjacent contour points in the contour point sequence of the contour points of each frame on the part to be tested are also adjacent;
and generating triangles between every two contour point sequences according to the contour point sequences of every two adjacent contour points in the acquisition time of frames so as to reconstruct the laser contour grid mesh of the part to be detected.
2. The method for reconstructing a laser contour mesh as set forth in claim 1, wherein said step of obtaining a contour point sequence of said contour points for each frame by performing an ordering process according to a position of each contour point on said part to be measured in said contour points for each frame comprises:
classifying contour points on the same plane in the part to be tested into a set according to the position of each contour point in each frame on the part to be tested, so as to obtain a plurality of sets of the contour points of each frame;
carrying out ordered treatment on the contour points in each set of the contour points of each frame to obtain an ordered sequence of the contour points in each set of the contour points of each frame;
and arranging all the ordered sequences of the contour points of each frame according to a preset sequence to obtain a contour point sequence of the contour points of each frame.
3. The method of claim 2, wherein the step of performing an ordering process on the contour points in each set of the contour points for each frame to obtain an ordered sequence of the contour points in each set of the contour points for each frame comprises:
for any target set, dividing the plane of the part to be tested, where the contour points in the target set are located, into a plurality of grids;
Selecting a starting grid from grids with outline points in the grids;
the initial grid is taken as a center, a long-side grid positioned at the same first coordinate axis position as the initial grid and a short-side grid positioned at the same second coordinate axis position as the initial grid are determined, and the number of grids with contour points in the long-side grid is larger than the number of grids with contour points in the short-side grid within a preset range of the initial grid;
adding all grids with outline points in the initial grid and the short-side grid to a result point set;
selecting a grid which is closest to the initial grid and has contour points from the long-side grids, and adding the grid to a pre-established search queue, wherein the search queue is empty;
according to the first-in first-out sequence, a candidate grid is taken out from the current search queue;
if the candidate grids are not in the result point set, adding the candidate grids into the result point set, adding the grids which have outline points in a preset neighborhood range of grids adjacent to the candidate grids and are not in the current search queue and the result point set into the current search queue according to a first preset direction, returning to the step of taking out one candidate grid from the current search queue according to the first-in first-out sequence until the current search queue is empty;
If the result point set does not include all grids with outline points in the grids, taking the initial grid as a candidate grid, adding the grids which have outline points in a preset neighborhood range of grids adjacent to the candidate grid and are not in the current search queue and the result point set to the current search queue according to a second preset direction, returning to the step of taking out one candidate grid from the current search queue according to the first-in first-out sequence until the search queue is empty;
and sequencing the contour points in the grids in the result point set according to the sequence of adding the grids in the result point set into the result point set, so as to obtain an ordered sequence of the contour points in the target set.
4. The laser contour mesh reconstruction method as defined in claim 3, wherein said step of ordering contour points in said grids in said result point set in the order in which said grids in said result point set are added to said result point set, to obtain an ordered sequence of contour points in said target set comprises:
for any target grid in the result point set, if the target grid comprises a contour point, taking the contour point as a target contour point of the target grid;
If the target grid comprises a plurality of contour points, determining each target contour point of the target grid according to the position information of the contour points in the result point set;
generating a sequence number of each target contour point of the target grid in the ordered sequence according to the sequence numbers of the target grid in the result point set;
and traversing each target grid in the result point set to obtain the sequence number of each target contour point of each target grid in the ordered sequence, and generating the ordered sequence.
5. The laser contour mesh reconstruction method as defined in claim 1, wherein said step of generating triangles between each two of said contour point sequences from contour point sequences of contour points adjacent to each other at each two frame acquisition times comprises:
for a first contour point sequence and a second contour point sequence which are adjacent in any two frame acquisition time, taking a first contour point in the first contour point sequence as a first current contour point and taking a first contour point in the second contour point sequence as a second current contour point;
determining a current triangle according to the first current contour point, a next contour point of the first current contour point, the second current contour point and a next contour point of the second current contour point;
Updating the first current contour point and the second current contour point according to the vertex of the current triangle;
and repeating the step of determining the current triangle according to the first current contour point, the next contour point of the first current contour point, the second current contour point and the next contour point of the second current contour point until the first current contour point is the last contour point of the first contour point sequence or the second current contour point is the last contour point of the second contour point sequence, thereby obtaining the triangle between the first contour point sequence and the second contour point sequence.
6. The laser profile mesh reconstruction method as claimed in claim 5, wherein the step of determining a current triangle based on the first current profile point, a next profile point to the first current profile point, the second current profile point, and a next profile point to the second current profile point comprises:
taking a straight line formed by connecting the first current contour point and the second current contour point as one side of a current triangle;
acquiring a next contour point of the first current contour point and acquiring a next contour point of the second current contour point;
Calculating a first distance between the first current contour point and a next contour point of the second current contour point, and calculating a second distance between the second current contour point and a next contour point of the first current contour point;
and taking the smaller distance from the first distance to the second distance as the other side of the current triangle, and finally determining the current triangle.
7. The laser profile mesh reconstruction method as claimed in claim 5, wherein the step of updating the first current profile point and the second current profile point according to the vertex of the current triangle comprises:
updating the contour point with the largest sequence number in the first contour point sequence in the vertex of the current triangle to be a first current contour point;
and updating the contour point with the largest sequence number in the second contour point sequence in the vertex of the current triangle to be the second current contour point.
8. A laser profile mesh reconstruction apparatus, the apparatus comprising:
the acquisition module is used for acquiring multi-frame contour points of the part to be tested, and each frame of contour point is obtained by combining contour points obtained by simultaneously scanning the part to be tested from a plurality of different angles by a plurality of line laser profilers;
The processing module is used for carrying out ordered processing according to the position of each contour point in each frame of contour points on the component to be tested to obtain a contour point sequence of the contour points of each frame, and the positions of any two adjacent contour points in the contour point sequence of the contour points of each frame on the component to be tested are also adjacent;
the generating module is used for generating triangles between every two contour point sequences according to the contour point sequences of every two contour points adjacent to each other in the acquisition time of frames so as to reconstruct the laser contour grid mesh of the part to be detected.
9. An electronic device comprising a processor and a memory, the memory for storing a program, the processor for implementing the laser profile mesh reconstruction method of any one of claims 1-7 when the program is executed.
10. A computer-readable storage medium, characterized in that a computer program is stored thereon, which computer program, when being executed by a processor, implements the laser profile mesh reconstruction method of any one of claims 1-7.
CN202311338170.6A 2023-10-17 2023-10-17 Laser contour mesh reconstruction method and device, electronic equipment and storage medium Active CN117078891B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311338170.6A CN117078891B (en) 2023-10-17 2023-10-17 Laser contour mesh reconstruction method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311338170.6A CN117078891B (en) 2023-10-17 2023-10-17 Laser contour mesh reconstruction method and device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN117078891A true CN117078891A (en) 2023-11-17
CN117078891B CN117078891B (en) 2024-01-09

Family

ID=88715618

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311338170.6A Active CN117078891B (en) 2023-10-17 2023-10-17 Laser contour mesh reconstruction method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN117078891B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070253617A1 (en) * 2006-04-27 2007-11-01 Mako Surgical Corp. Contour triangulation system and method
JP2010186479A (en) * 2009-02-12 2010-08-26 Fujitsu Ltd Device and method for dividing three-dimensional model
CN101944239A (en) * 2009-07-08 2011-01-12 富士通株式会社 Method and device for segmenting 3D model and image processing system with device
US20170053438A1 (en) * 2014-06-13 2017-02-23 Shenzhen Institutes Of Advanced Technology Chinese Academy Of Sciences Method and system for reconstructing a three-dimensional model of point clouds
CN110322464A (en) * 2019-06-30 2019-10-11 华中科技大学 A kind of small curvature thin-walled parts boundary extraction method based on three-dimensional point cloud
CN116045851A (en) * 2023-03-31 2023-05-02 第六镜科技(北京)集团有限责任公司 Line laser profiler calibration method and device, electronic equipment and storage medium

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070253617A1 (en) * 2006-04-27 2007-11-01 Mako Surgical Corp. Contour triangulation system and method
JP2010186479A (en) * 2009-02-12 2010-08-26 Fujitsu Ltd Device and method for dividing three-dimensional model
CN101944239A (en) * 2009-07-08 2011-01-12 富士通株式会社 Method and device for segmenting 3D model and image processing system with device
US20170053438A1 (en) * 2014-06-13 2017-02-23 Shenzhen Institutes Of Advanced Technology Chinese Academy Of Sciences Method and system for reconstructing a three-dimensional model of point clouds
CN110322464A (en) * 2019-06-30 2019-10-11 华中科技大学 A kind of small curvature thin-walled parts boundary extraction method based on three-dimensional point cloud
US20210174121A1 (en) * 2019-06-30 2021-06-10 Huazhong University Of Science And Technology Method for extracting robot processing boundary of thin-walled part with small curvature based on three-dimensional point cloud
CN116045851A (en) * 2023-03-31 2023-05-02 第六镜科技(北京)集团有限责任公司 Line laser profiler calibration method and device, electronic equipment and storage medium

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
XIAOZHI LI: "Human Body Dimensions Extraction from 3D Scan Data", 2010 INTERNATIONAL CONFERENCE ON INTELLIGENT COMPUTATION TECHNOLOGY AND AUTOMATION *
秦绪佳, 欧宗瑛, 侯建华: "医学图像三维重建模型的剖切与立体视窗剪裁", 计算机辅助设计与图形学学报, no. 03 *

Also Published As

Publication number Publication date
CN117078891B (en) 2024-01-09

Similar Documents

Publication Publication Date Title
US10255480B2 (en) Monitoring object shape and deviation from design
CN112669463B (en) Method for reconstructing curved surface of three-dimensional point cloud, computer device and computer-readable storage medium
US9984291B2 (en) Information processing apparatus, information processing method, and storage medium for measuring a position and an orientation of an object by using a model indicating a shape of the object
CN107622530B (en) Efficient and robust triangulation network cutting method
JP2011192214A (en) Geometric feature extracting device, geometric feature extraction method and program, three-dimensional measuring device and object recognition device
CN114359042A (en) Point cloud splicing method and device, three-dimensional scanner and electronic equipment
CN115131521A (en) Generating a three-dimensional representation of an object surface from a structured point cloud
US10650586B2 (en) Automated mesh generation
CN114861500A (en) Method and system for automatically generating tunnel structure finite element model based on three-dimensional point cloud
US7388584B2 (en) Method and program for determining insides and outsides of boundaries
CN117078891B (en) Laser contour mesh reconstruction method and device, electronic equipment and storage medium
CN104573144A (en) System and method for simulating offline point cloud of measuring equipment
Furferi et al. 3D Model Retrieval from mechanical drawings analysis
CN109360215B (en) Method, device and equipment for searching outer contour of three-dimensional model and storage medium
Wu et al. Occluder Generation for Buildings in Digital Games
CN111633337B (en) Reflection eliminating method and device for laser welding seam measurement
JP2009122998A (en) Method for extracting outline from solid/surface model, and computer software program
Filaretov et al. The method of cutting of flexible parts using manipulators and information multiplexing from 3D vision system and CAD model
CN107871043B (en) Singular point identification method and device
CN116071429B (en) Method and device for identifying outline of sub-pattern, electronic equipment and storage medium
Omelkina et al. Symmetry-Based 3D Object Completion using Local Geometry Features.
CN114037779A (en) Contour drawing method and device, computer storage medium and electronic device
Kinsner et al. GPU accelerated sheet forming grid measurement
CN116579930A (en) Point cloud denoising method based on point cloud partition density
CN118014971A (en) Surface defect detection method, device and equipment for photovoltaic module and storage medium

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
GR01 Patent grant
GR01 Patent grant