Vision-based laser marking positioning method and system

By constructing a pixel matrix set of steam holes and calculating the distinguishability of neighboring holes, and combining the features of neighboring pixels for comprehensive matching, the problems of positioning deviation and low efficiency in the traditional laser marking and positioning method for electric iron accessories are solved, and high-precision and efficient flexible production is achieved.

CN121391996BActive Publication Date: 2026-04-07NINGBO XINGDING ELECTRIC APPLIANCE CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-12-24
Publication Date
2026-04-07

AI Technical Summary

Technical Problem

Traditional laser marking and positioning methods for electric iron accessories suffer from problems such as fixture wear, workpiece surface deformation, and random placement due to frequent model changes. This results in large deviations in marking positions, skewed scales, and duplicate printing of batch numbers, making it difficult to adapt to the needs of flexible production. Existing technologies cannot effectively distinguish the candidate positions of multiple similar steam holes, leading to positioning failures and production efficiency losses.

Method used

By constructing a pixel matrix set of steam holes, the discrimination and location confidence between the target hole and its neighboring holes are calculated. The features of neighboring pixels are combined for comprehensive matching. The pixel features of the target hole and its neighboring holes are used for accurate matching. A regional joint analysis mechanism is introduced to identify the subtle differences between multiple geometrically similar steam holes, thereby achieving high-precision positioning.

Benefits of technology

It improves the robustness of positioning, reduces the problems of mark skew and re-marking caused by mismatch, ensures high precision and consistency of marking, improves production efficiency and yield, and meets the high-efficiency and precise positioning requirements of flexible production lines.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121391996B_ABST
    Figure CN121391996B_ABST
Patent Text Reader

Abstract

This invention relates to the field of image processing, and more particularly to a vision-based laser marking and positioning method and system. The method includes: acquiring a template RGB image and a target RGB image of an electric iron soleplate; constructing a pixel matrix set of target holes and calculating the distinguishability between the target hole and any other hole; calculating the positioning confidence of the target hole at a target scale, iterating through the target holes to obtain their positioning confidence at each scale, and determining the positioning hole based on the positioning confidence; calculating the positioning weight of any pixel matrix in the pixel matrix set of any positioning hole; taking any steam hole in the target RGB image as a matching hole to calculate the positioning matching degree between the matching hole and any positioning hole at the target scale; and calculating the comprehensive matching degree between the matching hole and any positioning hole based on the cumulative value of the positioning matching degree and the positioning confidence. The technical solution of this invention can improve the accuracy of marking and positioning.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of image processing. In particular, it relates to a vision-based laser marking positioning method and system. BACKGROUND

[0002] In the field of laser marking of electric iron accessories, traditional positioning methods (such as fixed clamps, positioning pins, or manual red light alignment) often cause large deviations in marking positions, skewed scales, and repeated printing of batch numbers due to frequent changes in types, clamp wear, deformation of workpiece curved surfaces, and random placement. This not only leads to low yield, but also makes it difficult to adapt to flexible production needs.

[0003] Although existing technologies attempt to improve through image processing, they only rely on the pixel features of a single steam hole on the bottom plate of the marking template for matching and positioning, ignoring the consistency differences in pixel distribution, shape, and surrounding regional features (such as hole spacing, edge texture, or local patterns) of different position steam holes. This leads to the inability to distinguish between multiple similar steam hole candidate positions during real-time marking, making it difficult to accurately lock the real marking point and further exacerbating positioning failure and production efficiency loss. SUMMARY

[0004] To solve the above technical problems, the present application provides solutions in the following aspects.

