Image processing method, storage medium, laser processing equipment and numerical control machine

By setting alignment points and preset control points in laser processing, the feature information and coordinate positions of the target reference image are determined, and the problem of curve or non-planar pattern processing is solved, the processing quality and aesthetics are improved, and the pattern and object surface perfection is achieved. Fit.

CN119273551APending Publication Date: 2025-01-07SHENZHEN MAKER WORKS TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410779669.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Priority Date
2023-07-05
Filing Date
2024-06-17
Publication Date
2025-01-07

AI Technical Summary

Technical Problem

During laser processing, it is difficult for the prior art to effectively process curves or non-planar patterns, resulting in incomplete fit of the processing results with the object surface, affecting aesthetics and processing quality.

Method used

By setting alignment points and preset control points, establishing coordinate axes, determining feature information and coordinate positions of the target reference image, rotating and moving according to the feature information of the image to be processed, and generating a deformed image to match the object outline.

Benefits of technology

It improves the aesthetics and quality of laser processing, ensures that the pattern fits with the surface of the object, and enhances the artistic sense and visual appeal of the product.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119273551A_ABST
    Figure CN119273551A_ABST
Patent Text Reader

Abstract

The invention discloses an image processing method, a storage medium, laser processing equipment and a numerical control machine, and relates to the technical field of image processing.The image processing method comprises the steps that firstly, an alignment point is set, and a coordinate axis is established with the alignment point as a coordinate origin; setting a preset control point, and determining a target reference image and a coordinate position of the target reference image according to the movement amount of the preset control point on the coordinate axis relative to the alignment point; determining feature information and a coordinate position of the target reference image according to the target reference image and the coordinate position thereof; determining the coordinate position and the rotation angle of the to-be-processed image on the target reference image according to the feature information and the coordinate position of the target reference image, and finally moving and rotating the to-be-processed image according to the coordinate position and the rotation angle of the to-be-processed image on the target reference image to obtain a deformed image corresponding to the target reference image. The invention aims to improve the laser processing quality and optimize the attractiveness of the to-be-processed pattern.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of image processing technology, and in particular to an image processing method, a storage medium, a laser processing device and a numerical control machine. Background Art

[0002] In the field of modern manufacturing and creative design, laser processing technology is widely used due to its high precision, high speed and ability to achieve complex pattern cutting and engraving on a variety of materials. This technology is not limited to industrial manufacturing, but also goes deep into many aspects such as artistic creation, personalized customization, and advertising logo production. When using laser processing equipment to process the object to be processed, in order to pursue aesthetic effects or adapt to the contours of the object to be processed, it is usually necessary to perform certain image processing on the image to be processed and bend it to seek a certain aesthetics and laser processing quality. Summary of the invention

[0003] The main purpose of the present invention is to provide an image processing method, a storage medium, a laser processing device and a CNC machine, aiming to improve the quality and aesthetics of laser processing.

[0004] To achieve the above object, the present invention proposes an image processing method, which comprises:

[0005] Set an alignment point and establish a coordinate axis with the alignment point as the coordinate origin;

[0006] Setting a preset control point, and determining feature information and coordinate position of a target reference image according to a movement amount of the preset control point on the coordinate axis relative to the coordinate origin;

[0007] Determine the coordinate position and rotation angle of the image to be processed on the target reference image according to the feature information and coordinate position of the target reference image;

[0008] The image to be processed is moved and rotated according to the coordinate position and rotation angle of the image to be processed on the target reference image to obtain a deformed image corresponding to the target reference image.

[0009] In one embodiment, the target reference image is a curved circle, the characteristic information of the target reference image includes the radius of the curved circle, and the coordinate position of the target reference image includes the coordinates of the center of the circle.

[0010] In one embodiment, the image processing method further includes:

[0011] Taking any point in the image to be processed as the origin of the coordinate axis;

[0012] Establishing an orthogonal coordinate axis with the length direction of the image to be processed as the x-axis and the height direction of the image to be processed as the y-axis;

[0013] Wherein, any point in the image to be processed includes the center point of the image to be processed.

[0014] In one embodiment, the step of setting a preset control point and determining the feature information and coordinate position of the target reference image according to the movement amount of the preset control point on the coordinate axis relative to the coordinate origin specifically includes:

[0015] Selecting a point at any position on the coordinate axis except the y-axis as a preset control point to set the preset control point;

[0016] Acquire a first movement amount of the preset control point on the coordinate axis relative to the alignment point in the x-axis direction, and acquire a second movement amount of the preset control point on the coordinate axis relative to the alignment point in the y-axis direction;

[0017] The radius of the curved circle is calculated according to the first movement amount, the second movement amount and a preset first formula, and the center coordinates of the curved circle are calculated according to the alignment point, the control point and the radius.

[0018] In one embodiment, the preset first formula includes:

[0019] r=(x 2 +y 2 ) / 2y;

[0020] Wherein, r is the radius of the curve circle; x is the first movement amount; and y is the second movement amount.

[0021] In one embodiment, the image processing method further includes:

[0022] The image to be processed is split into a plurality of sub-target images, and position information of the plurality of sub-target images on the coordinate axis is calculated respectively.

[0023] In one embodiment, after the step of splitting the image to be processed into a plurality of sub-target images and respectively calculating the position information of the plurality of sub-target images on the coordinate axis, the method further comprises:

[0024] Calculate the coordinate position and rotation angle of each sub-target image on the target reference image according to the position information of each sub-target image on the coordinate axis;

[0025] Each of the sub-target images is moved and rotated according to the coordinate position and rotation angle of each sub-target image on the target reference image, so as to obtain a deformed image corresponding to the target reference image.

[0026] In one embodiment, the step of respectively calculating the coordinate position and rotation angle of each sub-target image on the target reference image according to the position information of each sub-target image on the coordinate axis specifically includes:

[0027] According to the position information of each sub-target image, respectively obtain the distance between each sub-target image and the coordinate origin;

[0028] Calculate the rotation angle of each sub-target image on the target reference image according to the distance between each sub-target image and the coordinate origin and a preset second formula;

[0029] The position coordinates of each sub-target image on the target reference image are calculated respectively according to the rotation angle of each sub-target image on the target reference image and a preset third formula.

[0030] In one embodiment, the target reference image is a curved circle, and the preset second formula includes:

[0031] Angle = L / r;

[0032] The preset third formula includes:

[0033] px=rsin(Angle); py=r-rcos(Angle);

[0034] Wherein, Angle is the rotation angle; L is the distance between the sub-target image and the origin of the coordinate axis; r is the radius of the curve circle; px is the horizontal coordinate of the sub-target image on the curve circle, and py is the vertical coordinate of the sub-target image on the curve circle.

[0035] In one embodiment, the moving and rotating the image to be processed according to the coordinate position and rotation angle of the image to be processed on the target reference image to obtain a deformed image corresponding to the target reference image includes:

[0036] Moving the image to be processed to the coordinate position;

[0037] Rotate the moved image to be processed by the rotation angle with the circle center coordinate as the center to obtain a deformed image on the curved circle;

