CN115330836A - Laser cleaning track compression method, device, equipment and storage medium - Google Patents

Laser cleaning track compression method, device, equipment and storage medium Download PDF

Info

Publication number
CN115330836A
CN115330836A CN202210962576.0A CN202210962576A CN115330836A CN 115330836 A CN115330836 A CN 115330836A CN 202210962576 A CN202210962576 A CN 202210962576A CN 115330836 A CN115330836 A CN 115330836A
Authority
CN
China
Prior art keywords
track
scanning track
workpiece
grid
tracks
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
CN202210962576.0A
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.)
Seizet Technology Shenzhen Co Ltd
Original Assignee
Seizet Technology Shenzhen 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 Seizet Technology Shenzhen Co Ltd filed Critical Seizet Technology Shenzhen Co Ltd
Priority to CN202210962576.0A priority Critical patent/CN115330836A/en
Publication of CN115330836A publication Critical patent/CN115330836A/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/20Analysis of motion
    • G06T7/246Analysis of motion using feature-based methods, e.g. the tracking of corners or segments
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/30Determination of transform parameters for the alignment of images, i.e. image registration
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/70Determining position or orientation of objects or cameras
    • G06T7/73Determining position or orientation of objects or cameras using feature-based methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/80Analysis of captured images to determine intrinsic or extrinsic camera parameters, i.e. camera calibration
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10028Range image; Depth image; 3D point clouds
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30241Trajectory
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30244Camera pose

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Multimedia (AREA)
  • Detergent Compositions (AREA)

Abstract

The invention relates to the technical field of laser cleaning, and discloses a method, a device, equipment and a storage medium for compressing a laser cleaning track. The method includes the steps that a to-be-compressed scanning track of a to-be-scanned workpiece is obtained, the to-be-compressed scanning track is a set of dense point sets which are arranged in a directed mode, the scanning track is divided into multiple sections of tracks based on the dense point sets, the multiple sections of tracks are compressed according to preset rules, a target scanning track is obtained, the target scanning track is represented as a sparse point set, the sparse point set is subjected to de-duplication processing, the target scanning track is obtained, the scanning track is simplified on the premise that the cleaning effect is guaranteed, and the communication efficiency and the cleaning efficiency are improved.

Description

