Image calibration method, numerical control machine, computing system and storage medium
By processing the calibration image of the CNC machine and updating the positional relationship between the calibration points and the calibration pixel points, the error problem caused by the change in positional relationship during transportation or use of the CNC machine is solved, and the processing precision and accuracy are improved.
Patent Information
- Application Number
- CN202410237389.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2023-03-02
- Filing Date
- 2024-03-01
- Publication Date
- 2024-09-03
AI Technical Summary
During the transportation or use of CNC machines, changes in the relative position of the camera device and the light source lead to errors in the calibration relationship, which affects the processing accuracy and makes it impossible to accurately obtain the position information of the material to be processed.
By obtaining the calibration image, the calibration pixels are scaled, rotated, and offset, and the positional relationship between the calibration points and the calibration pixels is updated to ensure the accuracy of laser processing.
The calibration relationship error of the CNC machine is reduced, the processing accuracy is improved, and the position information of the material to be processed in the processing format can be accurately obtained to achieve precise processing.
Smart Images

Figure CN118587257A
Abstract
Description
[0001] This application claims the priority of the Chinese patent application filed with the China Patent Office on March 2, 2023, with application name “Processing Calibration Method and Device” and priority number 2023102371611, all contents of which are incorporated by reference in this application. Technical Field
[0002] The present application relates to the field of laser processing technology, and in particular to an image calibration method and a numerical control machine, a computing system, and a storage medium. Background Art
[0003] During the processing of the CNC machine, the actuator of the CNC machine is controlled so that the actuator of the CNC machine emits laser to process the processing object.
[0004] During the process of factory assembly, transportation or use of CNC machines, the measuring components (such as cameras) configured in the CNC machines often offset, resulting in errors in the correspondence between the images captured by the camera devices installed in the CNC machines and the processing format in the CNC machines, making it impossible to accurately obtain the position of the material to be processed in the processing format, making it difficult to accurately process the material to be processed. Summary of the invention
[0005] The present application aims to solve the technical problem that it is impossible to accurately obtain the position information of the material to be processed in the processing width, making it difficult to accurately process the material to be processed.
[0006] According to one aspect of an embodiment of the present application, the present application provides an image calibration method, the method comprising:
[0007] Get a calibration image of the calibration points;
[0008] According to the calibration image, at least one of scaling, rotating and shifting is performed on the calibration pixel points to update the positional relationship between the calibration point and the calibration pixel points;
[0009] Laser processing is performed according to the updated positional relationship between the calibration points and the calibrated pixel points.
[0010] According to one aspect of an embodiment of the present application, performing at least one of scaling, rotating, and shifting the calibrated pixel points according to the calibration image includes:
[0011] Determine, according to the calibration image, position information of a pixel point mapped by the calibration point on the calibration image, where the number of the pixel point is at least one;
[0012] Comparing the position information of the pixel point with the position information of the calibration pixel point corresponding to the calibration point to obtain at least one error data;
[0013] The position information of the calibration pixel point is corrected according to the error data to obtain the calibration position information of the calibration pixel point.
[0014] According to an aspect of an embodiment of the present application, determining, based on the calibration image, position information of a pixel point mapped by the calibration point on the calibration image includes:
[0015] By performing threshold segmentation on the calibration image, the pixel points mapped by each calibration point in the calibration image are screened to obtain the screening points that meet the threshold requirements;
[0016] Generating a plurality of screening point matrices composed of the screening points, wherein the screening point matrices have the same number of rows and columns as the calibration point matrix;
[0017] A screening dot matrix having the same characteristic information as the calibration dot matrix is found among a plurality of screening dot matrices, and a pixel dot matrix is formed by taking each screening point in the obtained screening dot matrix as a pixel point.
[0018] According to one aspect of an embodiment of the present application, the error data includes a scaling error, and the position information of the pixel point is compared with the position information of the calibrated pixel point corresponding to the calibration point to obtain at least one error data, including:
[0019] Comparing the position information of each pixel with the position information of the calibration pixel corresponding to the calibration point, respectively, to obtain a scaling ratio corresponding to each calibration pixel, wherein the number of the scaling ratios is the same as the number of the calibration pixels;
[0020] Using each of the scaling ratios to scale the calibration pixel points, respectively, to obtain position information of the scaled calibration pixel points;
[0021] According to the error between the scaled calibrated pixel points and the pixel points, a scaling ratio corresponding to the minimum error is determined, and the scaling ratio corresponding to the minimum error is the scaling error.
[0022] According to one aspect of an embodiment of the present application, the calibration pixels form a calibration dot matrix, the error data includes a scaling error, and the position information of the calibration pixels is corrected according to the error data to obtain the calibration position information of the calibration pixels, including:
[0023] Find the calibration pixel point closest to the center of the calibration point array as the scaling reference point;
[0024] Determining the distance between adjacent calibration pixels according to the scaling error;
[0025] According to the distance between the scaling reference point and the adjacent calibration pixel points, the calibration position information of the remaining calibration pixel points is determined in turn.
[0026] According to one aspect of an embodiment of the present application, the error data includes an offset error, and the correcting the position information of the calibration pixel point according to the error data to obtain the calibration position information of the calibration pixel point includes:
[0027] The calibration pixel point is moved according to the offset error to obtain calibration position information of the calibration pixel point.
[0028] According to one aspect of an embodiment of the present application, the error data includes a rotation error, and the position information of the pixel point is compared with the position information of the calibration pixel point corresponding to the calibration point to obtain at least one error data, including:
[0029] Taking a specific point of the pixel array as a pixel reference point, obtaining a reference coordinate of any pixel point;
[0030] Taking a specific point of the calibration dot matrix as a calibration reference point, obtaining a reference coordinate of a calibration pixel point corresponding to the pixel point;
[0031] According to the reference coordinates of the pixel point and the reference coordinates of the calibration pixel point, a rotation angle of the calibration pixel point around the calibration reference point is calculated as the rotation error.
[0032] According to one aspect of an embodiment of the present application, the error data includes a rotation error, and the correcting the position information of the calibration pixel point according to the error data to obtain the calibration position information of the calibration pixel point includes:
[0033] Rotating the calibration pixel point around the center of the calibration dot matrix according to the rotation error;
[0034] The calibration position information of the calibration pixel point is calculated according to the rotated calibration pixel point.
[0035] According to one aspect of an embodiment of the present application, the laser processing according to the updated positional relationship between the calibration point and the calibration pixel point includes:
[0036] Obtaining a current processing height corresponding to the calibration image;
[0037] Establishing a mapping relationship between the updated positional relationship between the calibration point and the calibration pixel point and the current processing height;
[0038] Determining the positional relationship between a point on the target processing height and a calibration pixel point according to the target processing height of the material to be processed and the mapping relationship;
[0039] The material to be processed is processed according to the positional relationship between the point at the target processing height and the calibration pixel point.
[0040] According to an aspect of an embodiment of the present application, after updating the positional relationship between the calibration point and the calibrated pixel point, the method further includes:
[0041] Displaying the calibration image on a target page;
[0042] Auxiliary lines are displayed on the calibration image of the target page, and the auxiliary lines are used to assist the user in placing the pattern to be processed and / or the material to be processed.
[0043] According to an aspect of an embodiment of the present application, acquiring a calibration image of a calibration point includes:
[0044] driving a movable head at a first position in a working space to machine and form a first calibration point, wherein the movable head is slidably disposed on a slide rail of a numerical control machine;
[0045] Moving the movable head to a second position in the working space by means of the slide rail, and forming a second calibration point by machining the movable head at the second position;
[0046] The calibration image is acquired by a camera device in the working space, wherein the camera device is fixed on the numerical control machine.
[0047] According to one aspect of an embodiment of the present application, it is characterized in that the CNC machine includes a shell, the shell forms the working space, the shell carries the slide rail, and the movable head moves in the working space through the slide rail to transmit electromagnetic energy.
[0048] According to one aspect of an embodiment of the present application, the present application provides a numerical control machine, the numerical control machine comprising:
[0049] Slide rails;
[0050] a movable head, the movable head being slidably disposed on the slide rail;
[0051] A communication component, the communication component is used to receive the laser processing signal obtained by any of the methods described above; and
[0052] A controller is provided for controlling the movable head to move on the slide rail to process the material to be processed based on the laser processing signal.
[0053] According to one aspect of an embodiment of the present application, the present application provides a computing system, the computing system comprising at least one numerical control machine and at least one processor;
[0054] The processor is used to execute the steps of any one of the above methods;
[0055] The numerical control machine transmits electromagnetic energy to a processing material disposed inside the numerical control machine based on the laser processing signal obtained by the processor.
[0056] According to one aspect of an embodiment of the present application, the present application provides a computer-readable storage medium having computer-readable instructions stored thereon. When the computer-readable instructions are executed by a processor of a computer, the computer executes any one of the above-described image calibration methods.
[0057] In the image calibration method implemented in the embodiment of the present application, a calibration image of the calibration point is first obtained; based on the calibration image, the calibration pixel points are scaled, rotated, and offset, and the positional relationship between the calibration point and the calibration pixel points is updated; laser processing is performed based on the updated positional relationship between the calibration point and the calibration pixel points. Thus, the error existing in the calibration pixel points can be clarified by comparing the direct position of the pixel points mapped by the calibration point and the calibration pixel points, and the positional relationship between the calibration point and the calibration pixel points is updated based on this, thereby reducing the error. This helps to alleviate the problem of reduced processing accuracy of the CNC machine caused by errors in the calibration relationship of the CNC machine, and can accurately obtain the position information of the material to be processed in the processing format, so as to accurately process the material to be processed.
[0058] Other features and advantages of the present application will become apparent from the following detailed description, or may be learned in part by the practice of the present application.
[0059] It should be understood that the foregoing general description and the following detailed description are exemplary only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0060] The above and other objects, features and advantages of the present application will become more apparent by describing in detail exemplary embodiments thereof with reference to the attached drawings.
[0061] Figure 1 A system architecture diagram applied according to an embodiment of the present application is shown.
[0062] Figure 2 A flow chart of an image calibration method according to an embodiment of the present application is shown.
[0063] Figure 3 A flow chart showing at least one of scaling, rotating and shifting the calibrated pixels of the calibration image according to an embodiment of the present application is shown.
[0064] Figure 4 A flowchart is shown for determining position information of pixel points mapped by calibration points on a calibration image based on a calibration image according to an embodiment of the present application.
[0065] Figure 5A calibration image according to one embodiment of the present application is shown.
[0066] Figure 6 A flow chart of comparing the position information of a pixel point with the position information of a calibrated pixel point corresponding to a calibration point to obtain a scaling error according to an embodiment of the present application is shown.
[0067] Figure 7 A flow chart of correcting the position information of the calibration pixel points according to the scaling error to obtain the calibration position information of the calibration pixel points according to an embodiment of the present application is shown.
[0068] Figure 8 A schematic diagram showing a scaling error between a calibration dot matrix and a pixel dot matrix according to an embodiment of the present application is shown.
[0069] Fig. 9 A schematic diagram of sequentially redetermining calibration position information of calibrated pixel points according to scaling errors according to an embodiment of the present application is shown.
[0070] Fig.10 A schematic diagram showing an offset error between a calibration dot matrix and a pixel dot matrix according to an embodiment of the present application is shown.
[0071] Fig.11 A flow chart of comparing the position information of a pixel point with the position information of a calibrated pixel point corresponding to a calibration point to obtain a rotation error according to an embodiment of the present application is shown.
[0072] Fig.12 A flow chart of correcting the position information of the calibration pixel points according to the rotation error to obtain the calibration position information of the calibration pixel points according to an embodiment of the present application is shown.
[0073] Fig.13 A schematic diagram showing a rotation error between a calibration dot matrix and a pixel dot matrix according to an embodiment of the present application is shown.
[0074] Fig.14 A flow chart of laser processing according to the positional relationship between updated calibration points and calibrated pixel points according to one embodiment of the present application is shown.
[0075] Fig.15 A flow chart of displaying auxiliary lines on a target page according to an embodiment of the present application is shown.
[0076] Fig.16 A schematic diagram of target page auxiliary lines according to an embodiment of the present application is shown.
[0077] Fig.17 A flow chart of acquiring a calibration image of a calibration point according to an embodiment of the present application is shown.
[0078] Fig.18 A schematic structural diagram of a numerical control machine configured to acquire a standard image according to an embodiment of the present application is shown.
[0079] Fig.19 A hardware structure diagram of a numerical control machine for implementing a machining calibration method according to an embodiment of the present application is shown. DETAILED DESCRIPTION
[0080] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in a variety of forms and should not be construed as limited to the examples set forth herein; rather, these example embodiments are provided so that the description of the present application will be more comprehensive and complete and the concepts of the example embodiments will be fully conveyed to those skilled in the art. The accompanying drawings are only schematic illustrations of the present application and are not necessarily drawn to scale. The same reference numerals in the figures represent the same or similar parts, and thus their repeated description will be omitted.
[0081] In addition, the described features, structures or characteristics may be combined in one or more example embodiments in any suitable manner. In the following description, many specific details are provided to provide a full understanding of the example embodiments of the present application. However, those skilled in the art will appreciate that the technical solution of the present application may be practiced while omitting one or more of the specific details, or other methods, components, steps, etc. may be adopted. In other cases, known structures, methods, implementations or operations are not shown or described in detail to avoid obscuring the present application and making the various aspects of the present application obscure.
[0082] Some of the blocks shown in the accompanying drawings are functional entities that do not necessarily correspond to physically or logically independent entities. These functional entities can be implemented in software form, or in one or more hardware modules or integrated circuits, or in different networks and / or processor devices and / or microcontroller devices.
[0083] See also Figure 1 , Figure 1 This is a system architecture diagram used in an embodiment of the present application. The system architecture may include: at least one external device 11, such as a host computer, and a numerical control machine 12 facing each external device 11. It should be understood that Figure 1 The number of external devices 11 in the embodiment is only for illustration. Any number of external devices 11 may be provided according to implementation requirements.
[0084] Some technical solutions of the embodiments of the present application can be based on Figure 1 The system architecture shown or its variant architecture is used for specific implementation.
[0085] The processing calibration of the CNC machine described in this application is aimed at the situation that the calibration file based on which the CNC machine measures the processing object during processing is inaccurate. By calibrating the calibration file, the CNC machine can perform precise processing.
[0086] The calibration file contains the calibration relationship between the measurement point and the calibration pixel point mapped to it. When the CNC machine processes the processing object, the light source configured by the CNC machine is driven to illuminate the point on the processing object that needs to be measured to form a light spot, which is the measurement point. The camera device configured by the CNC machine is driven to take a picture of the measurement point to obtain a measurement image, and the area where the measurement point graphic is displayed in the measurement image is the calibration pixel point. Specifically, the calibration relationship refers to the linear function relationship between the measurement point coordinate information and the calibration pixel point position information. In other words, the measurement point coordinate information can be obtained by substituting the calibration pixel point position information into the calibration relationship.
[0087] The coordinate information of the measurement point refers to the position of the measurement point in the mechanical coordinate system constructed by the CNC machine. The CNC machine uses any point in the calibration image as a reference point, calculates the distance between the calibration pixel point in the calibration image and the reference point, and obtains the calibration pixel point position information based on the distance between the calibration pixel point and the reference point.
[0088] So far, the measurement based on the calibration relationship has been explained. When measuring the processing object, it is only necessary to obtain the position information of the calibration pixel points mapped to the measurement points on the processing object based on the measurement image; then the position information of the calibration pixel points is substituted into the calibration relationship for calculation, so that the coordinate information of the measurement points can be obtained, and the CNC machine will realize accurate processing of the processing object based on the coordinate information of the measurement points.
[0089] This convenient and quick measurement method is based on the calibration relationship. The parameter values in the calibration relationship are affected by the relative position relationship between the light source and the camera device. The light source and the camera device are both hardware devices required for the CNC machine to measure the processing object. When the CNC machine is in the process of transportation or use, once the relative position relationship between the light source and the camera device changes, the parameter values in the calibration relationship will no longer be adapted to the current changed relative position relationship between the light source and the camera device, which will lead to errors in the calibration relationship. The measurement performed thereby will also have errors, which will make the CNC machine unable to perform precise processing.
[0090] In view of the change in the relative position relationship between the light source and the camera device in the CNC machine, it is necessary to correct the calibration relationship and re-adapt the relative position relationship between the light source and the camera device at this time. In the CNC machine, several points with clear known coordinate information are used as calibration points. First, the calibration points are printed to obtain the existing calibration points, and the calibration images are obtained for the calibration points; the pixels mapped by each calibration point are identified in the calibration image, and the position information of the pixels mapped by each calibration point is calculated. The pixel position information mapped by the calibration point is compared with the position information of the calibration pixel points corresponding to the calibration point in the calibration file, and the error of the calibration pixel position information can be obtained, that is, the error of the calibration file. Then, according to the error of this calibration file, the calibration relationship between the calibration point and the calibration pixel points is updated, that is, the update of the calibration file is completed, and an accurate calibration file is obtained. It should be clarified that the calibration file refers to the carrier that records the position relationship between the calibration point and the calibration pixel points, including but not limited to the json file.
[0091] It is further clarified that, as used herein, "camera" includes, for example, a visible light camera, a black and white camera, an infrared or ultraviolet sensitive camera, a separate brightness sensor such as a photodiode, a sensitive photon detector such as a photomultiplier tube or an avalanche photodiode, a detector of infrared radiation beyond the visible spectrum, such as microwaves, X-rays or gamma rays, an optically filtered detector, a spectrometer and other detectors, which may include a source of electromagnetic radiation for illumination to assist in acquisition, such as a flash, UV illumination, etc.
[0092] See also Figure 2 , Figure 2 A flowchart of an image calibration method according to an embodiment of the present application is shown. The present application embodiment provides a processing calibration method, including:
[0093] Step S210, obtaining a calibration image of the calibration point;
[0094] Step S220, performing at least one of scaling, rotating, and shifting on the calibration pixel points according to the calibration image, and updating the positional relationship between the calibration point and the calibration pixel points;
[0095] Step S230, laser processing is performed according to the positional relationship between the updated calibration points and the calibrated pixel points.
[0096] These three steps are described in detail below.
[0097] In step S210, when calibrating the CNC machine, it is necessary to first clarify the current measurement error of the CNC machine. Based on this, the CNC machine first performs calibration point printing, and calibration point printing is the execution process of printing points of preset coordinates by the CNC machine. The calibration points are points printed by the machine and the shape is not limited, which can be solid circles, hollow circles, squares, stars, triangles, etc. It can be completed by the actuator in the CNC machine. For example, the CNC machine drives its actuator for processing to emit a laser to the preset coordinates to the calibration part, and the processing marks formed on the calibration part are used as calibration points, such as circular burning marks, circular cutting marks, etc.
[0098] It should be clear that calibration parts are items for printing calibration points, including but not limited to white paper, iron plates, etc.
[0099] The calibration points have corresponding calibration pixels in the calibration file. The calibration images are obtained by photographing the calibration points. The calibration images must have a graphical display of the calibration points. The calibration images show the area of the calibration points, and the mapping of the calibration points to the pixels is realized. It should be clear that the calibration images can be obtained through the camera device of the CNC machine; they can also be obtained through a mobile phone, which communicates with the host computer and transmits the images to the host computer.
[0100] It is further clarified that the above-mentioned actuators include but are not limited to lasers, cutting tools and engraving tools, etc. The term "laser" as used herein includes any electromagnetic radiation or focused or coherent energy source, which (in the context of a cutting tool) uses photons to modify a substrate or cause some changes or changes in the material hit by the photons. The laser (whether a cutting tool or a diagnostic tool) can be of any desired wavelength, including, for example, microwaves, lasers, infrared lasers, visible light lasers, UV lasers, X-ray lasers, ray lasers, etc.
[0101] In step S220, the position information of each pixel is obtained, and the pixel position information is compared with the calibration pixel position information corresponding to the calibration point in the pre-configured calibration file. Based on the pixel position information, it is determined whether the calibration pixel needs to be scaled, rotated, or offset, or one or more of the above processing is required, and the calibration pixel is processed.
[0102] See also Figure 3 , Figure 3 A flowchart of performing at least one of scaling, rotating, and shifting the calibration pixel points according to a calibration image according to an embodiment of the present application is shown. The embodiment of the present application provides that the steps of performing at least one of scaling, rotating, and shifting the calibration pixel points according to the calibration image include:
[0103] Step S221, determining, according to the calibration image, position information of a pixel point mapped by the calibration point on the calibration image, where there is at least one pixel point;
[0104] Step S222, comparing the position information of the pixel point with the position information of the calibration pixel point corresponding to the calibration point to obtain at least one error data;
[0105] Step S223, correcting the position information of the calibration pixel points according to the error data to obtain the calibration position information of the calibration pixel points.
[0106] These three steps are described in detail below.
[0107] In step S221, the CNC machine completes the printing of calibration points through a preconfigured printing execution process, i.e., a processing program. For the calibration points printed, the number is preferably more than two, so as to ensure accurate identification of scaling errors under the action of more than two calibration points, and then perform calibration for scaling errors.
[0108] By analogy, the number of calibration points is at least one, but when it is greater than one, several calibration points form a dot matrix, which can fully adapt to many types of error data such as scaling errors, thereby enhancing the universality of processing calibration.
[0109] After the calibration points are printed, the dot matrix formed by the calibration points can be photographed by a camera device configured by the CNC machine to obtain a calibration image.
[0110] After acquiring the calibration image, the pixels in the calibration image are identified to determine which areas in the calibration image display the graphics of the calibration points. These areas can be regarded as the pixels mapped by the calibration points in the calibration image. The pixels are the same as the calibration points, and there is at least one. Further, based on the relative position relationship between the pixels and the relative position relationship between the calibration points, the pixels mapped by all calibration points can be known. Exemplarily, if a calibration point is located in the upper left corner of the calibration dot matrix formed in reality, the pixel mapped by the calibration point is in the upper left corner of the dot matrix composed of the pixels, so as to determine the one-to-one correspondence between the calibration points and the pixels, and obtain the pixels mapped by each calibration point.
[0111] Take any point in the calibration image as the origin reference point to obtain the position information of the pixel. For example, take the center of the calibration image as the origin reference point, calculate the distance of the pixel relative to the origin reference point according to the calculation function installed in the CNC machine, in units of pixels or millimeters (mm), etc., and obtain the position information of the pixel mapped by the calibration point on the calibration image according to the distance between the pixel and the origin reference point.
[0112] See also Figure 4 , Figure 4A flowchart of determining the position information of the pixel points mapped by the calibration points on the calibration image according to an embodiment of the present application is shown. The embodiment of the present application provides a step S221 of determining the position information of the pixel points mapped by the calibration points on the calibration image according to the calibration image, including:
[0113] Step S301, performing threshold segmentation on the calibration image to filter the pixel points mapped by each calibration point in the calibration image to obtain the filter points that meet the threshold requirements;
[0114] Step S302, generating a plurality of screening dot matrices composed of screening points, wherein the screening dot matrices have the same number of rows and columns as the calibration dot matrices;
[0115] Step S303, searching for a screening dot matrix having the same characteristic information as the calibration dot matrix among the plurality of screening dot matrices, and forming a pixel dot matrix with each screening point in the obtained screening dot matrix as a pixel point.
[0116] These three steps are described in detail below.
[0117] In step S301, threshold segmentation of the obtained calibration image means graying the calibration image first, and converting the calibration image into a gray image. At this time, each point of the gray calibration image has a gray value, and the gray value represents the gray depth of the color and brightness of each point in the image. Figure 5 , Figure 5 FIG. 1 shows a calibration image according to an embodiment of the present application. Figure 5 The color and brightness of the visible pixel in the gray calibration image are obviously different from the background in the gray calibration image. Therefore, a grayscale threshold that can distinguish the pixel from the background is set to distinguish the pixel from the background in the gray calibration image. Through multiple experiments, it is easy to find what grayscale value can be used as a threshold to screen out pixels in the gray calibration image.
[0118] However, since the current technology level cannot always accurately identify pixels, points that do not belong to pixels will be screened out when performing threshold segmentation on the calibration image, resulting in other points that do not belong to pixels being obtained while obtaining all pixels. In this case, all points are first updated to filter points so that the pixels in the filter points can be filtered out through the following steps.
[0119] In step S302, since the pixel points are the mapping of the calibration points on the calibration image, the pixel points can also form the same dot matrix as the calibration dot matrix array. Therefore, among all the screening points, a screening dot matrix composed of screening points with the same rows and columns as the calibration dot matrix is found to obtain several screening dot matrices. Since the screening points must include all the pixel points, there must be a screening dot matrix in the obtained screening dot matrix that is completely composed of pixel points.
[0120] For example, in obtaining the screening dot matrix, if the calibration dot matrix is a 3×4 rectangular dot matrix, then a 3×4 rectangular dot matrix is also searched in the screening dot matrix as the screening dot matrix, and at least one screening dot matrix can be obtained. And among the obtained screening dot matrices, there must be one screening dot matrix that is completely composed of pixel points.
[0121] In step S303, a screening dot matrix having the same characteristic information as the calibration dot matrix is searched in the obtained screening dot matrix, and the characteristic information refers to the distance between each dot in the dot matrix, the size of each dot, etc., and a screening dot matrix having the same characteristic information as the calibration dot matrix is obtained, that is, a screening dot matrix composed entirely of pixel points is obtained, and the screening dot matrix is updated to a pixel dot matrix. According to the position of each pixel point in the pixel dot matrix in the calibration image, the position information of the pixel points mapped on the calibration image can be obtained.
[0122] In the embodiment of the present application, the pixels in the calibration image are determined based on the principle that the color of the pixels in the calibration image is different from the background color, and the pixel matrix is highly similar to the calibration matrix. Double screening ensures the accuracy of the pixels. On the premise that the position of the pixels in the calibration image is relatively clear, the availability of the position information of the pixels in the calibration image is also ensured.
[0123] In step S222, after obtaining the position information of each pixel point, the pixel point position information is compared with the calibration pixel point position information corresponding to the calibration point in the pre-configured calibration file, and the error data of the calibration pixel point position information is obtained based on the pixel point position information. The obtained error data is used to adjust the position information of the calibration pixel point.
[0124] For example, in one embodiment of the present application, the types of error data include rotation error, offset error, and scaling error, which correspond to the accidental rotation, translation, and vertical movement of the camera device or the execution structure during transportation or processing, respectively forming rotation error, offset error, and scaling error. The following method can be used to calculate and classify the error data.
[0125] The calibrated pixel points and pixel position information can be expressed in the form of (a, b).
[0126] For the offset error, the intersection of the diagonal of the calibration dot matrix and the calibration dot matrix is taken as the center, and the position information of their centers is obtained and compared. If they are consistent, there is no offset error. If they are inconsistent, there is an offset error. The offset error is calculated based on their center position information.
[0127] For scaling error, calculate the distance m between the calibration points and the distance n between the calibration points. If m and n are the same, there is no scaling error. If m and n are not the same, there is a scaling error. Calculate the scaling error based on the values of m and n.
[0128] For rotation error, select any point in the calibration dot matrix that does not coincide with the center of the calibration dot matrix as the calibration dot matrix error point, and connect the calibration dot matrix error point and the center of the calibration dot matrix with a straight line to obtain line segment L. Find a point in the calibration dot matrix that corresponds to the calibration dot matrix error point as the calibration dot matrix error point, and connect the calibration dot matrix error point and the center of the calibration dot matrix with a straight line to obtain line segment M. Determine whether line segment L and line segment M are parallel. If they are parallel, there is no rotation error. If they are not parallel, there is a rotation error. Calculate the rotation error based on the angle between line segment L and the straight line where line segment M is located.
[0129] It is further explained that before comparing the pixel position information with the calibration pixel position information corresponding to the calibration point in the pre-configured calibration file, it is necessary to obtain the calibration pixel position information corresponding to the calibration point in the calibration file according to the coordinate information of the calibration point. The coordinate information refers to the position of the calibration point in the mechanical coordinate system established by the CNC machine.
[0130] See also Figure 6 , Figure 6 A flowchart of comparing the position information of a pixel point with the position information of a calibration pixel point corresponding to a calibration point to obtain a scaling error according to an embodiment of the present application is shown. The embodiment of the present application provides a step S222 of comparing the position information of a pixel point with the position information of a calibration pixel point corresponding to a calibration point to obtain a scaling error, including:
[0131] Step S401, respectively comparing the position information of each pixel with the position information of the calibration pixel corresponding to the calibration point to obtain the scaling ratio corresponding to each calibration pixel, where the number of scaling ratios is the same as the number of calibration pixels;
[0132] Step S402, scaling the calibration pixel points using each scaling ratio to obtain position information of the scaled calibration pixel points;
[0133] Step S403, determining the scaling ratio corresponding to the minimum error according to the error between the scaled calibrated pixel point and the pixel point, the scaling ratio corresponding to the minimum error is the scaling error.
[0134] The above three steps are described in detail below.
[0135] In step S401, the position information of each pixel point is compared with the position information of the calibration pixel point corresponding to the calibration point, so as to obtain the scaling ratio between each pixel point and its corresponding calibration pixel point, and the scaling ratio is equal to the number of calibration pixels.
[0136] In step S402, according to all the obtained scaling ratios, each scaling ratio is substituted into each calibrated pixel point, and each calibrated pixel point is scaled, so that the scaled calibrated pixel point corresponding to each scaling ratio can be obtained, that is, the position information of each scaled calibrated pixel point can be obtained.
[0137] In step S403, the position information of the scaled calibrated pixel is compared with the position information of the pixel to obtain the error of the scaling ratio. The error of the scaling ratio is used to measure the scaling effect of each calibrated pixel under various scaling ratios. The smaller the error of the scaling ratio, the better the scaling effect, so the scaling ratio corresponding to the minimum error is used as the scaling error.
[0138] In the embodiment of the present application, the scaling ratio of each calibration pixel is calculated and the scaling ratio is brought into other calibration pixels to determine the effects of various scaling ratios on eliminating scaling errors in turn, and then the scaling ratio with the best elimination effect is used as the scaling error. This method determines the final scaling error by analyzing more scaling ratios, making the accuracy of the scaling error higher.
[0139] In step S223, the calibration pixel position information in the calibration file is corrected according to the acquired error data to obtain the calibration position information of the calibration pixel. When eliminating the errors of the calibration pixel points according to the error data, it is preferred to eliminate the scaling error, followed by eliminating the offset error, and finally eliminating the rotation error. Prioritizing the elimination of scaling errors can make the size of the calibration dot matrix consistent with the pixel dot matrix, thereby avoiding the need to calculate the impact of scaling errors when eliminating offset errors and rotation errors. The offset error takes precedence over the rotation error, avoiding the need to calculate the impact of the offset error when eliminating the rotation error. It is further explained that the order of eliminating errors includes but is not limited to the above-mentioned error elimination order.
[0140] In an embodiment of the present application, by comparing the positions of the pixels mapped by the calibration points and the calibration pixels directly, the errors existing in the calibration pixels are clarified, and based on this, the positional relationship between the calibration points and the calibration pixels is updated, thereby improving the efficiency of eliminating the errors of the calibration pixels and more efficiently updating the positional relationship between the calibration points and the calibration pixels.
[0141] See also Figure 7 , Figure 7The flowchart of correcting the position information of the calibration pixel points according to the scaling error to obtain the calibration position information of the calibration pixel points according to one embodiment of the present application is shown. The calibration pixel points form a calibration dot matrix. The embodiment of the present application provides a step S223 of correcting the position information of the calibration pixel points according to the scaling error to obtain the calibration position information of the calibration pixel points, including:
[0142] Step S501, finding the calibration pixel point closest to the center of the calibration point array as the scaling reference point;
[0143] Step S502, determining the distance between adjacent calibration pixels according to the scaling error;
[0144] Step S503: determining calibration position information of other calibration pixels in sequence according to the position of the scaling reference point and the distance between adjacent calibration pixels.
[0145] These three steps are described in detail below.
[0146] See also Figure 8 , Figure 8 A schematic diagram showing a scaling error between a calibration dot matrix and a pixel dot matrix according to an embodiment of the present application is shown. It should be clear that the dot matrix is embodied as a grid in the figure in order to compare the calibration dot matrix with the pixel dot matrix.
[0147] In step S501, the scaling error refers to the change in the distance between the calibration pixels in the calibration matrix, and the center of the calibration matrix has not moved, so at this time, it is only necessary to find the center of the calibration matrix, and then rearrange the calibration pixels according to the accurate distance between the calibration pixels. It should be clear that the calibration matrix obtained is a rectangle. According to the principle of geometry, the intersection of the diagonals of the rectangle is the center of the rectangle, that is, the intersection of the diagonals of the calibration matrix is the center of the calibration matrix. When there is a calibration pixel at the center of the calibration matrix, the calibration pixel is set as the scaling reference point. If there is no calibration pixel at the center of the calibration matrix, the center is directly used as the scaling reference point. The purpose is to determine the position of other calibration pixels in the calibration matrix by the position of the scaling reference point and the scaling error in the following steps.
[0148] In step S502, when the distance between adjacent calibration pixels is determined according to the scaling error, the orientation between the calibration pixels is not changed. Exemplarily, a calibration coordinate system is established with the center of the calibration dot matrix as the scaling reference point, and the coordinate information of the calibration pixel is (0, 1), and its distance is 1, and the direction is the y-axis direction. The coordinate information of the calibration pixel is determined to be (0, 2) according to the scaling error, that is, the distance changes from the original 1 to 2, and the direction remains unchanged in the y-axis direction.
[0149] In step S503, the position of the calibration pixel points adjacent to the scaling reference point is determined based on the position of the scaling reference point and the distance between the adjacent calibration pixel points. Based on the calibration pixel points whose positions have been determined, the positions of other calibration pixel points adjacent to the calibration pixel points whose positions have been determined are confirmed until the positions of all calibration pixel points have been determined.
[0150] In an embodiment of the present application, if it is necessary to randomly find a scaling reference point such as the upper left corner when scaling, and then follow the rest of the positions, this may cause the error in the lower right corner to become larger and larger. Therefore, in an embodiment of the present application, the calibration pixel point closest to the center of the calibration dot matrix is used as the scaling reference point to reduce the error of each calibration pixel point and better eliminate the scaling error of the calibration pixel point.
[0151] See also Fig. 9 , Fig. 9 A schematic diagram showing a calibration position information of a calibration pixel point is sequentially re-determined according to a scaling error according to an embodiment of the present application. Fig. 9 As shown, the calibration position information of the calibrated pixel points is re-determined in sequence using the method described in step S501 to step S503.
[0152] In one embodiment of the present application, see Fig.10 , Fig.10 A schematic diagram showing an offset error between a calibration dot matrix and a pixel dot matrix according to an embodiment of the present application is shown. When the error data is an offset error, the position information of each calibration pixel in the calibration dot matrix is corrected according to the offset error to obtain the calibration position information of each calibration pixel in the calibration dot matrix. The offset error is not only a horizontal movement, but also includes movement in the up and down directions. For example, when the offset error is a horizontal movement, in the coordinate system where the calibration pixel is located, the known offset error is an offset of amm in the x-axis direction and a offset of bmm in the y-axis direction. If the coordinates of the calibration pixel are (x, y), then after correction according to the error data, the position of the calibration pixel is (xa, yb).
[0153] When the error data is an offset error, the position information of each calibration pixel in the calibration dot matrix is corrected according to the offset error to obtain the calibration position information of each calibration pixel in the calibration dot matrix. For example, in the coordinate system where the calibration pixel is located, the offset error is known to be an offset amm in the x-axis direction and an offset bmm in the y-axis direction. The coordinates of the calibration pixel are (x, y), then after correction according to the error data, the position of the calibration pixel is (xa, yb).
[0154] In the embodiment of the present application, the calibration pixel points are moved directly according to the offset error to obtain the calibration position information of the calibration pixel points, thereby improving the efficiency of eliminating the rotation error of the calibration pixel points.
[0155] See also Fig.11 , Fig.11 A flowchart of comparing the position information of a pixel point with the position information of a calibration pixel point corresponding to a calibration point to obtain a rotation error according to an embodiment of the present application is shown. The embodiment of the present application provides a step S222 of comparing the position information of a pixel point with the position information of a calibration pixel point corresponding to a calibration point to obtain a rotation error, including:
[0156] Step S601, taking a specific point of the pixel array as a pixel reference point, obtaining a reference coordinate of any pixel point;
[0157] Step S602, taking a specific point of the calibration dot matrix as a calibration reference point, obtaining a reference coordinate of a calibration pixel point corresponding to the pixel point;
[0158] Step S603 , calculating the rotation angle of the calibrated pixel around the calibrated reference point according to the reference coordinates of the pixel and the reference coordinates of the calibrated pixel as the rotation error.
[0159] The above three steps are described in detail below.
[0160] In step S601, a pixel point is randomly selected, and a specific point of the pixel matrix is used as a pixel reference point, that is, a specific point of the pixel matrix is used as an origin, and the position information of the pixel point is obtained as a reference coordinate.
[0161] In step S602, a calibration pixel point is randomly selected, and a specific point of the calibration dot matrix is used as a calibration reference point, that is, the specific point of the calibration dot matrix is used as the origin, and the position information of the pixel point is obtained as a reference coordinate.
[0162] It should be clear that the specific point of the pixel matrix and the specific point of the calibration matrix can be the center point, or a point at a specific position such as the upper left corner, upper right corner, lower left corner, or lower right corner. However, the specific point of the pixel matrix and the specific point of the calibration matrix are at the same position in the matrix, for example, both are at the upper left corner.
[0163] In step S603, according to the reference coordinates of the pixel point and the reference coordinates of the calibrated pixel point, the rotation angle of the calibrated pixel point around the calibrated reference point can be calculated by a preset mathematical formula as the rotation error.
[0164] The formula is as follows:
[0165] m=x*cosθ-y*sinθ
[0166] n=x*sinθ+y*cosθ
[0167]
[0168]
[0169] Wherein, (x, y) is the reference coordinate of the calibration pixel point, (m, n) is the reference coordinate of the pixel point, and θ is the rotation angle of the calibration pixel point around the calibration reference point, that is, the rotation error. In the embodiment of the present application, when calculating the rotation error in the above manner, the rotation error can be calculated directly using the easily available calculation conditions of the reference coordinate of the calibration pixel point and the reference coordinate of the pixel point, which greatly reduces the difficulty of calculating the rotation error.
[0170] See also Fig.12 , Fig.12 The flowchart of correcting the position information of the calibration pixel points according to the rotation error to obtain the calibration position information of the calibration pixel points according to one embodiment of the present application is shown. The embodiment of the present application provides a step S223 of correcting the position information of the calibration pixel points according to the rotation data to obtain the calibration position information of the calibration pixel points, including:
[0171] Step S701, rotating the calibration pixel point around the center of the calibration point array according to the rotation error;
[0172] Step S702, calculating calibration position information of the calibration pixel points according to the rotated calibration pixel points.
[0173] The above two steps are described in detail below.
[0174] In step S701, refer to Fig.13 , Fig.13 A schematic diagram showing a rotation error between a calibration dot matrix and a pixel dot matrix according to an embodiment of the present application is shown. It is further clarified that when the error data is a rotation error, the rotation amount required to correct the calibration dot matrix is calculated based on the rotation error as the rotation error. The diagonal of the calibration dot matrix is used as the calibration dot matrix center, and each calibration pixel point in the calibration dot matrix is rotated around the calibration dot matrix center according to the above rotation amount.
[0175] In step S702, the calibration position information of each calibration pixel in the calibration dot matrix is calculated according to the position of the rotated calibration pixel.
[0176] Directly rotating the calibration pixel around the center of the calibration dot matrix based on the rotation error can more directly and conveniently obtain the calibration position information of the calibration pixel, thereby improving the efficiency of eliminating the rotation error of the calibration pixel.
[0177] In step S230, the positional relationship between the calibration points and the calibration pixels in the calibration file, ie, the calibration relationship, is updated according to the calibration position information of the calibration pixels, so as to obtain a calibration file composed of the calibration relationship.
[0178] It is further clarified that calibration points of different heights and their corresponding calibration pixels are stored in the calibration file. However, in the present application, the calibration points printed to the calibration image, in order to reduce the amount of calculation in the calibration process and shorten the calibration time, therefore, when printing the calibration points, the CNC machine will print the calibration points on the calibration piece of the set height, obtain the calibration image and the corresponding pixels of the calibration points, and correct the position information of the calibration pixels at the set height according to the error between the pixel position information and the calibration pixels, and obtain the accurate calibration pixel position information at the set height. At the set height, according to the calibration point coordinate information and the calibration position information between its corresponding calibration pixels, the calibration relationship between the calibration points and their corresponding calibration pixels is updated. It is further explained that the calibration relationship can be a functional relationship, and the calibration relationship can be applied to all heights by simply correcting the parameters of the calibration relationship according to the position relationship between the calibration points at the set height and their corresponding calibration pixels. The calibration relationship corresponding to each calibration point in the calibration file is updated, and the update of the calibration file is completed. According to the position information of the calibrated pixel points after calibration and the position information of the calibration points corresponding to each calibrated pixel point, the position relationship between each calibration point and its corresponding calibration pixel point is updated.
[0179] It should be clarified that the calibration file described above refers to a carrier for recording the positional relationship between calibration points and calibration pixel points, which includes but is not limited to a json file.
[0180] In step S240, according to the positional relationship between the updated calibration points and the calibrated pixel points, and the processing trajectory generated in the CNC machine, the moving trajectory of the CNC machine actuator is determined to process the material to be processed.
[0181] It can be seen from steps S210 to S240 that the present application can clarify the errors existing in the calibration pixels by comparing the positions of the pixels mapped by the calibration points and the calibration pixels, and based on this, update the positional relationship between the calibration points and the calibration pixels to eliminate the errors, thereby efficiently solving the problem of reduced CNC machine processing accuracy caused by errors in the calibration relationship of the CNC machine.
[0182] See also Fig.14 , Fig.14 A flowchart of laser processing according to the positional relationship between the updated calibration points and the calibration pixel points according to an embodiment of the present application is shown. The embodiment of the present application provides a step S240 of laser processing according to the positional relationship between the updated calibration points and the calibration pixel points, including:
[0183] Step S241, obtaining the current processing height corresponding to the calibration image;
[0184] Step S242, establishing a mapping relationship between the positional relationship between the updated calibration point and the calibration pixel point and the current processing height;
[0185] Step S243, determining the positional relationship between the point on the target processing height and the calibration pixel point according to the target processing height of the material to be processed and the mapping relationship;
[0186] Step S244, processing the material to be processed according to the positional relationship between the point at the target processing height and the calibration pixel point.
[0187] The above four steps are described in detail below.
[0188] In step S241, the current processing height corresponding to the calibration image is determined according to the height of the calibration piece. In an embodiment of the present application, the calibration piece may be a material to be processed, and may also be used as the calibration piece when used for calibration.
[0189] In step S242, a mapping relationship is established between the positional relationship between the later calibration point and the calibration pixel point and the current processing height, that is, the positional relationship between the later calibration point and the calibration pixel point corresponds to the current processing height.
[0190] In step S243, the target processing height of the material to be processed refers to the height at which the material to be processed is processed. According to the recorded positional relationship between the calibration point and the calibration pixel point, the positional relationship between the calibration point and the calibration pixel point at the target processing height is determined.
[0191] In step S244, according to the processing trajectory generated in the CNC machine and the positional relationship between the calibration point and the calibration pixel point at the target processing height, the movement trajectory of the CNC machine actuator is determined to process the material to be processed.
[0192] In an embodiment of the present application, based on the positional relationship between the calibration points and their corresponding calibration pixel points, the conversion of coordinates between the target page and the processed material can be directly realized. The virtual processing trajectory can be directly designed on the target page of the CNC machine, and then the actual processing trajectory on the material to be processed can be obtained based on the positional relationship between the calibration points and the calibration pixel points, thereby greatly improving the processing efficiency of the material to be processed.
[0193] See also Fig.15 , Fig.15 A flowchart of displaying auxiliary lines on a target page according to an embodiment of the present application is shown. The embodiment of the present application provides steps of displaying auxiliary lines on a target page, including:
[0194] Step S801, displaying a calibration image on a target page;
[0195] Step S802: displaying auxiliary lines on the calibration image of the target page, the auxiliary lines being used to assist the user in placing the pattern to be processed and / or the material to be processed.
[0196] The above two steps are described in detail below.
[0197] In step S801, the calibration image is displayed on the target image.
[0198] In step S802, if Fig.16 , Fig.16 A schematic diagram of auxiliary lines of a target page according to an embodiment of the present application is shown. Auxiliary lines are displayed on the calibration image of the target page, and the auxiliary lines are used to assist the user in placing the pattern to be processed and / or the material to be processed. The calibration image describes the picture of the material to be processed. Displaying auxiliary lines on the calibration image helps the user to more intuitively observe the placement position of the material to be processed, and thus can assist the user in placing the material to be processed.
[0199] At the same time, displaying auxiliary lines on the calibration image helps the user to more intuitively observe the processing position of the pattern to be processed on the material to be processed, thereby assisting the user in placing the pattern to be processed.
[0200] In the embodiment of the present application, auxiliary lines are displayed on the calibration image displayed on the target page, so that the user can more conveniently place the pattern to be processed and / or the material to be processed, which greatly improves the user experience.
[0201] See also Fig.17 , Fig.17 A flow chart of obtaining a calibration image of a calibration point according to an embodiment of the present application is shown. The present application embodiment provides a step S210 of obtaining a standard image of a calibration point, including:
[0202] Step S901, driving a movable head at a first position in a working space to process and form a first calibration point, wherein the movable head is slidably disposed on a slide rail of a numerical control machine;
[0203] Step S902, moving the movable head to a second position of the working space by means of a slide rail, and forming a second calibration point by machining the movable head at the second position;
[0204] Step S903, acquiring a calibration image through a camera device in the workspace, wherein the camera device is fixed on the CNC machine.
[0205] The above three steps are described in detail below.
[0206] In step S901, a movable head located at a first position in the working space of the numerical control machine is driven to process and form a first calibration point, wherein the movable head is slidably arranged on a slide rail of the numerical control machine. The slide rail includes a first track and a second track, and the first track and the second track are perpendicular to each other. It should be clarified that the first position is any position that the movable head can reach in the working space. The movable head can be the execution structure itself used for processing, which moves in the working space through the slide rail to transfer electromagnetic energy. Such as the laser described above. It can also be a bearing member that carries the execution structure of the numerical control machine, carrying the actuator to move in the working space through the slide rail, and the actuator transfers electromagnetic energy in the working space. Among them, the numerical control machine includes a shell, and the space formed by the shell is the working space. The shell carries the slide rail, and the movable head moves in the working space through the slide rail to transfer electromagnetic energy.
[0207] In step S902, the slide rail is controlled to move the movable head to a second position in the workspace, and a second calibration point is formed by machining the movable head at the second position. The second position refers to the position where the movable head needs to be located for machining the second calibration point, which is a known position.
[0208] In step S903, until all the preset calibration points are engraved, the camera device is controlled to take pictures. It should be clear that the camera device can be located in the working space of the CNC machine, and the CNC machine can directly control the camera device to take pictures. In addition, the camera device can also be a mobile terminal camera device or an external camera device, which can be detachably fixed in the working space of the CNC machine. The CNC machine controls the camera device of the mobile terminal or the external camera device to take pictures by wired and / or wireless means.
[0209] See also Fig.18 , Fig.18 A schematic structural diagram of a numerical control machine configured to acquire a standard image according to an embodiment of the present application is shown.
[0210] In this embodiment, the CNC machine 100 includes a shell, the space formed by the shell is a working space, the shell carries a slide rail, the slide rail includes a first rail 61 and a second rail 62, and the first rail 61 and the second rail 62 are perpendicular to each other.
[0211] The second rail 62 is slidably connected to the first rail 61, and the second rail 62 can slide relative to the first rail 61 along the extension direction of the first rail 61. The movable head 40 is slidably connected to the second rail 62, and the movable head 40 can slide relative to the second rail 62 along the extension direction of the second rail 62.
[0212] The movable head 40 moves in the working space via a slide rail to transmit electromagnetic energy, such as emitting laser to perform laser processing on a workpiece.
[0213] In one embodiment of the present application, a camera device (not shown) is disposed in the working space formed by the housing 63 .
[0214] In this embodiment, the carrying assembly 40 and the execution structure 20 are carried on the second track 62 for processing operations such as printing, engraving, and cutting.
[0215] Specifically, the numerical control machine 100 further includes a housing 63, a working space is formed in the housing 63, and the second rail 62 is received in the processing space of the housing 63 and carried by the housing 63. The second rail 62 can move along the first rail 61 in the third direction D3 and the opposite direction thereof, so as to enable the movable head 40 to move in the third direction D3 to measure distance or process the surface to be processed.
[0216] The first guide rail 61 is accommodated in the processing space of the shell 63 and is supported by the shell 63, and the first guide rail 61 is slidably connected to the second guide rail 62. The second guide rail 62 can drive the movable head 40 to move along the second guide rail 62 in the first direction D1 and the opposite direction, so as to realize the movement of the movable head 40 in the first direction D1 to measure or process the object to be processed.
[0217] In addition, the CNC machine 100 further includes a cover plate 64, which is made of a transparent material, so that the operator can observe the working condition of the bearing assembly 40 through the cover plate 64, and can filter and block the laser to prevent the laser from causing harm to the operator. For example, the material of the cover plate 64 can be, but is not limited to, polycarbonate, optical resin, or polymethyl methacrylate.
[0218] The image calibration method according to the embodiment of the present application can be performed by Fig.19 It is realized by CNC machines. Fig.19 The hardware structure diagram of a numerical control machine for implementing a machining calibration method according to an embodiment of the present application is shown. Fig.19 To describe a numerical control machine according to an embodiment of the present application. Fig.19 The CNC machine shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.
[0219] like Fig.19 As shown, the CNC machine may be in the form of a general-purpose computing device. The components of the CNC machine may include, but are not limited to: at least one processing unit 810, at least one storage unit 820, and a bus 830 connecting different system components (including the storage unit 820 and the processing unit 810).
[0220] The storage unit stores program codes, which can be executed by the processing unit 810, so that the processing unit 810 performs the steps according to various exemplary embodiments of the present invention described in the description of the exemplary method described above in this specification. For example, the processing unit 810 can perform the following steps: Figure 2 The steps shown in .
[0221] The storage unit 820 may include a readable medium in the form of a volatile storage unit, such as a random access memory unit (RAM) 8201 and / or a cache memory unit 8202 , and may further include a read-only memory unit (ROM) 8203 .
[0222] The storage unit 820 may also include a program / utility 8204 having a set (at least one) of program modules 8205, such program modules 8205 including but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment.
[0223] Bus 830 may represent one or more of several types of bus structures, including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.
[0224] The CNC machine can also communicate with one or more external devices 700 (e.g., keyboards, pointing devices, Bluetooth devices, mobile phones, etc.), and can also communicate with one or more devices that enable users to interact with the CNC machine, and / or communicate with any device that enables the CNC machine to communicate with one or more other computing devices (e.g., routers, modems, etc.). Such communication can be performed through an input / output (I / O) interface 850. In addition, the CNC machine can also communicate with one or more networks (e.g., local area networks (LANs), wide area networks (WANs) and / or public networks, such as the Internet) through a network adapter 860. As shown, the network adapter 860 communicates with other modules of the point cloud camera 12 through a bus 830. It should be understood that, although not shown in the figure, other hardware and / or software modules can be used in conjunction with the CNC machine, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.
[0225] Through the description of the above implementation methods, it is easy for those skilled in the art to understand that the example implementation methods described here can be implemented by software or by combining software with necessary hardware. Therefore, the technical solution according to the implementation methods of the present application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which can be a personal computer, a server, a terminal device, or a network device, etc.) to execute the method according to the implementation methods of the present application.
[0226] In an exemplary embodiment of the present application, a computer program medium is further provided, on which computer-readable instructions are stored. When the computer-readable instructions are executed by a processor of a computer, the computer executes the method described in the above method embodiment.
[0227] According to one embodiment of the present application, a program product for implementing the method in the above method embodiment is also provided, which can adopt a portable compact disk read-only memory (CD-ROM) and include program code, and can be run on a terminal device, such as a personal computer. However, the program product of the present invention is not limited to this. In this document, a readable storage medium can be any tangible medium containing or storing a program, which can be used by or in combination with an instruction execution system, an apparatus or a device.
[0228] The program product may use any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples (non-exhaustive list) of readable storage media include: an electrical connection with one or more wires, a portable 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.
[0229] Computer readable signal media may include data signals propagated in baseband or as part of a carrier wave, in which readable program code is carried. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Readable signal media may also be any readable medium other than a readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.
[0230] The program code embodied on the readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wired, optical cable, RF, etc., or any suitable combination of the foregoing.
[0231] Program code for performing the operations of the present invention may be written in any combination of one or more programming languages, including object-oriented programming languages such as Java, C++, etc., and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as a separate software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server. In cases involving a remote computing device, the remote computing device may be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device (e.g., through the Internet using an Internet service provider).
[0232] It should be noted that, although several modules or units of the equipment for action execution are mentioned in the above detailed description, this division is not mandatory. In fact, according to the embodiments of the present application, the features and functions of two or more modules or units described above can be embodied in one module or unit. On the contrary, the features and functions of one module or unit described above can be further divided into being embodied by multiple modules or units.
[0233] In addition, although the steps of the method in the present application are described in a specific order in the drawings, this does not require or imply that the steps must be performed in this specific order, or that all the steps shown must be performed to achieve the desired results. Additionally or alternatively, some steps may be omitted, multiple steps may be combined into one step, and / or one step may be decomposed into multiple steps, etc.
[0234] Through the description of the above implementation methods, it is easy for those skilled in the art to understand that the example implementation methods described here can be implemented by software or by combining software with necessary hardware. Therefore, the technical solution according to the implementation methods of the present application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which can be a personal computer, a server, a mobile terminal, or a network device, etc.) to execute the method according to the implementation methods of the present application.
[0235] Those skilled in the art will readily appreciate other embodiments of the present application after considering the specification and practicing the inventions applied for herein. The present application is intended to cover any modification, use or adaptation of the present application, which follows the general principles of the present application and includes common knowledge or customary techniques in the art that the present application does not apply for. The specification and embodiments are intended to be exemplary only, and the true scope and spirit of the present application are indicated by the appended claims.
Claims
1. An image calibration method, characterized in that: The method comprises: Get a calibration image of the calibration points; According to the calibration image, at least one of scaling, rotating and shifting is performed on the calibration pixel points to update the positional relationship between the calibration point and the calibration pixel points; Laser processing is performed according to the updated positional relationship between the calibration points and the calibrated pixel points.
2. The method according to claim 1, characterized in that The step of performing at least one of scaling, rotating, and shifting the calibrated pixel points according to the calibration image includes: Determine, according to the calibration image, position information of a pixel point mapped by the calibration point on the calibration image, where the number of the pixel point is at least one; Comparing the position information of the pixel point with the position information of the calibration pixel point corresponding to the calibration point to obtain at least one error data; The position information of the calibration pixel point is corrected according to the error data to obtain the calibration position information of the calibration pixel point.
3. The method according to claim 2, characterized in that The step of determining, according to the calibration image, position information of pixel points mapped by the calibration points on the calibration image comprises: By performing threshold segmentation on the calibration image, the pixel points mapped by each calibration point in the calibration image are screened to obtain the screening points that meet the threshold requirements; Generating a plurality of screening point matrices composed of the screening points, wherein the screening point matrices have the same number of rows and columns as the calibration point matrix; A screening dot matrix having the same characteristic information as the calibration dot matrix is found among a plurality of screening dot matrices, and a pixel dot matrix is formed by taking each screening point in the obtained screening dot matrix as a pixel point.
4. The method according to claim 2, characterized in that: The error data includes a scaling error, and the position information of the pixel point is compared with the position information of the calibration pixel point corresponding to the calibration point to obtain at least one error data, including: Comparing the position information of each pixel with the position information of the calibration pixel corresponding to the calibration point, respectively, to obtain a scaling ratio corresponding to each calibration pixel, wherein the number of the scaling ratios is the same as the number of the calibration pixels; Using each of the scaling ratios to scale the calibration pixel points, respectively, to obtain position information of the scaled calibration pixel points; According to the error between the scaled calibrated pixel points and the pixel points, a scaling ratio corresponding to the minimum error is determined, and the scaling ratio corresponding to the minimum error is the scaling error.
5. The method according to claim 2 or 4, characterized in that: The calibration pixel points form a calibration dot matrix, the error data includes a scaling error, and the position information of the calibration pixel points is corrected according to the error data to obtain the calibration position information of the calibration pixel points, including: Find the calibration pixel point closest to the center of the calibration point array as the scaling reference point; Determining the distance between adjacent calibration pixels according to the scaling error; According to the distance between the scaling reference point and the adjacent calibration pixel points, the calibration position information of the remaining calibration pixel points is determined in turn.
6. The method according to claim 2, characterized in that The error data includes an offset error, and the correcting the position information of the calibration pixel point according to the error data to obtain the calibration position information of the calibration pixel point includes: The calibration pixel point is moved according to the offset error to obtain calibration position information of the calibration pixel point.
7. The method according to claim 3, characterized in that The error data includes a rotation error, and the position information of the pixel point is compared with the position information of the calibration pixel point corresponding to the calibration point to obtain at least one error data, including: Taking a specific point of the pixel array as a pixel reference point, obtaining a reference coordinate of any pixel point; Taking a specific point of the calibration dot matrix as a calibration reference point, obtaining a reference coordinate of a calibration pixel point corresponding to the pixel point; According to the reference coordinates of the pixel point and the reference coordinates of the calibration pixel point, a rotation angle of the calibration pixel point around the calibration reference point is calculated as the rotation error.
8. The method according to claim 2 or 7, characterized in that: The error data includes a rotation error, and the correcting the position information of the calibration pixel point according to the error data to obtain the calibration position information of the calibration pixel point includes: Rotating the calibration pixel point around the center of the calibration dot matrix according to the rotation error; The calibration position information of the calibration pixel point is calculated according to the rotated calibration pixel point.
9. The method according to claim 1, characterized in that: The laser processing according to the updated positional relationship between the calibration point and the calibration pixel point comprises: Obtaining a current processing height corresponding to the calibration image; Establishing a mapping relationship between the updated positional relationship between the calibration point and the calibration pixel point and the current processing height; Determining the positional relationship between a point on the target processing height and a calibration pixel point according to the target processing height of the material to be processed and the mapping relationship; The material to be processed is processed according to the positional relationship between the point at the target processing height and the calibration pixel point.
10. The method according to claim 1, characterized in that After updating the positional relationship between the calibration point and the calibrated pixel point, the method further includes: Displaying the calibration image on a target page; Auxiliary lines are displayed on the calibration image of the target page, and the auxiliary lines are used to assist the user in placing the pattern to be processed and / or the material to be processed.
11. The method according to claim 1, characterized in that: The step of obtaining a calibration image of a calibration point comprises: driving a movable head at a first position in a working space to machine and form a first calibration point, wherein the movable head is slidably disposed on a slide rail of a numerical control machine; Moving the movable head to a second position in the working space by means of the slide rail, and forming a second calibration point by machining the movable head at the second position; The calibration image is acquired by a camera device in the working space, wherein the camera device is fixed on the numerical control machine.
12. The method according to claim 11, characterized in that The numerical control machine comprises a housing, the housing forming the working space, the housing carrying the slide rail, and the movable head moves in the working space via the slide rail to transmit electromagnetic energy.
13. A numerically controlled machine, characterized in that: The CNC machine comprises: Slide rails; a movable head, the movable head being slidably disposed on the slide rail; A communication component, the communication component is used to receive the laser processing signal obtained by the method according to any one of claims 1-12; and A controller is provided for controlling the movable head to move on the slide rail to process the material to be processed based on the laser processing signal.
14. A computing system, characterized in that: The computing system includes at least one numerically controlled machine and at least one processor; The processor is used to perform the steps of the method according to any one of claims 1 to 12; The numerical control machine transmits electromagnetic energy to a processing material disposed inside the numerical control machine based on the laser processing signal obtained by the processor.
15. A computer-readable storage medium, characterized in that: Computer-readable instructions are stored thereon, and when the computer-readable instructions are executed by a processor of a computer, the computer is caused to execute the image calibration method according to any one of claims 1 to 12.
Citation Information
Cited By
Image printing data generation method, device and system and storage medium
CN119806444A
