Distortion correction method and device of ultra-wide-angle camera and electronic equipment

By acquiring and utilizing the distortion correction parameters of an ultra-wide-angle camera, image distortion captured by the ultra-wide-angle camera in the laser engraving machine is eliminated, solving the problem of low engraving accuracy and achieving higher engraving precision.

CN120823133APending Publication Date: 2025-10-21SHENZHEN YUANYIN TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510852667.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-23
Publication Date
2025-10-21

AI Technical Summary

Technical Problem

Laser engraving machines use ultra-wide-angle cameras to capture images of the engraving area, resulting in severe distortion and affecting engraving accuracy.

Method used

By acquiring the distortion correction parameters of the ultra-wide-angle camera, including the distortion coordinate matrix and the standard coordinate matrix, calibration is performed using a calibration board to generate a corrected image and eliminate image distortion.

Benefits of technology

It improves the image quality of the engraving area and enhances the engraving precision of the laser engraving machine.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120823133A_ABST
    Figure CN120823133A_ABST
Patent Text Reader

Abstract

The invention is suitable for the technical field of lasers, and provides a distortion correction method and device for an ultra-wide-angle camera and electronic equipment, and the method comprises the steps: obtaining a to-be-corrected image corresponding to a to-be-engraved material collected by the ultra-wide-angle camera in a laser engraving machine; distortion correction parameters corresponding to the ultra-wide-angle camera are obtained, the distortion correction parameters comprise a distortion coordinate matrix and a standard coordinate matrix corresponding to each angular point in a reference image, and the reference image is a calibration plate image collected by the ultra-wide-angle camera; and correcting the to-be-corrected image according to the distortion coordinate matrix and the standard coordinate matrix to generate a corrected image corresponding to the to-be-engraved material. Therefore, each pixel point in the to-be-corrected image is corrected to the correct position according to the pre-stored distortion correction matrix and the standard coordinate matrix, and image distortion generated during shooting of the ultra-wide-angle camera is eliminated, so that the image quality of the engraving breadth is improved, and the engraving precision of the laser engraving machine is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the field of laser technology, and in particular relates to a distortion correction method, device, electronic device, storage medium and computer program product for an ultra-wide-angle camera. Background Art

[0002] A laser engraving machine is an advanced device that uses lasers to engrave materials. Unlike mechanical engraving machines and other traditional manual engraving methods, laser engraving machines use the heat energy of lasers to engrave materials. The laser within the laser engraver is its core. Generally speaking, laser engraving machines have a wider range of applications, higher engraving accuracy, and faster engraving speeds.

[0003] In related technologies, laser engraving machines typically use a camera to capture image data of the entire engraving area when engraving materials. However, due to the limited space of the laser engraving machine and the need to capture the entire engraving area through the camera, an ultra-wide-angle camera must be used. However, due to the severe distortion of ultra-wide-angle cameras, the captured image of the engraving area is severely distorted, which in turn affects the engraving accuracy of the laser engraving machine. Summary of the Invention

[0004] The embodiments of the present application provide a method, device, electronic device, storage medium, and computer program product for distortion correction of an ultra-wide-angle camera, which can solve the problem that the engraving format image captured by a laser engraving machine using an ultra-wide-angle camera is severely distorted, thereby affecting the engraving accuracy of the laser engraving machine.

[0005] In a first aspect, an embodiment of the present application provides a distortion correction method for an ultra-wide-angle camera, comprising: obtaining an image to be corrected corresponding to a material to be engraved, which is captured by an ultra-wide-angle camera in a laser engraving machine; obtaining distortion correction parameters corresponding to the ultra-wide-angle camera, wherein the distortion correction parameters include a distortion coordinate matrix and a standard coordinate matrix corresponding to each corner point in a reference image, and the reference image is an image of a calibration plate captured by the ultra-wide-angle camera; performing correction processing on the image to be corrected according to the distortion coordinate matrix and the standard coordinate matrix to generate a corrected image corresponding to the material to be engraved.

[0006] In a possible implementation of the first aspect, the correction processing of the image to be corrected based on the distortion coordinate matrix and the standard coordinate matrix to generate a corrected image corresponding to the material to be engraved includes:

[0007] Determine the reference pixel points in the image to be corrected according to the distortion coordinate matrix;

[0008] Using each reference pixel as a corner point of a sub-image block to divide the image to be corrected into multiple sub-image blocks;

[0009] Performing perspective transformation on each sub-image block according to the corner point coordinates and the standard coordinate matrix corresponding to each sub-image block to generate a corrected sub-image block corresponding to each sub-image block;

[0010] The corrected sub-image blocks are stitched together to generate a corrected image.

[0011] Optionally, in another possible implementation of the first aspect, after the image to be corrected is corrected according to the distortion coordinate matrix and the standard coordinate matrix to generate a corrected image corresponding to the material to be engraved, the method further includes:

[0012] Get the reference shooting height corresponding to the ultra-wide-angle camera and the thickness of the material to be engraved;

[0013] Determine the zoom ratio of the corrected image based on the reference shooting height and the thickness of the material to be engraved;

[0014] The corrected image is scaled according to the scaling ratio.

[0015] Optionally, in another possible implementation of the first aspect, determining the scaling ratio corresponding to the corrected image based on the reference shooting height and the thickness of the material to be engraved includes:

[0016] Determine the difference between the reference shooting height and the thickness of the material to be engraved according to the reference shooting height and the thickness of the material to be engraved;

[0017] The ratio of the reference shooting height to the difference is determined as the scaling ratio corresponding to the corrected image.

[0018] Optionally, in another possible implementation of the first aspect, before obtaining the image to be corrected corresponding to the material to be engraved captured by the ultra-wide-angle camera in the laser engraving machine, the method further includes:

[0019] The reference image corresponding to the calibration plate is captured by an ultra-wide-angle camera, where the calibration plate contains multiple black and white squares;

[0020] Extract corner points of the reference image to determine the coordinates of the distorted corner points corresponding to each square;

