Search

CN-116993656-B - Control method and system for plate pattern cutting path

CN116993656BCN 116993656 BCN116993656 BCN 116993656BCN-116993656-B

Abstract

The invention discloses a control method and a control system for a plate pattern cutting path, wherein the method comprises the steps of obtaining a plate pattern image; the method comprises the steps of preprocessing a panel pattern image to obtain a first panel pattern image, selecting pixel points with gradient change of color in the first panel pattern image, connecting each pixel point to form a first contour, conducting curve fitting and smoothing processing on the first contour to obtain a second contour, removing redundant lines in the second contour to obtain a third contour, judging whether the third contour exceeds the breadth of a workbench of a cutting machine, if so, removing the exceeding part to obtain a fourth contour, converting coordinates of each pixel point of the fourth contour into world coordinates of the cutting machine, generating a cutting path, and generating a control instruction for the cutting machine according to the cutting path. The invention solves the problems of deviation and inaccuracy of the generated cutting path caused by insufficient processing of the extracted contour in the traditional cutting path planning.

Inventors

  • GUO RUIHANG
  • GUO RUIZHOU
  • Wei Bindan
  • Lin Haocong
  • GUO RUIXIAO

Assignees

  • 广东瑞知智能科技有限公司

Dates

Publication Date
20260512
Application Date
20230517

Claims (7)

  1. 1. The control method of the plate pattern cutting path is characterized by comprising the following steps of: S1, obtaining a plate pattern image; s2, preprocessing the plate pattern image to obtain a first plate pattern image; Step S3, selecting pixel points with gradient change of color in the first plate pattern image, and connecting each pixel point to form a first contour; S4, performing curve fitting and smoothing treatment on the first contour to obtain a second contour; step S5, removing redundant lines in the second contour to obtain a third contour; Step S6, judging whether the third contour exceeds the width of a workbench of the cutting machine, if so, removing the exceeding part to obtain a fourth contour, and converting each pixel point coordinate of the fourth contour into the world coordinate of the cutting machine to generate a cutting path; s7, generating a control instruction for the cutting machine according to the cutting path; In step S3, the method specifically includes the following substeps: step S31, scanning each pixel in the first plate pattern image, and replacing the value of a center pixel point of the Gaussian template with the weighted average gray value of the pixels in the neighborhood determined by the convolution kernel to obtain a Gaussian filtered first plate pattern image; Step S32, gradient is calculated on the first plate pattern image after Gaussian filtering; Step S33, performing quadratic equation fitting by calculating quadratic function interpolation of gradient modulus values at three adjacent points in the gradient direction, namely using three coordinate points, and solving a compensation value; step S34, adding a compensation value to the middle point of the three adjacent points in the gradient direction to obtain a sub-pixel edge point; And step S35, connecting the sub-pixel edge points into a first contour.
  2. 2. The method for controlling a cutting path of a board pattern according to claim 1, wherein in step S2, the method specifically comprises the following substeps: s21, performing single-channel processing on three channels of the plate pattern image to obtain a gray image; Step S22, setting a gray level threshold of the gray level image, adjusting the gray level of the pixel point with the gray level larger than the gray level threshold to the maximum gray level, and adjusting the gray level of the pixel point with the gray level smaller than the gray level threshold to the minimum gray level, so as to obtain the binary image.
  3. 3. The method according to claim 1, wherein in step S31, the Gaussian template is calculated by a Gaussian function, and the Gaussian function is expressed as follows: Wherein, the X and y are pixel coordinate values of the Gaussian template at each position of the picture, wherein x is a value of an abscissa in a coordinate system, and y is a value of an ordinate in the coordinate system; the standard deviation in the xy direction in the coordinate system is represented.
  4. 4. The method according to claim 1, wherein in step S6, the coordinate transformation comprises the following steps: Step S61, generating camera parameters through camera calibration; Step S62, obtaining a conversion matrix during conversion according to the camera parameters; And step S63, converting the pixel coordinates into world coordinates according to the conversion matrix.
  5. 5. A control system of a sheet pattern cutting path, characterized by using the control method of a sheet pattern cutting path according to any one of claims 1 to 4, the system comprising: the acquisition module is used for acquiring a plate pattern image; The first processing module is used for preprocessing the plate pattern image to obtain a first plate pattern image; The contour forming module is used for selecting pixel points with gradient change of color in the first plate pattern image, and connecting each pixel point to form a first contour; The second processing module is used for performing curve fitting and smoothing processing on the first contour to obtain a second contour; the rejecting module is used for rejecting redundant lines in the second contour to obtain a third contour; The judging module is used for judging whether the third contour exceeds the breadth of the workbench of the cutting machine, if so, removing the exceeding part to obtain a fourth contour, and converting each pixel point coordinate of the fourth contour into the world coordinate of the cutting machine to generate a cutting path; the control instruction generation module is used for generating a control instruction for the cutting machine according to the cutting path; the profile forming module includes: A scanning sub-module for scanning each pixel in the first panel pattern image; The substitution submodule is used for substituting the value of the pixel point in the center of the Gaussian template by the weighted average gray value of the pixels in the neighborhood determined by the convolution kernel to obtain a Gaussian filtered first plate pattern image; The Gaussian template is calculated through a Gaussian function, and the formula of the Gaussian function is as follows: Wherein, the X and y are pixel coordinate values of the Gaussian template at each position of the picture, wherein x is a value of an abscissa in a coordinate system, and y is a value of an ordinate in the coordinate system; representing standard deviation in xy direction in the coordinate system; the first computing sub-module is used for solving gradient of the Gaussian filtered first plate pattern image; The second calculation sub-module is used for performing quadratic equation fitting by calculating quadratic function interpolation of gradient modulus values at three adjacent points in the gradient direction, namely using three coordinate points, and solving a compensation value; a third calculation sub-module adds a compensation value to the middle point of the three adjacent points in the gradient direction to obtain a sub-pixel edge point; and the connection submodule is used for connecting the edge points of the sub-pixels into a first contour.
  6. 6. The system for controlling a sheet pattern cutting path as set forth in claim 5, wherein said first processing module comprises: the graying processing submodule is used for carrying out single-channel processing on three channels of the plate pattern image to obtain a gray image; The binarization processing submodule is used for setting a gray level threshold value of the gray level image, adjusting the gray level value of the pixel point with the gray level value larger than the gray level threshold value to the maximum gray level value, and adjusting the gray level value of the pixel point with the gray level value smaller than the gray level threshold value to the minimum gray level value to obtain the binary image.
  7. 7. The system of claim 5, wherein the determining module includes a coordinate conversion sub-module, the coordinate conversion sub-module including: the generation subunit is used for generating camera parameters through camera calibration; An acquisition subunit, configured to acquire a conversion matrix during conversion according to the camera parameters; and the conversion subunit is used for converting the pixel coordinates into world coordinates according to the conversion matrix.

