Processing Calibration Method, Device and Storage Medium
By identifying and matching feature points in the image of the material to be processed, and dynamically determining the compensation parameters to calibrate the cutting path, the problem that traditional laser cutting systems cannot adaptively correct, improving machining accuracy and consistency.
Patent Information
- Application Number
- CN202510464954.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-15
- Publication Date
- 2025-07-01
- Estimated Expiration
- 2045-04-15
AI Technical Summary
When processing special materials, traditional laser cutting systems cannot adaptively correct according to different characteristics and processing needs of the materials, making it difficult to ensure processing accuracy and product consistency.
By identifying feature points in the image of the material to be processed, the feature matching image and feature matching algorithm are determined based on the shape characteristics of the feature points, and the compensation parameters are dynamically determined to calibrate the cutting path.
Improve processing positioning accuracy and product consistency, reduce processing errors, and enhance the flexibility of automated processing correction.
Smart Images

Figure CN119991666B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of image processing technology, and particularly to a processing correction method, device, and storage medium. Background Art
[0002] In laser cutting technology, for some special materials, such as jelly-like substances, etc., they are easily affected by high temperature and other mechanical actions during the laser cutting process, resulting in material deformation, which in turn affects the processing accuracy. To compensate for material deformation, traditional laser cutting systems usually apply a predetermined correction algorithm for correction during the processing.
[0003] However, due to the differences in the physical properties of the materials themselves, their deformation degrees during the processing are different. In addition, different processing tasks have different requirements for the correction accuracy. The traditional camera calibration before processing cannot reflect the deformation situation of the material during the processing in real time, and the traditional correction method cannot perform adaptive adjustment according to the characteristics of different materials and processing requirements, resulting in low correction flexibility.
[0004] The above content is only used to assist in understanding the technical solution of this application, and does not represent an admission that the above content is prior art. Summary of the Invention
[0005] The main purpose of this application is to provide a processing correction method, device, and storage medium, aiming to solve the technical problem that the traditional correction method cannot perform adaptive adjustment according to the characteristics of different materials and processing requirements.
[0006] To achieve the above purpose, this application proposes a processing correction method, and the method includes:
[0007] Identify the feature points in the image of the material to be processed, and determine the feature matching image and feature matching algorithm according to the shape features of the feature points;
[0008] According to the feature matching algorithm, determine the similarity between the feature points in the image of the material to be processed and the feature points in the feature matching image, and determine the target feature points in the image of the material to be processed according to the similarity;
[0009] When the number of the target feature points is greater than or equal to the preset number threshold, determine the compensation parameter according to the pixel coordinates of the target feature points and the calibration coordinates of the feature points in the feature matching image;
[0010] Calibrate the cutting path according to the compensation parameter.
[0011] In one embodiment, the shape features include corner features and contour features, and the step of determining the feature matching image and feature matching algorithm according to the shape features of the feature points includes:
[0012] Determine the feature matching image according to the contour features of the feature points;
[0013] Determine the complexity of the feature points according to the corner point features and the contour features of the feature points;
[0014] Determine the corresponding feature matching algorithm according to the complexity.
[0015] In one embodiment, before the steps of identifying the feature points in the image of the material to be processed and determining the feature matching image and the feature matching algorithm according to the shape features of the feature points, it further includes:
[0016] Determine the preset quantity threshold according to the complexity of the feature points, where the complexity is inversely proportional to the preset quantity threshold; or
[0017] Obtain the quantity parameter input by the user, and use the quantity parameter as the preset quantity threshold.
[0018] In one embodiment, the step of determining the compensation parameter according to the pixel coordinates of the target feature point and the calibration coordinates of the feature points in the feature matching image includes:
[0019] Based on the camera parameters and the image of the material to be processed, convert the pixel coordinates of the target feature point into calibration coordinates;
[0020] According to the calibration coordinates of the target feature point and the calibration coordinates of the feature points in the feature matching image, determine the coordinate offset of the feature points in the image of the material to be processed, and use the coordinate offset as the compensation parameter.
[0021] In one embodiment, the step of determining the compensation parameter according to the pixel coordinates of the target feature point and the calibration coordinates of the feature points in the feature matching image further includes:
[0022] Move the field of view of the camera to the target feature point, and control the camera to collect the target feature point image;
[0023] Based on the camera parameters and the target feature point image, convert the pixel coordinates of the target feature point into calibration coordinates;
[0024] According to the pixel coordinates of the target feature point and the calibration coordinates of the feature points in the feature matching image, determine the coordinate offset of the feature points in the image of the material to be processed, and use the coordinate offset as the compensation parameter.
[0025] In one embodiment, the step of calibrating the cutting path according to the compensation parameter includes:
[0026] Determine the offset of each cutting path point on the cutting path according to the compensation parameter;
[0027] Offset each of the cutting path points according to the offset of the cutting path points;
[0028] Generate a new cutting path between the offset cutting path points through a difference algorithm.
[0029] In one embodiment, the step of calibrating the cutting path according to the compensation parameter further includes:
[0030] Determine the offset of each cutting path point on the cutting path according to the compensation parameter;
[0031] Determine the scaling ratio of the cutting path according to the offset of the cutting path points;
[0032] Correct the cutting path according to the scaling ratio.
[0033] In one embodiment, after the step of calibrating the cutting path according to the compensation parameter, it further includes:
[0034] Determine the feeding offset length of the next feeding according to the offset of the starting point of the path on the cutting path, and send the feeding offset length to the feeding device.
[0035] In addition, to achieve the above object, the present application also proposes a processing correction device, which includes: a memory, a processor, and a computer program stored on the memory and executable on the processor, and the computer program is configured to implement the steps of the processing correction method as described above.
[0036] In addition, to achieve the above object, the present application also proposes a storage medium, which is a computer-readable storage medium, and a computer program is stored on the storage medium, and when the computer program is executed by a processor, it implements the steps of the processing correction method as described above.
[0037] The present application provides a processing correction method, which identifies feature points in an image of a material to be processed, determines a feature matching image and a feature matching algorithm according to the shape features of the feature points; then, according to the feature matching algorithm, determines the similarity between the feature points in the image of the material to be processed and the feature points in the feature matching image, and determines target feature points in the image of the material to be processed according to the similarity; when the number of target feature points is greater than or equal to a preset number threshold, determines a compensation parameter according to the pixel coordinates of the target feature points and the calibration coordinates of the feature points in the feature matching image; and calibrates the cutting path according to the compensation parameter.
[0038] This method dynamically determines the feature matching algorithm and the quantity threshold by precisely identifying and matching the feature points in the image of the material to be processed, considering the shape features and complexity of the feature points, and calculates the compensation parameters to calibrate the cutting path. Thus, in the case where the material may deform, it improves the machining positioning accuracy and product consistency, reduces the machining error, and enhances the flexibility of automatic machining correction. Description of the Drawings
[0039] The drawings here are incorporated into the specification and form a part of this specification, showing the embodiments consistent with this application, and are used together with the specification to explain the principles of this application.
[0040] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, for those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.
[0041] Figure 1 It is a schematic flowchart provided for the first embodiment of the machining correction method of this application;
[0042] Figure 2 It is a schematic flowchart provided for the second embodiment of the machining correction method of this application;
[0043] Figure 3 It is a schematic flowchart provided for the third embodiment of the machining correction method of this application;
[0044] Figure 4 It is a schematic diagram of the device structure of the hardware operating environment involved in the machining correction method in the embodiments of this application.
[0045] The implementation, functional features, and advantages of the purpose of this application will be further described with reference to the embodiments and the drawings. Detailed Embodiments
[0046] It should be understood that the specific embodiments described here are only used to explain the technical solutions of this application and are not used to limit this application.
[0047] To better understand the technical solutions of this application, the following will be described in detail in combination with the drawings in the specification and the specific embodiments.
[0048] In laser cutting technology, for some special materials, such as colloids, etc., they are easily affected by high temperature and other mechanical actions during the laser cutting process, resulting in material deformation, which in turn affects the processing accuracy. To compensate for material deformation, traditional laser cutting systems usually apply a predetermined calibration algorithm during the processing for calibration. However, due to the differences in the physical properties of the materials themselves, their deformation degrees during the processing are different. In addition, different processing tasks have different requirements for calibration accuracy. The traditional camera calibration before processing cannot reflect the deformation situation of the material during the processing in real time, and the traditional calibration methods cannot perform adaptive adjustment according to the characteristics of different materials and processing requirements, resulting in low calibration flexibility.
[0049] In view of the above problems, this application proposes a processing calibration method. By identifying the feature points in the image of the material to be processed, the feature matching image and the feature matching algorithm are determined according to the shape features of the feature points; then, according to the feature matching algorithm, the similarity between the feature points in the image of the material to be processed and the feature points in the feature matching image is determined, and the target feature points are determined in the image of the material to be processed according to the similarity; when the number of target feature points is greater than or equal to the preset number threshold, the compensation parameters are determined according to the pixel coordinates of the target feature points and the calibration coordinates of the feature points in the feature matching image; according to the compensation parameters, the cutting path is calibrated.
[0050] This method accurately identifies and matches the feature points in the image of the material to be processed, dynamically determines the feature matching algorithm and the number threshold considering the shape features and complexity of the feature points, calculates the compensation parameters to calibrate the cutting path, thereby improving the processing positioning accuracy and product consistency, reducing the processing error, and enhancing the flexibility of automatic processing calibration in the case where the material may deform.
[0051] It should be noted that the execution subject of this embodiment can be a computing service device with data processing, network communication, and program running functions, or an electronic device capable of implementing the above functions, etc. Hereinafter, taking the processing calibration system as an example, this embodiment and the following embodiments will be described.
[0052] Based on this, the first embodiment proposed in this application provides a processing calibration method. Refer to Figure 1 , in this embodiment, the processing calibration method includes steps S10 to S40:
[0053] Step S10, identify the feature points in the image of the material to be processed, and determine the feature matching image and the feature matching algorithm according to the shape features of the feature points.
[0054] It should be noted that during the laser processing, due to the physical properties of the material to be processed, it may deform during processing due to high temperature or other reasons, such as stretching or curling. In this embodiment, in order to ensure the positioning of the material to be processed during processing, feature points are provided on the material to be processed for auxiliary positioning. The feature points can be arranged in an array on the material to be processed, or can be at the center position of the material to be processed. In addition, the shape of the feature points can be adjusted according to the type of the material to be processed or the processing accuracy. For example, for materials that are not easily deformed or materials with low requirements for processing accuracy, the feature points can be set as circles. For materials that are relatively easily deformed or materials with high requirements for processing accuracy, the feature points can be set as more complex shapes such as stars.
[0055] It can be understood that for materials that are not easily deformed, they are relatively stable during processing, with small and regular deformations. The circular feature points are simple and symmetric, which can reduce the computational complexity of subsequent feature point matching while meeting the positioning requirements. For materials that are easily deformed, their deformation degree is large and irregular. Feature points with complex shapes such as stars have more detailed and directional information, which can still maintain good recognizability and matchability after deformation, thus more accurately reflecting the actual deformation of the material.
[0056] Exemplarily, first, use a camera to capture an image of the material to be processed, ensuring that the image is clear and can accurately reflect the characteristics of the material. Then, perform preprocessing operations such as grayscale conversion and denoising on the acquired image to improve the accuracy of feature point detection. For example, use Gaussian filtering to remove noise in the image, making the image smoother and facilitating subsequent feature point detection.
[0057] After collecting the image of the material to be processed, use a feature point detection algorithm such as the SIFT (Scale-Invariant Feature Transform) algorithm to identify the feature points in the image.
[0058] Exemplarily, a scale space pyramid is constructed by continuously performing Gaussian blur and downsampling on the image. Specifically, the image of the material to be processed is first subjected to Gaussian blur processing a preset number of times. Each time after blurring, the details of the image will be reduced to simulate the image features at different scales. Then, the images processed with different numbers of blurs are downsampled in the order of scales from fine to coarse, that is, the resolution of the image is reduced, thereby constructing a Gaussian pyramid. For example, assuming the size of the original image is W×H, the size of the image becomes W / 2×H / 2 after the first downsampling, and W / 4×H / 4 after the second downsampling, and so on, forming a multi-layer pyramid structure of the scale space. Among them, W represents the horizontal size of the image, that is, the number of pixels contained in the image in the horizontal direction; H represents the vertical size of the image, that is, the number of pixels contained in the image in the vertical direction. The purpose of constructing the scale space is to be able to detect the features of the image at different scales, making the feature point detection robust to the scaling of the image. Through Gaussian blur and downsampling, the details and overall structure information of the image can be captured at different resolutions, so that feature points that are significant at different scales can be found in the subsequent feature point detection.
[0059] In the constructed scale space, for each pixel point, it is compared with the pixel points in its neighborhood. Specifically, for each pixel point in the current layer, its value is compared with the values of the first preset number of adjacent pixel points in the same layer, such as 8 pixel points, and the second preset number of pixel points at the corresponding positions in the upper and lower adjacent layers, such as 9 pixel points. If the value of this pixel point is the maximum or minimum value in its neighborhood, then this pixel point is considered a potential extreme point, that is, a possible feature point.
[0060] Furthermore, the detected extreme points are further analyzed and screened. First, the curvature at each extreme point is calculated, and whether the extreme point is stable is judged according to the magnitude of the curvature. If the curvature is too large, it means that this extreme point is located on the edge and is easily affected by noise and is unstable, and needs to be removed. The remaining extreme points are used as the identified feature points. Then, for the remaining extreme points, the pixel coordinates are determined by fitting a quadratic function to determine the position of the feature points.
[0061] After identifying the feature points in the image of the material to be processed, a suitable feature matching image and feature matching algorithm are determined according to the shape features of the feature points. Among them, the feature matching image can be a standard template image built into the processing and calibration system, or an image of the same type as the material to be processed but without deformation, which contains the feature points and the position information of the feature points on the material, and is used to match the feature points in the image of the material to be processed.
[0062] It is understandable that feature points of different shapes present different visual features in the image. For example, circular feature points appear as relatively regular circular contours in the image, and their matching images should also have similar circular features so that corresponding points can be accurately found during the matching process. Feature points with complex shapes such as stars have more corners and detailed information, and the matching images need to be able to reflect these complex shape features in order to perform better matching. Feature points of different shapes have different requirements for the performance of the matching algorithm. Simple-shaped feature points such as circles are more suitable for using some fast and simple matching algorithms because their features are relatively single and it is easy to find corresponding points through basic geometric shape matching. Complex-shaped feature points such as stars, on the other hand, require more complex matching algorithms that can handle complex shape information and possible deformations to ensure the accuracy and reliability of the matching.
[0063] Optionally, step S10 includes steps S11 to S13:
[0064] Step S11, determining the feature matching image according to the contour feature of the feature point.
[0065] After identifying the feature points in the image of the material to be processed, the contour information of the feature points is extracted through an edge detection algorithm, the boundary pixel points of the feature points are identified, and then the boundary pixel points of the feature points are connected into one or more continuous curves or broken lines through a contour detection algorithm to form the contour feature of the feature point.
[0066] Exemplarily, the Canny edge detection algorithm is used to extract the contour information of the feature points. Specifically, the gradients of the image in the horizontal and vertical directions are calculated through the Sobel operator or the Prewitt operator to obtain the gradient magnitude and direction. The non-maximum suppression is performed on the gradient magnitude to retain the maximum points in the edge direction and suppress other points to refine the edge. Then, a high threshold and a low threshold are set. The points with gradient magnitude higher than the high threshold are strong edge points, the points with gradient magnitude lower than the low threshold are non-edge points, and the points with gradient magnitude between the two are weak edge points. The weak edge points with strong edge points in the neighborhood are connected, and finally a clear edge map is obtained. Then, the edge map is binarized, and a threshold is set to convert the edge map into a binary image. Then, by scanning the binary image, all connected edge pixel points are found to form the contour feature.
[0067] Optionally, standard shape templates corresponding to different feature points can be predefined in the processing correction system, and the extracted contour features are matched with the predefined standard shape templates to determine the graphic category of the feature points, and then the feature matching image is determined.
[0068] Step S12, determining the complexity of the feature point according to the corner feature and the contour feature of the feature point.
[0069] Exemplarily, a corner detection algorithm is used to identify the corners on the feature points. Corners are points in an image with obvious directional changes and usually appear at the edges, corners, etc. of an object. For feature points with complex shapes, such as stars, multiple corners are included inside, while for feature points with simple shapes, such as circles, there are almost no obvious corners. The extracted corner features, such as the number of corners and the corner distribution, are combined with the contour features to evaluate the complexity of the feature points. For example, if a feature point contains a large number of corners and the contour shape is complex, such as polygons, stars, etc., it is considered that the complexity of the feature point is high; on the contrary, if the feature point has almost no corners and the contour is simple, such as circles, squares, etc., the complexity is low.
[0070] Specifically, a complexity index is defined, and parameters such as the number of corners and the change in contour curvature are combined through weighting to obtain a specific complexity value. For example, the complexity index C can be expressed as: . Among them, is the number of corners, is the variance of the change in contour curvature, and are the weight coefficients.
[0071] Step S13, determine the corresponding feature matching algorithm according to the complexity.
[0072] Exemplarily, a comparison table is maintained inside the machining correction system to record the feature matching algorithms corresponding to different complexity indexes. For example, for low-complexity feature points without corners, algorithms such as the square difference matching algorithm or the normalized cross-correlation matching algorithm are used to perform matching according to the edge map of the feature points. For feature points with a small number of corners, a geometric transformation matching method is used, such as calculating the affine transformation or the homography matrix between the feature points in the image of the material to be machined and the feature points in the feature matching image for matching. For complex feature points with a large number of corners and a high change in contour curvature, local feature descriptors of the feature points are extracted using feature-based matching algorithms such as SIFT, SURF (Speeded Up Robust Features), ORB (Oriented FAST and Rotated BRIEF), etc., and matching is performed by comparing the similarity between the descriptors.
[0073] Step S20, determine the similarity between the feature points in the image of the material to be machined and the feature points in the feature matching image according to the feature matching algorithm, and determine the target feature points in the image of the material to be machined according to the similarity.
[0074] It can be understood that since the feature points in the feature matching image are all the same, it is possible to calculate the similarity between all the feature points identified in the image of the material to be processed and any one feature point in the feature matching image. When the similarity between a feature point in the image of the material to be processed and any one feature point in the feature matching image is greater than a preset similarity threshold, the feature point in the image of the material to be processed is determined as the target feature point.
[0075] Optionally, calculate a descriptor for each feature point in the image of the material to be processed, and calculate the distance between its descriptor and the descriptor of any one feature point in the feature matching image, such as the Euclidean distance or the Hamming distance. The smaller the distance between the descriptors of two feature points, the higher the similarity.
[0076] It should be noted that the feature descriptor is a vector used to describe the features of the area around the feature point. It can uniquely represent the image information of this area, has high uniqueness, and at the same time has a certain invariance to factors such as illumination changes and perspective changes. The calculation method of the feature descriptor varies depending on the feature matching algorithm used, and it can be a SIFT feature descriptor, a BRIEF feature descriptor, or other descriptors.
[0077] Step S30, when the number of the target feature points is greater than or equal to a preset number threshold, determine a compensation parameter according to the pixel coordinates of the target feature points and the calibration coordinates of the feature points in the feature matching image.
[0078] Optionally, step S30 includes steps S31 to S32:
[0079] Step S31, based on the camera parameters and the image of the material to be processed, convert the pixel coordinates of the target feature points into calibration coordinates.
[0080] Step S32, according to the calibration coordinates of the target feature points and the calibration coordinates of the feature points in the feature matching image, determine the coordinate offset of the feature points in the image of the material to be processed, and use the coordinate offset as the compensation parameter.
[0081] Exemplarily, the processing correction system first counts the number of target feature points determined in the image of the material to be processed through the feature matching algorithm. If the number of target feature points is less than the preset number threshold, the processing correction system will prompt that the feature points are insufficient, and prompt the user to re-identify the feature points or adjust the parameters of the feature matching algorithm.
[0082] If the number of target feature points is greater than or equal to a preset number threshold, extract the pixel coordinates of each target feature point in the image of the material to be processed. The pixel coordinates usually take the upper left corner of the image as the origin and represent the position of the feature point in pixels. At the same time, obtain the calibration coordinates of the feature points corresponding to each target feature point on the feature matching image, and use the camera internal parameter matrix and distortion coefficient obtained during the camera calibration process to convert the pixel coordinates of the target feature points into calibration coordinates. Then, according to the calibration coordinates of each target feature point and the calibration coordinates of the feature points corresponding to each target feature point on the feature matching image, calculate the offset as the compensation parameter. Among them, the calibration coordinates refer to the coordinates in the normalized camera coordinate system obtained by converting the pixel coordinates through the camera internal parameter matrix and distortion coefficient during the camera calibration process.
[0083] Optionally, step S30 further includes steps S33 to S35:
[0084] Step S33, move the field of view of the camera to the target feature point and control the camera to collect an image of the target feature point.
[0085] Step S34, based on the camera parameters and the image of the target feature point, convert the pixel coordinates of the target feature point into calibration coordinates.
[0086] Step S35, according to the pixel coordinates of the target feature point and the calibration coordinates of the feature points in the feature matching image, determine the coordinate offset of the feature points in the image of the material to be processed, and use the coordinate offset as the compensation parameter.
[0087] In order to improve the calculation accuracy of the compensation parameter. After determining the position of the target feature point in the image of the material to be processed, control the camera to move to the target feature point and collect an image of the target feature point again. Determine the pixel coordinates of the target feature point according to the image of the target feature point, rather than through the overall image of the material to be processed.
[0088] For example, when the camera calibration uses a calibration algorithm with low accuracy such as the proportional calibration method, the accuracy of the camera internal parameter matrix and distortion coefficient may be affected to a certain extent, resulting in a reduction in the accuracy of determining the pixel coordinates of the target feature point through the overall image. In this case, by controlling the camera field of view to move to the target feature point and collecting an image, a high-resolution local image of the feature point can be obtained. Compared with the overall image, the local image reduces the influence of background interference and image distortion, making the feature point clearer, thereby effectively compensating for the errors caused by insufficient calibration accuracy and improving the calculation accuracy of the compensation parameter.
[0089] Determine the pixel coordinates of the target feature points based on the target feature point image. At the same time, use the camera internal parameter matrix and distortion coefficients obtained during camera calibration to convert the pixel coordinates of the target feature points into calibration coordinates, and then calculate the offset between its calibration coordinates and the calibration coordinates of the corresponding feature points on the feature matching image as the compensation parameter.
[0090] Step S40: Calibrate the cutting path according to the compensation parameter.
[0091] After obtaining the compensation parameter, the predetermined cutting path can be calibrated according to the determined compensation parameter. The calibration process can be to displace, rotate, scale, etc. each cutting path point on the cutting path according to the compensation parameter. Send the calibrated cutting path to the laser cutting control system to guide the laser cutting head for precise processing. The calibrated cutting path will be closer to the ideal path after material deformation during the actual processing.
[0092] Optionally, step S40 includes steps S41 to S43:
[0093] Step S41: Determine the offset of each cutting path point on the cutting path according to the compensation parameter.
[0094] The cutting path is imported into the processing correction system before processing. The cutting path consists of a series of ordered cutting path points, and each point has its predetermined coordinate position. For each cutting path point on the cutting path, the corresponding compensation parameter is assigned according to its positional relationship with the nearby feature points.
[0095] Exemplarily, spatially match each cutting path point with the identified feature points. Calculate the distances between each cutting path point and at least the two nearest feature points. According to the distance ratio between the cutting path point and the above feature points, allocate the coordinate offset of the feature points to this cutting path point according to this distance ratio, and linearly interpolate to calculate the offset of this cutting path point.
[0096] Exemplarily, assume there is a cutting path point P, and there are two nearby feature points A and B. The compensation parameter of A is ΔA, and the compensation parameter of B is ΔB. The distance between P and A is dPA, and the distance between P and B is dPB. Using linear interpolation, first calculate the weights of the target feature points, where the weight of feature point A , and the weight of feature point B . Then calculate the offset assigned to the cutting path point P .
[0097] Step S42: Offset each cutting path point according to the offset of the cutting path point.
[0098] Step S43: Generate a new cutting path between the offset cutting path points through a difference algorithm.
[0099] Add the original coordinates of the cutting path points to the offset to obtain new adjusted cutting path points, and offset the cutting path points. Between each pair of adjacent offset cutting path points, generate a series of interpolation points according to the selected interpolation algorithm, and generate a new cutting path based on the newly generated interpolation points and the offset cutting path points.
[0100] Optionally, step S40 further includes steps S44 to S46:
[0101] Step S41: Determine the offset of each cutting path point on the cutting path according to the compensation parameter.
[0102] Step S42: Determine the scaling ratio of the cutting path according to the offset of the cutting path points.
[0103] Step S43: Correct the cutting path according to the scaling ratio.
[0104] Optionally, set an influence radius, and calculate the distance between each cutting path point and the feature points within the influence radius. According to the distance ratio between the cutting path points and the feature points within the above influence radius, distribute the coordinate offset of the feature points to the cutting path points according to this distance ratio, and linearly interpolate to calculate the offset of the cutting path points.
[0105] Exemplarily, create an array A to store the offsets of each cutting path point. Initialize two variables total_dx and total_dy to 0, which are used to accumulate the X-direction offsets and Y-direction offsets of all points, and initialize the variable count to the number of cutting path points. For each point i (from 1 to count) on the cutting path, according to the compensation parameter, read the X-direction offset dx_i and Y-direction offset dy_i of point i, and calculate the average X-direction offset average_dx = total_dx / count, and the average Y-direction offset average_dy = total_dy / count. Then, determine the maximum X coordinate value max_x and the maximum Y coordinate value max_y of the original cutting path, and calculate the X-direction scaling ratio scale_x = (average_dx / max_x) + 1 and the Y-direction scaling ratio scale_y = (average_dy / max_y) + 1. After determining the scaling ratios, it is possible to check whether the scaling ratios are within a reasonable range. For example, generally, the scaling ratio should not be less than 0.5 or greater than 2. Next, create a new array scaled_path to store the scaled cutting path points. For each point i on the original cutting path, first read the original coordinates x_i and y_i, and calculate the scaled coordinates and . And add the scaled coordinates to the scaled_path array: scaled_path[i] = [scaled_x_i, scaled_y_i]. Finally, output the scaled_path array as the corrected cutting path, and update the path planner of the cutting system to use the new cutting path for processing.
[0106] In this embodiment, by accurately identifying and matching the feature points in the image of the material to be processed, and considering the shape features and complexity of the feature points, the feature matching algorithm and the quantity threshold are dynamically determined, and the compensation parameter is calculated to calibrate the cutting path. Therefore, in the case where the material may be deformed, the machining positioning accuracy and product consistency are significantly improved, the machining error is reduced, the efficiency and stability of automated machining are enhanced, and efficient and accurate machining control is achieved.
[0107] Based on the first embodiment of this application, in the second embodiment of this application, the same or similar content as in the above-mentioned first embodiment can be referred to the above introduction and will not be repeated hereinafter. On this basis, please refer to Figure 2 , after step S40, the machining correction method further includes step S50:
[0108] Step S50, determine the feeding offset length for the next feeding according to the offset of the starting point of the cutting path, and send the feeding offset length to the feeding device.
[0109] It is understandable that during the cutting process, adjusting the loading length can compensate for the problem of inaccurate material positioning caused by material deformation. By adjusting the offset during loading, the starting position of cutting can be ensured to align with the expected position of the material, thereby improving the cutting accuracy and processing quality.
[0110] Exemplarily, the offset of the starting point of the cutting path is read from the previously calculated offset array offsets, that is, offsets[0], which contains dx1 and dy1. According to the offsets dx1 and dy1 of the starting point, the offset length during loading is calculated. For example, if the loading device is in the X direction, the offset length of loading in the X direction is calculated as follows: , where conversionFactorX is the conversion factor for converting the offset from the cutting path unit to the length unit of the loading device. Similarly, if the loading device is in the Y direction, the offset length of loading in the Y direction is calculated as follows: , where conversionFactorY is the conversion factor in the Y direction. Then, the calculated offset length of loading is sent to the loading device to control the loading device to update its internal parameters so as to compensate for the material deformation during the next loading.
[0111] In this embodiment, by compensating for the offset of the starting point, it is ensured that the starting point of the cutting path is accurately aligned with the actual position of the material, thereby improving the overall cutting accuracy, and the accurate loading offset can reduce the material waste caused by inaccurate positioning and improve the material utilization rate.
[0112] Based on the above embodiments of the present application, in the third embodiment of the present application, the same or similar content as the above embodiments can be referred to the above introduction and will not be repeated hereinafter. On this basis, please refer to Figure 3 , before step S10, the machining correction method further includes steps S60 to S70:
[0113] Step S60, determining the preset quantity threshold according to the complexity of the feature points, where the complexity is inversely proportional to the preset quantity threshold.
[0114] It can be understood that by adjusting the preset quantity threshold of the target feature points, the accuracy of positioning correction can be adjusted. Since the accuracy of positioning correction depends on the quantity and quality of the feature points used for correction, more feature points can provide more data points to establish a positioning reference, thereby improving the accuracy of correction. When using more feature points, the errors in the recognition or matching of individual feature points can be statistically averaged, reducing the impact on the final correction result. Different processing tasks may have different requirements for accuracy. By adjusting the preset quantity threshold, these different requirements can be met. For example, for tasks with high-precision requirements, the preset quantity threshold can be increased to use more feature points for matching and positioning. Similarly, different materials or image conditions may result in differences in the quality of feature points. At this time, the correction strategy can also be adjusted by adjusting the threshold according to the complexity of the feature points. For example, if the complexity of the feature points is high, that is, the matching accuracy between each feature point is high, the quantity of feature points used for correction can be reduced to make a balance adjustment between the correction accuracy and the processing efficiency.
[0115] Exemplarily, for each identified feature point, it is analyzed according to its corner feature and contour feature to quantify its complexity. The complexity can be a numerical value representing the geometric or texture complexity of the feature point. A function or mapping rule is set to convert the complexity of the feature point into a preset quantity threshold. This relationship is inverse, that is, the higher the complexity, the lower the preset quantity threshold of the required feature points.
[0116] Step S70, obtain the quantity parameter input by the user, and use the quantity parameter as the preset quantity threshold.
[0117] In order to allow the user to customize according to the specific application scenario and requirements, the processing correction system can support manually inputting a quantity parameter as the preset quantity threshold, thereby providing a method for the user to customize the calibration accuracy.
[0118] Exemplarily, an input box or knob is provided on the operation interface of the cutting device to allow the user to input or adjust the quantity parameter. In response to the user's input action, the value of the quantity parameter input by the user is obtained, and the value of the quantity parameter input by the user is set as the preset quantity threshold for subsequent determination of the quantity of feature points. The user can customize the calibration accuracy according to the characteristics of the material and the processing requirements, enhancing the user's control over the processing process.
[0119] It should be noted that the above examples are only for understanding the present application and do not constitute a limitation on the processing correction method of the present application. Based on this technical concept, more forms of simple transformations are within the protection scope of the present application.
[0120] The present application provides a processing and calibration device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein, the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the processing and calibration method in the first embodiment above.
[0121] Reference is made below Figure 4 , which shows a schematic structural diagram of a processing and calibration device suitable for implementing the embodiments of the present application. The processing and calibration device in the embodiments of the present application may include, but is not limited to, a fixed terminal such as a laser cutter. Figure 4 The processing and calibration device shown is only an example and should not impose any limitation on the functions and usage scope of the embodiments of the present application.
[0122] As Figure 4 shown, the processing and calibration device may include a processing device 1001 (such as a central processing unit, a graphics processing unit, etc.), which can execute various appropriate actions and processes according to the program stored in the read-only memory (ROM, Read Only Memory) 1002 or the program loaded from the storage device 1003 into the random access memory (RAM, Random Access Memory) 1004. In the random access memory 1004, various programs and data required for the operation of the processing and calibration device are also stored. The processing device 1001, the read-only memory 1002, and the random access memory 1004 are connected to each other through a bus 1005. The input / output (I / O) interface 1006 is also connected to the bus. Generally, the following systems may be connected to the I / O interface 1006: an input device 1007 including, for example, a touch screen, a touchpad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; an output device 1008 including, for example, a liquid crystal display (LCD, Liquid Crystal Display), a speaker, a vibrator, etc.; a storage device 1003 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 1009. The communication device 1009 can allow the processing and calibration device to communicate with other devices wirelessly or wiredly to exchange data. Although the figure shows a processing and calibration device with various systems, it should be understood that it is not required to implement or have all the systems shown. More or fewer systems may be alternatively implemented or had.
[0123] In particular, according to the embodiments disclosed in the present application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, the embodiments disclosed in the present application include a computer program product that includes a computer program carried on a computer-readable medium, and the computer program contains program codes for executing the methods shown in the flowcharts. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device, or installed from a storage device 1003, or installed from a ROM 1002. When the computer program is executed by a processing device 1001, the above-mentioned functions defined in the methods of the embodiments disclosed in the present application are executed.
[0124] The processing and calibration device provided by the present application adopts the processing and calibration method in the above embodiment, and can solve the technical problem that the traditional calibration method cannot be adaptively adjusted according to the characteristics of different materials and processing requirements. Compared with the prior art, the beneficial effects of the processing and calibration device provided by the present application are the same as those of the processing and calibration method provided by the above embodiment, and other technical features in the processing and calibration device are the same as the features disclosed in the method of the previous embodiment, and will not be elaborated here.
[0125] It should be understood that each part disclosed in the present application can be implemented by hardware, software, firmware or a combination thereof. In the description of the above embodiments, specific features, structures, materials or characteristics can be combined in a suitable manner in any one or more embodiments or examples.
[0126] The above is only the specific implementation manner of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed by the present application, and all should be covered by the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.
[0127] The present application provides a computer-readable storage medium having computer-readable program instructions (i.e., computer programs) stored thereon, and the computer-readable program instructions are used to execute the processing and calibration method in the above embodiment.
[0128] The computer-readable storage medium provided by this application can be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or components, or any combination of the above. More specific examples of computer-readable storage media can include, but are not limited to: electrical connections with one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM), or flash memory, optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the above. In this embodiment, the computer-readable storage medium can be any tangible medium that contains or stores a program, and this program can be used by or in combination with an instruction execution system, device, or component. The program code contained on the computer-readable storage medium can be transmitted using any appropriate medium, including but not limited to: wires, optical cables, radio frequency (RF), etc., or any suitable combination of the above.
[0129] The above computer-readable storage medium can be included in the processing and calibration device; it can also exist independently without being assembled into the processing and calibration device.
[0130] The above computer-readable storage medium carries one or more programs. When the above one or more programs are executed by the processing and calibration device, the processing and calibration device can write computer program code for performing the operations of this application in one or more programming languages or combinations thereof. The above programming languages include object-oriented programming languages - such as Java, Smalltalk, C++; it also includes conventional procedural programming languages - such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, or executed as an independent software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer can be connected to the user's computer through any type of network - including a local area network (LAN) or a wide area network (WAN) - or can be connected to an external computer (for example, by using an Internet service provider to connect through the Internet).
[0131] The flowcharts and block diagrams in the accompanying drawings illustrate the possible architectures, functions, and operations of systems, methods, and computer program products according to various embodiments of the present application. In this regard, each block in the flowchart or block diagram may represent a module, a segment of a program, or a part of code that contains one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions marked in the blocks may occur in a different order than that marked in the accompanying drawings. For example, two consecutive blocks shown may actually be executed substantially in parallel, and they may sometimes be executed in the reverse order, depending on the functions involved. It should also be noted that each block in the block diagram and / or flowchart, as well as combinations of blocks in the block diagram and / or flowchart, can be implemented by a dedicated hardware-based system that performs the specified functions or operations, or can be implemented by a combination of dedicated hardware and computer instructions.
[0132] The modules described in the embodiments of the present application can be implemented in software or in hardware. Among them, the name of the module does not constitute a limitation to the unit itself in some cases.
[0133] The readable storage medium provided by the present application is a computer-readable storage medium. The computer-readable storage medium stores computer-readable program instructions (i.e., computer programs) for executing the above-mentioned processing and correction method, and can solve the technical problem that the traditional correction method cannot be adaptively adjusted according to the characteristics of different materials and processing requirements. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided by the present application are the same as those of the processing and correction method provided by the above embodiments, and will not be elaborated here.
[0134] The above are only some embodiments of the present application, and do not limit the patent scope of the present application. Any equivalent structural transformation made using the specification and drawings of the present application under the technical concept of the present application, or any direct / indirect application in other related technical fields, is included in the patent protection scope of the present application.
Claims
1. A processing correction method, characterized in that: The processing correction method comprises: Identify feature points in the image of the material to be processed, and determine a feature matching image based on contour features of the feature points; Determining the complexity of the feature point according to the corner feature and the contour feature of the feature point; Determining a corresponding feature matching algorithm according to the complexity; Determine, according to the feature matching algorithm, the similarity between the feature points in the image of the material to be processed and the feature points in the feature matching image, and determine the target feature points in the image of the material to be processed according to the similarity; When the number of the target feature points is greater than or equal to a preset number threshold, determining compensation parameters according to the pixel coordinates of the target feature points and the calibrated coordinates of the feature points in the feature matching image; According to the compensation parameters, the cutting path is calibrated.
2. The processing correction method according to claim 1, characterized in that: Before the step of identifying feature points in the image of the material to be processed and determining a feature matching image according to contour features of the feature points, the method further includes: Determining the preset number threshold according to the complexity of the feature points, wherein the complexity is inversely proportional to the preset number threshold; or Acquire a quantity parameter input by a user, and use the quantity parameter as the preset quantity threshold.
3. The processing correction method according to claim 1, characterized in that: The step of determining the compensation parameter according to the pixel coordinates of the target feature point and the calibrated coordinates of the feature point in the feature matching image comprises: Based on the camera parameters and the image of the material to be processed, the pixel coordinates of the target feature points are converted into calibration coordinates; According to the calibrated coordinates of the target feature points and the calibrated coordinates of the feature points in the feature matching image, the coordinate offset of the feature points in the image of the material to be processed is determined, and the coordinate offset is used as the compensation parameter.
4. The processing correction method according to claim 1, characterized in that: The step of determining the compensation parameter according to the pixel coordinates of the target feature point and the calibrated coordinates of the feature point in the feature matching image further includes: Move the camera's field of view to the target feature point, and control the camera to capture an image of the target feature point; Based on the camera parameters and the target feature point image, the pixel coordinates of the target feature point are converted into calibration coordinates; According to the calibrated coordinates of the target feature points and the calibrated coordinates of the feature points in the feature matching image, the coordinate offset of the feature points in the image of the material to be processed is determined, and the coordinate offset is used as the compensation parameter.
5. The processing correction method according to claim 1, characterized in that: The step of calibrating the cutting path according to the compensation parameters comprises: Determining the offset of each cutting path point on the cutting path according to the compensation parameter; offsetting each of the cutting path points according to the offset amount of the cutting path point; A new cutting path is generated between the offset cutting path points through an interpolation algorithm.
6. The processing correction method according to claim 1, characterized in that: The step of calibrating the cutting path according to the compensation parameters further comprises: Determining the offset of each cutting path point on the cutting path according to the compensation parameter; Determining a scaling ratio of the cutting path according to the offset of the cutting path point; The cutting path is corrected according to the scaling factor.
7. The processing correction method according to any one of claims 5 to 6, characterized in that: After the step of calibrating the cutting path according to the compensation parameters, the method further includes: According to the offset of the first point on the cutting path, the offset length of the next material feeding is determined, and the offset length of the material feeding is sent to the material feeding device.
8. A processing and correction device, characterized in that: The device comprises: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the machining correction method according to any one of claims 1 to 7.
9. A storage medium, characterized in that: The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, the steps of the processing correction method according to any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
System for cutting shapes preset in a continuous stream of sheet material
CN1599890A