[0021] Generate a distortion coordinate matrix based on the coordinates of the distortion corner points corresponding to each square;

[0022] Determine the coordinates of the standard corner points corresponding to each square based on the distance between the ultra-wide-angle camera and the calibration plate and the size of the squares;

[0023] Generate a standard coordinate matrix based on the standard corner point coordinates corresponding to each square;

[0024] The distortion coordinate matrix and the standard coordinate matrix are stored in the laser engraving machine as distortion correction parameters.

[0025] Optionally, in yet another possible implementation of the first aspect, determining the coordinates of the standard corner points corresponding to each square based on the distance between the ultra-wide-angle camera and the calibration plate and the size of the squares includes:

[0026] Determine the number of pixels per unit length based on the distance between the ultra-wide-angle camera and the calibration plate;

[0027] According to the size of the square and the number of pixels per unit length, the standard corner coordinates corresponding to each square are determined.

[0028] In the second aspect, an embodiment of the present application provides a distortion correction device for an ultra-wide-angle camera, including: a first acquisition module, used to obtain an image to be corrected corresponding to the material to be engraved, which is captured by the ultra-wide-angle camera in the laser engraving machine; a second acquisition module, used to obtain distortion correction parameters corresponding to the ultra-wide-angle camera, wherein the distortion correction parameters include a distortion coordinate matrix and a standard coordinate matrix corresponding to each corner point in the reference image, and the reference image is an image of a calibration plate captured by the ultra-wide-angle camera; a correction module, used to correct the image to be corrected according to the distortion coordinate matrix and the standard coordinate matrix to generate a corrected image corresponding to the material to be engraved.

[0029] In a possible implementation of the second aspect, the correction module includes:

[0030] A first determining unit, configured to determine a reference pixel point in the image to be corrected according to the distortion coordinate matrix;

[0031] a dividing unit, configured to use each reference pixel point as a corner point of a sub-image block to divide the image to be corrected into a plurality of sub-image blocks;

[0032] a first generating unit, configured to perform perspective transformation on each sub-image block according to the corner point coordinates corresponding to each sub-image block and the standard coordinate matrix, so as to generate a corrected sub-image block corresponding to each sub-image block;

[0033] The second generating unit is configured to perform splicing processing on the corrected sub-image blocks to generate a corrected image.

[0034] Optionally, in another possible implementation of the second aspect, the distortion correction device for the ultra-wide-angle camera further includes:

[0035] The third acquisition module is used to obtain the reference shooting height corresponding to the ultra-wide-angle camera and the thickness of the material to be engraved;

[0036] A first determining module is used to determine the scaling ratio corresponding to the corrected image according to the reference shooting height and the thickness of the material to be engraved;

[0037] The scaling module is used to scale the corrected image according to the scaling ratio.

[0038] Optionally, in another possible implementation of the second aspect, the first determining module includes:

[0039] a second determining unit, configured to determine a difference between the reference shooting height and the thickness of the material to be engraved according to the reference shooting height and the thickness of the material to be engraved;

[0040] The third determining unit is configured to determine the ratio of the reference shooting height to the difference as the scaling ratio corresponding to the corrected image.

[0041] Optionally, in yet another possible implementation of the second aspect, the distortion correction device for the ultra-wide-angle camera further includes:

[0042] An acquisition module is used to acquire a reference image corresponding to a calibration plate using an ultra-wide-angle camera, wherein the calibration plate contains a plurality of black and white squares;

[0043] The second determination module is used to extract corner points of the reference image to determine the coordinates of the distorted corner points corresponding to each square;

[0044] A first generating module is used to generate a distortion coordinate matrix according to the coordinates of the distortion corner points corresponding to each square;

[0045] The third determination module is used to determine the coordinates of the standard corner points corresponding to each square according to the distance between the ultra-wide-angle camera and the calibration plate and the size of the square;

[0046] The second generation module is used to generate a standard coordinate matrix according to the standard corner point coordinates corresponding to each square;

[0047] The storage module is used to store the distortion coordinate matrix and the standard coordinate matrix as distortion correction parameters in the laser engraving machine.

[0048] Optionally, in yet another possible implementation of the second aspect, the third determining module includes:

[0049] a fourth determining unit, configured to determine the number of pixels corresponding to a unit length according to the distance between the ultra-wide-angle camera and the calibration plate;

[0050] The fifth determining unit is configured to determine the coordinates of the standard corner points corresponding to each square according to the size of the square and the number of pixels corresponding to the unit length.

[0051] In a third aspect, an embodiment of the present application provides an electronic device, comprising: a memory, a processor, and a computer program stored in the memory and runnable on the processor, wherein when the processor executes the computer program, the distortion correction method for the ultra-wide-angle camera as described above is implemented.

[0052] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the distortion correction method for the ultra-wide-angle camera as described above is implemented.

[0053] In a fifth aspect, an embodiment of the present application provides a computer program product. When the computer program product is run on an electronic device, the electronic device executes the distortion correction method for the ultra-wide-angle camera as described above.

[0054] Compared with the prior art, the embodiments of the present application have the following beneficial effects: the ultra-wide-angle camera in the laser engraving machine is calibrated in advance using a calibration plate to determine the distortion coordinate matrix and the standard coordinate matrix of the reference image corresponding to the calibration plate, and stored as distortion correction parameters. After the image to be corrected corresponding to the material to be engraved is acquired, each pixel point in the image to be corrected is corrected to the correct position according to the pre-stored distortion correction matrix and the standard coordinate matrix, thereby eliminating the image distortion generated when the ultra-wide-angle camera is shooting, thereby improving the image quality of the engraving format, and further improving the engraving accuracy of the laser engraving machine. BRIEF DESCRIPTION OF THE DRAWINGS

[0055] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the embodiments or descriptions of the prior art. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0056] Figure 1 1 is a flow chart of a method for correcting distortion of an ultra-wide-angle camera according to an embodiment of the present application;

[0057] Figure 2 is a schematic diagram of a reference image corresponding to a calibration plate provided in one embodiment of the present application;