Description

Control method and system for plate pattern cutting path Technical Field The invention relates to the technical field of plate pattern cutting, in particular to a control method and a control system for a plate pattern cutting path. Background Cutting the plate pattern by using a cutting machine is an important process in the modern manufacturing process, and under normal conditions, the cutting path of the cutting machine needs to be planned, specifically, the plate pattern image is obtained and preprocessed, so that the contrast ratio of the image can be effectively enhanced, and the contour extraction is facilitated. However, in the conventional cutting path planning, the extracted contour is not processed sufficiently, for example, redundant lines of the contour are not removed, a part of the contour exceeding the breadth of a workbench of a cutting machine is not removed, and the like, so that deviation and inaccuracy of a generated cutting path occur. Disclosure of Invention Aiming at the defects, the invention provides a control method and a control system for a cutting path of a plate pattern, and aims to solve the problems that in the traditional cutting path planning, the extracted contour is not processed enough, so that the generated cutting path is deviated and inaccurate. To achieve the purpose, the invention adopts the following technical scheme: The control method of the plate pattern cutting path comprises the following steps: S1, obtaining a plate pattern image; s2, preprocessing the plate pattern image to obtain a first plate pattern image; Step S3, selecting pixel points with gradient change of color in the first plate pattern image, and connecting each pixel point to form a first contour; S4, performing curve fitting and smoothing treatment on the first contour to obtain a second contour; step S5, removing redundant lines in the second contour to obtain a third contour; Step S6, judging whether the third contour exceeds the width of a workbench of the cutting machine, if so, removing the exceeding part to obtain a fourth contour, and converting each pixel point coordinate of the fourth contour into the world coordinate of the cutting machine to generate a cutting path; and S7, generating a control instruction for the cutting machine according to the cutting path. Preferably, in step S2, the following substeps are specifically included: s21, performing single-channel processing on three channels of the plate pattern image to obtain a gray image; Step S22, setting a gray level threshold of the gray level image, adjusting the gray level of the pixel point with the gray level larger than the gray level threshold to the maximum gray level, and adjusting the gray level of the pixel point with the gray level smaller than the gray level threshold to the minimum gray level, so as to obtain the binary image. Preferably, in step S3, the following substeps are specifically included: step S31, scanning each pixel in the first plate pattern image, and replacing the value of a center pixel point of the Gaussian template with the weighted average gray value of the pixels in the neighborhood determined by the convolution kernel to obtain a Gaussian filtered first plate pattern image; Step S32, gradient is calculated on the first plate pattern image after Gaussian filtering; Step S33, performing quadratic equation fitting by calculating quadratic function interpolation of gradient modulus values at three adjacent points in the gradient direction, namely using three coordinate points, and solving a compensation value; step S34, adding a compensation value to the middle point of the three adjacent points in the gradient direction to obtain a sub-pixel edge point; And step S35, connecting the sub-pixel edge points into a first contour. Preferably, in step S31, the gaussian template is calculated by a gaussian function, and the formula of the gaussian function is as follows: Wherein, G (x, y) represents x, y is the pixel coordinate value of the Gaussian template at each position of the picture, x represents the value of the abscissa in the coordinate system, y represents the value of the ordinate in the coordinate system, and sigma represents the standard deviation in the xy direction in the coordinate system. Preferably, in step S6, the coordinate transformation specifically comprises the following sub-steps: Step S61, generating camera parameters through camera calibration; Step S62, obtaining a conversion matrix during conversion according to the camera parameters; And step S63, converting the pixel coordinates into world coordinates according to the conversion matrix. Another aspect of the present application provides a control system for a sheet pattern cutting path, the system comprising: the acquisition module is used for acquiring a plate pattern image; The first processing module is used for preprocessing the plate pattern image to obtain a first plate pattern image; The contour forming module is us