[0038] Alternatively, the image to be processed is rotated by the rotation angle with the circle center coordinate as the center;

[0039] The rotated image to be processed is moved to the coordinate position to obtain a deformed image on the curved circle.

[0040] In one embodiment, when there are multiple images to be processed, the image processing method further includes:

[0041] Establishing a coordinate axis using any one of the plurality of images to be processed as a reference object, and setting an alignment point on the coordinate axis;

[0042] Determining the radius and center coordinates of the curved circle corresponding to the reference object according to the movement of the preset control point on the coordinate axis relative to the alignment point;

[0043] Respectively acquiring relative distances between the images to be processed except the reference object and the reference object to obtain a plurality of relative distances corresponding to the images to be processed;

[0044] Calculating the radius of the curved circle corresponding to each of the to-be-processed images according to the plurality of relative distances and the radius;

[0045] The coordinate position and rotation angle of each image to be processed on the corresponding curved circle are calculated according to the radius and the center coordinates corresponding to each image to be processed, so as to move and rotate each image to be processed to obtain a deformed image on the curved circle.

[0046] In one embodiment, when there are multiple images to be processed, the center coordinates of the curved circles corresponding to the multiple images to be processed are at the same position, and the image processing method further includes:

[0047] According to the positional relationship between the reference object and the rest of the images to be processed, the bending direction of each image to be processed is determined to obtain a deformed image of each image to be processed on the corresponding curved circle.

[0048] In one embodiment, the step of determining the bending direction of each of the images to be processed according to the positional relationship between the reference object and the remaining images to be processed according to the center coordinates to obtain the deformed image of each of the images to be processed on the corresponding curved circle specifically includes:

[0049] According to the coordinates of the circle center, a straight line is constructed in the coordinate axis, the straight line passes through the circle center and is parallel to the x-axis;

[0050] When the reference object and the remaining images to be processed are on both sides of the straight line, the bending directions of the remaining images to be processed are opposite to the bending direction of the reference object, and the remaining images to be processed are moved and rotated in the direction opposite to the bending direction of the reference object to obtain a deformed image on a curved circle;

[0051] When the reference object and the remaining images to be processed are on the same side of the straight line, the bending direction of the remaining images to be processed is the same as the bending direction of the reference object, and the remaining images to be processed are moved and rotated in the same direction as the bending direction of the reference object to obtain a deformed image on the curved circle.

[0052] In one embodiment, the image processing method further includes:

[0053] Obtaining a processing instruction of the image to be processed, and after receiving the processing instruction of the image to be processed, executing the steps of setting an alignment point and establishing a coordinate axis with the alignment point as a coordinate origin;

[0054] Alternatively, after executing the steps of setting preset control points and determining the characteristic information and coordinate position of the target reference image based on the movement of the preset control points on the coordinate axis relative to the alignment points, and after receiving the processing instructions for the image to be processed, executing the step of determining the coordinate position and rotation angle of the image to be processed on the target reference image based on the characteristic information and coordinate position of the target reference image.

[0055] The present invention further proposes a storage medium, which is a computer-readable storage medium. A computer program is stored on the computer-readable storage medium. When the computer program is executed by a processor, the steps of the image processing method described in any one of the above items are implemented.

[0056] The present invention also proposes a laser processing device, which includes: 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 image processing method as described in any one of the above items.

[0057] The present invention also proposes a numerical control machine, comprising:

[0058] Removable head;

[0059] A communication component, the communication component is used to receive a processing file, the processing file is generated according to the deformed image obtained by any one of the methods described above;

[0060] and a controller, wherein the controller controls the movable head to process a processing material based on the processing file.

[0061] The present invention proposes an image processing method, in which an alignment point is first set and a coordinate axis is established with the alignment point as the coordinate origin; then a preset control point is set, and a target reference image and its coordinate position are determined according to the movement amount of the preset control point on the coordinate axis relative to the alignment point; then the characteristic information and coordinate position of the target reference image are determined according to the target reference image and its coordinate position; then the coordinate position and rotation angle of a to-be-processed image on the target reference image are determined according to the characteristic information and coordinate position of the target reference image; finally, the to-be-processed image is moved and rotated according to its coordinate position and rotation angle on the target reference image to obtain a deformed image corresponding to the target reference image.

[0062] In practical applications, the pattern to be processed is taken as the image to be processed, and the coordinate axis is constructed by setting the alignment point. After setting the preset control point, the movement amount between the preset control point and the alignment point (coordinate origin) on the coordinate axis can be determined, and then the characteristic information and coordinate position of the target reference image can be determined, so as to determine the coordinate position and rotation angle of the image to be processed. For example, when the target reference image is a curved circle, the radius and center coordinates of the curved circle can be determined, so as to determine the coordinate position and rotation angle of the image to be processed on the curved circle according to the radius and center coordinates of the curved circle, and the image to be processed is moved and rotated, so as to obtain the bent image to be processed, that is, the deformed image corresponding to the target reference image. Among them, the alignment point can be any point in the image to be processed, and the user can select the preset control point through the terminal device connected to the laser processing equipment, such as processing the image to be processed on the operation page of the host computer. And set the preset control point in the operation page. In this way, according to the user's selection of the preset control point and the alignment point, the image to be processed can be adjusted accordingly to optimize the display effect and processing quality of the pattern to be processed. BRIEF DESCRIPTION OF THE DRAWINGS

[0063] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the structures shown in these drawings without paying creative work.

[0064] Figure 1 A flowchart of an embodiment of an image processing method of the present invention;

[0065] Figure 2 A flowchart of another embodiment of the image processing method of the present invention;

[0066] Figure 3is a flow chart of another embodiment of the image processing method of the present invention;

[0067] Figure 4 A flowchart of another embodiment of the image processing method of the present invention;

[0068] Figure 5 A flowchart of another embodiment of the image processing method of the present invention;

[0069] Figure 6 A flowchart of another embodiment of the image processing method of the present invention;

[0070] Figure 7 is a flow chart of another embodiment of the image processing method of the present invention;

[0071] Figure 8 A schematic diagram of an image according to an embodiment of an image processing method of the present invention;

[0072] Fig. 9 A schematic diagram of an image according to an embodiment of an image processing method of the present invention;

[0073] Fig.10 A schematic diagram of an image according to an embodiment of an image processing method of the present invention;

[0074] Fig.11 A schematic diagram of an image according to an embodiment of an image processing method of the present invention;

[0075] Fig.12 A schematic diagram of an image according to an embodiment of an image processing method of the present invention;

[0076] Fig.13 A schematic diagram of an image according to an embodiment of an image processing method of the present invention;

[0077] Fig.14 A schematic diagram of an image according to an embodiment of an image processing method of the present invention;

[0078] Fig.15 A schematic diagram of an image according to an embodiment of an image processing method of the present invention;

[0079] Fig.16 A schematic diagram of an image according to an embodiment of an image processing method of the present invention;

[0080] Fig.17 FIG. 1 is a schematic diagram of an image according to an embodiment of an image processing method of the present invention.

