CN115359068A - Laser cleaning track generation method, device, equipment and storage medium - Google Patents
Laser cleaning track generation method, device, equipment and storage medium Download PDFInfo
- Publication number
- CN115359068A CN115359068A CN202210962587.9A CN202210962587A CN115359068A CN 115359068 A CN115359068 A CN 115359068A CN 202210962587 A CN202210962587 A CN 202210962587A CN 115359068 A CN115359068 A CN 115359068A
- Authority
- CN
- China
- Prior art keywords
- scanning
- grid
- workpiece
- scanned
- corner
- 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
Links
- 238000004140 cleaning Methods 0.000 title claims abstract description 83
- 238000000034 method Methods 0.000 title claims abstract description 60
- 238000003860 storage Methods 0.000 title claims abstract description 11
- 240000004282 Grewia occidentalis Species 0.000 claims abstract description 76
- 230000011218 segmentation Effects 0.000 claims abstract description 26
- 239000011159 matrix material Substances 0.000 claims description 27
- 239000000463 material Substances 0.000 claims description 19
- 238000004364 calculation method Methods 0.000 claims description 7
- 238000005520 cutting process Methods 0.000 claims description 4
- RKTYLMNFRDHKIL-UHFFFAOYSA-N copper;5,10,15,20-tetraphenylporphyrin-22,24-diide Chemical compound [Cu+2].C1=CC(C(=C2C=CC([N-]2)=C(C=2C=CC=CC=2)C=2C=CC(N=2)=C(C=2C=CC=CC=2)C2=CC=C3[N-]2)C=2C=CC=CC=2)=NC1=C3C1=CC=CC=C1 RKTYLMNFRDHKIL-UHFFFAOYSA-N 0.000 claims description 3
- 238000000605 extraction Methods 0.000 claims description 3
- 230000000694 effects Effects 0.000 abstract description 7
- 230000008447 perception Effects 0.000 abstract description 3
- 238000012545 processing Methods 0.000 abstract description 2
- 238000004891 communication Methods 0.000 description 5
- 230000003749 cleanliness Effects 0.000 description 4
- 238000010586 diagram Methods 0.000 description 4
- 239000000126 substance Substances 0.000 description 4
- 238000003912 environmental pollution Methods 0.000 description 2
- 239000000047 product Substances 0.000 description 2
- 238000013519 translation Methods 0.000 description 2
- 238000004506 ultrasonic cleaning Methods 0.000 description 2
- 238000005452 bending Methods 0.000 description 1
- 239000011230 binding agent Substances 0.000 description 1
- 239000012459 cleaning agent Substances 0.000 description 1
- 239000000356 contaminant Substances 0.000 description 1
- 238000001035 drying Methods 0.000 description 1
- 239000000428 dust Substances 0.000 description 1
- 238000009713 electroplating Methods 0.000 description 1
- 230000007613 environmental effect Effects 0.000 description 1
- 239000004519 grease Substances 0.000 description 1
- JEIPFZHSYJVQDO-UHFFFAOYSA-N iron(III) oxide Inorganic materials O=[Fe]O[Fe]=O JEIPFZHSYJVQDO-UHFFFAOYSA-N 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 238000004806 packaging method and process Methods 0.000 description 1
- 239000002245 particle Substances 0.000 description 1
- 239000013557 residual solvent Substances 0.000 description 1
- 238000005507 spraying Methods 0.000 description 1
- 239000000758 substrate Substances 0.000 description 1
- 239000013589 supplement Substances 0.000 description 1
- 238000004381 surface treatment Methods 0.000 description 1
- 230000009466 transformation Effects 0.000 description 1
- 238000003466 welding Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/10—Segmentation; Edge detection
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F17/00—Digital computing or data processing equipment or methods, specially adapted for specific functions
- G06F17/10—Complex mathematical operations
- G06F17/16—Matrix or vector computation, e.g. matrix-matrix or matrix-vector multiplication, matrix factorization
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/10—Segmentation; Edge detection
- G06T7/194—Segmentation; Edge detection involving foreground-background segmentation
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/60—Analysis of geometric attributes
- G06T7/66—Analysis of geometric attributes of image moments or centre of gravity
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/70—Determining position or orientation of objects or cameras
- G06T7/73—Determining position or orientation of objects or cameras using feature-based methods
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V10/00—Arrangements for image or video recognition or understanding
- G06V10/40—Extraction of image or video features
- G06V10/44—Local feature extraction by analysis of parts of the pattern, e.g. by detecting edges, contours, loops, corners, strokes or intersections; Connectivity analysis, e.g. of connected components
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/10—Image acquisition modality
- G06T2207/10028—Range image; Depth image; 3D point clouds
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/20—Special algorithmic details
- G06T2207/20112—Image segmentation details
- G06T2207/20132—Image cropping
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/30—Subject of image; Context of image processing
- G06T2207/30241—Trajectory
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Mathematical Physics (AREA)
- Pure & Applied Mathematics (AREA)
- Computational Mathematics (AREA)
- Mathematical Analysis (AREA)
- Mathematical Optimization (AREA)
- Data Mining & Analysis (AREA)
- Computing Systems (AREA)
- Multimedia (AREA)
- Geometry (AREA)
- Algebra (AREA)
- Databases & Information Systems (AREA)
- Software Systems (AREA)
- General Engineering & Computer Science (AREA)
- Numerical Control (AREA)
Abstract
The invention relates to the technical field of laser cleaning, and discloses a method, a device, equipment and a storage medium for generating a laser cleaning track. The method comprises the steps of obtaining ordered point clouds of a workpiece to be scanned, generating a four-corner grid according to the ordered point clouds, carrying out plane segmentation on the four-corner grid to obtain a workpiece grid to be scanned, processing the ordered point clouds into the four-corner grid, achieving high arithmetic operation speed, conveniently and quickly achieving three-dimensional information expression of the workpiece, and achieving a stronger perception identification effect; extracting the four-corner grid outline of the workpiece grid to be scanned, and calculating a minimum directed bounding box according to the four-corner grid outline, so that the pose of an object in any shape can be accurately identified, the robustness is high, the calculated amount is small, and the identification efficiency is high; and generating a scanning track according to the minimum directed bounding box, so that the accuracy is high, the automatic operation is realized, the efficiency is high, and the labor force and the pollution are reduced.
Description
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 generating a laser cleaning track.
Background
The current cleaning methods widely used in the cleaning industry include mechanical cleaning methods, chemical cleaning methods and ultrasonic cleaning methods, but the application thereof is greatly limited under the environmental protection constraint and the requirement of high-precision market. The mechanical cleaning method comprises the following steps: the requirement of high cleanliness cleaning cannot be met. The chemical cleaning method comprises the following steps: environmental pollution is easy to cause, the obtained cleanliness is limited, and particularly when the dirt components are complex, a plurality of cleaning agents are required to be selected for repeated cleaning so as to meet the requirement of surface cleanliness. An ultrasonic cleaning method: the cleaning effect is good, but the cleaning effect on submicron-level dirt particles is very slight, the size of the cleaning tank limits the range and complexity of the processed parts, and the drying of the workpiece after cleaning is a great problem.
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 that of 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 an extension of the traditional cleaning method at present, and has a wide application prospect due to a plurality of inherent advantages. However, in the existing laser cleaning, the cleaning path is generally identified and planned manually, so that the efficiency is low, the labor is consumed, the cleaning is not comprehensive, and the like. Therefore, how to accurately generate a cleaning path, realize automatic operation, and reduce labor force and pollution is an urgent technical problem to be solved.
The above is only for the purpose of assisting understanding of the technical solution of the present invention, and does not represent an admission that the above is the prior art.
Disclosure of Invention
The invention mainly aims to provide a method, a device and equipment for generating a laser cleaning track and a computer storage medium, and aims to solve the technical problems of low automation degree, labor consumption, inaccurate cleaning path and incomplete cleaning of laser cleaning in the prior art.
In order to achieve the above object, the present invention provides a laser cleaning track generating method, including the steps of:
acquiring ordered point clouds of a workpiece to be scanned, and generating a four-corner grid according to the ordered point clouds;
performing plane segmentation on the four-corner grids to obtain workpiece grids to be scanned;
extracting the four-corner grid outline of the workpiece grid to be scanned;
calculating a minimum directed bounding box according to the four-corner grid outline;
and generating a scanning track according to the minimum directional bounding box.
Optionally, before performing plane segmentation on the tetragonal mesh and obtaining a workpiece mesh to be scanned, the method further includes:
cutting the four-corner grids by using the background grids to obtain grids in the material frame;
correspondingly, the plane segmentation is performed on the four-corner grid to obtain a workpiece grid to be scanned, and the method comprises the following steps:
and carrying out plane segmentation on the grids in the material frame to obtain the workpiece grids to be scanned.
Optionally, the performing plane segmentation on the grid in the material frame to obtain a grid of the workpiece to be scanned includes:
calculating the normal vector included angle of any two four-corner surface patches in the grid in the material frame;
and if the cosine value of the included angle of the normal vector is greater than a preset value, considering that the two corresponding four-corner patches belong to the same plane, and performing plane segmentation on the grid in the material frame to obtain a workpiece grid to be scanned.
Optionally, the calculating a minimum directed bounding box according to the tetragonal mesh profile includes:
according to the four-corner grid outline, calculating the mass center of the workpiece grid to be scanned in a camera coordinate system;
calculating an inertia tensor matrix of the workpiece grid to be scanned 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.
Optionally, the generating a scanning trajectory according to the minimum directional bounding box includes:
calculating the vertex coordinates of the upper surface of the minimum directional bounding box;
calculating a scanning direction and a scanning sequence according to a preset rule;
and generating a scanning track according to the vertex coordinates, the scanning direction and the scanning sequence.
Optionally, the generating a scanning trajectory according to the vertex coordinates, the scanning direction, and the scanning order includes:
calculating the number of scanning tracks according to the vertex coordinates and the given laser width threshold;
calculating a starting point and an end point of each scanning track based on the number of the scanning tracks;
and generating the scanning tracks according to the starting point and the end point of each scanning track, the scanning direction and the scanning sequence.
Optionally, the generating a scanning track according to the starting point and the ending point of each scanning track, the scanning direction, and the scanning order includes:
for any scanning track, converting coordinates of a starting point and an end point of the scanning track from a workpiece coordinate system to a camera coordinate system;
and calculating the scanning pose of each point in the scanning track under the camera coordinate system, and converting the scanning pose, the scanning direction and the scanning sequence of each point into a robot coordinate system through hand-eye calibration to obtain the scanning track.
In addition, in order to achieve the above object, the present invention further provides a laser cleaning trajectory generation device, including:
the generating module is used for acquiring ordered point clouds of a workpiece to be scanned and generating a four-corner grid according to the ordered point clouds;
the plane segmentation module is used for carrying out plane segmentation on the four-corner grids to obtain workpiece grids to be scanned;
the extraction module is used for extracting the four-corner grid outline of the workpiece grid to be scanned;
the calculation module is used for calculating a minimum directed bounding box according to the four-corner grid outline;
the generating module is further configured to generate a scanning track according to the minimum directed bounding box.
In addition, in order to achieve the above object, the present invention further provides a laser cleaning trajectory generation apparatus, including: a memory, a processor and a laser cleaning trajectory generation program stored on the memory and executable on the processor, the laser cleaning trajectory generation program when executed by the processor implementing the steps of the laser cleaning trajectory generation method as described above.
In addition, in order to achieve the above object, the present invention further provides a storage medium having a laser cleaning trajectory generation program stored thereon, wherein the laser cleaning trajectory generation program, when executed by a processor, implements the steps of the laser cleaning trajectory generation method as described above.
According to the method, ordered point clouds of a workpiece to be scanned are obtained, a four-corner grid is generated according to the ordered point clouds, the four-corner grid is subjected to plane segmentation to obtain the workpiece grid to be scanned, the ordered point clouds are processed into the four-corner grid, the algorithm operation speed is high, three-dimensional information expression of the workpiece can be conveniently and rapidly realized, and a stronger perception identification effect is realized; extracting the four-corner grid outline of the workpiece grid to be scanned, and calculating a minimum directed bounding box according to the four-corner grid outline, so that the pose of an object in any shape can be accurately identified, the robustness is high, the calculated amount is small, and the identification efficiency is high; and generating a scanning track according to the minimum directed bounding box, so that the accuracy is high, the automatic operation is realized, the efficiency is high, and the labor force and the pollution are reduced.
Drawings
Fig. 1 is a schematic structural diagram of a laser cleaning track generation device in a hardware operating environment according to an embodiment of the present invention;
FIG. 2 is a schematic flow chart illustrating a first embodiment of a laser cleaning track generation method according to the present invention;
FIG. 3 is a diagram illustrating an actual effect of a scanning track in an embodiment of a laser cleaning track generation method of the present invention;
fig. 4 is a block diagram of a first embodiment of a laser cleaning track generating apparatus 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 generation device in a hardware operating environment according to an embodiment of the present invention.
As shown in fig. 1, the laser cleaning trajectory generation device 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 described previously.
Those skilled in the art will appreciate that the configuration shown in FIG. 1 does not constitute a limitation of the laser cleaning trajectory generation apparatus and may include more or fewer components than shown, or some components in combination, 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 generation program.
In the laser cleaning track generating device shown in fig. 1, the network interface 1004 is mainly used for connecting to 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 trajectory generation device calls a laser cleaning trajectory generation program stored in the memory 1005 through the processor 1001, and executes the laser cleaning trajectory generation method provided by the embodiment of the present invention.
Based on the hardware structure, the embodiment of the laser cleaning track generation method is provided.
Referring to fig. 2, fig. 2 is a schematic flow chart of a first embodiment of a laser cleaning track generation method according to the present invention, and provides the first embodiment of the laser cleaning track generation method according to the present invention.
In a first embodiment, the laser cleaning track generation method includes the steps of:
step S10: and acquiring ordered point clouds of the workpiece to be scanned, and generating a four-corner grid according to the ordered point clouds.
It should be understood that the executing subject of the present embodiment is the laser cleaning track generating device, and the laser cleaning track generating 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 ordered point cloudV corresponding to the ith row and j column, the ith row and j +1 column, the (i + 1) th row and j +1 column and the (i + 1) th row and j column in the data 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 noted as (x, y, z). 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 calculatedWherein N is F The number of the quadrangular patches included in the quadrangular grid.
Step S20: and carrying out plane segmentation on the four-corner grids to obtain a workpiece grid to be scanned.
It should be noted that, the phase included angle threshold θ of the four-corner patch method is set, and if two arbitrary four-corner patches F are present i ,F j Normal phase angle cosine value cos (n) i ,n j ) If cos (theta) is greater, then two four-corner patches are considered to belong to the same plane, otherwise F i ,F j Belonging to different planes, thereby dividing the workpiece grid to be scanned. The phase inclusion angle threshold θ of the four-corner patch method is usually set according to an empirical value.
Further, in this embodiment, before the step S20, the method further includes:
cutting the four-corner grids by using the background grids to obtain grids in the material frame;
correspondingly, the plane segmentation is performed on the four-corner grid to obtain a workpiece grid to be scanned, and the method comprises the following steps:
and carrying out plane segmentation on the grids in the material frame to obtain the workpiece grids to be scanned.
In specific implementation, the length L, the width W, the height limiting size H and the pose (x, y, z, R) of the material frame are set x ,R y ,R z ) At this time, the grid outside the material frame is a background grid,cutting out the meshes outside the material frame and reserving the meshes in the material frame.
Further, the performing plane segmentation on the grid in the material frame to obtain a grid of the workpiece to be scanned includes:
calculating the normal vector included angle of any two four-corner surface patches in the grid in the material frame;
and if the cosine value of the included angle of the normal vector is greater than a preset value, considering that the two corresponding four-corner patches belong to the same plane, and performing plane segmentation on the grid in the material frame to obtain a workpiece grid to be scanned.
Step S30: and extracting the four-corner grid outline of the workpiece grid to be scanned.
Understandably, the inner vertex v of any one of the meshes is determined by the topological relation between the vertices of the quadrilateral meshes 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.
Step S40: and calculating the minimum directed bounding box according to the four-corner grid outline.
It should be understood that, in order to accurately identify the pose of an object with an arbitrary shape, the pose under the minimum envelope of the workpiece to be scanned is calculated according to the four-corner mesh contour point cloud, that is, the minimum directional bounding box is obtained.
Further, the step S40 includes:
according to the four-corner grid outline, calculating the mass center of the workpiece grid to be scanned in a camera coordinate system;
calculating an inertia tensor matrix of the workpiece grid to be scanned 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.
It should be understood that the center of mass refers to the center of mass, which is considered to be an imaginary point at which the mass of the object is centered. Object centroid coordinate P c ComputingThe formula is as follows:
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:
wherein, the 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 a (x, y, z) small mass d m Relative position to point Q. The calculation of these moments of inertia is then as follows:
instead of diagonal elements, the product of inertia is defined as:
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 profile in 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:
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. And the main elements of the symmetric matrix are positive numbers, the obtained three eigenvalues are necessarily positive real numbers, and the three eigenvectors are necessarily orthogonal to each other, so that the eigenvalue lambda of the inertia tensor matrix is obtained by calculation 1 、λ 2 、λ 3 。
According to the eigenvalue of the inertia tensor matrix, solving the eigenvalue of the inertia tensor matrixThe eigenvector formula is as follows: i ω = λ ω. According to the eigenvector of the inertia tensor matrix, namely the inertia principal axis, defining a coordinate system of the four-corner grid outline at the centroid according to the inertia principal axis, thereby obtaining a rotation matrix R of the four-corner grid outline to the centroid rotation principal axis under the 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 points o2c Equal to the centroid P c And (4) coordinates.
Step S50: and generating a scanning track according to the minimum directional bounding box.
It should be noted that the minimum point B of the minimum directed bounding box is found 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 is scanned in the X-axis direction, and a plurality of trajectories are arranged in the Y-axis direction. This embodiment is not limited.
In the embodiment, the ordered point cloud of the workpiece to be scanned is obtained, the four-corner mesh is generated according to the ordered point cloud, the four-corner mesh is subjected to plane segmentation to obtain the workpiece mesh to be scanned, and the ordered point cloud is processed into the four-corner mesh, so that the algorithm operation speed is high, the three-dimensional information expression of the workpiece can be conveniently and rapidly realized, and a stronger perception identification effect is realized; extracting the four-corner grid outline of the workpiece grid to be scanned, and calculating a minimum directed bounding box according to the four-corner grid outline, so that the pose of an object in any shape can be accurately identified, the robustness is high, the calculated amount is small, and the identification efficiency is high; and generating a scanning track according to the minimum directed bounding box, so that the accuracy is high, the automatic operation is realized, the efficiency is high, and the labor force and the pollution are reduced.
With continued reference to fig. 2, a second embodiment of the laser cleaning track generation method of the present invention is proposed based on the above-mentioned first embodiment.
In the second embodiment, the step S50 includes:
calculating the vertex coordinates of the upper surface of the minimum directional bounding box;
calculating a scanning direction and a scanning sequence according to a preset rule;
and generating a scanning track according to the vertex coordinates, the scanning direction and the scanning sequence.
It should be understood that the vertex coordinate A (x) of the upper surface of the minimum directional bounding box is based on 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 ) Calculating the side length of the directional bounding box along the X-axis directionThen the number of laser cleaning tracks is:
(2) and calculating the coordinates of the starting point and the ending point of the single scanning track.
For any scanning track T i I belongs to [0, N), and the coordinates of the starting point and the ending point of the track are as follows:
wherein P is si ,P ei Respectively is the coordinates of the start point and the end point of the ith scanning track, p _ a is the coordinate of a vertex A, p _ B is the coordinate of a vertex B, and d is a given laser width threshold value.
(3) And calculating the scanning track direction. For any scanning track T i I belongs to [0, N), if i is odd, the scanning direction is P si →P ei Otherwise, the scanning direction is P ei →P si I.e. when i is even, the scanning track T is exchanged i The start and end point coordinate values of (a). Further, in this embodiment, the generating a scanning trajectory according to the vertex coordinates, the scanning direction, and the scanning order includes: calculating the number of scanning tracks according to the vertex coordinates and the given laser width threshold; calculating a starting point and an end point of each scanning track based on the number of the scanning tracks; and generating the scanning tracks according to the starting point and the end point of each scanning track, the scanning direction and the scanning sequence.
Further, in this embodiment, the generating the scanning tracks according to the starting point and the ending point of each scanning track, the scanning direction, and the scanning order includes:
for any scanning track, converting coordinates of a starting point and an end point of the scanning track from a workpiece coordinate system to a camera coordinate system;
and calculating the scanning pose of each point in the scanning track under the camera coordinate system, and converting the scanning pose, the scanning direction and the scanning sequence of each point into a robot coordinate system through hand-eye calibration to obtain the scanning track.
Note that, for an arbitrary scanning trajectory T i And converting the coordinates of the starting point and the end point of the scanning track from the workpiece coordinate system to the camera coordinate system. The transformation matrix T from the coordinate system of the workpiece to the coordinate system of the camera is calculated from the minimum bounding box o2c Comprises the following steps:
then the track T is scanned arbitrarily i The coordinates of the start point and the end point of (a) in the camera coordinate system are:
calculating the scanning track T under the coordinate system of the camera i And the pose of each point is determined, and the scanning pose of each point is converted into a robot coordinate system through hand-eye calibration to be used as a final scanning track. The actual effect of the scan trajectory generated based on the minimum bounding box is shown in fig. 3.
In this embodiment, the vertex coordinates of the upper surface of the minimum oriented bounding box are calculated, the scanning direction and the scanning sequence are calculated according to a preset rule, and the scanning track is generated according to the vertex coordinates, the scanning direction and the scanning sequence, so that the scanning track completely covers the surface of the scanned object, thereby realizing comprehensive cleaning and improving the cleaning quality.
Furthermore, the present invention also provides a storage medium having a laser cleaning trajectory generation program stored thereon, which when executed by a processor implements the steps of the laser cleaning trajectory generation method as described above.
In addition, referring to fig. 4, an embodiment of the present invention further provides a laser cleaning trajectory generation apparatus, where the laser cleaning trajectory generation apparatus includes:
the generating module 10 is used for acquiring ordered point clouds of a workpiece to be scanned and generating a four-corner grid according to the ordered point clouds;
the plane segmentation module 20 is configured to perform plane segmentation on the four-corner grids to obtain workpiece grids to be scanned;
an extraction module 30, configured to extract a four-corner grid profile of the workpiece grid to be scanned;
a calculation module 40, configured to calculate a minimum directional bounding box according to the quadrilateral mesh profile;
the generating module 10 is further configured to generate a scanning trajectory according to the minimum directional bounding box.
Other embodiments or specific implementation manners of the laser cleaning track generation device according to the present invention may 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, etc. do not denote any order, but rather the words first, second, etc. are to be interpreted as indicating.
Through the description of the foregoing embodiments, it is clear to those skilled in the art that the method of the foregoing embodiments may be implemented by software plus a necessary general hardware platform, and certainly may also be implemented by hardware, but in many cases, the former is a better implementation. Based on such understanding, the technical solutions of the present invention or portions thereof contributing 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 (such as a Read Only Memory image (ROM)/Random Access Memory (RAM), a magnetic disk, and an optical disk), and includes several instructions for enabling a terminal device (which may be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) 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 generation method is characterized by comprising the following steps:
acquiring ordered point clouds of a workpiece to be scanned, and generating a four-corner grid according to the ordered point clouds;
performing plane segmentation on the four-corner grids to obtain workpiece grids to be scanned;
extracting the four-corner grid outline of the workpiece grid to be scanned;
calculating a minimum directed bounding box according to the four-corner grid outline;
and generating a scanning track according to the minimum directional bounding box.
2. The method for generating a laser cleaning track according to claim 1, wherein before performing plane segmentation on the tetragonal meshes to obtain a workpiece mesh to be scanned, the method further comprises:
cutting the four-corner grids by using the background grids to obtain grids in the material frame;
correspondingly, the plane segmentation is performed on the four-corner grid to obtain a workpiece grid to be scanned, and the method comprises the following steps:
and carrying out plane segmentation on the grids in the material frame to obtain the workpiece grids to be scanned.
3. The laser cleaning track generation method of claim 2, wherein the performing plane segmentation on the grid in the material frame to obtain the grid of the workpiece to be scanned comprises:
calculating a normal vector included angle of any two four-corner surface patches in the grid in the material frame;
and if the cosine value of the included angle of the normal vector is greater than a preset value, considering that the two corresponding four-corner patches belong to the same plane, and performing plane segmentation on the grid in the material frame to obtain a workpiece grid to be scanned.
4. The laser cleaning trajectory generation method of claim 1, wherein said computing a minimum directed bounding box from said four-corner grid profile comprises:
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 workpiece grid to be scanned 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.
5. The laser cleaning trajectory generation method of any one of claims 1 to 4, wherein the generating a scanning trajectory from the minimum directional bounding box comprises:
calculating the vertex coordinates of the upper surface of the minimum directional bounding box;
calculating a scanning direction and a scanning sequence according to a preset rule;
and generating a scanning track according to the vertex coordinates, the scanning direction and the scanning sequence.
6. The laser cleaning trajectory generation method of claim 5, wherein generating a scanning trajectory based on the vertex coordinates, the scanning direction, and the scanning order comprises:
calculating the number of scanning tracks according to the vertex coordinates and a given laser width threshold value;
calculating a starting point and an end point of each scanning track based on the number of the scanning tracks;
and generating the scanning tracks according to the starting point and the end point of each scanning track, the scanning direction and the scanning sequence.
7. The laser cleaning track generation method of claim 6, wherein generating the scanning tracks according to the start point and the end point of each scanning track, the scanning direction and the scanning order comprises:
for any scanning track, converting coordinates of a starting point and an end point of the scanning track from a workpiece coordinate system to a camera coordinate system;
and calculating the scanning pose of each point in the scanning track under the camera coordinate system, and converting the scanning pose, the scanning direction and the scanning sequence of each point into a robot coordinate system through hand-eye calibration to obtain the scanning track.
8. A laser cleaning trajectory generation device, characterized by comprising:
the generating module is used for acquiring ordered point clouds of a workpiece to be scanned and generating a four-corner grid according to the ordered point clouds;
the plane segmentation module is used for carrying out plane segmentation on the four-corner grids to obtain workpiece grids to be scanned;
the extraction module is used for extracting the four-corner grid outline of the workpiece grid to be scanned;
the calculation module is used for calculating a minimum directed bounding box according to the four-corner grid outline;
the generating module is further configured to generate a scanning track according to the minimum directed bounding box.
9. A laser cleaning trajectory generation device, characterized by comprising: a memory, a processor and a laser cleaning trajectory generation program stored on the memory and executable on the processor, the laser cleaning trajectory generation program when executed by the processor implementing the steps of the laser cleaning trajectory generation method according to any one of claims 1 to 7.
10. A storage medium having stored thereon a laser cleaning trajectory generation program that, when executed by a processor, implements the steps of the laser cleaning trajectory generation method according to any one of claims 1 to 7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210962587.9A CN115359068A (en) | 2022-08-11 | 2022-08-11 | Laser cleaning track generation method, device, equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210962587.9A CN115359068A (en) | 2022-08-11 | 2022-08-11 | Laser cleaning track generation method, device, equipment and storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN115359068A true CN115359068A (en) | 2022-11-18 |
Family
ID=84001191
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202210962587.9A Pending CN115359068A (en) | 2022-08-11 | 2022-08-11 | Laser cleaning track generation method, device, equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN115359068A (en) |
-
2022
- 2022-08-11 CN CN202210962587.9A patent/CN115359068A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN105046684B (en) | A kind of image matching method based on polygon generalised Hough transform | |
CN113012226B (en) | Method and device for estimating pose of camera, electronic equipment and computer storage medium | |
CN113269723B (en) | Unordered grabbing system for parts with three-dimensional visual positioning and manipulator cooperative work | |
CN109766903B (en) | Point cloud model curved surface matching method based on curved surface features | |
US20230015214A1 (en) | Planar contour recognition method and apparatus, computer device, and storage medium | |
CN112894815A (en) | Method for detecting optimal position and posture for article grabbing by visual servo mechanical arm | |
CN111881892A (en) | Ordered point cloud 5D texture grid data structure generation method, device, equipment and medium | |
CN113487633A (en) | Point cloud contour extraction method and device, computer equipment and storage medium | |
CN115690090B (en) | Defect sample image generation method, device, equipment and storage medium | |
CN115358918A (en) | Projection-based scanning track fitting method, device, equipment and storage medium | |
CN114861500A (en) | Method and system for automatically generating tunnel structure finite element model based on three-dimensional point cloud | |
CN115330836A (en) | Laser cleaning track compression method, device, equipment and storage medium | |
CN113483664B (en) | Screen plate automatic feeding system and method based on line structured light vision | |
CN113048886B (en) | Method and apparatus for measuring size of irregular body of workpiece | |
JP5762099B2 (en) | Posture recognition apparatus, work robot, posture recognition method, program, and recording medium | |
CN110232664A (en) | A kind of mask restorative procedure of exorcising based on augmented reality | |
CN115359068A (en) | Laser cleaning track generation method, device, equipment and storage medium | |
CN116051540B (en) | Method and system for acquiring positioning pose of transformer wiring terminal based on point cloud model | |
CN113111741A (en) | Assembly state identification method based on three-dimensional feature points | |
CN114119407A (en) | Denoising method, device and equipment for four-corner grid data and storage medium | |
CN115375763A (en) | Method, device and equipment for fitting laser cleaning track and storage medium | |
CN114998381A (en) | Welding track fitting method, device, equipment and storage medium in tube plate welding | |
Sagawa et al. | Elastic convolved ICP for the registration of deformable objects | |
CN113627548A (en) | Planar workpiece template matching method, device, medium and computer equipment | |
CN110060330B (en) | Three-dimensional modeling method and device based on point cloud image and robot |
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 |