[0058] Figure 3 This is a schematic diagram of an image to be corrected corresponding to a material to be engraved provided in one embodiment of the present application;

[0059] Figure 4 is a schematic diagram of corner points in a reference image provided by an embodiment of the present application;

[0060] Figure 5 This is a schematic diagram of corner points corresponding to a calibration plate provided in one embodiment of the present application;

[0061] Figure 6 This is a schematic diagram of dividing an image to be corrected into sub-image blocks provided by an embodiment of the present application;

[0062] Figure 7 is a schematic diagram of a corrected image provided by an embodiment of the present application;

[0063] Figure 8 is a schematic diagram of the shooting range of the ultra-wide-angle camera provided in one embodiment of the present application;

[0064] Figure 9 1 is a schematic structural diagram of a distortion correction device for an ultra-wide-angle camera provided in one embodiment of the present application;

[0065] Figure 10 It is a structural diagram of an electronic device provided in one embodiment of the present application. DETAILED DESCRIPTION

[0066] In the following description, specific details such as specific system structures and techniques are provided for purposes of illustration rather than limitation to facilitate a thorough understanding of the embodiments of the present application. However, it will be apparent to those skilled in the art that the present application may be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to avoid obscuring the description of the present application with unnecessary detail.

[0067] It should be understood that when used in the present specification and the appended claims, the term "comprising" indicates the presence of described features, integers, steps, operations, elements and / or components, but does not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or collections thereof.

[0068] It will also be understood that the term "and / or" used in this specification and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.

[0069] As used in this specification and the appended claims, the term "if" can be interpreted as "when" or "upon" or "in response to determining" or "in response to detecting," depending on the context. Similarly, the phrase "if it is determined" or "if [described condition or event] is detected" can be interpreted as meaning "upon determination" or "in response to determining" or "upon detection of [described condition or event]" or "in response to detecting [described condition or event]," depending on the context.

[0070] In addition, in the description of the present application specification and the appended claims, the terms "first", "second", "third", etc. are only used to distinguish the descriptions and cannot be understood as indicating or implying relative importance.

[0071] References to "one embodiment" or "some embodiments" in this specification mean that a particular feature, structure, or characteristic described in conjunction with that embodiment is included in one or more embodiments of the present application. Thus, phrases such as "in one embodiment," "in some embodiments," "in other embodiments," and "in other embodiments" appearing in various places in this specification do not necessarily refer to the same embodiment, but rather mean "one or more but not all embodiments," unless otherwise specifically emphasized. The terms "including," "comprising," "having," and variations thereof all mean "including but not limited to," unless otherwise specifically emphasized.

[0072] The following describes in detail the distortion correction method, device, electronic device, storage medium and computer program for the ultra-wide-angle camera provided in this application with reference to the accompanying drawings.

[0073] Figure 1 A flow chart of a distortion correction method for an ultra-wide-angle camera provided in an embodiment of the present application is shown.

[0074] like Figure 1 As shown, the distortion correction method of the ultra-wide-angle camera includes the following steps:

[0075] Step 101: obtaining an image to be calibrated corresponding to a material to be engraved, which is captured by an ultra-wide-angle camera in a laser engraving machine.

[0076] It should be noted that the distortion correction method for the ultra-wide-angle camera of the embodiment of the present application can be performed by the distortion correction device for the ultra-wide-angle camera of the embodiment of the present application. The distortion correction device for the ultra-wide-angle camera of the embodiment of the present application can be configured in any electronic device equipped with an ultra-wide-angle camera to perform the distortion correction method for the ultra-wide-angle camera of the embodiment of the present application. For example, the distortion correction device for the ultra-wide-angle camera of the embodiment of the present application can be configured in a laser engraving machine equipped with an ultra-wide-angle camera to perform distortion correction on the image captured by the ultra-wide-angle camera in the laser engraving machine, thereby improving the engraving accuracy of the laser engraving machine.

[0077] In an embodiment of the present application, when a laser engraving machine is engraving an engraving material, it is usually necessary to collect image data of the entire engraving format through a camera, and determine the specific engraving position based on the collected image data of the engraving material and the engraving parameters set by the user, so as to achieve engraving of the engraving material. However, since the laser engraving machine is limited by the small space of the equipment, it is necessary to capture the image of the entire engraving format through a camera. Since the distance between the camera and the engraving material is very limited, an ultra-wide-angle camera must be used. However, since the distortion of the ultra-wide camera is very serious, the collected engraving format image is seriously distorted, which in turn affects the engraving accuracy of the laser engraving machine. Therefore, in order to improve the engraving accuracy of the laser engraving machine, an embodiment of the present application proposes an ultra-wide-angle camera distortion correction method suitable for space-constrained equipment such as a laser engraving machine.

[0078] like Figure 2 As shown in FIG. 1 , an image of a calibration plate captured by an ultra-wide-angle camera in a laser engraving machine provided in an embodiment of the present application is a rectangular calibration plate comprising a plurality of black and white squares. Figure 2 It can be seen from the figure that the calibration plate in the image has been significantly deformed, that is, the calibration plate image is distorted.

[0079] The material to be engraved may refer to a material currently placed in a laser engraving machine that needs to be engraved, such as a wood board, leather, etc., which is not limited in this embodiment of the present application.

[0080] The image to be corrected may refer to an image of the material to be engraved captured by an ultra-wide-angle camera in a laser engraving machine.

[0081] In the embodiment of the present application, since the laser engraving machine needs to engrave according to the image of the material to be engraved, after the user places the material to be engraved, sets the engraving parameters, and starts the laser engraving machine for engraving, the ultra-wide-angle camera in the laser engraving machine can be driven to capture the image of the material to be engraved, that is, to capture the image to be corrected, so as to perform distortion correction on the image to be corrected in subsequent steps. Figure 3 As shown, this is a schematic diagram of the image to be corrected captured by an ultra-wide-angle camera. It can be seen that the material to be engraved in the image is obviously distorted.