[0005] In a first aspect, a vision-based laser marking positioning method includes: obtaining a template RGB image of an electric iron bottom plate and a to-be-positioned RGB image; taking any steam hole in the template RGB image as a target hole, constructing a pixel matrix set of the target hole, taking the steam holes other than the target hole in the template RGB image as remaining holes, and calculating the discriminability of the target hole and any remaining hole; taking the steam holes in the 8-neighborhood of the target hole as adjacent holes, presetting the number of adjacent holes of the target hole as a target scale, calculating the positioning confidence of the target hole under the target scale according to the discriminability, obtaining the positioning confidence of the target hole under each scale through iteration, obtaining the cumulative value of the positioning confidence of the target hole, obtaining the cumulative value of the positioning confidence of each steam hole through iteration, arranging all cumulative values of the positioning confidence from large to small, taking the top 3 steam holes with the cumulative values of the positioning confidence as positioning holes; for the target scale, calculating the positioning weight of any pixel matrix in the pixel matrix set of any positioning hole, taking any steam hole in the to-be-positioned RGB image as a to-be-matched hole, calculating the positioning matching degree of the to-be-matched hole and any positioning hole under the target scale, calculating the comprehensive matching degree of the to-be-matched hole and any positioning hole based on the positioning matching degree and the cumulative value of the positioning confidence, and completing positioning.

[0006] Preferably, the pixel matrix set of the target hole is constructed by: obtaining a bisector of the tip angle of the sole of the electric iron; constructing a minimum circumscribed rectangle of the target hole as a target pixel matrix, two sides of the minimum circumscribed rectangle being parallel to the bisector of the tip angle; obtaining pixel matrices in 8 neighborhood directions of the target pixel matrix as neighborhood pixel matrices, the neighborhood pixel matrices being adjacent to the target pixel matrix and having the same size as the target pixel matrix; and taking the target pixel matrix and all the neighborhood pixel matrices as the pixel matrix set of the target hole.

[0007] Preferably, the calculation of the discrimination degree comprises: obtaining the pixel matrix set of any remaining hole; calculating the negative exponential value of the cosine similarity of the pixel matrix at the same position between the pixel matrix set of the target hole and the pixel matrix set of any remaining hole; obtaining the negative exponential value of the cosine similarity of all the pixel matrices between the target hole and any remaining hole; and taking the sum of all the negative exponential values of the cosine similarity as the discrimination degree between the target hole and any remaining hole.

[0008] Preferably, the calculation of the positioning confidence degree comprises: constructing all the adjacent holes of the target hole as an adjacent set, and constructing all the adjacent holes of any remaining hole in the same way; taking any neighborhood direction as a research direction, calculating the discrimination degree of the steam hole in the research direction between the adjacent set of the target hole and the adjacent set of any remaining hole; obtaining the discrimination degree of the steam hole in the research direction between the adjacent set of the target hole and the adjacent set of each remaining hole; calculating a first cumulative value of all the discrimination degrees; taking the discrimination degree between the target hole and the adjacent hole in the research direction as a weight value, and calculating a first product of the weight value and the first cumulative value; obtaining the first product of each neighborhood direction, and taking the mean value of all the first products as the positioning confidence degree.

[0009] Preferably, the positioning weight comprises: taking any pixel matrix in the pixel matrix set of any positioning hole as a research matrix, and taking the pixel matrix other than the research matrix in the pixel matrix set of any positioning hole as a control matrix, calculating the negative exponential value of the cosine similarity between the research matrix and the control matrix; obtaining the negative exponential value of the cosine similarity between the research matrix and each control matrix, and taking the sum of all the negative exponential values of the cosine similarity as the positioning weight of any pixel matrix.

[0010] Preferably, the positioning matching degree comprises: for a target scale, obtaining neighboring holes of any positioning hole, taking the neighboring holes of any positioning hole as positioning neighboring holes, and obtaining a pixel matrix set of the positioning neighboring holes; taking any neighborhood direction as a research direction, taking a positioning weight of a pixel matrix in the research direction in the pixel matrix set of the positioning neighboring holes as a first term; obtaining a pixel matrix of a neighboring hole of the hole to be matched in the research direction as a first matrix, obtaining a pixel matrix of a neighboring hole of the positioning neighboring holes in the research direction as a second matrix, and calculating a cosine similarity of the first matrix and the second matrix; calculating a second product of the first term and the cosine similarity, obtaining a second product of each research direction, and calculating a second product cumulative value; obtaining a second product cumulative value of each neighboring hole, and taking a sum of all second product cumulative values as the positioning matching degree of the hole to be matched and any positioning hole in the target scale.