[0081] The realization of the purpose, functional features and advantages of the present invention will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0082] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0083] It should be noted that all directional indications in the embodiments of the present invention (such as up, down, left, right, front, back, etc.) are only used to explain the relative position relationship, movement status, etc. between the components under a certain specific posture (as shown in the accompanying drawings). If the specific posture changes, the directional indication will also change accordingly.

[0084] It should be noted that, in this article, step codes such as S100, S200, etc. are used for the purpose of expressing the corresponding content more clearly and concisely, and do not constitute a substantial limitation on the sequence. When implementing the step, those skilled in the art may execute S200 first and then S100, etc., but these should all be within the scope of protection of this application.

[0085] In the field of modern manufacturing and creative design, laser processing technology is widely used due to its high precision, high speed and ability to achieve complex pattern cutting and engraving on a variety of materials. This technology is not limited to industrial manufacturing, but also goes deep into many aspects such as artistic creation, personalized customization, and advertising logo production. When using laser processing equipment to process the object to be processed, in order to pursue aesthetic effects or adapt to the contours of the object to be processed, it is usually necessary to perform certain image processing on the image to be processed and bend it to seek a certain aesthetics and laser processing quality.

[0086] It is understandable that by making intelligent and intuitive adjustments to the image to be processed, such as bending, twisting, scaling and other operations, various complex design requirements can be effectively met. By bending the image, the originally flat pattern design can conform to the natural curve of the object to be processed or the specially designed streamlined form, thereby maintaining the integrity and accuracy of the design while significantly enhancing the artistic sense and visual appeal of the product, thereby improving the aesthetics and user experience of the product. For example, for those objects with curved surfaces or non-planar structures, if an unadjusted two-dimensional plane design is used to directly perform laser processing according to the pattern to be processed, the processing result may not fully fit the surface of the object, resulting in gaps or over-cutting problems. By bending the image to be processed so that it accurately matches the actual contour of the object to be processed, it can be ensured that the laser processing path fits the surface of the object more closely, thereby improving the processing accuracy and quality.

[0087] For this purpose, refer to Figure 1The present invention proposes an image processing method, which comprises:

[0088] Step S100, setting an alignment point, and establishing a coordinate axis with the alignment point as the coordinate origin;

[0089] Step S200, setting a preset control point, and determining feature information and coordinate position of a target reference image according to a movement amount of the preset control point on the coordinate axis relative to the coordinate origin;

[0090] Step S300, determining the coordinate position and rotation angle of the image to be processed on the target reference image according to the feature information and coordinate position of the target reference image;

[0091] Step S400: Move and rotate the image to be processed according to the coordinate position and rotation angle of the image to be processed on the target reference image to obtain a deformed image corresponding to the target reference image.

[0092] In this embodiment, the image processing method of the present invention can be applied to the control device of the laser processing equipment or the terminal of the laser processing equipment. For example, the control device is integrated with a memory for storing the image processing control program of the present invention and a processor for executing the image processing control program of the present invention. Among them, the control device can be implemented by a main controller, such as MCU, DSP (Digital Signal Process, digital signal processing chip), FPGA (Field Programmable Gate Array, programmable logic gate array chip), PLC, SOC (System On Chip, system-level chip), etc. Among them, the laser processing equipment terminal includes a host computer, and the laser processing equipment can establish a connection with the host computer via a communication circuit. The user can process the image to be processed through the operation page on the host computer connected to the laser processing equipment. The preset control point is set in the operation page, and the image to be processed can be adjusted accordingly according to the user's manipulation of the preset control point. It can be understood that orthogonal coordinate axes or non-orthogonal axes, such as polar coordinate axes, hyperbolic coordinate axes, parabolic coordinate axes, etc., can be established on the operation page according to actual needs.

[0093] It is understandable that the deformed image is not limited to a curved circle, but can also be a curve with a certain curvature. For example, the image to be processed is deformed according to a preset curve path (such as a smiling arc) to increase visual interest and artistic sense, which is suitable for customized processing of personalized gifts or decorations. In practical applications, the pattern to be processed is used as the image to be processed, wherein the pattern to be processed includes but is not limited to graphics, text, lines, etc.

[0094] The following description is made by taking the target reference image as a curved circle as an example, wherein the characteristic information of the target reference image includes the radius of the curved circle, and the coordinate position of the target reference image includes the coordinates of the center of the circle. In this embodiment, the description is made by taking the establishment of orthogonal coordinate axes as an example. The image to be processed may be a pattern or a text phrase consisting of multiple characters. For example, Figure 8 An image to be processed before processing is provided in an embodiment of the present application. Take the text phrase "HELLO, WORLD!" as an example for explanation. First, in the graphic editing software of the image to be processed "HELLO, WORLD!" or the supporting software of the laser processing equipment, an orthogonal coordinate system is established. In order to simplify the calculation, an orthogonal coordinate axis system can be established with the image to be processed as a reference object, and an alignment point is set at any position on the image to be processed or at any other position outside the image to be processed. For example, the lower left corner of "H" is selected as the alignment point O, and the O point is used as the coordinate origin, and the length direction of the image to be processed "HELLO, WORLD!" is used as the x-axis, and the height direction of the image to be processed is used as the y-axis to establish the orthogonal coordinate axis; then the alignment point is used as the basis for the bending deformation calculation. Next, the user sets a preset control point on the operation interface provided by the host computer software, and the preset control point will determine the bending shape of the text phrase along the curved path. The movement amount between the preset control point and the alignment point (coordinate origin) can determine the unique radius and center coordinates of the curved circle. Among them, the center and the alignment point are both on the y-axis.

[0095] It should be noted that when the preset control point position H falls on the y-axis, the image to be processed does not produce a bending effect. Therefore, the user needs to select a preset control point at a position deviating from the y-axis direction to achieve a bending effect. According to the center coordinates (0, r) and the radius r, each character in the image to be processed "HELLO, WORLD!" is processed one by one. First, the rotation angle of each character and the coordinate position on the curve circle are calculated based on the radius, the coordinate center of the circle, and the position of the center of each character, and each character is rotated and moved to obtain a deformed image of the image to be processed. Reference Fig. 9 , Fig. 9 The deformed image after image processing needs to ensure that the orientation of the characters is consistent with the tangent direction of the curved circle, thereby maintaining reading fluency and aesthetics.

[0096] In practical applications, the pattern to be processed is taken as the image to be processed, and the coordinate axis is constructed by setting the alignment point. After setting the preset control point, the movement amount between the preset control point and the alignment point (coordinate origin) on the coordinate axis can be determined, and then the characteristic information and coordinate position of the target reference image can be determined, so as to determine the coordinate position and rotation angle of the image to be processed. For example, the radius and center coordinates of the curve circle are determined, so as to determine the coordinate position and rotation angle of the image to be processed on the target reference image according to the radius and center coordinates of the curve circle, and the image to be processed is moved and rotated to obtain the image to be processed after bending, that is, the deformed image corresponding to the target reference image. Among them, the alignment point can be any point in the image to be processed, and the user can select the preset control point through the terminal device connected to the laser processing equipment, such as processing the image to be processed on the operation page of the host computer. And set the preset control point in the operation page. In this way, according to the user's selection of the preset control point and the alignment point, the image to be processed can be adjusted accordingly to optimize the display effect and processing quality of the pattern to be processed.