[0082] It should be noted that Figure 3 The calibration plate below the material to be engraved may not exist during the actual engraving process. It is only used to highlight the position of the material to be engraved to facilitate observation and understanding of the image.

[0083] Step 102: Obtain distortion correction parameters corresponding to the ultra-wide-angle camera, wherein the distortion correction parameters include a distortion coordinate matrix and a standard coordinate matrix corresponding to each corner point in a reference image, and the reference image is a calibration plate image captured by the ultra-wide-angle camera.

[0084] The distortion correction parameters may be parameters generated by calibrating an ultra-wide-angle camera in the laser engraving machine before the laser engraving machine is officially put into use, and pre-stored in a storage medium of the laser engraving machine.

[0085] Among them, the calibration plate used for calibrating the ultra-wide-angle camera in the embodiment of the present application can be a calibration plate including multiple black and white squares.

[0086] The reference image may refer to an image captured by an ultra-wide-angle camera in the laser engraving machine when the calibration plate is placed at a position where the laser engraving machine should place the engraving material.

[0087] The corner points in the reference image can be the pixel points corresponding to the vertices of each square in the reference image, such as Figure 4 shown.

[0088] The distortion coordinate matrix may be a matrix composed of pixel coordinates of each corner point determined by performing corner point extraction on the reference image. In other words, the distortion coordinate matrix includes the pixel coordinates of each corner point in the calibration plate after distortion.

[0089] The standard coordinate matrix can be a matrix consisting of the theoretical pixel coordinates of the corner points of each square in the undistorted image, determined based on the distance between the ultra-wide-angle camera and the calibration plate and the size of each square in the calibration plate. In other words, the standard coordinate matrix represents the exact pixel coordinates of each corner point on the Boahan calibration plate when it is undistorted.

[0090] In an embodiment of the present application, after the image to be corrected corresponding to the material to be engraved is acquired, the pre-stored distortion coordinate matrix and standard coordinate matrix can be obtained to correct the image to be corrected according to the distortion coordinate matrix and the standard coordinate matrix.

[0091] Furthermore, before the laser engraving machine is put into use, or before the laser engraving machine leaves the factory, a calibration plate can be used to calibrate the ultra-wide-angle camera of the laser engraving machine, and the distortion correction parameters generated after calibration can be stored in the storage medium of the laser engraving machine so that they can be called at any time during the use of the laser engraving machine to achieve image distortion correction of the material to be engraved. That is, in a possible implementation of the embodiment of the present application, before the above step 101, the following steps may also be included:

[0092] The reference image corresponding to the calibration plate is captured by an ultra-wide-angle camera, where the calibration plate contains multiple black and white squares;

[0093] Extract corner points of the reference image to determine the coordinates of the distorted corner points corresponding to each square;

[0094] Generate a distortion coordinate matrix based on the coordinates of the distortion corner points corresponding to each square;

[0095] Determine the coordinates of the standard corner points corresponding to each square based on the distance between the ultra-wide-angle camera and the calibration plate and the size of the squares;

[0096] Generate a standard coordinate matrix based on the standard corner point coordinates corresponding to each square;

[0097] The distortion coordinate matrix and the standard coordinate matrix are stored in the laser engraving machine as distortion correction parameters.

[0098] The coordinates of the distortion corner points may be the pixel coordinates of the vertices of each square in the target plate in the reference image.

[0099] The standard corner point coordinates may be the theoretical pixel coordinates of the vertices of each square in the target plate when the image is not distorted.

[0100] As a possible implementation method, a calibration plate containing multiple black and white squares can be used to calibrate the ultra-wide-angle camera to facilitate corner point extraction. When calibrating the ultra-wide-angle camera of a laser engraving machine, the calibration plate can be placed in the engraving material placement position of the laser engraving machine, and the ultra-wide-angle camera can be driven to capture a reference image corresponding to the calibration plate. Afterwards, a corner point extraction algorithm is used to extract the corner points of the reference image to determine the pixel coordinates of each corner point (i.e., the vertices of each square) contained in the reference image in the reference image, i.e., the distorted corner point coordinates. Then, based on the order of the distorted corner point coordinates in the reference image, a distorted coordinate matrix is ​​generated.

[0101] For example, if Figure 4 As shown in the figure, when performing corner point extraction on a reference image, only the corner points inside the reference image can be extracted, while the corner points around the reference image are removed. Assuming that the calibration plate used during calibration contains m×n squares (i.e., m rows and n columns of squares), (m-1)×(n-1) distorted corner point coordinates can be extracted from the reference image during corner point extraction. That is, there are m-1 rows and n-1 columns of distorted corner point coordinates in the reference image, thus generating an (m-1)×(n-1)-dimensional distorted coordinate matrix. Each element in the distorted coordinate matrix is ​​the pixel coordinate of the corresponding corner point in the reference image.

[0102] It should be noted that, in actual use, when performing corner point extraction on a reference image, any corner point extraction algorithm may be used for corner point extraction, and this embodiment of the present application does not limit this. For example, indChessboardCorners in the Open Source Computer Vision Library (opencv) may be used for corner point extraction.

[0103] As a possible implementation method, after extracting the coordinates of each distorted corner point in the reference image, the standard pixel coordinates corresponding to the vertices of each square when no image distortion occurs can be determined to generate a standard coordinate matrix. Since when capturing an image, if the distance between the camera and the object is known and the camera parameters are known, the theoretical pixel coordinates of the object in the image can be determined. Since the distance between the ultra-wide-angle camera and the calibration plate is known, the size of each square in the calibration plate is also known, and thus the pixel coordinates of the vertices of each square in the image when no distortion occurs can be directly obtained. Therefore, the standard corner coordinates corresponding to each square can be determined based on the distance between the ultra-wide-angle camera and the calibration plate and the size of the square, and then the standard coordinate matrix can be generated based on the order of the standard corner coordinates in the image.