[0011] Preferably, the positioning matching degree comprises: for a target scale, obtaining neighboring holes of any positioning hole, taking the neighboring holes of any positioning hole as positioning neighboring holes, and obtaining a pixel matrix set of the positioning neighboring holes; calculating a positioning weight of a pixel matrix of any neighborhood in the pixel matrix set of the positioning neighboring holes, taking a sum of the positioning weights of all pixel matrices in the pixel matrix set of the positioning neighboring holes as a numerator; taking a cumulative value of the sum of the positioning weights of all positioning neighboring holes as a denominator; calculating a ratio of the numerator and the denominator; taking any neighborhood direction as a research direction, obtaining a pixel matrix of a neighboring hole of the hole to be matched in the research direction as a first matrix, obtaining a pixel matrix of a neighboring hole of the positioning neighboring holes in the research direction as a second matrix, calculating a cosine similarity of the first matrix and the second matrix, and calculating a cosine similarity cumulative value of all research directions; calculating a third product of the ratio and the cosine similarity cumulative value; and taking a sum of the third products of all neighboring holes of any positioning hole as the positioning matching degree of the hole to be matched and any positioning hole in the target scale.

[0012] Preferably, the comprehensive matching degree comprises: for a target scale, calculating a sum of positioning confidence degrees of three positioning holes, obtaining a sum of positioning confidence degrees of each scale, and calculating a mean value of all positioning confidence degrees; taking a ratio of the sum of positioning confidence degrees and the mean value as a matching weight of the target scale; taking a positioning matching degree of the hole to be matched and any positioning hole in the target scale as a local matching degree; calculating a fourth product of the matching weight and the local matching degree; and taking a mean value of fourth products of all scales as the comprehensive matching degree of the hole to be matched and any positioning hole.

[0013] In a second aspect, a laser marking positioning system based on vision comprises a processor and a memory, and the memory stores computer program instructions which, when executed by the processor, implement the laser marking positioning method based on vision.

[0014] The present application has the following effects:

[0015] This invention, through comprehensive analysis of multi-hole features, can effectively identify subtle differences among multiple geometrically similar steam holes under complex working conditions, thereby overcoming the mismatch problems caused by factors such as conveyor belt vibration, workpiece displacement, and rotation angle deviation in traditional technologies. Precise matching using the pixel features of the target hole and its neighboring holes not only improves the robustness of positioning but also significantly reduces problems such as skewed marking, re-marking, or damage caused by mismatches. This ensures high precision and consistency in marking, improves production efficiency and yield, and meets the needs of flexible production lines for efficient and precise positioning. Attached Figure Description

[0016] Figure 1 This is a flowchart of a vision-based laser marking and positioning method according to an embodiment of the present invention. Detailed Implementation

[0017] The technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are some embodiments of the present invention, but not all embodiments.

[0018] The specific embodiments of the present invention will now be described in detail with reference to the accompanying drawings.

[0019] Reference Figure 1 The vision-based laser marking and positioning method includes steps S1-S4, as detailed below:

[0020] S1: Obtain the template RGB image and the RGB image to be positioned for the soleplate of the electric iron.

[0021] In one embodiment, after laser marking is completed on the soleplate component of the electric iron, according to the preset marking size and precise marking position, a high-precision industrial camera (equipped with a fixed light source and calibration parameters) is used to acquire the RGB (red, green, blue) image of the marked component, which serves as the template RGB image. Simultaneously, for the soleplate components to be positioned on the production line, their RGB images are also captured in real time using an industrial camera under the same imaging conditions (such as lighting, angle, and resolution), serving as the RGB images to be positioned.

[0022] S2: Take any steam hole in the template RGB image as the target hole, construct a pixel matrix set of the target hole, take the steam holes in the template RGB image other than the target hole as the remaining holes, and calculate the distinguishability between the target hole and any remaining hole.