[0097] In one embodiment of the present invention, reference Figure 2 , the establishment of the coordinate axis includes:

[0098] Step S110, taking any point in the image to be processed as the origin of the coordinate axis;

[0099] Step S120: establishing orthogonal coordinate axes with the length direction of the image to be processed as the x-axis and the height direction of the image to be processed as the y-axis.

[0100] Wherein, any point in the image to be processed includes the center point of the image to be processed.

[0101] In this embodiment, the origin of the coordinate axis can be any point in the image to be processed. It is assumed that the lower left corner of the minimum circumscribed rectangle of the image to be processed is selected as the origin of the coordinate axis (Ox, Oy). This can be a choice based on specific design requirements or processing convenience. Similarly, with the selected lower left corner point (Ox, Oy) as the origin of the coordinate axis, the length direction of the image to be processed is the x-axis, and the direction perpendicular to the length direction of the image to be processed is the y-axis. It can be understood that the definition of the coordinate axis is entirely based on the position of the selected point and the expected processing requirements. Combined with the content of the above embodiment, since any point in the image to be processed can be used as the origin of the coordinate axis, the position of the origin is not limited.

[0102] It is understandable that in order to rotate the image to be processed uniformly around the center according to the calculated coordinate position and rotation angle, or to make the image to be processed present symmetry on the curve circle, the center point of the image to be processed can be selected as the origin of the coordinate axis in this embodiment. Through the above settings, when the origin of the coordinate axis is located at the center point of the image to be processed, the operations such as rotation and scaling of the processed image will be relatively simple. In addition, the central symmetry can simplify mathematical calculations and is easy to control and predict the effect after the transformation. When processing an asymmetric or irregularly shaped image to be processed, a fixed center point may not be suitable for all deformation requirements. Therefore, any point in the image to be processed can be used as the origin to better adapt to complex contours, so that the deformation process of the image to be processed is more in line with expectations, providing flexibility for image processing work.

[0103] Taking the image to be processed as a non-text image such as a pattern or graphic as an example, we can first obtain the minimum bounding rectangle of the image to be processed. Assuming that the length of the minimum bounding rectangle is W and the width is H, the coordinates of the center point (Cx, Cy) are (W / 2, H / 2). With the center point (Cx, Cy) as the origin of the coordinates, define the length direction of the image to be processed as the x-axis, and the direction perpendicular to the length direction of the image to be processed as the y-axis. Fig.10 and Fig.11 As shown, the left and right edges of the image to be processed correspond to the negative and positive half axes of the x-axis, respectively, and the upper and lower edges correspond to the positive and negative half axes of the y-axis.

[0104] In one embodiment, the image processing method further includes:

[0105] Obtaining a processing instruction of the image to be processed, and after receiving the processing instruction of the image to be processed, executing the steps of setting an alignment point and establishing a coordinate axis with the alignment point as a coordinate origin;

[0106] Alternatively, after executing the steps of setting preset control points and determining the characteristic information and coordinate position of the target reference image based on the movement of the preset control points on the coordinate axis relative to the alignment points, and after receiving the processing instructions for the image to be processed, executing the step of determining the coordinate position and rotation angle of the image to be processed on the target reference image based on the characteristic information and coordinate position of the target reference image.

[0107] It is understandable that the step of obtaining the processing instruction of the image to be processed can be performed before step S100, or after step S200, and after the execution is completed, step S300 is started. In this way, the host computer can establish a coordinate axis and set a preset reference point after obtaining the processing instruction of the image to be processed, and then determine the target reference image, so as to further determine the deformed image corresponding to the image to be processed on the target reference image; or first establish a coordinate axis and set a preset control point on the operation page, determine the radius and coordinate position of the target reference image, and then determine the coordinate position and rotation angle of the image to be processed on the target reference image according to the received processing instruction of the image to be processed, so as to obtain the deformed image on the target reference image.

[0108] In one embodiment of the present invention, reference Figure 3 , step S200 specifically includes:

[0109] Step S210, selecting a point at any position on the coordinate axis except the y-axis as a preset control point;

[0110] Step S220, obtaining a first movement amount of the preset control point on the coordinate axis relative to the alignment point in the x-axis direction, and obtaining a second movement amount of the preset control point on the coordinate axis relative to the alignment point in the y-axis direction;

[0111] Step S230, calculating the radius of the curve circle according to the first movement amount, the second movement amount and a preset first formula, and calculating the center coordinates of the curve circle according to the alignment point, the control point and the radius.

[0112] Wherein, the image processing method further includes:

[0113] The image to be processed is split into a plurality of sub-target images, and position information of the plurality of sub-target images on the coordinate axis is calculated respectively.

[0114] After the step of splitting the image to be processed into a plurality of sub-target images and respectively calculating the position information of the plurality of sub-target images on the coordinate axis, the method further comprises:

[0115] refer to Figure 4 , step S240, calculating the coordinate position and rotation angle of each sub-target image on the target reference image according to the position information of each sub-target image on the coordinate axis;

[0116] Step S250: Move and rotate each of the sub-target images according to the coordinate position and rotation angle of each of the sub-target images on the target reference image to obtain a deformed image corresponding to the target reference image.

[0117] In this embodiment, assuming that the center point of the image to be processed is used as the coordinate origin (i.e., the alignment point), and an orthogonal coordinate axis is established, the user can select a point at any position on the orthogonal coordinate axis except the y-axis as a preset control point, and then obtain the first movement amount of the preset control point on the orthogonal coordinate axis relative to the alignment point in the x-axis direction, and the second movement amount of the preset control point on the orthogonal coordinate axis relative to the alignment point in the y-axis direction. Fig.10 As shown, the center point 0 of the image to be processed "HELLO, WORLD!" is used as the alignment point, and the alignment point is used as the origin of the coordinate axis. The length direction of the text "HELLO, WORLD!" is used as the x-axis, and the direction perpendicular to "HELLO, WORLD!" is used as the y-axis to establish an orthogonal coordinate system, and a preset control point H (x, y) is selected at any position outside the y-axis. It can be understood that since the alignment point is the origin, x is the first offset and y is the second offset. The radius of the curve circle is calculated based on the first movement x and the second movement y and the preset first formula, and the coordinates of the center of the curve circle are calculated based on the alignment point, the control point and the radius. Among them, the preset first formula includes:

[0118] r=(x 2 +y 2 ) / 2y;

[0119] Wherein, r is the radius of the curve circle; x is the first movement amount; and y is the second movement amount.

[0120] It should be noted that the preset first formula can be derived from the following formula: According to the Pythagorean theorem, According to trigonometric functions, we can get