[0104] As a possible implementation, since the number of pixels per unit length of the object in actual three-dimensional space is also fixed when the distance between the camera and the object is fixed, the number of pixels per unit length can be determined based on the distance between the ultra-wide-angle camera and the calibration plate, and the pixel coordinates of each vertex can be determined based on the size of the grid on the calibration plate. That is, in a possible implementation of the embodiment of the present application, the above-mentioned determination of the standard corner point coordinates corresponding to each grid based on the distance between the ultra-wide-angle camera and the calibration plate and the size of the grid includes:

[0105] Determine the number of pixels per unit length based on the distance between the ultra-wide-angle camera and the calibration plate;

[0106] According to the size of the square and the number of pixels per unit length, the standard corner coordinates corresponding to each square are determined.

[0107] As a possible implementation method, the distance between the ultra-wide-angle camera and the calibration plate can be obtained in real time (such as integrating a ranging module near the ultra-wide-angle camera), or the pre-stored distance between the ultra-wide-angle camera and the calibration plate can be directly obtained (since the distance between the ultra-wide-angle camera and the placement of the engraving material in the laser engraving machine is fixed, it can be measured and stored in advance). After obtaining the distance between the ultra-wide-angle camera and the calibration plate, the number of pixels corresponding to the unit length can be determined based on the distance and the inherent shooting parameters of the ultra-wide-angle camera (such as internal and external parameters). For example, the number of pixels corresponding to the unit length can be 20pix / mm (i.e., 20 pixels per millimeter).

[0108] After determining the number of pixels per unit length, the pixel coordinates corresponding to the vertices of each square and the standard corner coordinates corresponding to each square can be determined based on the size of each square and the position of each square in the calibration plate.

[0109] For example, if Figure 5 FIG. 1 is a schematic diagram of a calibration plate provided in an embodiment of the present application, which comprises a plurality of black and white squares, each of which has a side length of 30 mm. Figure 4 Assume that the number of pixels per unit length is 20pix / mm. Figure 4 The corner points 410, 420, 430, and 440 are respectively Figure 5 The four vertices 510, 520, 530, and 540 corresponding to the first square of the first row in the reference image correspond to the pixel points, and we can determine Figure 4 The standard corner coordinates corresponding to the corner points 410, 420, 430, and 440 are (0,0), (600,0), (0,600), and (600,600), respectively; assuming Figure 4 The corner points 450 and 460 are Figure 5 The two vertices 550 and 560 corresponding to the second square in the first row of the image correspond to the pixel points in the reference image, so we can determine Figure 4 The standard corner point coordinates corresponding to the corner points 450 and 460 in the image are (1200, 0) and (1200, 600) respectively. Similarly, the standard corner point coordinates corresponding to the vertices of each square in the calibration plate can be determined, that is, the standard corner point coordinates corresponding to each corner point in the reference image, thereby determining the standard coordinate matrix corresponding to the calibration plate.

[0110] Step 103 : Correcting the image to be corrected according to the distortion coordinate matrix and the standard coordinate matrix to generate a corrected image corresponding to the material to be engraved.

[0111] In the embodiment of the present application, since the position of the engraving material in the laser engraving machine is fixed, the distance between the ultra-wide-angle camera and the calibration plate and the material to be engraved is fixed whether in the calibration process or in the actual engraving process, so the size of the image captured by the ultra-wide-angle camera is also fixed. It is understandable that in a special scenario such as a laser engraving machine where the space is limited and the distance between the ultra-wide-angle camera and the object is always fixed, for two different images taken by the ultra-wide-angle camera, the same pixel coordinates in the two images represent the same point in the actual three-dimensional space. Therefore, in the embodiment of the present application, based on the distortion coordinate matrix, the pixel points that match the pixel coordinates in the distortion coordinate matrix can be extracted from the image to be corrected, and then the image to be corrected can be corrected based on the difference between the standard pixel coordinates in the standard coordinate matrix and these pixel coordinates, thereby achieving correction of the image to be corrected.

[0112] As a possible implementation, pixel points corresponding to each corner point in the reference image can be extracted from the image to be corrected based on the distortion coordinate matrix, and the image to be corrected can be divided into multiple image blocks based on these pixel points. Perspective transformation is then performed on each image block based on the standard coordinate matrix to correct the distortion of each image block. The corrected image blocks are then spliced ​​together to generate a corrected image. That is, in one possible implementation of this embodiment of the present application, step 103 can include:

[0113] Determine the reference pixel points in the image to be corrected according to the distortion coordinate matrix;

[0114] Using each reference pixel as a corner point of a sub-image block to divide the image to be corrected into multiple sub-image blocks;

[0115] Performing perspective transformation on each sub-image block according to the corner point coordinates and the standard coordinate matrix corresponding to each sub-image block to generate a corrected sub-image block corresponding to each sub-image block;

[0116] The corrected sub-image blocks are stitched together to generate a corrected image.

[0117] The reference pixel point may refer to a pixel point in the image to be corrected whose pixel coordinates are the same as the pixel coordinates of each corner point in the reference image.

[0118] In the embodiment of the present application, since the distortion coordinate matrix contains the pixel coordinates of each corner point in the reference image, the pixel points with corresponding pixel coordinates in the image to be corrected can be selected and processed based on the pixel coordinates in the distortion coordinate matrix as the reference pixels in the image to be corrected. After the reference pixels in the image to be corrected are determined, the reference pixels can be used as the corner points of the sub-image blocks, thereby dividing the image to be corrected into multiple sub-image blocks.

[0119] For example, if Figure 6 As shown, you can follow Figure 6 The image to be corrected is divided into multiple sub-image blocks in the manner shown in , and a schematic diagram of a sub-image block divided by four reference pixels is given in 6 . Other sub-image blocks can be determined in the same manner.

[0120] It should be noted that Figure 6 The schematic diagram of dividing the image to be corrected into multiple sub-image blocks is only exemplary and should not be considered as limiting the present application. In actual use, the number of reference pixels can be greater and the arrangement can be more dense.