[0023] In one embodiment, the geometric vertex of the base plate tip angle (typically the tip of a triangle) is first accurately identified, and its angle bisector is calculated as a global orientation reference. Next, for the selected target steam hole, its minimum bounding rectangle is constructed, and the two main sides of this rectangle are forced to be strictly parallel to the angle bisector, thereby eliminating orientation deviations caused by base plate rotation and ensuring the orientation consistency of the hole features. Based on this, using the minimum bounding rectangle region as the target pixel matrix, pixel matrices in its eight surrounding neighborhood directions (up, down, left, right, upper left, upper right, lower left, lower right) are further extracted. Each neighborhood pixel matrix is ​​closely adjacent to the target matrix, has the same size, and covers local contextual information (such as edge texture, hole spacing, or background pattern). The target pixel matrix and all eight neighboring pixel matrices are integrated into a unified pixel matrix set.

[0024] Traverse each hole on the base plate except the target hole, and obtain its corresponding pixel matrix set (i.e., a 9-region feature set consisting of the minimum bounding rectangle of the target hole and its 8 neighboring pixel matrices). Then, for the target hole and the currently traversed holes, calculate the cosine similarity of the two sets of pixel matrices position by position (a total of 9 corresponding regions, such as the central hole region and 8 directional neighbors), and take a negative exponential function for each similarity value. This transformation can effectively amplify small differences. When the similarity is high, the output approaches 0, indicating that the features are similar; when the similarity is low, the output increases significantly, highlighting the distinguishability.

[0025] Iterate through all 9 positions, sum up these negative exponent values ​​to obtain a scalar sum, which serves as the distinguishability between the target hole and the other holes.

[0026] S3: Take the steam holes in the neighborhood of the target hole 8 as neighboring holes, preset the number of neighboring holes of the target hole as the target scale, calculate the positioning reliability of the target hole at the target scale according to the discrimination, traverse to obtain the positioning reliability of the target hole at each scale, obtain the cumulative positioning reliability value of the target hole, traverse to obtain the cumulative positioning reliability value of each steam hole, sort all the cumulative positioning reliability values ​​from large to small, and take the top 3 steam holes with the highest cumulative positioning reliability values ​​as positioning holes.

[0027] In one embodiment, the steam holes in the vicinity of the target hole 8 are considered as neighboring holes, and the number of neighboring holes of the target hole is preset as the target scale. For example, the target scale is 2, that is, any two neighboring holes closest to the target hole are selected; the target scale is 3, that is, any three neighboring holes closest to the target hole are selected.

[0028] It should be noted that in the automated production line for laser marking of electric iron soleplate accessories, due to the vibration of the conveyor belt and the feeding mechanism of the vibratory feeder, each soleplate accessory generally has random displacement and rotation angle deviation when it arrives at the marking station, which makes it impossible for the workpiece to be accurately aligned with the marking head. The existing positioning technology only relies on the pixel features (such as hole outline or gray value) of a single steam hole in the marking template image for matching, ignoring the uniqueness of steam holes at different locations in the local neighborhood (such as edge texture, background pattern, hole spacing and pixel distribution differences caused by arc surface deformation). In real-time marking scenarios, when there are multiple geometrically similar steam holes on the soleplate surface, it is impossible to effectively distinguish candidate positions, often resulting in mismatch, skewed marking or re-marking, which seriously restricts the efficiency of flexible production.

[0029] To address this, the present invention innovatively extracts the neighborhood pixel features of each steam hole, that is, constructs a pixel matrix set consisting of the minimum bounding rectangle of the target hole as the core and its eight directional neighborhood pixel matrices; then, combined with the unique pixel features of the target hole's neighboring holes, it performs a multi-steam hole joint difference analysis to quantitatively evaluate the positioning reliability of the target hole among multiple candidate holes, thereby robustly locking the true marking position under complex working conditions with displacement, rotation and workpiece deformation, significantly improving positioning accuracy, reducing re-marking rate, and adapting to the flexible production needs of rapid changeover of multiple models.