[0121] When the alignment point is the center point of the image to be processed, in order to present a better symmetry effect, the center of the circle and the alignment point are in the same vertical direction. That is, the coordinates of the alignment point are (0, 0), and the coordinates of the center of the circle are C (0, r). It should be noted that when the preset control point H moves upward and deviates from the y-axis, the coordinates of the center of the circle are (0, r); when the preset control point H moves downward, the coordinates of the center of the circle are (0, -r). The center of the circle is located on the y-axis, that is, the positive and negative vertical coordinates of the center of the circle can be determined according to the moving direction of the preset control point H. Since the control point H is located in the negative direction of the y-axis, the center of the circle C is located in the negative direction of the y-axis; if the preset control point H is located in the positive direction of the y-axis, the center of the circle C is located in the positive direction of the y-axis.

[0122] Combined with the content of the above embodiment, if the image to be processed is composed of multiple characters, it is necessary to first split it into multiple sub-target images, and then calculate the position information of the multiple sub-target images respectively. For example, for the image to be processed "HELLO, WORLD!", each character of the image to be processed can be divided into a sub-target image, and the coordinate position and rotation angle of each sub-target image on the curve circle can be calculated according to the position information of each sub-target image on the orthogonal coordinate axis, so that each character is rotated and moved according to the corresponding rotation angle and coordinate position, and a deformed image is presented. In this way, the bending deformation of the image to be processed is realized, and the display effect and processing quality of the pattern to be processed are optimized.

[0123] Further, refer to Figure 5 Step S240 specifically includes:

[0124] Step S241, obtaining the distance between each sub-target image and the coordinate origin according to the position information of each sub-target image;

[0125] Step S242, calculating the rotation angle of each sub-target image on the target reference image according to the distance between each sub-target image and the coordinate origin and a preset second formula;

[0126] Step S243, calculating the position coordinates of each sub-target image on the target reference image according to the rotation angle of each sub-target image on the target reference image and a preset third formula.

[0127] In this embodiment, after the coordinates of the center of the circle and the radius are calculated, the bending direction of the image to be processed can be determined according to the preset control point H. Fig.14 As shown, the preset control point H is in the positive direction of the y-axis. Therefore, the image to be processed "HELLO, WORLD!" after being moved and rotated is oriented in the positive direction of the y-axis.

[0128] In combination with the contents of the above embodiments, after the image to be processed is split into multiple sub-target images, it is necessary to obtain the position information of each sub-target image in order to determine the distance between the position information and the coordinate origin, and calculate the rotation angle and position coordinates of the sub-target image on the curve circle in combination with the preset second formula and the preset third formula, so as to form a deformed image after rotating and moving it.

[0129] Wherein, the preset second formula includes: Angle=L / r;

[0130] The preset third formula includes:

[0131] px=rsin(Angle); py=r-rcos(Angle);

[0132] Wherein, Angle is the rotation angle; L is the distance between the sub-target image and the origin of the orthogonal coordinate axis; r is the radius of the curve circle; px is the horizontal coordinate of the sub-target image on the curve circle, and py is the vertical coordinate of the sub-target image on the curve circle.

[0133] Take the second character "O" in "HELLO, WORLD!" as an example. In the unprocessed state, refer to Fig.12 and Fig.15 The coordinates of the center point of the character "O" (denoted as point E) are (L, 0). Starting from the origin O of the coordinate axis, take an arc of length L on circle C, and calculate the center angle Angle corresponding to the arc according to the preset second formula Angle=L / r, where r is the signed radius of circle C calculated above. And calculate the position P of the center point (point E) of the character "O" on the circle according to the preset third formula px=rsin(Angle), py=r-rcos(Angle). The angle that the character "O" needs to rotate is equal to the center angle Angle corresponding to the arc, which is Fig.13 As shown in . In this way, the center point (point E) of the "O" character in the unbending state (unprocessed) can be moved to position P, and then rotated around the center point (point E) by Angle to obtain the "O" character in the bent state. Similarly, for other characters, the movement amount Lx between the center point of other characters and the origin O in the x-axis direction can be found, and then a circular arc with a length of Lx on the circle C is taken, and the rotation angle and the position coordinates on the curve circle are calculated according to the preset second formula and the preset third formula to complete the deformation of other characters, and finally obtain the deformed image after the bending processing of the entire image to be processed.

[0134] In this embodiment, the moving and rotating the image to be processed according to the coordinate position and rotation angle of the image to be processed on the target reference image to obtain a deformed image corresponding to the target reference image includes:

[0135] Moving the image to be processed to the coordinate position;

[0136] Rotate the moved image to be processed by the rotation angle with the circle center coordinate as the center to obtain a deformed image on the curved circle;

[0137] Alternatively, the image to be processed is rotated by the rotation angle with the circle center coordinate as the center;

[0138] The rotated image to be processed is moved to the coordinate position to obtain a deformed image on the curved circle.

[0139] In practical applications, after calculating the rotation angle and position of each character on the curve circle, for unprocessed characters, the center point (point E) of the character can be first moved to position P, and then rotated around the center point (point E) by angle Angle to obtain the character in a curved state. Alternatively, the character can be first rotated around the center point (point E) by angle Angle, and then the center point (point E) of the character can be moved to position P to obtain the character in a curved state. Therefore, the image processing method of the present invention does not limit the order of moving and rotating the image to be processed.

[0140] Through the above settings, the image to be processed can be split into multiple sub-target images, and then the split characters or texts can be moved and rotated respectively. All sub-target images are on the same curve circle, and finally a deformed image of the image to be processed in a bent state is obtained. And it can be ensured that the spacing between two adjacent characters or texts after bending is equal to the spacing between two adjacent characters or texts before bending. In this way, it is helpful to adjust the pattern to be processed and optimize the display effect of the pattern to be processed. It also helps to adapt to the contour of the object to be processed and optimize the effect of laser engraving.

[0141] It is understandable that in the case of multiple images to be processed, such as a set of icons containing different elements or a multi-line text group or character group, the flexibility and efficiency of image processing technology are particularly important. In this case, each independent image to be processed needs to be designed with its position in the overall image after deformation, ultimately presenting an effect that is both beautiful and creative.

[0142] In one embodiment of the present invention, reference Figure 6 When there are multiple images to be processed, the image processing method further includes:

[0143] Step S500, establishing a coordinate axis using any one of the plurality of images to be processed as a reference object, and setting an alignment point on the coordinate axis;

[0144] Step S600, determining the radius and center coordinates of the curve circle corresponding to the reference object according to the movement amount of the preset control point on the coordinate axis relative to the alignment point;

[0145] Step S700, respectively acquiring relative distances between the images to be processed except the reference object and the reference object, to obtain a plurality of relative distances corresponding to the images to be processed;

[0146] Step S800, calculating the radius of the curved circle corresponding to each of the to-be-processed images according to the plurality of relative distances and the radius;

[0147] Step S900, calculating the coordinate position and rotation angle of each image to be processed on the corresponding curved circle according to the radius and the center coordinates of each image to be processed, so as to move and rotate each image to be processed to obtain a deformed image on the curved circle.