[0121] In the embodiment of the present application, after the image to be corrected is divided into multiple sub-image blocks, since the pixel coordinates of the corner points of each sub-image block are all pixel coordinates in the distorted coordinate matrix, and the undistorted standard coordinates corresponding to each pixel coordinate in the distorted coordinate matrix are all stored in the standard coordinate matrix, for a sub-image block, it is only necessary to determine the standard pixel coordinates corresponding to the four corner points of the sub-image block from the standard coordinate matrix based on the corner point coordinates corresponding to the sub-image block, and perform a perspective transformation on the sub-image block based on the four corner point coordinates (distorted corner point coordinates) and the standard pixel coordinates corresponding to the four corner points, so that each pixel in the sub-image block is transformed to a coordinate range determined by the standard pixel coordinates corresponding to the four corner points. This can eliminate the distortion of the sub-image block, thereby achieving distortion correction for the sub-image block. In the same manner, distortion correction can be performed on each sub-image block in the image to be corrected to generate a corrected sub-image block corresponding to each sub-image block. After the corrected sub-image blocks corresponding to each sub-image block are generated, the corrected sub-image blocks may be spliced ​​together to generate a corrected image.

[0122] For example, if Figure 7 As shown, Figure 3 After the distortion correction of the image to be corrected shown in Figure 7 The corrected image is shown.

[0123] Furthermore, since the material to be engraved usually has a certain thickness, the distance between the material to be engraved and the ultra-wide-angle camera is closer after the material to be engraved is placed compared to the calibration process, so that the area occupied by the material to be engraved in the image is larger. Therefore, when correcting the image to be corrected, the size change of the material to be engraved in the image caused by the thickness of the material to be engraved can also be taken into account to further improve the correction accuracy of the ultra-wide-angle camera, and further improve the engraving accuracy of the laser engraving machine. That is, in a possible implementation of the embodiment of the present application, after the above step 103, it can also include:

[0124] Get the reference shooting height corresponding to the ultra-wide-angle camera and the thickness of the material to be engraved;

[0125] Determine the zoom ratio of the corrected image based on the reference shooting height and the thickness of the material to be engraved;

[0126] The corrected image is scaled according to the scaling ratio.

[0127] The reference shooting height may refer to the distance between the calibration plate and the ultra-wide-angle camera during the calibration process.

[0128] As a possible implementation, Figure 8 As shown, the ultra-wide-angle camera has a fixed shooting range. Therefore, the thicker the material to be engraved, the closer its surface is to the ultra-wide-angle camera, and the larger the image range it occupies in the image captured by the ultra-wide-angle camera. As a result, the size of the engraved material in the image to be corrected will be inconsistent with the size of the calibration plate in the reference image. If the image to be corrected is corrected based solely on the distortion correction parameters, the size of the corrected image will have certain errors. Therefore, after generating the corrected image, it can also be scaled according to the thickness of the material to be engraved to further improve the accuracy of distortion correction.

[0129] As a possible implementation, a reference shooting height can be pre-stored in the laser engraving machine based on data from a calibration process. The ultra-wide-angle camera can include an autofocus module, which can be used to capture the thickness of the material to be engraved. Furthermore, based on the reference shooting height and the thickness of the material to be engraved, the difference between the reference shooting height and the thickness of the material to be engraved can be determined. The ratio of the reference shooting height to this difference is then used as the scaling factor for the corrected image. Finally, the size of the corrected image can be multiplied by the scaling factor to achieve scaling of the corrected image.

[0130] As an example, the scaling ratio of the corrected image can be determined by the following formula:

[0131] a=H / (Hh).

[0132] Where a is the scaling ratio of the corrected image, H is the reference shooting height, and h is the thickness of the material to be engraved.

[0133] The distortion correction method for an ultra-wide-angle camera provided in an embodiment of the present application pre-calibrates the ultra-wide-angle camera in a laser engraving machine using a calibration plate to determine the distortion coordinate matrix and the standard coordinate matrix of a reference image corresponding to the calibration plate, and stores them as distortion correction parameters. After acquiring the image to be corrected corresponding to the material to be engraved, each pixel point in the image to be corrected is corrected to the correct position according to the pre-stored distortion correction matrix and the standard coordinate matrix, thereby eliminating the image distortion generated when shooting with the ultra-wide-angle camera, thereby improving the image quality of the engraving format and further improving the engraving accuracy of the laser engraving machine.

[0134] It should be understood that the size of the serial numbers of the steps in the above embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.

[0135] Corresponding to the distortion correction method of the ultra-wide-angle camera described in the above embodiment, Figure 9 A schematic structural diagram of the distortion correction device for an ultra-wide-angle camera provided in an embodiment of the present application is shown. For ease of explanation, only the parts related to the embodiment of the present application are shown.

[0136] Reference Figure 9 The device 90 comprises:

[0137] A first acquisition module 91 is used to acquire an image to be calibrated corresponding to the material to be engraved, which is captured by an ultra-wide-angle camera in a laser engraving machine;

[0138] A second acquisition module 92 is configured to acquire distortion correction parameters corresponding to the ultra-wide-angle camera, wherein the distortion correction parameters include a distortion coordinate matrix and a standard coordinate matrix corresponding to each corner point in a reference image, where the reference image is a calibration plate image captured by the ultra-wide-angle camera;

[0139] The correction module 93 is used to perform correction processing on the image to be corrected according to the distortion coordinate matrix and the standard coordinate matrix to generate a corrected image corresponding to the material to be engraved.

[0140] The distortion correction device for an ultra-wide-angle camera provided in an embodiment of the present application calibrates the ultra-wide-angle camera in a laser engraving machine using a calibration plate in advance to determine the distortion coordinate matrix and the standard coordinate matrix of the reference image corresponding to the calibration plate, and stores them as distortion correction parameters. After acquiring the image to be corrected corresponding to the material to be engraved, the device corrects each pixel point in the image to be corrected to the correct position according to the pre-stored distortion correction matrix and the standard coordinate matrix, thereby eliminating the image distortion generated when the ultra-wide-angle camera is shooting, thereby improving the image quality of the engraving format, and further improving the engraving accuracy of the laser engraving machine.

[0141] In a possible implementation form of the present application, the correction module 93 includes:

[0142] A first determining unit, configured to determine a reference pixel point in the image to be corrected according to the distortion coordinate matrix;

[0143] a dividing unit, configured to use each reference pixel point as a corner point of a sub-image block to divide the image to be corrected into a plurality of sub-image blocks;

[0144] a first generating unit, configured to perform perspective transformation on each sub-image block according to the corner point coordinates corresponding to each sub-image block and the standard coordinate matrix, so as to generate a corrected sub-image block corresponding to each sub-image block;

[0145] The second generating unit is configured to perform splicing processing on the corrected sub-image blocks to generate a corrected image.

[0146] Furthermore, in another possible implementation of the present application, the distortion correction device 90 for the ultra-wide-angle camera further includes:

[0147] The third acquisition module is used to obtain the reference shooting height corresponding to the ultra-wide-angle camera and the thickness of the material to be engraved;

[0148] A first determining module is used to determine the scaling ratio corresponding to the corrected image according to the reference shooting height and the thickness of the material to be engraved;

[0149] The scaling module is used to scale the corrected image according to the scaling ratio.

[0150] Furthermore, in another possible implementation form of the present application, the first determining module includes:

[0151] a second determining unit, configured to determine a difference between the reference shooting height and the thickness of the material to be engraved according to the reference shooting height and the thickness of the material to be engraved;

[0152] The third determining unit is configured to determine the ratio of the reference shooting height to the difference as the scaling ratio corresponding to the corrected image.

[0153] Furthermore, in another possible implementation of the present application, the distortion correction device 90 for the ultra-wide-angle camera further includes:

[0154] An acquisition module is used to acquire a reference image corresponding to a calibration plate using an ultra-wide-angle camera, wherein the calibration plate contains a plurality of black and white squares;

[0155] The second determination module is used to extract corner points of the reference image to determine the coordinates of the distorted corner points corresponding to each square;

[0156] A first generating module is used to generate a distortion coordinate matrix according to the coordinates of the distortion corner points corresponding to each square;

[0157] The third determination module is used to determine the coordinates of the standard corner points corresponding to each square according to the distance between the ultra-wide-angle camera and the calibration plate and the size of the square;

[0158] The second generation module is used to generate a standard coordinate matrix according to the standard corner point coordinates corresponding to each square;

[0159] The storage module is used to store the distortion coordinate matrix and the standard coordinate matrix as distortion correction parameters in the laser engraving machine.

[0160] Furthermore, in another possible implementation form of the present application, the third determining module includes:

[0161] a fourth determining unit, configured to determine the number of pixels corresponding to a unit length according to the distance between the ultra-wide-angle camera and the calibration plate;

[0162] The fifth determining unit is configured to determine the coordinates of the standard corner points corresponding to each square according to the size of the square and the number of pixels corresponding to the unit length.

[0163] It should be noted that the information interaction, execution process, etc. between the above-mentioned devices / units are based on the same concept as the method embodiment of this application. Their specific functions and technical effects can be found in the method embodiment section and will not be repeated here.

[0164] Those skilled in the art can clearly understand that, for the convenience and brevity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In actual applications, the above-mentioned functions can be distributed and completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated into one processing unit, or each unit can exist physically alone, or two or more units can be integrated into one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.

[0165] In order to implement the above embodiments, the present application also proposes an electronic device.

[0166] Figure 10 This is a schematic structural diagram of an electronic device according to an embodiment of the present application.

[0167] like Figure 10 As shown, the electronic device 200 includes:

[0168] A memory 210 and at least one processor 220, a bus 230 connecting different components (including the memory 210 and the processor 220), the memory 210 stores a computer program, and when the processor 220 executes the program, the distortion correction method for the ultra-wide-angle camera described in the embodiment of the present application is implemented.

[0169] Bus 230 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processor, or a local bus using any of a variety of bus architectures. Examples of these architectures include, but are not limited to, an Industry Standard Architecture (ISA) bus, a Micro Channel Architecture (MAC) bus, an Enhanced ISA bus, a Video Electronics Standards Association (VESA) local bus, and a Peripheral Component Interconnect (PCI) bus.

[0170] The electronic device 200 typically includes a variety of electronic device-readable media. These media can be any available media that can be accessed by the electronic device 200, including volatile and non-volatile media, removable and non-removable media.

[0171] The memory 210 may also include computer system readable media in the form of volatile memory, such as random access memory (RAM) 240 and / or cache memory 250. The electronic device 200 may further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, the storage system 260 may be used to read and write non-removable, non-volatile magnetic media ( Figure 10 Not shown, often called a "hard drive"). Although Figure 10 Not shown, a disk drive for reading and writing to a removable non-volatile disk (e.g., a "floppy disk"), and an optical drive for reading and writing to a removable non-volatile optical disk (e.g., a CD-ROM, DVD-ROM, or other optical media) may be provided. In these cases, each drive may be connected to bus 230 via one or more data medium interfaces. Memory 210 may include at least one program product having a set (e.g., at least one) of program modules configured to perform the functions of various embodiments of the present application.

[0172] A program / utility 280 having a set (at least one) of program modules 270 may be stored, for example, in memory 210. Such program modules 270 include, but are not limited to, an operating system, one or more application programs, other program modules, and program data, each of which, or some combination thereof, may include an implementation of a network environment. Program modules 270 generally implement the functions and / or methods of the embodiments described herein.

[0173] The electronic device 200 can also communicate with one or more external devices 290 (e.g., a keyboard, a pointing device, a display 291, etc.), one or more devices that enable a user to interact with the electronic device 200, and / or any device that enables the electronic device 200 to communicate with one or more other computing devices (e.g., a network card, a modem, etc.). Such communication can occur via an input / output (I / O) interface 292. Furthermore, the electronic device 200 can also communicate with one or more networks (e.g., a local area network (LAN), a wide area network (WAN), and / or a public network such as the Internet) via a network adapter 293. As shown, the network adapter 293 communicates with other modules of the electronic device 200 via a bus 230. It should be understood that, although not shown in the figure, other hardware and / or software modules can be used in conjunction with the electronic device 200, including but not limited to microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.