[0030] Specifically, all neighboring holes of the target hole are constructed into a neighbor set, and the neighbor set of any other hole is obtained similarly. Taking any neighborhood direction as the study direction, the discrimination degree of the steam holes of the neighbor set of the target hole and the neighbor set of any other hole in the study direction is calculated. The discrimination degree of the steam holes of the neighbor set of the target hole and the neighbor set of each other hole in the study direction is obtained through traversal. The first cumulative value of all discrimination degrees is calculated. The discrimination degree of the target hole and the neighboring holes in the study direction is used as the weight, and the first product of the weight and the first cumulative value is calculated. The first product of each neighborhood direction is obtained through traversal. The mean of all first products is used as the location confidence of the target hole at the target scale.

[0031] The location confidence of the target hole at each scale is obtained by iterating through the data, and the cumulative value of the location confidence of the target hole is obtained.

[0032] The system iterates through each steam hole to obtain its cumulative positional confidence value. All cumulative positional confidence values ​​are then sorted from largest to smallest, and the top three steam holes with the highest cumulative positional confidence values ​​are selected as the positioning holes. It's important to explain that three-point positioning for marking is a tooling alignment method used in the laser marking industry. It's used to quickly and accurately place the workpiece into the equipment coordinate system, ensuring that the marking content completely overlaps with the marked area. The core idea originates from the geometric concept of determining position using three points.

[0033] The calculation logic of positional confidence is as follows: On the one hand, the distinguishability between the target hole and each steam hole in its neighboring hole set quantifies the complexity of the pixel feature distribution in the local area around the target hole. The larger this value, the more irregular and diverse the pixel distribution in the neighborhood, which stems from the local deformation caused by workpiece arc surface deformation or random placement. This helps to identify high information entropy areas, thereby enhancing robustness to small displacements and rotations.

[0034] On the other hand, the distinguishability of the target hole from all other holes (including non-adjacent holes) in terms of the features of the neighboring hole set directly measures the salience and uniqueness of the target hole as a positioning reference. The larger this value, the more unique the feature fingerprint of the target hole compared to other similar steam holes on the base plate after combining its neighborhood. This can effectively suppress ambiguity in multi-hole matching (for example, avoiding misjudging neighboring holes as targets when conveyor belt vibration causes workpiece displacement), thereby ensuring accurate positioning and locking of the true marking position.

[0035] S4: For the target scale, calculate the positioning weight of any pixel matrix in the pixel matrix set of any positioning hole, take any steam hole in the RGB image to be positioned as the hole to be matched, calculate the positioning matching degree between the hole to be matched and any positioning hole at the target scale, and calculate the comprehensive matching degree between the hole to be matched and any positioning hole based on the positioning matching degree and the cumulative value of positioning confidence, and complete the positioning.

[0036] It should be noted that in the laser marking and positioning of electric iron soleplate accessories, due to the spray volume and flow design requirements of the steam holes, their structural features (such as shape, size and hole spacing) are highly consistent and evenly distributed on the soleplate. This means that when existing technologies rely solely on the pixel features (such as grayscale value or outline) of a single steam hole for matching, they cannot effectively distinguish the subtle differences between holes in different positions (especially under the displacement and arc surface deformation caused by conveyor belt vibration and random workpiece rotation). Non-target holes are often misjudged as positioning references, resulting in significant deviations in the marking position (such as marking covering functional areas) or direct damage to the steam hole structure (such as laser burning the hole edges, affecting steam spray), which seriously reduces the yield and hinders flexible production.

[0037] This invention innovatively introduces a regional joint analysis mechanism, which extracts the pixel feature matrix set of each candidate positioning hole and its neighboring holes (such as steam holes within an 8-neighborhood range), and comprehensively calculates the matching degree between the hole to be matched and the positioning hole, thereby accurately identifying the true location of the key steam hole.

[0038] In one embodiment, any pixel matrix in the pixel matrix set of any positioning hole is taken as the study matrix, and the pixel matrix other than the study matrix in the pixel matrix set of any positioning hole is taken as the reference matrix. The negative cosine similarity index value between the study matrix and the reference matrix is ​​calculated. The negative cosine similarity index value between the study matrix and each reference matrix is ​​obtained by traversing the set. The sum of all negative cosine similarity index values ​​is taken as the positioning weight of any pixel matrix.