[0148] In this embodiment, if there are multiple images to be processed, any one of the multiple images to be processed is used as a reference object, and an alignment point is set on the reference object, and an orthogonal coordinate axis is established with the alignment point as the coordinate origin; then the user sets a preset control point on the interface of the upper computer that is connected to the laser processing equipment, and determines the radius and center coordinates according to the movement between the control point and the alignment point. Since the multiple images to be processed before processing have a certain spacing, the relative distance between other images to be processed and the reference image can be obtained after the radius and center coordinates of the reference object are determined, and then the radius of the curve circle where the other images to be processed are located is obtained, and the rotation angle and position of each sub-target image in the corresponding curve circle are calculated in combination with the same center of the curve circle where each sub-target image is located. In this way, the deformation of multiple images to be processed can be achieved to seek a certain degree of aesthetics.

[0149] Take the bending of two images to be processed as an example, assuming that the images to be processed are the first image to be processed "HELLO, WORLD!" and the second image to be processed "HELLO, WORLD!". Take the first image to be processed as the reference object, and establish orthogonal coordinate axes based on the center point of the reference object as the origin of the coordinate axis, so that multiple images to be processed have unique positions in the same coordinate system. Set the preset control point and calculate the radius and center coordinates of the curve circle where the reference object is located, and calculate the coordinate position and rotation angle of the reference object on the curve circle based on the radius and center coordinates. Then, the reference object can be moved and rotated accordingly to obtain a deformed image of the reference object. At the same time, the first image to be processed and the second image to be processed before processing have a certain distance in the y-axis direction. In combination with the above-mentioned embodiment, assuming that the relative distance between the character "H" in the first image to be processed "HELLO, WORLD!" and the character "H" in the second image to be processed "HELLO, WORLD!" is R, and the radius of the curve circle where the reference object is located is r1, then the radius of the curve circle of the second image to be processed is the absolute value of the difference between r1 and R or the sum of r1 and R. It should be noted that when the reference object and the image to be processed are on the same side of the center of the circle (relative to the X-axis direction), the first case is: if the reference object and the second image to be processed are both below the straight line, and the reference object is above the second image to be processed, then the calculation formula for the radius of the curve circle of the second image to be processed is r2: r2 = R + r1. The second case is: if the reference object and the second image to be processed are both below the straight line, and the reference object is below the second image to be processed, then the calculation formula for the radius of the curve circle of the second image to be processed is r2: r2 = r1-R. It can be understood that the third case is: if the reference object and the second image to be processed are both above the straight line, and the reference object is above the second image to be processed, then the calculation formula for the radius of the curve circle r2 of the second image to be processed is: r2=r1-R. The fourth case is: if the reference object and the second image to be processed are both above the straight line, and the reference object is below the second image to be processed, then the calculation formula for the radius of the curve circle r2 of the second image to be processed is: r2=R+r1. It should be noted that when the reference object and the image to be processed are on different sides of the center of the circle (relative to the X-axis direction), regardless of whether the reference object is above the second image to be processed, the calculation formula for the radius of the curve circle r2 of the second image to be processed is: r2=R-r1.In this way, the radius r2 of the curve circle where the second image to be processed is located can be calculated, and then it can be split into multiple sub-target images, and the distance between the center point of each sub-target image and the alignment point of the second image to be processed is calculated respectively. Starting from the alignment point of the second image to be processed, a circular arc with a length equal to the distance between the center point of the sub-target image and the alignment point of the second image to be processed is taken, and the center angle Angle corresponding to the circular arc is calculated according to the preset second formula, and the position P of the center point of the sub-target image on the circle is calculated according to the preset third formula. In this way, the sub-target image in the non-bending state (unprocessed) can be moved to the position P first, and then rotated around the center point by Angle angle to obtain the sub-target image in the bent state. Similarly, multiple sub-target images in the bent state can be obtained.

[0150] It should be noted that if the center coordinates of the curved circles corresponding to the multiple images to be processed are at the same position, the first image to be processed “HELLO, WORLD!” and the second image to be processed “HELLO, WORLD!” after image processing are the same as each other. Fig.16 and Fig.17 As shown, Fig.16 is the deformed image obtained when the center coordinate is in the positive direction of the y-axis. Fig.17 is a deformed image obtained when the coordinates of the center of the circle are located in the negative direction of the y-axis. In addition, the centers of the curved circles corresponding to the multiple images to be processed can also be in different positions. They only need to be placed in the same coordinate system, and the deformed image in a curved state can be realized by using the image processing method of the present invention. For example, any one of the multiple images to be processed is selected as a reference object, and the radius and center coordinates of the reference curved circle are determined by setting alignment points and preset control points and the movement of the preset control points relative to the alignment points on the orthogonal coordinate axes; and then the coordinate position and rotation angle of the reference object are calculated. Until all the images to be processed are selected. In this way, bending deformation can also be realized by separately processing the multiple images to be processed according to the image processing method of the present invention.

[0151] Through the above settings, the image processing method of the present invention can deform multiple images to be processed, and determine whether the centers of the curve circles of each sub-target image need to be in the same position according to actual needs. In practical applications, compared with deforming a single image to be processed, it can be used more to enrich the visual level and increase the sense of design, that is, the user selects different or the same coordinate origins and curved paths for multiple images to be processed, to achieve a staggered and mutually echoing visual effect, further enhancing the processing effect and aesthetics.

[0152] It is understandable that in order to ensure that the various patterns to be processed are coordinated and consistent, create a visual effect with rich changes and depth, and meet diverse design needs, multiple images to be processed can share the same coordinate origin and center to ensure the consistency and coordination of the overall design.

[0153] In another embodiment of the present invention, when there are multiple images to be processed, the center coordinates of the curved circles corresponding to the multiple images to be processed are at the same position, and the image processing method further includes:

[0154] According to the positional relationship between the reference object and the rest of the images to be processed, the bending direction of each image to be processed is determined to obtain a deformed image of each image to be processed on the corresponding curved circle.

[0155] Among them, reference Figure 7 The step of determining the bending direction of each of the images to be processed according to the positional relationship between the reference object and the remaining images to be processed according to the center coordinates to obtain the deformed image of each of the images to be processed on the corresponding curved circle specifically includes:

[0156] Step S910: construct a straight line in the coordinate axis according to the coordinates of the circle center, the straight line passes through the circle center and is parallel to the x-axis;

[0157] Step S920: when the reference object and the remaining images to be processed are on both sides of the straight line, the bending directions of the remaining images to be processed are opposite to the bending direction of the reference object, and the remaining images to be processed are moved and rotated in the direction opposite to the bending direction of the reference object to obtain a deformed image on a curved circle;

[0158] Step S930: When the reference object and the remaining images to be processed are on the same side of the straight line, the bending direction of the remaining images to be processed is the same as the bending direction of the reference object, and the remaining images to be processed are moved and rotated in the same direction as the bending direction of the reference object to obtain a deformed image on the curved circle.