[0174] The processor 220 executes various functional applications and data processing by running programs stored in the memory 210 .

[0175] It should be noted that the implementation process and technical principles of the electronic device of this embodiment can be found in the aforementioned explanation of the distortion correction method of the ultra-wide-angle camera of the embodiment of the present application, and will not be repeated here.

[0176] An embodiment of the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in the above-mentioned various method embodiments can be implemented.

[0177] An embodiment of the present application provides a computer program product. When the computer program product is run on an electronic device, the electronic device can implement the steps in the above-mentioned method embodiments when executing the computer program product.

[0178] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present application implements all or part of the processes in the above-mentioned embodiment method, which can be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program, when executed by the processor, can implement the steps of the above-mentioned various method embodiments. Wherein, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may include at least: any entity or device that can carry the computer program code to the device / electronic device, a recording medium, a computer memory, a read-only memory (ROM), a random access memory (RAM), an electric carrier signal, a telecommunication signal and a software distribution medium. For example, a USB flash drive, a mobile hard disk, a magnetic disk or an optical disk.

[0179] In the above embodiments, the description of each embodiment has its own focus. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant description of other embodiments.

[0180] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0181] In the embodiments provided in the present application, it should be understood that the disclosed devices / electronic devices and methods can be implemented in other ways. For example, the device / electronic device embodiments described above are merely schematic. For example, the division of the modules or units is merely a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0182] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.

[0183] The above-described embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. These modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the various embodiments of the present application, and should all be included in the scope of protection of the present application.

Claims

1. A method for correcting distortion of an ultra-wide-angle camera, characterized in that: include: Obtaining an image to be corrected corresponding to the material to be engraved captured by an ultra-wide-angle camera in a laser engraving machine; Obtaining distortion correction parameters corresponding to the ultra-wide-angle camera, wherein the distortion correction parameters include a distortion coordinate matrix and a standard coordinate matrix corresponding to each corner point in a reference image, where the reference image is a calibration plate image captured by the ultra-wide-angle camera; The image to be corrected is corrected according to the distorted coordinate matrix and the standard coordinate matrix to generate a corrected image corresponding to the material to be engraved.

2. The method according to claim 1, wherein The step of performing correction processing on the image to be corrected according to the distorted coordinate matrix and the standard coordinate matrix to generate a corrected image corresponding to the material to be engraved includes: Determining reference pixel points in the image to be corrected according to the distortion coordinate matrix; Using each of the reference pixel points as a corner point of a sub-image block, so as to divide the image to be corrected into a plurality of the sub-image blocks; performing perspective transformation on each of the sub-image blocks according to the corner point coordinates corresponding to each of the sub-image blocks and the standard coordinate matrix, so as to generate a corrected sub-image block corresponding to each of the sub-image blocks; The corrected sub-image blocks are spliced ​​together to generate the corrected image.

3. The method according to claim 1, wherein After the image to be corrected is corrected according to the distorted coordinate matrix and the standard coordinate matrix to generate a corrected image corresponding to the material to be engraved, the method further includes: Obtaining a reference shooting height corresponding to the ultra-wide-angle camera and a thickness of the material to be engraved; Determining a zoom ratio corresponding to the corrected image according to the reference shooting height and the thickness of the material to be engraved; The corrected image is scaled according to the scaling ratio.

4. The method according to claim 3, wherein Determining the scaling ratio corresponding to the corrected image according to the reference shooting height and the thickness of the material to be engraved includes: Determining a difference between the reference shooting height and the thickness of the material to be engraved according to the reference shooting height and the thickness of the material to be engraved; The ratio of the reference shooting height to the difference is determined as the scaling ratio corresponding to the corrected image.

5. The method according to any one of claims 1 to 4, characterized in that: Before obtaining the image to be corrected corresponding to the material to be engraved captured by the ultra-wide-angle camera in the laser engraving machine, the method further includes: Capturing the reference image corresponding to the calibration plate by the ultra-wide-angle camera, wherein the calibration plate comprises a plurality of black and white squares; Extracting corner points of the reference image to determine the coordinates of the distorted corner points corresponding to each of the squares; Generating the distortion coordinate matrix according to the coordinates of the distortion corner points corresponding to each of the squares; Determining the coordinates of the standard corner points corresponding to each of the squares according to the distance between the ultra-wide-angle camera and the calibration plate and the size of the squares; Generate the standard coordinate matrix according to the standard corner point coordinates corresponding to each of the squares; The distorted coordinate matrix and the standard coordinate matrix are stored in the laser engraving machine as the distortion correction parameters.

6. The method according to claim 5, wherein The determining, based on the distance between the ultra-wide-angle camera and the calibration plate and the size of the squares, the coordinates of the standard corner points corresponding to each of the squares includes: Determining the number of pixels corresponding to a unit length according to the distance between the ultra-wide-angle camera and the calibration plate; The coordinates of the standard corner points corresponding to each of the squares are determined according to the size of the squares and the number of pixels corresponding to the unit length.

7. A distortion correction device for an ultra-wide-angle camera, characterized in that: include: A first acquisition module is used to acquire an image to be corrected corresponding to the material to be engraved, which is captured by an ultra-wide-angle camera in the laser engraving machine; a second acquisition module, configured to acquire distortion correction parameters corresponding to the ultra-wide-angle camera, wherein the distortion correction parameters include a distortion coordinate matrix and a standard coordinate matrix corresponding to each corner point in a reference image, where the reference image is a calibration plate image captured by the ultra-wide-angle camera; The correction module is used to perform correction processing on the image to be corrected according to the distortion coordinate matrix and the standard coordinate matrix to generate a corrected image corresponding to the material to be engraved.

8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the method according to any one of claims 1 to 6 is implemented.

9. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.

10. A computer program product, characterized in that The invention comprises a computer program, which, when running on an electronic device, causes the electronic device to execute the method according to any one of claims 1 to 6.