[0039] Select any positioning hole, obtain all adjacent steam holes in its spatial neighborhood (i.e., positioning neighboring holes, which usually cover an 8-neighbor range), and extract the pixel matrix set of each positioning neighboring hole (this set consists of the core hole region and its 8 directional neighboring pixel matrices).

[0040] For each nearby hole, eight research directions (i.e., eight neighborhood directions) are traversed, and the positioning weight corresponding to the pixel matrix of the nearby hole in a specific research direction is used as the first term. At the same time, the pixel matrix with the same research direction is extracted from the neighboring holes of the hole to be matched as the first matrix, and the pixel matrix with the corresponding direction is extracted from the nearby holes as the second matrix. The cosine similarity of the feature vectors after flattening the two is calculated. Then, the second product of the first term and the cosine similarity is calculated. This operation dynamically weights and fuses feature saliency and local similarity, effectively suppressing noise and amplifying unique features.

[0041] Iterate through all 8 research directions, accumulate the second product of each direction to obtain the second product of the neighboring holes, then iterate through all the neighboring holes and sum the accumulated values ​​to finally generate the positioning matching degree score between the hole to be matched and the positioning hole at the target scale.

[0042] The calculation logic of the positioning matching degree: The positioning matching degree integrates the contextual features, orientation sensitivity and weight adaptability of multiple neighboring holes, ensuring that the real positioning hole (rather than similar interference hole) can be accurately identified under the condition of highly uniform steam hole structure. This provides a reliable input for subsequent multi-scale confidence fusion, significantly reduces the risk of marking offset, and ensures the high yield operation of the flexible production line.

[0043] For the target scale, calculate the sum of the positional confidence of the three positioning holes, iterate through each scale to obtain the sum of the positional confidence, and calculate the mean of all the positional confidence sums; use the ratio of the sum of positional confidence to the mean as the matching weight for the target scale; use the positioning matching degree between the hole to be matched and any positioning hole at the target scale as the local matching degree; calculate the fourth product of the matching weight and the local matching degree; and use the mean of the fourth products of all scales as the comprehensive matching degree between the hole to be matched and any positioning hole.

[0044] This allows us to obtain the matching holes for the three positioning holes in the RGB image to be positioned.

[0045] Based on the positions of the three matching holes in the RGB image to be located, the precise horizontal and vertical coordinates of the four vertices of the rectangular marking frame are calculated using a three-point positioning algorithm. Next, these coordinates are input into the marking system, instructing the robotic arm to rotate and move according to these coordinates, ensuring that the robotic arm's laser marking head is aligned with the rectangular area in the image. Through this process, the robotic arm accurately performs laser marking at the target position based on the input coordinates, ensuring the accuracy and consistency of the marking.

[0046] In another embodiment, the degree of location matching includes:

[0047] For the target scale, obtain the neighboring holes of any positioning hole, and use these neighboring holes as positioning neighboring holes to obtain a set of pixel matrices for positioning neighboring holes; calculate the positioning weight of the pixel matrix of any neighborhood in the set of pixel matrices for positioning neighboring holes, and use the sum of the positioning weights of all pixel matrices in the set of pixel matrices for positioning neighboring holes as the numerator; use the cumulative sum of the positioning weights of all positioning neighboring holes as the denominator; calculate the ratio of the numerator to the denominator; take any neighborhood direction as the study direction, obtain the pixel matrix of the neighboring holes of the hole to be matched in the study direction as the first matrix, obtain the pixel matrix of the positioning neighboring holes in the study direction as the second matrix, calculate the cosine similarity between the first matrix and the second matrix, calculate the cumulative cosine similarity of all study directions; calculate the third product of the ratio and the cumulative cosine similarity; use the sum of the third products of all neighboring holes of any positioning hole as the positioning matching degree between the hole to be matched and any positioning hole at the target scale.