[0159] In this embodiment, when there are multiple images to be processed, if the centers of the curve circles corresponding to the multiple images to be processed are defined at the same position, in addition to determining the bending direction according to the preset control point H, a straight line parallel to the x-axis of the orthogonal coordinate axis can also be drawn through the center C.

[0160] In combination with the above embodiments, after calculating the rotation angle of the reference object and the position on the corresponding curve circle, the reference object can be moved and rotated (the order of movement and rotation is not limited), and then other images to be processed are processed, and then the radius of the curve circle of other images to be processed is obtained, and finally the rotation angle and the position on the corresponding curve circle of the remaining images to be processed are obtained. Taking the first image to be processed and the second image to be processed as an example, the first image to be processed is determined as the reference object. When the reference object and the second image to be processed are on both sides of the straight line, for example, the reference object is above the straight line and the second image to be processed is below the straight line, it means that the bending direction of the reference object is downward, and the bending direction of the second image to be processed is upward, which is opposite to the bending direction of the reference object. Then, the second image to be processed needs to be moved and rotated in the direction opposite to the bending direction of the reference object to obtain a deformed image on the curve circle. It should be noted that at this time, the center of the circle is between the reference object and the second image to be processed, and the sum of the radius of the second image to be processed and the radius of the reference object is equal to the distance between the center point of the reference object and the center point of the second image to be processed. That is, the radius of the curve circle of the second image to be processed is r2, which is equal to the difference between the relative distance R between the first image to be processed and the second image to be processed and the radius r1 of the curve circle where the first image to be processed is located, as shown in r2=R-r1. In this way, the rotation angle and position of each character of the second image to be processed on the curve circle can be determined according to the radius of the curve circle of the second image to be processed and the coordinates of the center of the circle, thereby obtaining the curved image of the second image to be processed. Similarly, when the reference object and the second image to be processed are on the same side of the straight line, for example, the reference object and the second image to be processed are both below the straight line, it means that the bending direction of the second image to be processed is the same as the bending direction of the reference object, and the image to be processed needs to be moved and rotated in the same direction as the bending direction of the reference object to obtain a deformed image on the curve circle. If the reference object is above the second image to be processed, the calculation formula for the radius of the curve circle of the second image to be processed is r2: r2=R+r1. If the reference object is below the second image to be processed, the calculation formula for the radius of the curve circle of the second image to be processed is r2: r2=r1-R. It can be understood that when the reference object and the second image to be processed are both above the straight line, if the reference object is above the second image to be processed, the calculation formula for the radius of the curve circle r2 of the second image to be processed is: r2 = r1-R. If the reference object is below the second image to be processed, the calculation formula for the radius of the curve circle r2 of the second image to be processed is: r2 = R + r1. In this way, the rotation angle and position of each character of the second image to be processed can be determined according to the radius of the curve circle and the center coordinates of the second image to be processed, thereby obtaining a curved image of the second image to be processed. Fig.16 It is a deformed image in a curved state when both the reference object and the second image to be processed are below the straight line where the center of the circle is located.

[0161] Through the above settings, when the image processing method of the present invention performs curve transformation on the text or graphics on multiple patterns to be processed, it can not only transform multiple patterns to be processed into deformed images with the same bending direction, but also transform multiple patterns to be processed into deformed images with different bending directions. In this way, more personalized effects can be achieved, and the display effects of multiple patterns to be processed are optimized.

[0162] The present application provides a storage medium, which is a computer-readable storage medium having computer-readable program instructions (ie, computer programs) stored thereon, and the computer-readable program instructions are used to execute the image processing method in the above-mentioned embodiment.

[0163] The computer-readable storage medium provided in the present application may be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared or semiconductor systems, systems or devices, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, system or device. The program code contained on the computer-readable storage medium may be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination of the above.

[0164] The computer-readable storage medium may be included in the laser processing device or the laser processing device terminal; or may exist independently without being assembled into the laser processing device or the laser processing device terminal.

[0165] The computer-readable storage medium carries one or more programs. When the one or more programs are executed by the laser processing device or the laser processing device terminal, the laser processing device or the laser processing device terminal: sets an alignment point and establishes a coordinate axis with the alignment point as the coordinate origin;

[0166] Setting a preset control point, and determining feature information and coordinate position of a target reference image according to a movement amount of the preset control point on the coordinate axis relative to the coordinate origin;

[0167] Determine the coordinate position and rotation angle of the image to be processed on the target reference image according to the feature information and coordinate position of the target reference image;

[0168] The image to be processed is moved and rotated according to the coordinate position and rotation angle of the image to be processed on the target reference image to obtain a deformed image corresponding to the target reference image.

[0169] Computer program code for performing the operations of the present application may be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, C++, and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate 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 may 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 may be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0170] The flowcharts and block diagrams in the accompanying drawings illustrate the possible architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present application. In this regard, each box in the flowchart or block diagram can represent a module, a program segment or a part of a code, and the module, a program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, and the combination of boxes in the block diagram and / or flowchart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0171] The modules involved in the embodiments of the present application may be implemented by software or hardware, wherein the name of the module does not limit the unit itself in some cases.

[0172] The readable storage medium provided in the present application is a computer-readable storage medium, which stores computer-readable program instructions (i.e., computer programs) for executing the above-mentioned image processing method, and can solve the same technical problem. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided in the present application are the same as the beneficial effects of the image processing method provided in the above-mentioned embodiment, and will not be described in detail here.

[0173] The present application also proposes a laser processing device, which includes: 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 image processing method as described in any one of the above items.

[0174] It is worth noting that since the laser processing equipment of the present invention is based on the above-mentioned image processing method, the embodiments of the intelligent device component of the present invention include all technical solutions of all embodiments of the above-mentioned image processing method, and the technical effects achieved are exactly the same, which will not be repeated here.

[0175] The present invention also proposes a numerical control machine, comprising:

[0176] Removable head;

[0177] A communication component, the communication component is used to receive a processing file, the processing file is generated according to the deformed image obtained by any one of the methods described above;

[0178] and a controller, wherein the controller controls the movable head to process a processing material based on the processing file.

[0179] It is worth noting that since the CNC machine of the present invention is based on the above-mentioned image processing method, the embodiments of the CNC machine of the present invention include all technical solutions of all embodiments of the above-mentioned image processing method, and the technical effects achieved are also exactly the same, which will not be repeated here.

[0180] The above descriptions are only optional embodiments of the present invention, and are not intended to limit the patent scope of the present invention. All equivalent structural changes made using the contents of the present invention's specification and drawings, or direct / indirect applications in other related technical fields, under the inventive concept of the present invention are included in the patent protection scope of the present invention.

Claims

1. An image processing method, characterized in that: The image processing method comprises: Set an alignment point and establish a coordinate axis with the alignment point as the coordinate origin; Setting a preset control point, and determining feature information and coordinate position of a target reference image according to a movement amount of the preset control point on the coordinate axis relative to the coordinate origin; Determine the coordinate position and rotation angle of the image to be processed on the target reference image according to the feature information and coordinate position of the target reference image; The image to be processed is moved and rotated according to the coordinate position and rotation angle of the image to be processed on the target reference image to obtain a deformed image corresponding to the target reference image.

