A visual positioning method and system for laser engraving machine
Through visual positioning methods, using binocular shooting and feature point recognition technology, the offset distance and angle are calculated and corrected, and the origin of the laser engraving program is automatically adjusted, which solves the problem of the laser engraving processing area offset caused by inaccurate control, and improves the processing quality .
Patent Information
- Application Number
- CN202410870607.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-01
- Publication Date
- 2024-12-17
- Estimated Expiration
- 2044-07-01
AI Technical Summary
During the marking, engraving or cutting process, the manual control of the movement of the machining end is not accurate enough, resulting in inaccurate selection of the origin of the machining program, which can easily cause the overall offset of the machining area and affect the processing quality.
Using visual positioning method, the plane blur range is obtained through initial binocular shooting, the positioning space position is selected for positioning binocular shooting, the feature point data is extracted, the positioning map coordinates are calculated, the offset distance and angle are corrected, and the laser engraving program origin is automatically offset to .
The automatic and precise offset control of the origin of the laser engraving program is realized, which avoids the overall offset of the processing area and ensures the quality of laser engraving processing.
Smart Images

Figure CN118616909B_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of visual positioning of laser engraving machines, and in particular relates to a visual positioning method and system for laser engraving machines. Background Art
[0002] Laser engraving machine, also known as laser engraving machine or laser marking machine, is a device that uses high-energy laser beam to mark, engrave or cut on the surface of various materials. Its working principle is to use the focused laser beam to accurately act on the surface of the material, causing the surface material to evaporate or change color instantly, thereby achieving the purpose of marking or engraving. It is widely used in electronic products, packaging industry, advertising production, handicraft processing, automobile manufacturing, medical equipment, etc.
[0003] The marking, engraving or cutting process of the laser engraving machine needs to be controlled according to a pre-set processing program. Before the processing control is performed according to the processing program, the processing end of the laser engraving machine needs to be controlled to move to the origin of the laser engraving program. In the prior art, the movement control of the processing end is usually performed manually, resulting in inaccurate selection of the origin of the laser engraving program, which can easily cause the overall offset of the laser engraving processing area, affecting the processing quality of marking, engraving or cutting. Summary of the invention
[0004] The purpose of the embodiments of the present invention is to provide a visual positioning method and system for a laser engraving machine, aiming to solve the technical problems existing in the prior art mentioned in the background technology.
[0005] The embodiment of the present invention is implemented as follows:
[0006] A visual positioning method for a laser engraving machine, the method specifically comprising the following steps:
[0007] At the initial shooting position, an initial binocular shooting is performed on the target laser engraved workpiece to obtain initial shooting data, and fuzzy recognition is performed to obtain the plane fuzzy range of the target laser engraved workpiece;
[0008] According to the plane blur range, a positioning space position is selected, and at the positioning space position, a positioning binocular photographing is performed on the target laser engraving workpiece to obtain positioning photographing data;
[0009] Acquire workpiece feature point data, extract feature point feature data, and perform feature point recognition on the positioning shooting data according to the feature point feature data to determine the distances of multiple target feature points;
[0010] Extracting feature point coordinate data from the workpiece feature point data, and calculating the positioning mapping coordinates of the positioning space position in combination with a plurality of target feature point distances;
[0011] According to the positioning mapping coordinates, a correction offset distance and a correction offset angle are calculated, and according to the correction offset distance and the correction offset angle, the coordinates are offset to the origin of the laser engraving program.
[0012] As a further limitation of the technical solution of the embodiment of the present invention, the initial binocular shooting of the target laser engraved workpiece at the initial shooting position, obtaining the initial shooting data, and performing blur recognition to obtain the plane blur range of the target laser engraved workpiece specifically includes the following steps:
[0013] After the target laser engraved workpiece is placed, an initial shooting instruction is generated;
[0014] According to the initial shooting instruction, at the initial shooting position, an initial binocular shooting of the target laser engraved workpiece is performed to obtain initial shooting data;
[0015] Selecting a plurality of workpiece boundary positions according to the initial shooting data;
[0016] Analyzing the initial photographing data to determine workpiece boundary directions and workpiece boundary distances corresponding to a plurality of workpiece boundary positions;
[0017] According to the plurality of workpiece boundary directions and the plurality of corresponding workpiece boundary distances, the plane fuzzy range of the target laser engraved workpiece is connected.
[0018] As a further limitation of the technical solution of the embodiment of the present invention, the positioning space position is selected according to the plane blur range, and the target laser engraving workpiece is positioned and photographed by binocular at the positioning space position, and the positioning shooting data is obtained, which specifically includes the following steps:
[0019] In the plane blur range, select the midpoint of the positioning range in the middle area;
[0020] Determine the positioning space position according to the midpoint of the positioning range and the preset positioning space height;
[0021] At the positioning space position, the target laser engraving workpiece is photographed by positioning binoculars to obtain positioning photography data.
[0022] As a further limitation of the technical solution of the embodiment of the present invention, the steps of acquiring workpiece feature point data, extracting feature point feature data, and performing feature point recognition on the positioning shooting data according to the feature point feature data, and determining the distances of multiple target feature points specifically include the following steps:
[0023] Obtain workpiece feature point data;
[0024] Extracting feature point feature data from the workpiece feature point data;
[0025] According to the feature point feature data, feature point recognition is performed on the positioning shooting data to obtain a plurality of shooting feature point data;
[0026] Distance analysis is performed on the plurality of photographed feature point data to determine distances of a plurality of target feature points.
[0027] As a further limitation of the technical solution of the embodiment of the present invention, the step of extracting feature point coordinate data from the workpiece feature point data and calculating the positioning mapping coordinates of the positioning space position by combining the distances of a plurality of target feature points specifically includes the following steps:
[0028] Extracting feature point coordinate data from the workpiece feature point data;
[0029] According to the workpiece feature point data, three representative feature points are selected;
[0030] According to the three representative feature points, three corresponding representative feature point coordinates are obtained from the feature point coordinate data;
[0031] According to the three representative feature points, three corresponding representative feature point distances are obtained from the plurality of target feature point distances;
[0032] The positioning mapping coordinates of the positioning space position are calculated according to the coordinates of the three representative feature points, the distances between the three representative feature points and a preset positioning space height.
[0033] As a further limitation of the technical solution of the embodiment of the present invention, the calculation formula of the positioning mapping coordinates is:
[0034]
[0035] Among them, (x, y) is the positioning mapping coordinate, (x A ,y A ) is the coordinate of the representative feature point of A, (x B ,y B ) is the coordinate of the representative feature point of B, (x C ,y C ) is the coordinate of the representative feature point of C, L A A represents the distance between the representative feature points, L B B represents the distance between the representative feature points, L C C represents the representative feature point distance of the feature point, and h is the height of the positioning space.
[0036] As a further limitation of the technical solution of the embodiment of the present invention, the calculation of the correction offset distance and the correction offset angle according to the positioning mapping coordinates, and the offset to the origin of the laser engraving program according to the correction offset distance and the correction offset angle specifically include the following steps:
[0037] Calculating a correction offset distance and a correction offset angle according to the positioning mapping coordinates;
[0038] Generate an origin offset instruction according to the correction offset distance and the correction offset angle;
[0039] According to the origin offset instruction, shift to the laser engraving height origin;
[0040] Descend to the preset laser engraving program height and automatically enter the laser engraving program origin.
[0041] As a further limitation of the technical solution of the embodiment of the present invention, the calculation formula of the correction offset distance is:
[0042]
[0043] The calculation formula for the correction offset angle is:
[0044]
[0045] A visual positioning system for a laser engraving machine, the system comprises an initial binocular shooting module, a positioning binocular shooting module, a feature point recognition module, a mapping coordinate calculation module and a program origin offset module, wherein:
[0046] An initial binocular shooting module is used to perform initial binocular shooting of a target laser engraved workpiece at an initial shooting position, obtain initial shooting data, and perform blur recognition to obtain a plane blur range of the target laser engraved workpiece;
[0047] A positioning binocular shooting module is used to select a positioning space position according to the plane blur range, and to perform positioning binocular shooting on the target laser engraving workpiece at the positioning space position to obtain positioning shooting data;
[0048] A feature point recognition module is used to obtain workpiece feature point data, extract feature point feature data, and perform feature point recognition on the positioning shooting data according to the feature point feature data to determine the distances of multiple target feature points;
[0049] A mapping coordinate calculation module, used to extract feature point coordinate data from the workpiece feature point data, and calculate the positioning mapping coordinates of the positioning space position in combination with a plurality of target feature point distances;
[0050] The program origin offset module is used to calculate the correction offset distance and the correction offset angle according to the positioning mapping coordinates, and offset to the laser engraving program origin according to the correction offset distance and the correction offset angle.
[0051] As a further limitation of the technical solution of the embodiment of the present invention, the initial binocular shooting module specifically includes:
[0052] An instruction generation unit, used to generate an initial shooting instruction after the target laser engraving workpiece is placed;
[0053] A binocular shooting unit is used to perform initial binocular shooting of the target laser engraved workpiece at an initial shooting position according to the initial shooting instruction to obtain initial shooting data;
[0054] A position selection unit, used for selecting a plurality of workpiece boundary positions according to the initial shooting data;
[0055] A distance determination unit, configured to analyze the initial photographing data to determine workpiece boundary directions and workpiece boundary distances corresponding to a plurality of workpiece boundary positions;
[0056] The range connecting unit is used to connect the plane fuzzy range of the target laser engraved workpiece according to the plurality of workpiece boundary directions and the plurality of corresponding workpiece boundary distances.
[0057] Compared with the prior art, the present invention has the following beneficial effects:
[0058] The embodiment of the present invention performs initial binocular photography on the target laser engraving workpiece to obtain the plane blur range; selects the positioning space position to perform positioning binocular photography on the target laser engraving workpiece; determines the distance of multiple target feature points; calculates the positioning mapping coordinates of the positioning space position; calculates the correction offset distance and the correction offset angle, and offsets to the origin of the laser engraving program. It is capable of performing initial binocular photography on the target laser engraving workpiece to obtain the plane blur range, selecting the positioning space position to perform positioning binocular photography within the plane blur range, identifying and determining the distance of multiple target feature points, calculating the correction offset distance and the correction offset angle, and then correcting the offset to the origin of the laser engraving program, thereby realizing automatic and precise offset control of the origin of the laser engraving program through visual positioning, effectively avoiding the overall offset of the laser engraving processing area, and ensuring the quality of laser engraving processing. BRIEF DESCRIPTION OF THE DRAWINGS
[0059] Figure 1 A flow chart of a visual positioning method for a laser engraving machine provided by an embodiment of the present invention is shown;
[0060] Figure 2 A flow chart of obtaining a plane blur range in a method provided by an embodiment of the present invention is shown;
[0061] Figure 3 A flow chart of obtaining positioning shooting data in the method provided in an embodiment of the present invention is shown;
[0062] Figure 4A flow chart of determining the distance of target feature points in the method provided by an embodiment of the present invention is shown;
[0063] Figure 5 A flow chart showing the calculation of positioning mapping coordinates in the method provided by an embodiment of the present invention is shown;
[0064] Figure 6 A flow chart showing the origin offset of the laser engraving program in the method provided by an embodiment of the present invention is shown;
[0065] Figure 7 The application architecture diagram of the visual positioning system for a laser engraving machine provided by an embodiment of the present invention is shown;
[0066] Figure 8 The structure block diagram of the initial binocular shooting module in the system provided by the embodiment of the present invention is shown. DETAILED DESCRIPTION
[0067] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.
[0068] It is understandable that the marking, engraving or cutting process of the laser engraving machine needs to be controlled according to a pre-set processing program. Before the processing control is performed according to the processing program, the processing end of the laser engraving machine needs to be controlled to move to the origin of the laser engraving program. In the prior art, the movement control of the processing end is usually performed manually, resulting in inaccurate selection of the origin of the laser engraving program, which can easily cause an overall offset of the laser engraving processing area, affecting the processing quality of marking, engraving or cutting.
[0069] To solve the above problems, an embodiment of the present invention discloses a visual positioning method and system for a laser engraving machine, which comprises the following steps: performing an initial binocular shooting of a target laser engraving workpiece at an initial shooting position to obtain initial shooting data, and performing blur recognition to obtain a plane blur range of the target laser engraving workpiece; selecting a positioning space position according to the plane blur range, performing a positioning binocular shooting of the target laser engraving workpiece at the positioning space position to obtain positioning shooting data; obtaining workpiece feature point data, extracting feature point feature data, and performing feature point recognition on the positioning shooting data according to the feature point feature data to determine multiple target feature point distances; extracting feature point coordinate data from the workpiece feature point data, and calculating the positioning mapping coordinates of the positioning space position in combination with multiple target feature point distances; calculating a correction offset distance and a correction offset angle according to the positioning mapping coordinates, and offsetting to the laser engraving program origin according to the correction offset distance and the correction offset angle. It can take initial binocular photos of the target laser engraving workpiece, obtain the plane blur range, select the positioning space position in the plane blur range for positioning binocular photos, identify and determine the distance of multiple target feature points, calculate the correction offset distance and correction offset angle, and then correct the offset to the origin of the laser engraving program. Through visual positioning, automatic and precise offset control of the origin of the laser engraving program can be achieved, avoiding the overall offset of the laser engraving processing area in the subsequent processing process, and ensuring the quality of laser engraving processing.
[0070] Specifically, Figure 1 The flowchart of the visual positioning method for a laser engraving machine provided by an embodiment of the present invention is shown.
[0071] In a preferred embodiment of the present invention, a visual positioning method for a laser engraving machine is provided, and the method specifically comprises the following steps:
[0072] Step S101: At an initial shooting position, an initial binocular shooting is performed on a target laser engraved workpiece to obtain initial shooting data, and blur recognition is performed to obtain a plane blur range of the target laser engraved workpiece.
[0073] In an embodiment of the present invention, a staff member needs to place a target laser engraved workpiece on a processing workbench for laser engraving. After completing the placement of the target laser engraved workpiece, the staff member can press a placement completion button, at which time an initial shooting instruction is generated. Then, according to the initial shooting instruction, an initial binocular shooting of the target laser engraved workpiece is performed at the initial shooting position to obtain initial shooting data. By analyzing the initial shooting data, multiple workpiece boundary positions of the target laser engraved workpiece are selected, and the workpiece boundary directions and workpiece boundary distances of the multiple workpiece boundary positions relative to the initial shooting position are determined, thereby obtaining multiple workpiece boundary directions and multiple workpiece boundary distances. Then, according to the multiple workpiece boundary directions and the corresponding workpiece boundary distances, plane identification is performed to determine multiple boundary identification points, and by connecting adjacent boundary identification points, a plane fuzzy range of the target laser engraved workpiece is generated.
[0074] Specifically, Figure 2 A flow chart of obtaining a plane blur range in the method provided by an embodiment of the present invention is shown.
[0075] Among them, in the preferred embodiment provided by the present invention, the initial binocular shooting of the target laser engraved workpiece is performed at the initial shooting position, the initial shooting data is obtained, and blur recognition is performed, and the plane blur range of the target laser engraved workpiece is obtained, which specifically includes the following steps:
[0076] Step S1011: after the target laser engraved workpiece is placed, an initial shooting instruction is generated.
[0077] Step S1012: According to the initial shooting instruction, an initial binocular shooting is performed on the target laser engraved workpiece at an initial shooting position to obtain initial shooting data.
[0078] Step S1013: Select multiple workpiece boundary positions according to the initial shooting data.
[0079] Step S1014: Analyze the initial shooting data to determine workpiece boundary directions and workpiece boundary distances corresponding to a plurality of workpiece boundary positions.
[0080] Step S1015: connecting the plane blur range of the target laser engraved workpiece according to the plurality of workpiece boundary directions and the plurality of corresponding workpiece boundary distances.
[0081] Furthermore, the visual positioning method for the laser engraving machine also includes the following steps:
[0082] Step S102: selecting a positioning space position according to the plane blur range, and performing positioning binocular photography of the target laser engraved workpiece at the positioning space position to obtain positioning photography data.
[0083] In an embodiment of the present invention, in the plane blur range, the midpoint of the positioning range in the middle area is selected, and according to the preset positioning space height, the midpoint of the positioning range is extended vertically upward to determine the positioning space position, and then at the positioning space position, the target laser engraved workpiece is positioned and photographed by binocular to obtain positioning shooting data.
[0084] Specifically, Figure 3 A flow chart of obtaining positioning shooting data in the method provided in an embodiment of the present invention is shown.
[0085] Among them, in the preferred embodiment provided by the present invention, the positioning space position is selected according to the plane blur range, and the target laser engraving workpiece is positioned and photographed by binocular at the positioning space position, and the acquisition of positioning shooting data specifically includes the following steps:
[0086] Step S1021: Select the midpoint of the positioning range of the middle area in the plane blur range.
[0087] Step S1022: Determine the positioning space position according to the midpoint of the positioning range and the preset positioning space height.
[0088] Step S1023: performing positioning binocular photography of the target laser engraved workpiece at the positioning space position to obtain positioning photography data.
[0089] Furthermore, the visual positioning method for the laser engraving machine also includes the following steps:
[0090] Step S103: acquiring workpiece feature point data, extracting feature point feature data, and performing feature point recognition on the positioning shooting data according to the feature point feature data to determine the distances of multiple target feature points.
[0091] In an embodiment of the present invention, feature point recognition, feature recording and coordinate marking are performed on a workpiece model of a pre-imported target laser engraved workpiece to obtain workpiece feature point data, and then feature point feature data is extracted from the workpiece feature point data. Feature point matching is then performed on the positioning shooting data according to the feature point feature data to determine a plurality of matching feature points that can be feature matched, and shooting feature point data of the plurality of matching feature points is extracted from the positioning shooting data. By performing distance analysis on the plurality of shooting feature point data, the distance between the plurality of matching feature points and the target feature point of the positioning space position is determined.
[0092] Specifically, Figure 4 A flow chart of determining the distance of target feature points in the method provided by an embodiment of the present invention is shown.
[0093] Among them, in the preferred embodiment provided by the present invention, the acquisition of workpiece feature point data, the extraction of feature point feature data, and the feature point recognition of the positioning shooting data according to the feature point feature data, and the determination of the distances of multiple target feature points specifically include the following steps:
[0094] Step S1031, obtaining workpiece feature point data.
[0095] Step S1032: extracting feature point feature data from the workpiece feature point data.
[0096] Step S1033: perform feature point recognition on the positioning shooting data according to the feature point feature data to obtain a plurality of shooting feature point data.
[0097] Step S1034: performing distance analysis on the plurality of photographed feature point data to determine distances of a plurality of target feature points.
[0098] Furthermore, the visual positioning method for the laser engraving machine also includes the following steps:
[0099] Step S104: extracting feature point coordinate data from the workpiece feature point data, and calculating the positioning mapping coordinates of the positioning space position in combination with a plurality of target feature point distances.
[0100] In an embodiment of the present invention, feature point coordinate data is extracted from workpiece feature point data, and three representative feature points are selected from multiple matching feature points, and then three corresponding representative feature point coordinates are obtained from the feature point coordinate data according to the three representative feature points, and three corresponding representative feature point distances are obtained from multiple target feature point distances according to the three representative feature points, and then the positioning mapping coordinates of the positioning space position on the plane of the processing workbench are calculated according to the three representative feature point coordinates, the three representative feature point distances and the preset positioning space height. Specifically, the calculation formula of the positioning mapping coordinates is:
[0101]
[0102] Among them, (x, y) is the positioning mapping coordinate, (x A ,y A ) is the coordinate of the representative feature point of A, (x B ,y B ) is the coordinate of the representative feature point of B, (x C ,y C ) is the coordinate of the representative feature point of C, L A A represents the distance between the representative feature points, L B B represents the distance between the representative feature points, L C C represents the representative feature point distance of the feature point, and h is the height of the positioning space.
[0103] Specifically, Figure 5 A flow chart of calculating positioning mapping coordinates in the method provided by an embodiment of the present invention is shown.
[0104] Among them, in the preferred embodiment provided by the present invention, the extraction of feature point coordinate data from the workpiece feature point data, and the calculation of the positioning mapping coordinates of the positioning space position in combination with the distances of multiple target feature points specifically include the following steps:
[0105] Step S1041 : extracting feature point coordinate data from the workpiece feature point data.
[0106] Step S1042: Select three representative feature points according to the workpiece feature point data.
[0107] Step S1043: according to the three representative feature points, obtain three corresponding representative feature point coordinates from the feature point coordinate data.
[0108] Step S1044: according to the three representative feature points, three corresponding representative feature point distances are obtained from the plurality of target feature point distances.
[0109] Step S1045 : Calculate the positioning mapping coordinates of the positioning space position according to the coordinates of the three representative feature points, the distances between the three representative feature points and the preset positioning space height.
[0110] Furthermore, the visual positioning method for the laser engraving machine also includes the following steps:
[0111] Step S105: Calculate a correction offset distance and a correction offset angle according to the positioning mapping coordinates, and shift to the laser engraving program origin according to the correction offset distance and the correction offset angle.
[0112] In the embodiment of the present invention, according to the positioning mapping coordinates, the correction offset distance and the correction offset angle are calculated, and then the origin offset instruction is generated according to the correction offset distance and the correction offset angle. According to the origin offset instruction, the end head is offset at the preset positioning space height to the laser engraving height origin, and then the end head is controlled to descend to the preset laser engraving program height, and automatically enters the laser engraving program origin in the processing program, thereby realizing automatic and accurate offset control of the laser engraving program origin. Specifically, the calculation formula of the correction offset distance is:
[0113]
[0114] The calculation formula for the correction offset angle is:
[0115]
[0116] Specifically, Figure 6 The flowchart of the laser engraving program origin offset in the method provided by the embodiment of the present invention is shown.
[0117] Among them, in the preferred embodiment provided by the present invention, the calculation of the correction offset distance and the correction offset angle according to the positioning mapping coordinates, and the offset to the origin of the laser engraving program according to the correction offset distance and the correction offset angle specifically include the following steps:
[0118] Step S1051: Calculate the correction offset distance and the correction offset angle according to the positioning mapping coordinates.
[0119] Step S1052: Generate an origin offset instruction according to the correction offset distance and the correction offset angle.
[0120] Step S1053: shift to the laser engraving height origin according to the origin shift instruction.
[0121] Step S1054, descend to the preset laser engraving program height, and automatically enter the laser engraving program origin.
[0122] Furthermore, Figure 7 The application architecture diagram of the visual positioning system for a laser engraving machine provided by an embodiment of the present invention is shown.
[0123] Among them, in another preferred embodiment provided by the present invention, a visual positioning system for a laser engraving machine includes:
[0124] The initial binocular shooting module 101 is used to perform initial binocular shooting of the target laser engraved workpiece at the initial shooting position, obtain initial shooting data, and perform blur recognition to obtain the plane blur range of the target laser engraved workpiece.
[0125] In an embodiment of the present invention, a staff member needs to place a target laser engraved workpiece on a processing workbench for laser engraving. After completing the placement of the target laser engraved workpiece, the staff member can press a placement completion button. At this time, the initial binocular shooting module 101 generates an initial shooting instruction, and then performs an initial binocular shooting of the target laser engraved workpiece at the initial shooting position according to the initial shooting instruction to obtain initial shooting data. By analyzing the initial shooting data, multiple workpiece boundary positions of the target laser engraved workpiece are selected, and the workpiece boundary directions and workpiece boundary distances of the multiple workpiece boundary positions relative to the initial shooting position are determined, thereby obtaining multiple workpiece boundary directions and multiple workpiece boundary distances, and then plane identification is performed according to the multiple workpiece boundary directions and the corresponding workpiece boundary distances, and multiple boundary identification points are determined. By connecting adjacent boundary identification points, a plane blur range of the target laser engraved workpiece is generated.
[0126] Specifically, Figure 8 It shows a structural block diagram of the initial binocular shooting module 101 in the system provided by an embodiment of the present invention.
[0127] Among them, in the preferred embodiment provided by the present invention, the initial binocular shooting module 101 specifically includes:
[0128] The instruction generating unit 1011 is used to generate an initial shooting instruction after the target laser engraving workpiece is placed.
[0129] The binocular shooting unit 1012 is used to perform initial binocular shooting of the target laser engraved workpiece at the initial shooting position according to the initial shooting instruction to obtain initial shooting data.
[0130] The position selection unit 1013 is used to select a plurality of workpiece boundary positions according to the initial shooting data.
[0131] The distance determining unit 1014 is used to analyze the initial shooting data to determine the workpiece boundary directions and workpiece boundary distances corresponding to the plurality of workpiece boundary positions.
[0132] The range connecting unit 1015 is used to connect the plane fuzzy range of the target laser engraved workpiece according to the multiple workpiece boundary directions and the multiple corresponding workpiece boundary distances.
[0133] Furthermore, the visual positioning system for the laser engraving machine also includes:
[0134] The positioning binocular shooting module 102 is used to select a positioning space position according to the plane blur range, and perform positioning binocular shooting on the target laser engraving workpiece at the positioning space position to obtain positioning shooting data.
[0135] In an embodiment of the present invention, the positioning binocular shooting module 102 selects the midpoint of the positioning range in the middle area in the plane blur range, and extends vertically upward at the midpoint of the positioning range according to a preset positioning space height to determine the positioning space position, and then at the positioning space position, performs positioning binocular shooting of the target laser engraved workpiece to obtain positioning shooting data.
[0136] The feature point recognition module 103 is used to obtain workpiece feature point data, extract feature point feature data, and perform feature point recognition on the positioning shooting data according to the feature point feature data to determine the distances of multiple target feature points.
[0137] In an embodiment of the present invention, the feature point recognition module 103 obtains workpiece feature point data by performing feature point recognition, feature recording and coordinate marking on a workpiece model of a pre-imported target laser engraved workpiece, and then extracts feature point feature data from the workpiece feature point data, and then matches feature points of the positioning shooting data according to the feature point feature data to determine a plurality of matching feature points that can be feature matched, and extracts shooting feature point data of a plurality of matching feature points from the positioning shooting data, and determines the target feature point distance between a plurality of matching feature points and the positioning space position by performing distance analysis on the plurality of shooting feature point data.
[0138] The mapping coordinate calculation module 104 is used to extract feature point coordinate data from the workpiece feature point data, and calculate the positioning mapping coordinates of the positioning space position in combination with a plurality of target feature point distances.
[0139] In the embodiment of the present invention, the mapping coordinate calculation module 104 extracts feature point coordinate data from the workpiece feature point data, selects three representative feature points from multiple matching feature points, and then obtains three corresponding representative feature point coordinates from the feature point coordinate data according to the three representative feature points, and obtains three corresponding representative feature point distances from multiple target feature point distances according to the three representative feature points, and then calculates the positioning mapping coordinates of the positioning space position on the plane of the processing workbench according to the three representative feature point coordinates, the three representative feature point distances and the preset positioning space height. Specifically, the calculation formula of the positioning mapping coordinates is:
[0140]
[0141] Among them, (x, y) is the positioning mapping coordinate, (x A ,y A ) is the coordinate of the representative feature point of A, (x B ,y B ) is the coordinate of the representative feature point of B, (x C ,y C ) is the coordinate of the representative feature point of C, L A A represents the distance between the representative feature points, L B B represents the distance between the representative feature points, L C C represents the representative feature point distance of the feature point, and h is the height of the positioning space.
[0142] The program origin offset module 105 is used to calculate the correction offset distance and the correction offset angle according to the positioning mapping coordinates, and offset to the laser engraving program origin according to the correction offset distance and the correction offset angle.
[0143] In the embodiment of the present invention, the program origin offset module 105 calculates the correction offset distance and the correction offset angle according to the positioning mapping coordinates, and then generates an origin offset instruction according to the correction offset distance and the correction offset angle. According to the origin offset instruction, the end head is offset at the preset positioning space height to the laser engraving height origin, and then the end head is controlled to descend to the preset laser engraving program height, and automatically enters the laser engraving program origin in the processing program, thereby realizing automatic and accurate offset control of the laser engraving program origin. Specifically, the calculation formula for the correction offset distance is:
[0144]
[0145] The calculation formula for the correction offset angle is:
[0146]
[0147] It should be understood that, although each step in the flow chart of each embodiment of the present invention is shown in sequence according to the indication of the arrow, these steps are not necessarily performed in sequence according to the order indicated by the arrow. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be performed in other orders. Moreover, at least a portion of the steps in each embodiment may include a plurality of sub-steps or a plurality of stages, and these sub-steps or stages are not necessarily performed at the same time, but can be performed at different times, and the execution order of these sub-steps or stages is not necessarily performed in sequence, but can be performed in turn or alternately with at least a portion of other steps or sub-steps or stages of other steps.
[0148] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the program can be stored in a non-volatile computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
[0149] The above-mentioned embodiments only express several implementation methods of the present invention, and the description thereof is relatively specific and detailed, but it cannot be understood as limiting the scope of the patent of the present invention. It should be pointed out that, for ordinary technicians in this field, several variations and improvements can be made without departing from the concept of the present invention, which all belong to the protection scope of the present invention. Therefore, the protection scope of the patent of the present invention shall be subject to the attached claims.
Claims
1. A visual positioning method for a laser engraving machine, characterized in that: The method specifically comprises the following steps: At the initial shooting position, an initial binocular shooting is performed on the target laser engraved workpiece to obtain initial shooting data, and fuzzy recognition is performed to obtain the plane fuzzy range of the target laser engraved workpiece; According to the plane blur range, a positioning space position is selected, and at the positioning space position, a positioning binocular photographing is performed on the target laser engraving workpiece to obtain positioning photographing data; Acquire workpiece feature point data, extract feature point feature data, and perform feature point recognition on the positioning shooting data according to the feature point feature data to determine the distances of multiple target feature points; Extracting feature point coordinate data from the workpiece feature point data, and calculating the positioning mapping coordinates of the positioning space position in combination with a plurality of target feature point distances; Calculate the correction offset distance and the correction offset angle according to the positioning mapping coordinates, and shift to the origin of the laser engraving program according to the correction offset distance and the correction offset angle; The process of performing initial binocular photography of the target laser engraved workpiece at the initial photography position, obtaining initial photography data, and performing blur recognition to obtain the plane blur range of the target laser engraved workpiece specifically includes the following steps: After the target laser engraved workpiece is placed, an initial shooting instruction is generated; According to the initial shooting instruction, at the initial shooting position, an initial binocular shooting of the target laser engraved workpiece is performed to obtain initial shooting data; Selecting a plurality of workpiece boundary positions according to the initial shooting data; Analyzing the initial photographing data to determine workpiece boundary directions and workpiece boundary distances corresponding to a plurality of workpiece boundary positions; Connecting the plane fuzzy range of the target laser engraved workpiece according to the plurality of workpiece boundary directions and the plurality of corresponding workpiece boundary distances; The selecting of a positioning space position according to the plane blur range, and performing positioning binocular photography of the target laser engraved workpiece at the positioning space position to obtain positioning photography data specifically comprises the following steps: In the plane blur range, select the midpoint of the positioning range in the middle area; Determine the positioning space position according to the midpoint of the positioning range and the preset positioning space height; At the positioning space position, the target laser engraving workpiece is photographed by binocular positioning to obtain positioning photography data; The method of acquiring workpiece feature point data, extracting feature point feature data, and performing feature point recognition on the positioning shooting data according to the feature point feature data, and determining the distances of multiple target feature points specifically includes the following steps: Obtain workpiece feature point data; Extracting feature point feature data from the workpiece feature point data; According to the feature point feature data, feature point recognition is performed on the positioning shooting data to obtain a plurality of shooting feature point data; Performing distance analysis on the plurality of photographed feature point data to determine the distances of the plurality of target feature points; The step of extracting feature point coordinate data from the workpiece feature point data and calculating the positioning mapping coordinates of the positioning space position by combining the distances of a plurality of target feature points specifically comprises the following steps: Extracting feature point coordinate data from the workpiece feature point data; According to the workpiece feature point data, three representative feature points are selected; According to the three representative feature points, three corresponding representative feature point coordinates are obtained from the feature point coordinate data; According to the three representative feature points, three corresponding representative feature point distances are obtained from the plurality of target feature point distances; Calculate the positioning mapping coordinates of the positioning space position according to the coordinates of the three representative feature points, the distances between the three representative feature points and the preset positioning space height; The calculation formula of the positioning mapping coordinates is: ; in, To locate the mapping coordinates, A represents the coordinates of the representative feature point of the feature point, B represents the coordinates of the representative feature point of the feature point, C represents the coordinates of the representative feature point of the feature point, A represents the distance between the representative feature points of feature points, is the distance between the representative feature points of B and the representative feature points, C represents the distance between the representative feature points of the feature points, To locate the space height; The calculating of the correction offset distance and the correction offset angle according to the positioning mapping coordinates, and the offset to the origin of the laser engraving program according to the correction offset distance and the correction offset angle specifically include the following steps: Calculating a correction offset distance and a correction offset angle according to the positioning mapping coordinates; Generate an origin offset instruction according to the correction offset distance and the correction offset angle; According to the origin offset instruction, shift to the laser engraving height origin; Descend to the preset laser engraving program height and automatically enter the laser engraving program origin; The calculation formula for the correction offset distance is: ; The calculation formula for the correction offset angle is: 。 2. A visual positioning system for a laser engraving machine, characterized in that: The system includes an initial binocular shooting module, a positioning binocular shooting module, a feature point recognition module, a mapping coordinate calculation module and a program origin offset module, wherein: An initial binocular shooting module is used to perform initial binocular shooting of a target laser engraved workpiece at an initial shooting position, obtain initial shooting data, and perform blur recognition to obtain a plane blur range of the target laser engraved workpiece; A positioning binocular shooting module is used to select a positioning space position according to the plane blur range, and to perform positioning binocular shooting on the target laser engraving workpiece at the positioning space position to obtain positioning shooting data; A feature point recognition module is used to obtain workpiece feature point data, extract feature point feature data, and perform feature point recognition on the positioning shooting data according to the feature point feature data to determine the distances of multiple target feature points; A mapping coordinate calculation module, used to extract feature point coordinate data from the workpiece feature point data, and calculate the positioning mapping coordinates of the positioning space position in combination with a plurality of target feature point distances; A program origin offset module, used to calculate a correction offset distance and a correction offset angle according to the positioning mapping coordinates, and offset to the laser engraving program origin according to the correction offset distance and the correction offset angle; The initial binocular shooting module specifically includes: An instruction generation unit, used to generate an initial shooting instruction after the target laser engraving workpiece is placed; A binocular shooting unit is used to perform initial binocular shooting of the target laser engraved workpiece at an initial shooting position according to the initial shooting instruction to obtain initial shooting data; A position selection unit, used for selecting a plurality of workpiece boundary positions according to the initial shooting data; A distance determination unit, configured to analyze the initial photographing data to determine workpiece boundary directions and workpiece boundary distances corresponding to a plurality of workpiece boundary positions; A range connection unit, used for connecting the plane fuzzy range of the target laser engraved workpiece according to the plurality of workpiece boundary directions and the plurality of corresponding workpiece boundary distances; The positioning space position is selected according to the plane blur range, and the target laser engraving workpiece is positioned and photographed by binocular at the positioning space position to obtain the positioning photography data. Specifically, the positioning photography data is obtained as follows: In the plane blur range, select the midpoint of the positioning range in the middle area; Determine the positioning space position according to the midpoint of the positioning range and the preset positioning space height; At the positioning space position, the target laser engraving workpiece is photographed by binocular positioning to obtain positioning photography data; The method of acquiring workpiece feature point data, extracting feature point feature data, and performing feature point recognition on the positioning shooting data according to the feature point feature data, and determining the distances of multiple target feature points is specifically as follows: Obtain workpiece feature point data; Extracting feature point feature data from the workpiece feature point data; According to the feature point feature data, feature point recognition is performed on the positioning shooting data to obtain a plurality of shooting feature point data; Performing distance analysis on the plurality of photographed feature point data to determine the distances of the plurality of target feature points; The feature point coordinate data is extracted from the workpiece feature point data, and the positioning mapping coordinates of the positioning space position are calculated by combining the distances of the plurality of target feature points: Extracting feature point coordinate data from the workpiece feature point data; According to the workpiece feature point data, three representative feature points are selected; According to the three representative feature points, three corresponding representative feature point coordinates are obtained from the feature point coordinate data; According to the three representative feature points, three corresponding representative feature point distances are obtained from the plurality of target feature point distances; Calculate the positioning mapping coordinates of the positioning space position according to the coordinates of the three representative feature points, the distances between the three representative feature points and the preset positioning space height; The calculation formula of the positioning mapping coordinates is: ; in, To locate the mapping coordinates, A represents the coordinates of the representative feature point of the feature point, B represents the coordinates of the representative feature point of the feature point, C represents the coordinates of the representative feature point of the feature point, A represents the distance between the representative feature points of feature points, is the distance between the representative feature points of B and the representative feature points, C represents the distance between the representative feature points of the feature points, To locate the space height; The calculation of the correction offset distance and the correction offset angle according to the positioning mapping coordinates, and the offset to the origin of the laser engraving program according to the correction offset distance and the correction offset angle are specifically as follows: Calculating a correction offset distance and a correction offset angle according to the positioning mapping coordinates; Generate an origin offset instruction according to the correction offset distance and the correction offset angle; According to the origin offset instruction, shift to the laser engraving height origin; Descend to the preset laser engraving program height and automatically enter the laser engraving program origin; The calculation formula for the correction offset distance is: ; The calculation formula for the correction offset angle is: 。