[0048] By introducing the pixel matrix set of the positioning hole and its neighboring holes, and calculating cosine similarity, precise positioning and matching at the target scale can be achieved, effectively measuring the similarity and matching degree between the hole to be matched and the positioning hole. By locating the pixel matrix set of neighboring holes, not only is pixel information within the neighborhood comprehensively considered, but weight calculations also make the contribution of more representative neighboring holes to the matching more prominent, enhancing the matching accuracy. Using cosine similarity further improves the accuracy of comparisons in different directions, enabling a comprehensive evaluation of the matching degree between holes in multiple dimensions.

[0049] The system includes a processor and a memory, the memory storing computer program instructions, which, when executed by the processor, implement the vision-based laser marking and positioning method according to the first aspect of the present invention.

[0050] The system also includes other components well known to those skilled in the art, such as communication buses and communication interfaces, the settings and functions of which are known in the art and will not be described in detail here.

[0051] It should be noted that those skilled in the art can make various modifications and improvements without departing from the inventive concept, and these all fall within the scope of protection of this invention. Therefore, the scope of protection of this patent should be determined by the appended claims.

Claims

1. A vision-based laser marking and positioning method, characterized in that, include: Obtain the template RGB image and the RGB image to be positioned for the soleplate of the electric iron; Take any steam hole in the template RGB image as the target hole, construct a pixel matrix set of the target hole, take the steam holes in the template RGB image other than the target hole as the remaining holes, and calculate the distinguishability between the target hole and any remaining hole. The steam holes in the 8-neighborhood of the target hole are taken as neighboring holes. The number of neighboring holes of the target hole is preset as the target scale. The location confidence of the target hole at the target scale is calculated based on the discrimination. The location confidence of the target hole at each scale is obtained through traversal. The location confidence cumulative value of the target hole is obtained. The location confidence cumulative value of each steam hole is obtained through traversal. All location confidence cumulative values ​​are arranged from largest to smallest. The steam holes with the top 3 location confidence cumulative values ​​are taken as the positioning holes. For the target scale, calculate the positioning weight of any pixel matrix in the pixel matrix set of any positioning hole, take any steam hole in the RGB image to be positioned as the matching hole, calculate the positioning matching degree between the matching hole and any positioning hole at the target scale based on the positioning weight, the matching hole, and the positioning hole, and calculate the comprehensive matching degree between the matching hole and any positioning hole based on the positioning matching degree and the cumulative value of positioning confidence, and complete the positioning. Calculating the location reliability includes: Construct a neighbor set for all neighboring holes of the target hole, and similarly obtain the neighbor set for any other hole; Taking any neighborhood direction as the research direction, calculate the distinguishability of the target hole's neighbor set and the neighbor set of any other hole in the research direction. Iterate through the neighbor set of the target hole and the neighbor set of each other hole in the research direction to obtain the distinguishability of the steam holes in the research direction. Calculate the first cumulative value of all distinguishability. The distinction between the target hole and the neighboring holes in the research direction is used as the weight, and the first product of the weight and the first accumulated value is calculated. Iterate through each neighborhood direction to obtain the first product, and use the mean of all first products as the location confidence.

2. The vision-based laser marking and positioning method according to claim 1, characterized in that, The set of pixel matrices used to construct the target hole includes: Obtain the bisector of the angle at the tip of the soleplate of the electric iron; Construct the minimum bounding rectangle of the target hole as the target pixel matrix, with the two sides of the minimum bounding rectangle being parallel to the angle bisector of the tip. Obtain the pixel matrix in the 8 neighborhood directions of the target pixel matrix as the neighborhood pixel matrix. All neighborhood pixel matrices are adjacent to the target pixel matrix and have the same size as the target pixel matrix. The target pixel matrix and all neighboring pixel matrices are used as the pixel matrix set of the target hole.

3. The vision-based laser marking and positioning method according to claim 1, characterized in that, Calculating the discrimination index includes: Iterate through the remaining holes to obtain the pixel matrix set; Calculate the negative exponent of the cosine similarity between the pixel matrix set of the target hole and the pixel matrix set of any other hole at the same position. Iterate through the pixel matrix sets of the target hole and any other hole at all positions to obtain the negative exponent of the cosine similarity between the pixel matrix sets of the target hole and any other hole. The sum of the negative exponents of all cosine similarity values ​​is used as the distinguishability between the target hole and any other hole.