Laser cleaning track compression method, device, equipment and storage medium
Technical Field
The invention relates to the technical field of laser cleaning, in particular to a method, a device, equipment and a storage medium for compressing a laser cleaning track.
Background
Laser cleaning is a common surface treatment technique in industry, and is used to remove grease, dust, rust, residual solvent, binder and other contaminants on the surface of a workpiece to ensure the quality of the next process, such as electroplating, phosphating, spraying, welding, packaging, and integrated circuit assembly, and the surface stains must be removed first. The laser cleaning is a 'dry' cleaning, does not need cleaning solution or other chemical solution, has cleanliness far higher than a chemical cleaning process, can adapt to the cleaning of various surface dirt, has little environmental pollution, and can not damage a substrate. The method is a supplement and extension of the traditional cleaning method, and has a wide application prospect due to a plurality of inherent advantages.
In laser cleaning, the identification and planning of cleaning paths are realized through manual operation in some cases, and scanning tracks are automatically generated in some cases, but the existing scanning tracks are too dense, so that the communication efficiency is low, and the laser cleaning efficiency is influenced. Therefore, how to improve the laser cleaning efficiency while maintaining the scanning track shape is an urgent technical problem to be solved.
The above is only for the purpose of assisting understanding of the technical aspects of the present invention, and does not represent an admission that the above is prior art.
Disclosure of Invention
The invention mainly aims to provide a method, a device and equipment for compressing a laser cleaning track and a computer storage medium, and aims to solve the technical problem of low cleaning efficiency caused by over-dense laser cleaning tracks in the prior art.
In order to achieve the above object, the present invention provides a laser cleaning track compression method, which includes the following steps:
acquiring a to-be-compressed scanning track of a to-be-scanned workpiece, wherein the to-be-compressed scanning track is a set of dense point sets which are arranged in a directed manner;
dividing the scan trajectory into a plurality of segments of trajectories based on the dense set of points;
compressing the multiple sections of tracks according to a preset rule to obtain a target scanning track;
and representing the target scanning track as a sparse point set, and performing deduplication processing on the sparse point set to obtain the target scanning track.
Preferably, the compressing the multiple segments of tracks according to a preset rule to obtain the target scanning track includes:
calculating a cosine value of a direction included angle between every two adjacent sections of tracks;
judging whether each two adjacent tracks can be combined or not according to the cosine value of the direction included angle;
if the two sections of tracks can be combined, combining the two corresponding adjacent sections of tracks to obtain a first compression scanning track;
and compressing the first compressed scanning track again to obtain a target scanning track.
Preferably, the compressing the first compressed scanning track again to obtain the target scanning track includes:
representing the first compressed scanning track as a group of sparse point sets with directed arrangement;
dividing the first compressed scanning track into a plurality of sections of new tracks based on the sparse point set;
calculating the track length of each new track;
judging whether each two adjacent new tracks can be merged or not according to the track length;
if the two adjacent tracks can be combined, combining the two corresponding adjacent new tracks to obtain the target scanning track.
Preferably, the determining whether each two adjacent tracks can be merged according to the cosine value of the direction included angle includes:
setting an included angle threshold value, and calculating a cosine value of the included angle threshold value;
if the cosine value of the direction included angle is greater than the cosine value of the included angle threshold value, the corresponding two adjacent tracks can be merged.
Preferably, the determining, according to the track length, whether each two adjacent new tracks can be merged includes:
setting a track minimum length threshold;
judging whether the track length of at least one section of each two adjacent sections of new tracks is smaller than the minimum length threshold value;
if so, the corresponding two new tracks can be merged.
Preferably, the acquiring a to-be-compressed scanning track of a to-be-scanned workpiece includes:
acquiring a workpiece grid of a workpiece to be scanned, and calculating a minimum directed bounding box according to the workpiece grid;
generating an initial scanning track according to the minimum directional bounding box;
projecting the workpiece grid to the upper surface of the minimum bounding box to obtain a projection grid;
discretizing the initial scan trajectory into a set of points;
searching a target projection grid surface with the shortest distance between each point in the discrete point set of each initial scanning track according to the projection grid, and recording a target serial number of the target projection grid surface;
projecting the discrete points in the point set to a target grid corresponding to the target sequence number in the workpiece grid to obtain a scanning track projection point set;
and fitting the scanning track to be compressed of the workpiece to be scanned according to the scanning track projection point set.
Preferably, the acquiring a to-be-compressed scanning track of a to-be-scanned workpiece includes:
acquiring a workpiece grid of a workpiece to be scanned, and calculating a minimum directed bounding box according to the workpiece grid;
generating an initial scanning track according to the minimum directional bounding box;
projecting the workpiece grid to the upper surface of the minimum bounding box to obtain a projected grid;
traversing four corner surface patches in the projection grid, searching the four corner surface patches intersected with the initial scanning track, and obtaining a candidate projection surface patch set;
traversing edges of four corner patches in the candidate projection patch set, and searching an intersecting edge and an intersecting point which are intersected with the initial scanning track;
searching the projection points of the intersection points in the workpiece grid according to the intersection edges and the intersection points, and forming a projection point set by all the searched projection points;
and fitting the scanning track to be compressed of the workpiece to be scanned according to the projection points in the projection point set.
In addition, in order to achieve the above object, the present invention further provides a laser cleaning trajectory compression device, including:
the device comprises an acquisition module, a compression module and a compression module, wherein the acquisition module is used for acquiring a to-be-compressed scanning track of a to-be-scanned workpiece, and the to-be-compressed scanning track is a group of dense point sets which are arranged in a directed manner;
a dividing module for dividing the scanning trajectory into a plurality of segments of trajectories based on the dense point set;
the compression module is used for compressing the multiple sections of tracks according to a preset rule to obtain a target scanning track;
and the duplication removing module is used for representing the target scanning track as a sparse point set, and carrying out duplication removing processing on the sparse point set to obtain the target scanning track.
In addition, in order to achieve the above object, the present invention further provides a laser cleaning trajectory compression apparatus, including: the system comprises a memory, a processor and a laser cleaning track compression program which is stored on the memory and can run on the processor, wherein the laser cleaning track compression program realizes the steps of the laser cleaning track compression method when being executed by the processor.
In addition, to achieve the above object, the present invention further provides a storage medium having a laser cleaning trajectory compression program stored thereon, wherein the laser cleaning trajectory compression program, when executed by a processor, implements the steps of the laser cleaning trajectory compression method as described above.
According to the method, a to-be-compressed scanning track of a to-be-scanned workpiece is obtained, the to-be-compressed scanning track is a set of dense point sets in directional arrangement, the scanning track is divided into multiple sections of tracks based on the dense point sets, the multiple sections of tracks are compressed according to a preset rule, a target scanning track is obtained, the target scanning track is represented as a sparse point set, the sparse point set is subjected to de-duplication processing, the target scanning track is obtained, and on the premise that a cleaning effect is guaranteed, the scanning track is simplified, and the communication efficiency and the cleaning efficiency are improved.
Drawings
FIG. 1 is a schematic structural diagram of a laser cleaning track compression device in a hardware operating environment according to an embodiment of the present invention;
FIG. 2 is a schematic flowchart illustrating a first embodiment of a method for compressing a laser cleaning track according to the present invention;
FIG. 3 is a diagram illustrating the effect of compressing the scanning track for the first time in the embodiment of the method for compressing the laser cleaning track according to the present invention;
FIG. 4 is a diagram illustrating the effect of the target scanning track in the embodiment of the method for compressing the laser cleaning track according to the present invention;
fig. 5 is a block diagram of a first embodiment of a laser cleaning track compressing device according to the present invention.
The implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
Referring to fig. 1, fig. 1 is a schematic structural diagram of a laser cleaning track compression device in a hardware operating environment according to an embodiment of the present invention.
As shown in fig. 1, the laser cleaning track compressing apparatus may include: a processor 1001, such as a Central Processing Unit (CPU), a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. Wherein a communication bus 1002 is used to enable connective communication between these components. The user interface 1003 may include a Display screen (Display), and the optional user interface 1003 may further include a standard wired interface and a wireless interface, and the wired interface for the user interface 1003 may be a USB interface in the present invention. The network interface 1004 may optionally include a standard wired interface, a WIreless interface (e.g., a WIreless-FIdelity (WI-FI) interface). The Memory 1005 may be a Random Access Memory (RAM) Memory or a Non-volatile Memory (NVM), such as a disk Memory. The memory 1005 may alternatively be a storage device separate from the processor 1001.
Those skilled in the art will appreciate that the configuration shown in FIG. 1 does not constitute a limitation of the laser cleaning track compression apparatus and may include more or fewer components than shown, or some components may be combined, or a different arrangement of components.
As shown in fig. 1, a memory 1005, which is a kind of computer storage medium, may include therein an operating system, a network communication module, a user interface module, and a laser cleaning trajectory compression program.
In the laser cleaning track compression device shown in fig. 1, the network interface 1004 is mainly used for connecting a background server and performing data communication with the background server; the user interface 1003 is mainly used for connecting user equipment; the laser cleaning track compression device calls a laser cleaning track compression program stored in the memory 1005 through the processor 1001, and executes the laser cleaning track compression method provided by the embodiment of the present invention.
Based on the hardware structure, the embodiment of the laser cleaning track compression method is provided.
Referring to fig. 2, fig. 2 is a schematic flow chart of a first embodiment of the laser cleaning track compression method of the present invention, and proposes the first embodiment of the laser cleaning track compression method of the present invention.
In a first embodiment, the laser cleaning track compression method includes the following steps:
step S10: and acquiring a to-be-compressed scanning track of the to-be-scanned workpiece, wherein the to-be-compressed scanning track is a group of directionally arranged dense point sets.
It should be understood that the main execution body of this embodiment is the laser cleaning trajectory compression device, and the laser cleaning trajectory compression device may be an electronic device such as a personal computer, an industrial personal computer, a robot, or a server, which is not limited in this embodiment. And fixing the 3D camera right above the workpiece to be welded, and triggering to take a picture to obtain the ordered point cloud of the workpiece to be scanned. For any point v in the ordered point cloud i,j Looking up v according to the index rule of row-column ordering i,j Adjacent point v of i,j+1 ,v i+1,j+1 ,v i+1,j . Wherein, the ith row and j column, the ith row and j +1 column, the ith +1 row and j +1 column and the ith +1 row and j column in the ordered point cloud data respectively correspond to the v i,j ,v i,j+1 ,v i+1,j+1 ,v i+1,j Four points, which form a four-corner patch, the points forming the four-corner patch are called mesh vertices. And adding the four-corner surface patches according to the index relation until all vertexes in the ordered point cloud are searched, wherein the vertexes and the four-corner surface patches jointly form a four-corner grid. Wherein each vertex v i,j Is (x, y, z) in the 3D space. According to the vertex position coordinates of the four-corner surface patches, the normal vector of each four-corner surface patch, the normal directions of all the four-corner surface patches and the normal direction set of the surface forming the four-corner grid are calculated
Figure BDA0003793755910000061
Wherein N is F The number of the quadrangular patches included in the quadrangular grid.
It should be noted that, the four-corner grid is subjected to plane segmentation to obtain a workpiece grid to be scanned; extracting the four-corner grid outline of the workpiece grid to be scanned; and calculating the minimum directed bounding box according to the four-corner grid outline. From the topological relation between the vertices of the quadrilateral meshes, the inner vertex v of any one mesh i,j Its adjacent vertex number must be four, otherwise vertex v i,j Are edge points. Thereby extracting the grid outline of the workpiece to be scanned. In order to accurately identify the pose of an object with any shape, the pose of the workpiece to be scanned under the minimum envelope is calculated according to the four-corner grid contour point cloud, and the minimum directed bounding box is obtained.
Further, calculating the mass center of the workpiece grid to be scanned under a camera coordinate system according to the four-corner grid profile; calculating an inertia tensor matrix of the to-be-scanned workpiece grid relative to the center of mass under the camera coordinate system; calculating an initial pose matrix of the workpiece grid to be scanned under the coordinate system of the center of mass according to the inertia tensor matrix; and calculating the minimum directed bounding box of the workpiece to be scanned according to the preliminary pose matrix.
Centroid refers to the center of massConsidered as an imaginary point where the mass of the object is concentrated at this point. Object centroid coordinate P c The calculation formula is as follows:
Figure BDA0003793755910000062
wherein M is the total mass of the object, M i To divide the object into i parts, i-th part mass, r i Is m i The coordinates of (a). And calculating the centroid of the workpiece grid to be scanned in the camera coordinate system according to an object centroid coordinate calculation formula.
The inertia tensor is a physical quantity for describing the magnitude of inertia of the fixed-point rotation of the rigid body, and only one point of the rigid body is always kept still when the rigid body rotates at the fixed point. In addition, the inertia tensor is a real-valued three-dimensional symmetric matrix, and for any reference point Q in a three-dimensional space and a rectangular coordinate system Q taking the reference point as an origin xyz The inertia tensor representation method is as follows:
Figure BDA0003793755910000071
wherein, diagonal element I xx ,I yy ,I zz The moments of inertia for the x-axis, y-axis, and z-axis, respectively. Moment of inertia generally refers to the property of a cross-section to resist bending, given (x, y, z) as a small mass d m Relative position to point Q. The calculation of these moments of inertia is then as follows:
Figure BDA0003793755910000072
Figure BDA0003793755910000073
Figure BDA0003793755910000074
instead of diagonal elements, the product of inertia is defined as:
Figure BDA0003793755910000075
Figure BDA0003793755910000076
Figure BDA0003793755910000077
solving an inertia tensor matrix of the four-corner grid outline relative to the mass center, and enabling the four-corner grid outline to be in accordance with the theorem of parallel axes
x i ′=x i -p x
y i ′=y i -p y
z i ′=z i -p z
Wherein (p) x ,p y ,p z ) Is the coordinate of the centroid of the four-corner grid outline under the camera coordinate system, (x) i ,y i ,z i ) Is the coordinate of the point cloud under the camera coordinate system. The inertia tensor matrix of the four-corner grid outline relative to the mass center can be obtained, and the final calculation formula is as follows:
Figure BDA0003793755910000078
and traversing all the four-corner grid outlines, substituting the formula, and calculating to obtain an inertia tensor matrix I of the four-corner grid outlines relative to the mass center under a camera coordinate system.
And (3) adopting a diagonal method to enable the inertia product to be zero and enable the inertia tensor to be a diagonal matrix. The main elements of the symmetric matrix are positive numbers, the obtained three eigenvalues are necessarily positive real numbers, the three eigenvectors are necessarily orthogonal with each other, and therefore the eigenvalue lambda of the inertia tensor matrix is obtained through calculation 1 、λ 2 、λ 3
According to the eigenvalue of the inertia tensor matrix, solving an eigenvector formula of the inertia tensor matrix as follows: i ω = λ ω. According to the eigenvector of the inertia tensor matrix, namely the principal axis of inertia, defining a coordinate system of the four-corner grid outline at the center of mass according to the principal axis of inertia, thereby obtaining a rotation matrix R of the four-corner grid outline rotating the principal axis to the center of mass under a camera coordinate system o2c According to the rotation matrix and the mass center in the camera coordinate system, calculating a rotation translation matrix from the camera coordinate system to a point cloud mass center coordinate system to obtain a preliminary position and orientation matrix T of the workpiece to be scanned o2c I.e. the smallest directed bounding box. Wherein, the translation matrix t from the camera coordinate system to the cloud centroid of the point o2c Equal to the centroid P c And (4) coordinates.
It should be noted that the initial scanning trajectory is generated according to the minimum directional bounding box. Finding the minimum point B of the minimum directed bounding box min And maximum point B max . From B min And B max The coordinates of the vertex of the upper surface of the directed bounding box can be respectively given as A (x) min ,y min ,z min ),B(x min ,y max ,z min ),C(x max ,y max ,z min ),D(x max ,y min ,z min ) The four vertices are arranged in a counterclockwise direction. And generating a scanning track in a mode that a single track is scanned along the X axis in the positive direction and a plurality of tracks are arranged along the Y axis in the positive direction. Alternatively, the four vertices may be arranged in a clockwise direction, and the scanning trajectory may be generated in such a manner that a single trajectory scans in the X-axis direction and a plurality of trajectories are arranged in the Y-axis direction. This embodiment is not limited.
In a specific implementation, in order to enable the laser beam to completely cover the workpiece to be scanned and simultaneously enable the laser beam to be uniformly distributed on the surface of the workpiece to be scanned, the energy of the laser beam is utilized to the maximum extent, and the scanning track to be compressed is obtained by projecting a laser cleaning track generated based on a minimum bounding box onto the surface of a workpiece grid.
It should be understood that any of the scan trajectories T to be compressed i Dense point sets that can be arranged by a set of directions
Figure BDA0003793755910000081
Is shown in which
Figure BDA0003793755910000082
Step S20: dividing the scan trajectory into a multi-segment trajectory based on the dense set of points.
Understandably, based on the dense point set, from the to-be-compressed scanning trajectory T i Starting from the starting point, connecting two points into a section of track, and compressing the scanning track T i Divided into a plurality of segments of tracks.
Step S30: and compressing the multiple sections of tracks according to a preset rule to obtain a target scanning track.
It should be understood that the track compression flow is divided into two steps. Firstly, two tracks with an included angle smaller than a certain threshold value are combined according to the included angle of the two continuous tracks. And secondly, combining two sections of tracks with the length less than a certain threshold value according to the minimum length of the tracks.
Step S40: and representing the target scanning track as a sparse point set, and performing deduplication processing on the sparse point set to obtain the target scanning track.
It should be noted that, for the scanning track T to be compressed i Compressed track sparse point set
Figure BDA0003793755910000091
And performing duplicate removal processing to remove repeated points and obtain a target scanning track. And the robot can perform laser scanning on the workpiece to be scanned according to the final scanning track to realize laser cleaning.
In this embodiment, a to-be-compressed scanning track of a to-be-scanned workpiece is obtained, the to-be-compressed scanning track is a set of dense point sets in directional arrangement, the scanning track is divided into multiple segments of tracks based on the dense point sets, the multiple segments of tracks are compressed according to a preset rule, a target scanning track is obtained, the target scanning track is represented as a sparse point set, the sparse point set is subjected to deduplication processing, the target scanning track is obtained, the scanning track is simplified on the premise that a cleaning effect is guaranteed, and communication efficiency and cleaning efficiency are improved.
With continued reference to fig. 2, a second embodiment of the laser cleaning track compression method according to the present invention is proposed based on the above-mentioned first embodiment.
In the second embodiment, the step S30 includes:
calculating cosine values of direction included angles between every two adjacent sections of tracks;
judging whether each two adjacent tracks can be combined or not according to the cosine value of the direction included angle;
if the two sections of tracks can be combined, combining the two corresponding adjacent sections of tracks to obtain a first compression scanning track;
and compressing the first compressed scanning track again to obtain a target scanning track.
In a specific implementation, first, an included angle threshold θ is set 1 The setting may be made based on empirical values. In this embodiment, determining whether each two adjacent tracks can be merged according to the cosine value of the direction included angle includes: setting an included angle threshold value, and calculating a cosine value of the included angle threshold value; if the cosine value of the direction included angle is larger than the cosine value of the included angle threshold value, the two corresponding adjacent tracks can be merged.
(1) Calculating the scanning track T to be compressed i The cosine value of the direction included angle between the kth track and the (k + 1) th track
Figure BDA0003793755910000092
(2) If the cosine values of the direction included angles of the kth section of track and the kth +1 section of track meet:
Figure BDA0003793755910000093
and (3) merging the kth section of track and the (k + 1) th section of track, namely taking the starting point of the kth section of track as the starting point of the merged track and the end point of the (k + 1) th section of track as the end point of the merged track, and otherwise, executing the step (4).
(3) Judging whether the k +1 th track is the scanning track T to be compressed i If the last section of track is the last section of track, recording the coordinates of the starting point and the ending point of the combined track, and ending the search; otherwise, repeating the step (2).
(4) And (4) recording the coordinates of the start point and the end point of the kth track, and repeatedly executing the steps (2) to (3) from the start point of the (k + 1) th track.
Further, in this embodiment, the compressing the first-time compressed scanning track again to obtain the target scanning track includes:
representing the first compressed scanning track as a group of sparse point sets with directed arrangement;
dividing the first compression scanning track into a plurality of sections of new tracks based on the sparse point set;
calculating the track length of each new track;
judging whether each two adjacent new tracks can be merged or not according to the track length;
if the two adjacent tracks can be combined, combining the two corresponding adjacent new tracks to obtain the target scanning track.
Understandably, after the track compression is carried out based on the direction, the obtained first compression scanning track can be composed of a group of sparse point sets arranged in a directed mode
Figure BDA0003793755910000102
It is shown that, as shown by the black dots in fig. 3, fig. 3 is an effect diagram of compressing the scanning tracks for the first time, and the number of the fitting dots in each scanning track is not necessarily equal.
It should be understood that the minimum length threshold L of the track may be set based on empirical values. In this embodiment, the determining whether each two adjacent new tracks can be merged according to the track length includes: setting a track minimum length threshold; judging whether the track length of at least one section of each two adjacent sections of new tracks is smaller than the minimum length threshold value; if so, the corresponding two new tracks can be merged.
(A) Calculating the first compression scanning track W i Length L of the kth segment track and the (k + 1) th segment track k And L k+1
Figure BDA0003793755910000101
(B) If L is k < L or L k+1 If the current position is less than L, merging the kth section of track and the (k + 1) th section of track, namely taking the starting point of the kth section of track as the starting point of the merged track and the end point of the (k + 1) th section of track as the end point of the merged track, and executing the step (C); if L is k > L and L k+1 If > L, then step (D) is performed.
(C) Judging whether the k +1 th track is the first compression scanning track W i If the last section of track in the process is the last section of track, recording start and end point coordinates of the combined track, and ending the search. Otherwise, repeating the step (B).
(D) Recording the coordinates of the start point and the end point of the kth track and the (k + 1) th track, and repeatedly executing (B) to (C) from the start point of the (k + 2) th track.
After track secondary compression is carried out based on length, the obtained target scanning track can be formed by a group of sparse point sets in directed arrangement
Figure BDA0003793755910000111
And (4) showing. And performing track secondary compression effect map based on track length, namely the effect map of the target scanning track is shown in fig. 4.
In this embodiment, during actual scanning, too dense points may cause a decrease in communication efficiency with a robot, and the surface of a scanned workpiece is mostly a smooth curved surface, and continuous scanning may be performed, so that by calculating a cosine value of a direction included angle between two adjacent tracks, it is determined whether the two adjacent tracks can be merged according to the cosine value of the direction included angle, and if the two adjacent tracks can be merged, the two corresponding adjacent tracks are merged to obtain a first compressed scanning track, and the first compressed scanning track is compressed again to obtain a target scanning track, so as to simplify a projection track, and remove redundant points while maintaining a track shape.
With continued reference to fig. 2, a third embodiment of the laser cleaning track compression method according to the present invention is proposed based on the first embodiment or the second embodiment.
In this embodiment, the step S10 includes:
acquiring a workpiece grid of a workpiece to be scanned, and calculating a minimum directed bounding box according to the workpiece grid;
generating an initial scanning track according to the minimum directional bounding box;
projecting the workpiece grid to the upper surface of the minimum bounding box to obtain a projection grid;
discretizing the initial scan trajectory into a set of points;
searching a target projection grid surface with each point in the discrete point set of each initial scanning track closest to the point according to the projection grid, and recording a target serial number of the target projection grid surface;
projecting the discrete points in the point set to a target grid corresponding to the target sequence number in the workpiece grid to obtain a scanning track projection point set;
and fitting the scanning track to be compressed of the workpiece to be scanned according to the scanning track projection point set.
It should be noted that the mesh is projected onto the upper surface of the minimum bounding box. The coordinate of the top surface of the minimum bounding box is A (x) min ,y min ,z min ),B(x min ,y max ,z min ),C(x max ,y max ,z min ),D(x max ,y min ,z min ) Then for any v oi (x oi ,y oi ,z oi ) Let z oi =z min And obtaining a projection grid.
It is to be understood that the discrete steps are set to Δ t = R res ,R res The resolution of the point cloud; the initial scanning track G i Set of points discretized into a directed arrangement
Figure BDA0003793755910000121
Note that, for the initial scanning track G i Set of directionally arranged points of discrete points
Figure BDA0003793755910000122
At any point in it
Figure BDA0003793755910000123
Finding and in projection grid
Figure BDA0003793755910000124
Nearest target projection grid surface
Figure BDA0003793755910000125
Recording
Figure BDA0003793755910000126
Id number of (2), i.e. the object number, the pair of sequence of constituent points and projection plane
Figure BDA0003793755910000127
Understandably, the initial scanning track G i Each point in
Figure BDA0003793755910000128
Projecting to a grid surface with serial number id in a 3D workpiece grid along a z axis to obtain a scanning track projection point set
Figure BDA0003793755910000129
Wherein
Figure BDA00037937559100001210
Representing a projection along the z-axis.
In a specific implementation, the scanning trajectory to be compressed may be fitted within a preset error range in the z direction according to the set of projection points of the scanning trajectory, where the preset error range is set according to an empirical value, for example, 1 mm.
In the embodiment, the discrete step length is taken as the point cloud resolution, dense points are obtained to fit the cleaning track, the energy of the laser beam is utilized to the maximum extent, the energy of the laser beam is uniformly distributed on the surface of the workpiece, and the cleaning effect is improved.
With continued reference to fig. 2, a fourth embodiment of the laser cleaning track compression method according to the present invention is proposed based on the first embodiment or the second embodiment.
In this embodiment, the step S10 includes:
acquiring a workpiece grid of a workpiece to be scanned, and calculating a minimum directed bounding box according to the workpiece grid;
generating an initial scanning track according to the minimum directional bounding box;
projecting the workpiece grid to the upper surface of the minimum bounding box to obtain a projected grid;
traversing four corner patches in the projection grid, searching the four corner patches intersected with the initial scanning track, and obtaining a candidate projection patch set;
traversing edges of four corner patches in the candidate projection patch set, and searching an intersecting edge and an intersecting point which are intersected with the initial scanning track;
searching the projection points of the intersection points in the workpiece grid according to the intersection edges and the intersection points, and forming a projection point set by all the searched projection points;
and fitting the scanning track to be compressed of the workpiece to be scanned according to the projection points in the projection point set.
It should be understood that the mesh is projected onto the minimum bounding box upper surface. The coordinate of the top surface of the minimum bounding box is A (x) min ,y min ,z min ),B(x min ,y max ,z min ),C(x max ,y max ,z min ),D(x max ,y min ,z min ) Then for any v oi (x oi ,y oi ,z oi ) Let z oi =z min And obtaining a projection grid.
Understandably, for any of the initial scan trajectories, the side length of the directional bounding box along the X-axis direction is calculated
Figure BDA0003793755910000131
Then the number of laser cleaning tracks is:
Figure BDA0003793755910000132
wherein
Figure BDA0003793755910000133
To round down the symbol, i ∈ [0, N). Traversing four corner patches in the projection grid, calculating the center of each four corner patch, searching the four corner patches intersected with the initial scanning track for any initial scanning track according to the centers of the four corner patches, recording the target sequence numbers of the intersected four corner patches, and forming the candidate projection patch set P by all the four corner patches meeting the conditions Fi ,i∈[0,N)。
It should be noted that, traversing the candidate projection patch set P Fi The edges of the middle four corner patches are searched for the initial scanning track T i The intersection point is calculated by the intersected edge, and the target serial number id and the intersection point coordinate of the intersected edge are recorded
Figure BDA0003793755910000134
Sequence pairs forming intersections and edges
Figure BDA0003793755910000135
In specific implementation, according to the target serial number id of the intersected edge, a target edge corresponding to the target serial number id is searched in the original workpiece grid, and the projection point of the intersection point is searched on the target edge. In particular, the coordinates of the intersection point may be calculated from the intersecting edges
Figure BDA0003793755910000136
According to the coordinates of the intersection point
Figure BDA0003793755910000137
Finding corresponding points on the target edge in the original workpiece grid
Figure BDA0003793755910000138
As a point
Figure BDA0003793755910000139
A projected point on the mesh surface; the point on the target edge can also be calculated as a point according to the coordinates of the two end points of the target edge
Figure BDA00037937559100001310
Projected points on the mesh plane. This embodiment is not limited in this regard.
It should be understood that, according to the projection points in the projection point set, multiple points are fitted into a line, and a to-be-compressed scanning track of the workpiece to be scanned is fitted.
In this embodiment, by searching for an intersecting edge and an intersecting point that intersect with the initial scanning trajectory, and according to the intersecting edge and the intersecting point, searching for projection points in the workpiece grid, all the searched projection points form a projection point set, and fitting the actual scanning trajectory of the workpiece to be scanned according to the projection points in the projection point set, the fitted scanning trajectory to be compressed can overcome the limitation of the shape and the placement posture of the workpiece to be cleaned, so that the energy of the laser beam is uniformly distributed on the surface of the workpiece, and the cleaning effect is improved.
In addition, the present invention further provides a storage medium, wherein the storage medium stores a laser cleaning track compression program, and the laser cleaning track compression program implements the steps of the laser cleaning track compression method when executed by a processor.
In addition, referring to fig. 5, an embodiment of the present invention further provides a laser cleaning track compression apparatus, where the laser cleaning track compression apparatus includes:
the acquisition module 10 is configured to acquire a to-be-compressed scanning trajectory of a to-be-scanned workpiece, where the to-be-compressed scanning trajectory is a set of dense point sets in directional arrangement;
a dividing module 20, configured to divide the scanning trajectory into multiple segments of trajectories based on the dense point set;
the compression module 30 is configured to compress the multiple segments of tracks according to a preset rule to obtain a target scanning track;
and the duplication removing module 40 is configured to represent the target scanning track as a sparse point set, and perform duplication removing processing on the sparse point set to obtain the target scanning track.
Other embodiments or specific implementation manners of the laser cleaning track compression device provided by the invention can refer to the above method embodiments, and are not described herein again.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or system. Without further limitation, an element defined by the phrases "comprising a," "8230," "8230," or "comprising" does not exclude the presence of other like elements in a process, method, article, or system comprising the element.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments. In the unit claims enumerating several means, several of these means may be embodied by one and the same item of hardware. The use of the words first, second, third and the like do not denote any order, but rather the words first, second and the like may be interpreted as indicating any order.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solutions of the present invention or portions thereof that contribute to the prior art may be embodied in the form of a software product, where the computer software product is stored in a storage medium (e.g., a Read Only Memory (ROM)/Random Access Memory (RAM), a magnetic disk, an optical disk), and includes several instructions for enabling a terminal device (e.g., a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method according to the embodiments of the present invention.
The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.

Claims (10)

1. A laser cleaning track compression method is characterized by comprising the following steps:
acquiring a to-be-compressed scanning track of a to-be-scanned workpiece, wherein the to-be-compressed scanning track is a group of directionally arranged dense point sets;
dividing the scan trajectory into a plurality of segments of trajectories based on the dense set of points;
compressing the multiple sections of tracks according to a preset rule to obtain a target scanning track;
and representing the target scanning track as a sparse point set, and performing deduplication processing on the sparse point set to obtain the target scanning track.
2. The method for compressing the laser cleaning track according to claim 1, wherein the compressing the plurality of segments of the track according to the preset rule to obtain the target scanning track comprises:
calculating cosine values of direction included angles between every two adjacent sections of tracks;
judging whether the two adjacent tracks can be combined or not according to the cosine value of the direction included angle;
if the two sections of tracks can be combined, combining the two corresponding adjacent sections of tracks to obtain a first compression scanning track;
and compressing the first compressed scanning track again to obtain a target scanning track.
3. The method for compressing the laser cleaning track according to claim 2, wherein said compressing the first compressed scanning track again to obtain the target scanning track comprises:
representing the first compressed scanning track as a group of sparse point sets with directed arrangement;
dividing the first compressed scanning track into a plurality of sections of new tracks based on the sparse point set;
calculating the track length of each new track;
judging whether each two adjacent new tracks can be merged or not according to the track length;
if the two adjacent tracks can be combined, combining the two corresponding adjacent new tracks to obtain the target scanning track.
4. The method of claim 2, wherein the determining whether two adjacent segments of the trajectory can be merged according to the cosine value of the direction included angle comprises:
setting an included angle threshold value, and calculating a cosine value of the included angle threshold value;
if the cosine value of the direction included angle is larger than the cosine value of the included angle threshold value, the two corresponding adjacent tracks can be merged.
5. The method for compressing laser cleaning tracks as claimed in claim 3, wherein said determining whether each two adjacent new tracks can be merged according to said track length comprises:
setting a track minimum length threshold;
judging whether the track length of at least one section of each two adjacent sections of new tracks is smaller than the minimum length threshold value;
if so, the corresponding two new tracks can be merged.
6. The laser cleaning track compression method of any one of claims 1 to 5, wherein the acquiring of the scanning track to be compressed of the workpiece to be scanned comprises:
acquiring a workpiece grid of a workpiece to be scanned, and calculating a minimum directed bounding box according to the workpiece grid;
generating an initial scanning track according to the minimum directional bounding box;
projecting the workpiece grid to the upper surface of the minimum bounding box to obtain a projected grid;
discretizing the initial scan trajectory into a set of points;
searching a target projection grid surface with each point in the discrete point set of each initial scanning track closest to the point according to the projection grid, and recording a target serial number of the target projection grid surface;
projecting the discrete points in the point set to a target grid corresponding to the target sequence number in the workpiece grid to obtain a scanning track projection point set;
and fitting the scanning track to be compressed of the workpiece to be scanned according to the scanning track projection point set.
7. The laser cleaning track compression method of any one of claims 1 to 5, wherein the acquiring of the scanning track to be compressed of the workpiece to be scanned comprises:
acquiring a workpiece grid of a workpiece to be scanned, and calculating a minimum directed bounding box according to the workpiece grid;
generating an initial scanning track according to the minimum directional bounding box;
projecting the workpiece grid to the upper surface of the minimum bounding box to obtain a projected grid;
traversing four corner patches in the projection grid, searching the four corner patches intersected with the initial scanning track, and obtaining a candidate projection patch set;
traversing the edges of the four corner patches in the candidate projection patch set, and searching the intersecting edges and the intersecting points which intersect with the initial scanning track;
searching projection points of the intersection points in the workpiece grid according to the intersection edges and the intersection points, and forming a projection point set by all the searched projection points;
and fitting the scanning track to be compressed of the workpiece to be scanned according to the projection points in the projection point set.
8. A laser cleaning track compression device, comprising:
the device comprises an acquisition module, a compression module and a compression module, wherein the acquisition module is used for acquiring a to-be-compressed scanning track of a to-be-scanned workpiece, and the to-be-compressed scanning track is a group of dense point sets which are arranged in a directed manner;
a dividing module for dividing the scanning trajectory into a plurality of segments of trajectories based on the dense point set;
the compression module is used for compressing the multiple sections of tracks according to a preset rule to obtain a target scanning track;
and the duplication removing module is used for representing the target scanning track as a sparse point set, and carrying out duplication removing processing on the sparse point set to obtain the target scanning track.
9. A laser cleaning track compression apparatus, comprising: a memory, a processor and a laser cleaning trajectory compression program stored on the memory and executable on the processor, the laser cleaning trajectory compression program when executed by the processor implementing the steps of the laser cleaning trajectory compression method according to any one of claims 1 to 7.
10. A storage medium, characterized in that the storage medium has stored thereon a laser cleaning trajectory compression program, which when executed by a processor implements the steps of the laser cleaning trajectory compression method according to any one of claims 1 to 7.
CN202210962576.0A 2022-08-11 2022-08-11 Laser cleaning track compression method, device, equipment and storage medium Pending CN115330836A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210962576.0A CN115330836A (en) 2022-08-11 2022-08-11 Laser cleaning track compression method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210962576.0A CN115330836A (en) 2022-08-11 2022-08-11 Laser cleaning track compression method, device, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN115330836A true CN115330836A (en) 2022-11-11

Family

ID=83924619

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210962576.0A Pending CN115330836A (en) 2022-08-11 2022-08-11 Laser cleaning track compression method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN115330836A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116363137A (en) * 2023-06-01 2023-06-30 合力(天津)能源科技股份有限公司 Cleaning effect evaluation method and system for guiding automatic cleaning of oil pipe

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116363137A (en) * 2023-06-01 2023-06-30 合力(天津)能源科技股份有限公司 Cleaning effect evaluation method and system for guiding automatic cleaning of oil pipe
CN116363137B (en) * 2023-06-01 2023-08-04 合力(天津)能源科技股份有限公司 Cleaning effect evaluation method and system for guiding automatic cleaning of oil pipe

Similar Documents

Publication Publication Date Title
JP4785880B2 (en) System and method for 3D object recognition
JP4686762B2 (en) Three-dimensional shape alignment method and program
CN107622530B (en) Efficient and robust triangulation network cutting method
CN110084894B (en) Local amplification display method and device of three-dimensional model and electronic equipment
CN113223078B (en) Mark point matching method, device, computer equipment and storage medium
CN113781622A (en) Three-dimensional model texture mapping conversion method, device, equipment and medium
CN115330836A (en) Laser cleaning track compression method, device, equipment and storage medium
EP4131162A1 (en) Planar contour recognition method and apparatus, computer device, and storage medium
CN114290660A (en) Curved surface layered 3D printing method and system
CN112002007A (en) Model obtaining method and device based on air-ground image, equipment and storage medium
CN114998381A (en) Welding track fitting method, device, equipment and storage medium in tube plate welding
JP2003141567A (en) Three-dimensional city model generating device and method of generating three-dimensional city model
CN111221934A (en) Method and device for determining operation boundary of unmanned aerial vehicle
CN115375763A (en) Method, device and equipment for fitting laser cleaning track and storage medium
CN115358918A (en) Projection-based scanning track fitting method, device, equipment and storage medium
CN115359068A (en) Laser cleaning track generation method, device, equipment and storage medium
JP2006277718A (en) High-speed image retrieval method
CN113111741A (en) Assembly state identification method based on three-dimensional feature points
CN113627548A (en) Planar workpiece template matching method, device, medium and computer equipment
CN115147433A (en) Point cloud registration method
CN110895679A (en) Machine vision image data processing method and device
JP2000251095A (en) Method and device for dividing area of polygon mesh and information recording medium
CN114952173A (en) Method, device and equipment for extracting outer contour of circular ring in tube plate welding and storage medium
CN114119407A (en) Denoising method, device and equipment for four-corner grid data and storage medium
CN113096094B (en) Three-dimensional object surface defect detection method

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