2. The method according to claim 1, characterized in that The target reference image is a curved circle, the feature information of the target reference image includes the radius of the curved circle, and the coordinate position of the target reference image includes the coordinates of the center of the circle.

3. The method according to claim 1, characterized in that The image processing method further comprises: Taking any point in the image to be processed as the origin of the coordinate axis; Establishing an orthogonal coordinate axis with the length direction of the image to be processed as the x-axis and the height direction of the image to be processed as the y-axis; Wherein, any point in the image to be processed includes the center point of the image to be processed.

4. The method according to claim 2, characterized in that The step of setting a preset control point and determining the feature information and coordinate position of the target reference image according to the movement amount of the preset control point on the coordinate axis relative to the coordinate origin specifically includes: Select a point at any position on the coordinate axis except the y-axis as a preset control point; Acquire a first movement amount of the preset control point on the coordinate axis relative to the alignment point in the x-axis direction, and acquire a second movement amount of the preset control point on the coordinate axis relative to the alignment point in the y-axis direction; The radius of the curved circle is calculated according to the first movement amount, the second movement amount and a preset first formula, and the center coordinates of the curved circle are calculated according to the alignment point, the control point and the radius.

5. The method according to claim 4, characterized in that The preset first formula includes: r=(x 2 +y 2 ) / 2y; Wherein, r is the radius of the curve circle; x is the first movement amount; and y is the second movement amount.

6. The method according to claim 1, characterized in that The image processing method further comprises: The image to be processed is split into a plurality of sub-target images, and position information of the plurality of sub-target images on the coordinate axis is calculated respectively.

7. The method according to claim 6, characterized in that After the step of splitting the image to be processed into a plurality of sub-target images and respectively calculating the position information of the plurality of sub-target images on the coordinate axis, the method further comprises: Calculate the coordinate position and rotation angle of each sub-target image on the target reference image according to the position information of each sub-target image on the coordinate axis; Each of the sub-target images is moved and rotated according to the coordinate position and rotation angle of each sub-target image on the target reference image, so as to obtain a deformed image corresponding to the target reference image.

8. The method according to claim 7, characterized in that The step of respectively calculating the coordinate position and rotation angle of each sub-target image on the target reference image according to the position information of each sub-target image on the coordinate axis specifically comprises: According to the position information of each sub-target image, respectively obtain the distance between each sub-target image and the coordinate origin; Calculate the rotation angle of each sub-target image on the target reference image according to the distance between each sub-target image and the coordinate origin and a preset second formula; The position coordinates of each sub-target image on the target reference image are calculated respectively according to the rotation angle of each sub-target image on the target reference image and a preset third formula.

9. The method according to claim 8, characterized in that The target reference image is a curved circle, The preset second formula includes: Angle=L / r; The preset third formula includes: px=rsin(Angle); py=r-rcos(Angle); Wherein, Angle is the rotation angle; L is the distance between the sub-target image and the origin of the coordinate axis; r is the radius of the curve circle; px is the horizontal coordinate of the sub-target image on the curve circle, and py is the vertical coordinate of the sub-target image on the curve circle.

10. The method according to claim 2, characterized in that The moving and rotating the image to be processed according to the coordinate position and the rotation angle of the image to be processed on the target reference image to obtain a deformed image corresponding to the target reference image comprises: Moving the image to be processed to the coordinate position; Rotate the moved image to be processed by the rotation angle with the circle center coordinate as the center to obtain a deformed image on the curved circle; Alternatively, the image to be processed is rotated by the rotation angle with the circle center coordinate as the center; The rotated image to be processed is moved to the coordinate position to obtain a deformed image on the curved circle.

11. The method according to claim 2, characterized in that When there are multiple images to be processed, the image processing method further includes: Establishing a coordinate axis using any one of the plurality of images to be processed as a reference object, and setting an alignment point on the coordinate axis; Determining the radius and center coordinates of the curved circle corresponding to the reference object according to the movement of the preset control point on the coordinate axis relative to the alignment point; Respectively acquiring relative distances between the images to be processed except the reference object and the reference object to obtain a plurality of relative distances corresponding to the images to be processed; Calculating the radius of the curved circle corresponding to each of the to-be-processed images according to the plurality of relative distances and the radius; The coordinate position and rotation angle of each image to be processed on the corresponding curved circle are calculated according to the radius and the center coordinates corresponding to each image to be processed, so as to move and rotate each image to be processed to obtain a deformed image on the curved circle.

12. The method according to claim 11, characterized in that When there are multiple images to be processed, the center coordinates of the curved circles corresponding to the multiple images to be processed are at the same position, and the image processing method further includes: According to the positional relationship between the reference object and the rest of the images to be processed, the bending direction of each image to be processed is determined to obtain a deformed image of each image to be processed on the corresponding curved circle.

13. The method according to claim 12, characterized in that The step of determining the bending direction of each of the images to be processed according to the positional relationship between the reference object and the rest of the images to be processed according to the center coordinates to obtain the deformed image of each of the images to be processed on the corresponding curved circle specifically includes: According to the coordinates of the circle center, a straight line is constructed in the coordinate axis, the straight line passes through the circle center and is parallel to the x-axis; When the reference object and the remaining images to be processed are on both sides of the straight line, the bending directions of the remaining images to be processed are opposite to the bending direction of the reference object, and the remaining images to be processed are moved and rotated in the direction opposite to the bending direction of the reference object to obtain a deformed image on a curved circle; When the reference object and the remaining images to be processed are on the same side of the straight line, the bending direction of the remaining images to be processed is the same as the bending direction of the reference object, and the remaining images to be processed are moved and rotated in the same direction as the bending direction of the reference object to obtain a deformed image on the curved circle.

14. The method according to claim 1, wherein: The image processing method further comprises: Obtaining a processing instruction of the image to be processed, and after receiving the processing instruction of the image to be processed, executing the steps of setting an alignment point and establishing a coordinate axis with the alignment point as a coordinate origin; Alternatively, after executing the steps of setting preset control points and determining the characteristic information and coordinate position of the target reference image based on the movement of the preset control points on the coordinate axis relative to the alignment points, and after receiving the processing instructions for the image to be processed, executing the step of determining the coordinate position and rotation angle of the image to be processed on the target reference image based on the characteristic information and coordinate position of the target reference image.

15. A storage medium, characterized in that: The storage medium is a computer-readable storage medium, and a computer program is stored on the computer-readable storage medium. When the computer program is executed by a processor, the steps of the image processing method according to any one of claims 1 to 14 are implemented.

16. A laser processing device, characterized in that: The laser processing 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 image processing method according to any one of claims 1 to 14.

17. A numerically controlled machine, characterized in that: The CNC machine comprises: Removable head; A communication component, the communication component is used to receive a processing file, the processing file is generated according to the deformed image obtained by the method according to any one of claims 1 to 14; and a controller, wherein the controller controls the movable head to process a processing material based on the processing file.