4. The vision-based laser marking and positioning method according to claim 1, characterized in that, The positioning weights include: Take any pixel matrix in the pixel matrix set of any positioning hole as the study matrix, and take the pixel matrix other than the study matrix in the pixel matrix set of any positioning hole as the control matrix, and calculate the negative cosine similarity index value between the study matrix and the control matrix. The cosine similarity negative exponent values ​​of the study matrix and each control matrix are obtained by iterating through them. The sum of all the cosine similarity negative exponent values ​​is used as the localization weight of any pixel matrix.

5. The vision-based laser marking and positioning method according to claim 1, characterized in that, The degree of location matching includes: For the target scale, obtain the neighboring holes of any positioning hole, take the neighboring holes of any positioning hole as the positioning neighboring holes, and obtain the pixel matrix set of the positioning neighboring holes. Take any neighborhood direction as the research direction, and take the localization weight of the pixel matrix located in the research direction in the set of pixel matrices that locate neighboring holes as the first term; Obtain the pixel matrix of the neighboring holes of the hole to be matched in the research direction as the first matrix, obtain the pixel matrix of the located neighboring holes in the research direction as the second matrix, and calculate the cosine similarity between the first matrix and the second matrix. Calculate the second product of the first term and the cosine similarity, iterate through each research direction to obtain the second product, and calculate the cumulative sum of the second products; The second-multiplied cumulative sum of each neighboring hole is obtained by iterating through the holes. The sum of all the second-multiplied cumulative sums is used as the degree of positioning match between the hole to be matched and any positioning hole at the target scale.

6. The vision-based laser marking and positioning method according to claim 1, characterized in that, The degree of location matching includes: For the target scale, obtain the neighboring holes of any positioning hole, take the neighboring holes of any positioning hole as the positioning neighboring holes, and obtain the pixel matrix set of the positioning neighboring holes. Calculate the localization weight of the pixel matrix in any neighborhood of the pixel matrix set that locates the neighboring holes, and use the sum of the localization weights of all pixel matrices in the pixel matrix set that locates the neighboring holes as the numerator. Use the sum of the positioning weights of all adjacent positioning holes as the denominator; Calculate the ratio of the numerator to the denominator; Take any neighborhood direction as the research direction, obtain the pixel matrix of the neighboring holes of the hole to be matched in the research direction as the first matrix, obtain the pixel matrix of the located neighboring holes in the research direction as the second matrix, calculate the cosine similarity between the first matrix and the second matrix, and calculate the cumulative value of the cosine similarity of all research directions. Calculate the third product of the ratio and the cumulative cosine similarity value; The sum of the third products of all neighboring holes of any given positioning hole is taken as the degree of positioning match between the hole to be matched and any given positioning hole at the target scale.

7. The vision-based laser marking and positioning method according to claim 1, characterized in that, The overall matching degree includes: For the target scale, calculate the sum of the positional confidence of the three positioning holes, iterate through the scale to obtain the sum of the positional confidence of each scale, and calculate the mean of all the positional confidence sums. The ratio of the sum of location confidence scores to the mean is used as the matching weight for the target scale; The degree of local matching is defined as the degree of matching between the hole to be matched and any positioning hole at the target scale. Calculate the fourth product of the matching weight and the degree of local matching; The average of the fourth product of all scales is taken as the overall matching degree between the hole to be matched and any positioning hole.

8. A vision-based laser marking and positioning system, characterized in that, include: A processor and a memory, the memory storing computer program instructions that, when executed by the processor, implement the vision-based laser marking and positioning method according to any one of claims 1-7.

Citation Information

Patent Citations

  • Multi-dimensional feature registration method oriented to workpiece positioning

    CN108520533A

  • Marked hole positioning method and device, assembly equipment and storage medium

    CN115082552A