Image correction method and device, computer equipment and readable storage medium

By performing global preliminary correction and regional detailed correction of the images to be corrected in the HUD display system, the problem of complex image distortion is solved, the correction quality and efficiency are improved, and the quality and consistency of the product are ensured.

CN119515744APending Publication Date: 2025-02-25INTERFACE TECH (CHENGDU) CO LTD +2
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411657940.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-19
Publication Date
2025-02-25

AI Technical Summary

Technical Problem

There are complex, non-uniformly distributed image distortions in the HUD display system, which are difficult to effectively solve in the prior art, resulting in obvious distortion or distortion in the corrected image, and the correction success rate is not high.

Method used

By obtaining the image to be corrected, the initial position and initial desired position of each pixel point are determined, and the global preliminary correction is performed. The image is then divided into multiple areas, and more fine correction is performed for each area, and the correction results of each area are finally summarized. Fusion to generate target correction images.

Benefits of technology

It significantly improves the quality and efficiency of image correction, can handle local distortion problems more accurately, improve the correction success rate, ensure the quality and consistency of the final product, and adapt to the additional image distortion problems that may occur during actual mass production.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119515744A_ABST
    Figure CN119515744A_ABST
Patent Text Reader

Abstract

The invention relates to an image correction method and device, computer equipment, a computer readable storage medium and a computer program product. The method comprises the following steps: acquiring an image to be corrected, acquiring at least one pixel point from the image to be corrected, and determining an initial position and an initial expected position of each pixel point; correcting each pixel point in the to-be-corrected image to obtain an initial corrected image; dividing the initial correction image into a plurality of image areas; for each image area, acquiring at least one pixel point from the corresponding image area, and determining an initial correction position and a target expected position of the at least one pixel point; correcting each pixel point of the image area to obtain a correction area corresponding to the image area; and fusing the correction areas corresponding to the image areas to obtain a target correction image. By adopting the method, the problem of complex image distortion in an HUD display system can be solved, and the quality and efficiency of image correction are remarkably improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of image processing technology, and in particular to an image correction method, apparatus, computer equipment, computer-readable storage medium and computer program product. Background Art

[0002] The HUD (Head-up Display) system is used in cars to project important information onto the windshield in front of the driver so that the driver can obtain this information without shifting his or her sight. Due to factors such as optical design, material properties, and manufacturing tolerances, the image displayed by the HUD is often distorted, and this distortion is usually axisymmetric and unevenly distributed.

[0003] Traditional methods usually use simple linear or nonlinear global transformations to correct the distortion of the entire image. These methods are not effective when dealing with complex, non-uniformly distributed distortions, and often fail to meet specification requirements, resulting in obvious distortion or distortion in the corrected image. In addition, the correction success rate is not high, especially in actual mass production, due to the tolerance of windshields or other optical surfaces, which will cause additional image distortion and affect product yield. Summary of the invention

[0004] Based on this, it is necessary to provide an image correction method, device, computer equipment, computer-readable storage medium and computer program product that can solve the complex image distortion problem in the HUD display system and significantly improve the quality and efficiency of image correction in response to the above-mentioned technical problems.

[0005] In a first aspect, the present application provides an image correction method, comprising:

[0006] Acquire an image to be corrected, acquire at least one pixel point from the image to be corrected, and determine an initial position and an initial expected position of each pixel point;

[0007] Based on the initial position of each pixel point and the initial expected position, correct each pixel point in the image to be corrected to obtain an initial corrected image;

[0008] Dividing the initial corrected image into a plurality of image regions;

[0009] For each of the image regions, obtaining at least one pixel point from the image region, and determining an initial correction position and a target expected position of the at least one pixel point;

[0010] Based on the initial correction position of the at least one pixel point and the target expected position, correct each pixel point in the targeted image area to obtain a correction area corresponding to the targeted image area;

[0011] The correction areas corresponding to the image areas are fused to obtain a target correction image.

[0012] In one embodiment, the step of correcting each pixel of the image area based on the initial correction position of the at least one pixel and the target expected position to obtain a correction area corresponding to the image area includes:

[0013] Based on the initial correction position of at least one pixel point and the target expected position, a first position transformation polynomial is determined; the position mapping coefficient in the first position transformation polynomial is determined; based on the position mapping coefficient in the first position transformation polynomial and the initial correction position of each pixel point in the targeted image area, the target expected position of each pixel point in the targeted image area is determined; each pixel point in the targeted image area is moved from the initial correction position of each pixel point to the target expected position of each pixel point to obtain a correction area corresponding to the targeted image area.

[0014] In one embodiment, dividing the initial corrected image into a plurality of image regions comprises:

[0015] Determine the central axis of the initial corrected image; determine multiple axis radius ranges with the central axis of the initial corrected image as the center; and divide the initial corrected image into multiple image areas based on the multiple axis radius ranges.

[0016] In one embodiment, fusing the correction areas corresponding to the image areas to obtain the target correction image includes:

[0017] Determine the seam edge area between adjacent correction areas; divide each correction area into a seam area and a non-seam area according to the seam edge area between the adjacent correction areas; determine a first position mapping coefficient corresponding to the seam area in each correction area and a second position mapping coefficient corresponding to the non-seam area; correct the pixel points in each correction area according to the first position mapping coefficient corresponding to the seam area in each correction area and the second position mapping coefficient corresponding to the non-seam area to obtain the area to be fused corresponding to each correction area; fuse the areas to be fused corresponding to each correction area to obtain a target correction image.

[0018] In one embodiment, the step of correcting the pixels in each correction area according to the first position mapping coefficient corresponding to the seam area and the second position mapping coefficient corresponding to the non-seam area in each correction area to obtain the area to be fused corresponding to each correction area includes:

[0019] Determine the distance between each correction area and the central axis; correct the pixel points in each correction area according to the distance between each correction area and the central axis, the first position mapping coefficient corresponding to the seam area in each correction area, and the second position mapping coefficient corresponding to the non-seam area, and obtain the area to be fused corresponding to each correction area.

[0020] In one embodiment, the step of correcting the pixels in each correction area according to the distance between each correction area and the central axis, the first position mapping coefficient corresponding to the seam area in each correction area, and the second position mapping coefficient corresponding to the non-seam area, to obtain the area to be fused corresponding to each correction area includes:

[0021] For each of the correction areas, a partial differential series is added to the first position mapping coefficient corresponding to the seam area in the correction area to obtain a third position mapping coefficient corresponding to the seam area in the correction area; a weight coefficient corresponding to the correction area is determined according to the distance between the correction area and the central axis; the third position mapping coefficient corresponding to the seam area and the second position mapping coefficient corresponding to the non-seam area in the correction area are weighted by the weight coefficient corresponding to the correction area to obtain a fourth position mapping coefficient corresponding to the seam area and a fifth position mapping coefficient corresponding to the non-seam area in the correction area; according to the fourth position mapping coefficient corresponding to the seam area and the fifth position mapping coefficient corresponding to the non-seam area in each correction area, the pixel points in each correction area are corrected to obtain the area to be fused corresponding to each correction area.

[0022] In a second aspect, the present application also provides an image correction device, comprising:

[0023] A first determination module is used to obtain an image to be corrected, obtain at least one pixel point from the image to be corrected, and determine an initial position and an initial expected position of each pixel point;

[0024] A first correction module, configured to correct each pixel in the image to be corrected based on the initial position of each pixel and the initial expected position, so as to obtain an initial corrected image;

[0025] A division module, used for dividing the initial corrected image into a plurality of image regions;

[0026] A second determination module is used to obtain at least one pixel point from each of the image areas, and determine an initial correction position and a target expected position of the at least one pixel point;

[0027] A second correction module, configured to correct each pixel of the targeted image area based on the initial correction position of the at least one pixel and the target expected position, to obtain a correction area corresponding to the targeted image area;

[0028] The fusion module is used to fuse the correction areas corresponding to the image areas to obtain a target correction image.

[0029] In a third aspect, the present application further provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:

[0030] Acquire an image to be corrected, acquire at least one pixel point from the image to be corrected, and determine an initial position and an initial expected position of each pixel point;

[0031] Based on the initial position of each pixel point and the initial expected position, correct each pixel point in the image to be corrected to obtain an initial corrected image;

[0032] Dividing the initial corrected image into a plurality of image regions;

[0033] For each of the image regions, obtaining at least one pixel point from the image region, and determining an initial correction position and a target expected position of the at least one pixel point;

[0034] Based on the initial correction position of the at least one pixel point and the target expected position, correct each pixel point in the targeted image area to obtain a correction area corresponding to the targeted image area;

[0035] The correction areas corresponding to the image areas are fused to obtain a target correction image.

[0036] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the following steps are implemented:

[0037] Acquire an image to be corrected, acquire at least one pixel point from the image to be corrected, and determine an initial position and an initial expected position of each pixel point;

[0038] Based on the initial position of each pixel point and the initial expected position, correct each pixel point in the image to be corrected to obtain an initial corrected image;

[0039] Dividing the initial corrected image into a plurality of image regions;

[0040] For each of the image regions, obtaining at least one pixel point from the image region, and determining an initial correction position and a target expected position of the at least one pixel point;

[0041] Based on the initial correction position of the at least one pixel point and the target expected position, correct each pixel point of the targeted image area to obtain a correction area corresponding to the targeted image area;

[0042] The correction areas corresponding to the image areas are fused to obtain a target correction image.

[0043] In a fifth aspect, the present application further provides a computer program product, including a computer program, which implements the following steps when executed by a processor:

[0044] Acquire an image to be corrected, acquire at least one pixel point from the image to be corrected, and determine an initial position and an initial expected position of each pixel point;

[0045] Based on the initial position of each pixel point and the initial expected position, correct each pixel point in the image to be corrected to obtain an initial corrected image;

[0046] Dividing the initial corrected image into a plurality of image regions;

[0047] For each of the image regions, obtaining at least one pixel point from the image region, and determining an initial correction position and a target expected position of the at least one pixel point;

[0048] Based on the initial correction position of the at least one pixel point and the target expected position, correct each pixel point of the targeted image area to obtain a correction area corresponding to the targeted image area;

[0049] The correction areas corresponding to the image areas are fused to obtain a target correction image.

[0050] The above-mentioned image correction method, device, computer equipment, computer-readable storage medium and computer program product obtain the image to be corrected, obtain at least one pixel point from the image to be corrected, and determine the initial position and initial expected position of each pixel point; provide necessary input data for the subsequent correction process, and determine the initial position (position in the current distorted state) and initial expected position (position in the ideal distortion-free state) of each pixel point, providing a benchmark for subsequent correction.

[0051] Based on the initial position of each pixel and the initial expected position, each pixel in the image to be corrected is corrected to obtain an initial corrected image; the entire image is initially corrected using a global transformation method, which can reduce most of the obvious distortion. Through the initially corrected image, it can be quickly determined whether the specification requirements have been met or further regional processing is required.

[0052] The initial correction image is divided into multiple image regions, allowing for more refined corrections to be performed for the characteristics of different regions. By partitioning, non-uniformly distributed distortions can be better accommodated, thereby improving overall correction accuracy.

[0053] For each of the image regions, at least one pixel point is obtained from the image region, and the initial correction position and target expected position of the at least one pixel point are determined; key pixel points are selected in each region, and the specific positions of these points before and after correction are determined to provide an accurate reference for correction in the region. By refining the specific position information of each region, local distortion problems can be handled more accurately, thereby further improving the correction quality.

[0054] Based on the initial correction position of the at least one pixel point and the target expected position, each pixel point in the targeted image area is corrected to obtain a correction area corresponding to the targeted image area; through targeted area correction, the success rate of correction can be significantly improved, so that the image quality of each area meets or exceeds the expected standard.

[0055] The correction areas corresponding to the image areas are integrated to obtain the target correction image. By integrating the correction results of all areas, a target correction image that meets the specification requirements as a whole is generated, thereby improving the quality and consistency of the final product. It can also adapt to the additional image distortion caused by the tolerance of the windshield or other optical surfaces during the actual mass production process, thereby reducing rework costs and material waste and improving product yield. BRIEF DESCRIPTION OF THE DRAWINGS

[0056] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the drawings required for use in the embodiments of the present application or related technical descriptions will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.

[0057] FIG1 is a diagram of an application environment of an image correction method according to an embodiment;

[0058] FIG2 is a schematic diagram of a flow chart of an image correction method in one embodiment;

[0059] FIG3 is a schematic flow chart of an image correction method in another embodiment;

[0060] FIG4 is a structural block diagram of an image correction device in one embodiment;

[0061] FIG. 5 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0062] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0063] The image correction method provided in the embodiment of the present application can be applied in the application environment shown in FIG. 1. Among them, the terminal 102 communicates with the server 104 through the network. The data storage system can store the data that the server 104 needs to process. The data storage system can be integrated on the server 104, or it can be placed on the cloud or other network servers. The terminal 102 is used to generate an image correction request and send the image correction request to the server 104 so that the server 104 merges the correction areas corresponding to each image area to obtain the target correction image. Among them, the terminal 102 can be, but is not limited to, various personal computers, laptops, smart phones, tablet computers, Internet of Things devices and portable wearable devices. The Internet of Things devices can be smart speakers, smart TVs, smart air conditioners, smart car devices, projection devices, etc. Portable wearable devices can be smart watches, smart bracelets, head-mounted devices, etc. The head-mounted device can be a virtual reality (VR) device, an augmented reality (AR) device, smart glasses, etc. The server 104 can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides cloud computing services.

[0064] In an exemplary embodiment, as shown in FIG2 , an image correction method is provided, which is described by taking the method applied to the server 104 in FIG1 as an example, and includes the following steps 202 to 212. Among them:

[0065] Step 202: Acquire the image to be calibrated, acquire at least one pixel from the image to be calibrated, and determine the initial position and the initial expected position of each pixel.

[0066] The image to be corrected refers to the original image that needs to be distorted. This image is the image displayed by the HUD system, and due to factors such as optical design, material properties, and manufacturing tolerances, there are different degrees of distortion.

[0067] The initial position refers to the actual position of each pixel in the image to be corrected before correction. These positions are the coordinates recorded in the distorted state. The initial position provides the pixel position information in the current distorted state, which is used to compare with the ideal position and calculate the transformation parameters required for correction.

[0068] The initial desired position is the ideal position that each pixel should reach after correction. These positions are based on the target coordinates set in a distortion-free or nearly distortion-free state. It can be understood that the initial desired position provides a benchmark to determine how each pixel should be moved to eliminate distortion. By comparing the initial position and the initial desired position, the polynomial coefficients and other parameters required for correction can be calculated.

[0069] Specifically, first, the original image that needs to be distorted is obtained from the HUD system. This image is distorted due to factors such as optical design, material properties, and manufacturing tolerances. The purpose is to provide a reference image for subsequent correction processing. Then a set of representative pixel points are selected as control points in the image to be corrected. These control points should be evenly distributed over the entire image and be able to cover the distortion of different areas. Next, for each selected control point, its actual coordinates (X, Y) in the distorted image are recorded. These coordinates reflect the pixel position in the current distortion state. The actual position (i.e., initial position) of each control point in the distorted image is recorded, with the purpose of providing key data points for the subsequent correction process through the selected control points and their initial positions. Finally, the ideal position after correction (i.e., initial expected position) is set for each control point. These positions are based on the target coordinates (U, V) set in a distortion-free or nearly distortion-free state. The purpose is to provide a benchmark to determine how each pixel should be moved to eliminate distortion. By comparing the initial position with the initial expected position, the polynomial coefficients and other parameters required for correction can be calculated. The present application does not specifically limit the method for setting the initial expected position, and it can be set according to actual needs.

[0070] Optionally, a theoretical model of optical design is used to predict the pixel positions in the undistorted state.

[0071] Optionally, the actual position in a distortion-free state is obtained through experiments or measurement equipment.

[0072] Optionally, the target position is set with reference to a known standard image or specification requirement.

[0073] Step 204 , based on the initial position and the initial expected position of each pixel point, calibrate each pixel point in the image to be calibrated to obtain an initial calibrated image.

[0074] The initial correction image refers to the image after the preliminary global correction, which reduces most of the obvious distortion and provides a better starting point for the subsequent regional correction. This step not only improves the accuracy of the correction, but also increases the success rate of the correction, ultimately improving the overall quality of the product and user experience.

[0075] Specifically, based on the initial position and initial expected position of each pixel, the global correction polynomial coefficients are calculated. The first step is to define the polynomial form, using a nonlinear even-order polynomial to describe the pixel position transformation. For example:

[0076] U=A(1)+A(2)×X+A(3)×Y+A(4)×X×Y+A(5)X 2 +A(6)×Y 2

[0077] V=B(1)+B(2)×X+B(3)×Y+B(4)×X×Y+B(5)X 2 +B(6)×Y 2

[0078] Then, we build a set of equations for each selected control point and its corresponding initial position (X, Y) and initial desired position (U, V). For example, for a control point (X i , Y i ), and its target position is (U i , V i ), then we can get the following equation:

[0079] Ui=A(1)+A(2)×X i +A(3)×Y i +A(4)×X i ×Y i +A(5)X i 2 +A(6)×Y i 2

[0080] V = B (1) + B (2) × X i +B(3)×Y i +B(4)×X i ×Y i +B(5)X i 2 +B(6)×Y i 2

[0081] The next step is to solve the system of equations and find the best polynomial coefficients A(n) and B(n) by using the least squares method or other optimization methods. This step ensures that the resulting polynomial best fits the ideal positions of all control points.

[0082] Apply the global correction polynomial to correct the entire image, traverse all pixels, and for each pixel (X, Y) in the image to be corrected, use the obtained polynomial coefficients A (n) and B (n) to calculate its new position (U, V). To calculate the new position, substitute the coordinates (X, Y) of each pixel into the polynomial equation and calculate the new coordinates (U, V):

[0083] U=A(1)+A(2)×X+A(3)×Y+A(4)×X×Y+A(5)X 2 +A(6)×Y 2

[0084] V=B(1)+B(2)×X+B(3)×Y+B(4)×X×Y+B(5)X 2 +B(6)×Y 2

[0085] Finally, according to the calculated new position (U, V), each pixel is moved from the original position (X, Y) to the new position (U, V). If (U, V) is not an integer coordinate, an interpolation technique (such as bilinear interpolation) can be used to fill in the new pixel value. All the corrected pixels are reassembled into a new image.

[0086] Step 206, dividing the initial corrected image into a plurality of image regions.

[0087] The image region refers to a number of sub-regions into which the entire image is divided according to certain standards (such as axis radius). Each sub-region represents a local area in the image, and these regions may have different distortion characteristics.

[0088] Specifically, first, an image that has undergone preliminary global correction processing is obtained from the previous step, that is, an initial corrected image. Then, a partitioning criterion is determined, for example, the axis radius is used as the partitioning criterion. Next, the number of partitions and boundaries are determined. Finally, the determined partitioning criterion, number of partitions and boundaries are applied to divide the initial corrected image into multiple regions, and the boundaries are marked.

[0089] Step 208 : for each image region, obtain at least one pixel point from the image region, and determine an initial correction position and a target expected position of the at least one pixel point.

[0090] The initial correction position refers to the actual position of each pixel after the initial global correction. These positions are the coordinates obtained after the first step of the initial correction process. The purpose is to provide a benchmark for further local correction. By comparing these positions with the ideal position (i.e. the target expected position), more refined correction parameters can be calculated.

[0091] The target expected position refers to the ideal position that each pixel should reach after correction. These positions are based on the target coordinates set in a distortion-free or nearly distortion-free state. The purpose is to provide a reference standard for target correction. By comparing the initial correction position and the target expected position, the specific correction requirements in each area can be determined, allowing for more accurate local correction.

[0092] Specifically, first determine the image area that has been divided, and process each image area one by one. Select a set of representative pixel points in the current image area as control points. These control points should be evenly distributed in the entire area and be able to cover different distortion conditions in the area. Record the position coordinates (X, Y) of these control points.

[0093] Then for each selected control point, obtain its position coordinates (X', Y') after the preliminary global correction. These coordinates are the actual positions after the first step of preliminary correction, called the initial correction positions. Record the initial correction position (X', Y') of each control point.

[0094] Finally, each control point is set at the ideal position after correction (i.e., the target expected position). These positions are based on the target coordinates (U, V) set in a distortion-free or nearly distortion-free state. The target expected position (U, V) of each control point is recorded. This application does not limit the specific method for setting the target expected position, which can be set according to actual needs.

[0095] Optionally, a theoretical model of optical design is used to predict the pixel positions in the undistorted state.

[0096] Optionally, the actual position in a distortion-free state is obtained through experiments or measurement equipment.

[0097] Optionally, the target position is set with reference to a known standard image or specification requirement.

[0098] Step 210, based on the initial correction position of at least one pixel point and the target expected position, correct each pixel point in the targeted image area to obtain a correction area corresponding to the targeted image area.

[0099] The correction area refers to the image portion obtained by calculating the correction polynomial coefficients applicable to the area based on the initial correction position and target expected position of the control points (pixels) in each image area, and applying these coefficients to correct all pixels in the area. The purpose is to further reduce the remaining distortion and improve the overall image quality through more refined local correction.

[0100] Specifically, the regional correction polynomial coefficients are first calculated: first, the polynomial form is defined, and a nonlinear even-order polynomial is used to describe the pixel position transformation. For example:

[0101] U=A(1)+A(2)×X*+A(3)×Y*+A(4)×X*×Y*+A(5)X* 2 +A(6)×Y* 2

[0102] V=B(1)+B(2)×X*+B(3)×Y*+B(4)×X*×Y*+B(5)X* 2 +B(6)×Y* 2

[0103] Then, a set of equations is established for each selected control point and its corresponding initial correction position (X*, Y*) and target desired position (U, V). For example, for a control point (X i *, Y i *), and its target position is (U i , V i) , we can get the following equation:

[0104] Ui=A(1)+A(2)×X i *+A(3)×Y i *+A(4)×X i *×Y i *+A(5)X i * 2 +A(6)×Y i * 2

[0105] V = B (1) + B (2) × X i *+B(3)×Y i *+B(4)×X i *×Y i *+B(5)X i * 2 +B(6)×Y i * 2

[0106] The next step is to solve the system of equations and find the best polynomial coefficients A(n) and B(n) by using the least squares method or other optimization methods. This step ensures that the resulting polynomial best fits the ideal positions of all control points.

[0107] Apply the regional correction polynomial to correct all pixels in the region, traverse all pixels in the region, and for each pixel (X*, Y*) in the current image region, use the obtained polynomial coefficients A (n) and B (n) to calculate its new position (U, V). Calculate the new position, substitute the coordinates (X', Y') of each pixel into the polynomial equation, and calculate the new coordinates (U, V):

[0108] U=A(1)+A(2)×X*+A(3)×Y*+A(4)×X*×Y*+A(5)X* 2 +A(6)×Y* 2

[0109] V=B(1)+B(2)×X*+B(3)×Y*+B(4)×X*×Y*+B(5)X* 2 +B(6)×Y* 2

[0110] Finally, according to the calculated new position (U, V), each pixel is moved from the original position (X*, Y*) to the new position (U, V). If (U, V) is not an integer coordinate, an interpolation technique (such as bilinear interpolation) can be used to fill in the new pixel value. All the corrected pixels are reassembled into a new image part, namely the correction area.

[0111] Step 212: fuse the correction areas corresponding to the image areas to obtain a target correction image.

[0112] The target correction image refers to the final result image after global and local correction processing. This image is obtained after eliminating or significantly reducing the distortion in the original image and meets the expected quality standards. The purpose is to provide a high-quality image with no or close to no distortion, ensuring that the information displayed by the HUD system is clear and accurate, and improving the user experience.

[0113] Specifically, firstly, a correction region is prepared, the correction region of each image region after local correction is obtained from the previous step, and the boundary information is recorded.

[0114] Then, choose a suitable fusion method according to actual needs, such as weighted averaging. And define a weight function to smooth the transition between different regions. For example, a Gaussian function or other smoothing function can be used to define the weight.

[0115] Next, identify the seam positions between adjacent correction areas. Apply a weight function at the seam so that the pixel values ​​of the two adjacent areas gradually transition and avoid sudden changes. For example, for the pixel points at the seam, the following formula can be used for weighted averaging:

[0116] P final (x, y)=w1(x, y)×P1(x, y)+w2(x, y)×P2(x, y)

[0117] Among them, P1(x, y) and P2(x, y) are the pixel values ​​of two adjacent correction areas at the seam, and w1(x, y) and w2(x, y) are the corresponding weights.

[0118] Finally, create a new blank image with the same size as the original image to be calibrated. Fill each calibration region into the new target image one by one according to its boundary information. Apply the previously defined weight function at the seams for smooth transition. Make sure that all calibration regions are correctly filled and there are no omissions or overlaps. Then get the final calibrated target calibration image.

[0119] In one of the embodiments, a first position transformation polynomial is determined based on an initial correction position and a target expected position of at least one pixel point; a position mapping coefficient in the first position transformation polynomial is determined; based on the position mapping coefficient in the first position transformation polynomial and the initial correction position of each pixel point in the targeted image area, the target expected position of each pixel point in the targeted image area is determined; each pixel point in the targeted image area is moved from the initial correction position of each pixel point to the target expected position of each pixel point to obtain a correction area corresponding to the targeted image area.

[0120] The first position transformation polynomial refers to a mathematical model used to describe the pixel position transformation relationship from the initial correction position to the target desired position. It is usually a nonlinear polynomial that can accurately represent the coordinate change of each pixel before and after correction. The purpose is to describe the position transformation.

[0121] The position mapping coefficients refer to the coefficients in the first position transformation polynomial, such as A(n) and B(n). These coefficients determine the specific transformation method of the pixel point from the initial correction position to the target desired position. The purpose is to accurately calculate the target desired position of each pixel point by determining these coefficients, thereby achieving local correction of the image.

[0122] Specifically, first select a set of representative pixel points as control points in the current image area. These points should be able to cover the distortion in different areas. Record the actual positions (X*, Y*) of these control points after preliminary global correction, that is, the initial correction positions. Set each control point to the ideal position (U, V) after correction, that is, the target expected position. Select a polynomial of appropriate form to describe the transformation relationship from the initial correction position to the target expected position. For example, the following form of nonlinear even-order polynomial can be used:

[0123] U=A(1)+A(2)×X*+A(3)×Y*+A(4)×X*×Y*+A(5)X* 2 +A(6)×Y* 2

[0124] V=B(1)+B(2)×X*+B(3)×Y*+B(4)×X*×Y*+B(5)X* 2 +B(6)×Y* 2

[0125] Then, for each selected control point and its corresponding initial correction position (X*, Y*) and target desired position (U, V), a set of equations is established. For example, for a control point (Xi*, Yi*), its target position is (Ui, Vi), then the following equation can be obtained:

[0126] Ui=A(1)+A(2)×X i *+A(3)×Y i *+A(4)×X i *×Y i *+A(5)X i * 2 +A(6)×Y i * 2

[0127] V = B (1) + B (2) × X i *+B(3)×Y i *+B(4)×X i *×Y i *+B(5)X i * 2 +B(6)×Y i * 2

[0128] The next step is to solve the equations, using the least squares method or other optimization methods to solve the above equations to find the best polynomial coefficients A(n) and B(n). These coefficients are the position mapping coefficients.

[0129] Then traverse all the pixels in the area: For each pixel (X*, Y*) in the current image area, use the obtained position mapping coefficients A(n) and B(n) to calculate its new position (U, V). Substitute the coordinates (X*, Y*) of each pixel into the polynomial equation to calculate the new coordinates (U, V):

[0130] U=A(1)+A(2)×X*+A(3)×Y*+A(4)×X*×Y*+A(5)X* 2 +A(6)×Y* 2

[0131] V=B(1)+B(2)×X*+B(3)×Y*+B(4)×X*×Y*+B(5)X* 2 +B(6)×Y* 2

[0132] Finally, according to the calculated new position (U, V), each pixel is moved from the original position (X*, Y*) to the new position (U, V). If (U, V) is not an integer coordinate, an interpolation technique (such as bilinear interpolation) can be used to fill in the new pixel value. All the corrected pixels are reassembled into a new image part, namely the correction area.

[0133] Since each region has its own position transformation polynomial, it can more effectively deal with distortion problems in specific regions, improving the success rate of correction. Even if there are particularly severe distortions in some areas, the local correction method can effectively solve these problems by adding more control points or adjusting the polynomial coefficients, enhancing the robustness of the system.

[0134] In one embodiment, the central axis of the initial corrected image is determined; a plurality of axis radius ranges are determined with the central axis of the initial corrected image as the center; and the initial corrected image is divided into a plurality of image regions based on the plurality of axis radius ranges.

[0135] The central axis refers to the symmetry axis or center line of the initial correction image. In HUD systems, since distortion is usually distributed axisymmetrically, the central axis usually refers to the geometric center line of the image. The central axis is used as a reference point to determine the location and division of each area. It can help ensure the symmetry and consistency of the partitions.

[0136] Axis radius range refers to different radius ranges extending outward from the central axis. Each axis radius range defines a ring or sector area. Through different axis radius ranges, the image can be divided into multiple concentric ring areas or sector areas. Each area represents a different level of distortion, which facilitates targeted local correction.

[0137] Specifically, the center point is calculated first to find the geometric center point (Xc, Yc) of the initial correction image. For an image with a width of W and a height of H, the center point is usually (W / 2, H / 2). Based on the center point, the central axis of the image is defined. The central axis can be a vertical line (Y = Yc) or a horizontal line (X = Xc) passing through the center point, or a cross formed by a combination of the two.

[0138] Then, the radius value is set, including setting a series of axis radius values ​​(R1, R2, R3, ... Rn) according to the characteristics of the distortion distribution and the required correction accuracy. These radius values ​​are arranged from small to large to form multiple annular regions. The region is divided, including dividing the image into multiple annular regions according to the set axis radius value with the central axis as the center. For example, the first region can be an annular region from the center to R1, the second region can be an annular region from R1 to R2, and so on.

[0139] Finally, mark the boundaries and mark the boundaries of each annular region in the image. This can be done by drawing circles or other methods. Confirm the partitions to ensure that each region has clear boundaries and the entire image is fully covered. If necessary, adjust the axis radius value according to the actual situation to ensure that the partitions are reasonable.

[0140] The division of regions based on the central axis and the axis radius helps to achieve a smooth transition in the subsequent fusion step and avoid seams or discontinuities between different regions. In addition, this regional division method can flexibly adjust the correction parameters according to the distortion characteristics of different regions, and is applicable to a variety of different optical systems and material properties.

[0141] In one of the embodiments, a seam edge area between adjacent correction areas is determined; each correction area is divided into a seam area and a non-seam area according to the seam edge area between the adjacent correction areas; a first position mapping coefficient corresponding to the seam area and a second position mapping coefficient corresponding to the non-seam area in each correction area are determined; based on the first position mapping coefficient corresponding to the seam area and the second position mapping coefficient corresponding to the non-seam area in each correction area, pixel points in each correction area are corrected to obtain an area to be fused corresponding to each correction area; and the areas to be fused corresponding to each correction area are fused to obtain a target correction image.

[0142] The seam edge area refers to the junction or overlapping part between adjacent correction areas. This area usually has abrupt changes or discontinuities in pixel values ​​and requires special processing to ensure a smooth transition. By determining the seam edge area, targeted smoothing can be performed to avoid obvious seams between different areas.

[0143] The seam area refers to the area near the edge of the seam when the correction area is divided. The pixels in this area need to be specially corrected to ensure a smooth transition with the adjacent area. The pixels in the seam area will be corrected using a specific position mapping coefficient (i.e., the first position mapping coefficient) to reduce or eliminate discontinuities at the seam.

[0144] The non-seam area refers to the area away from the seam edge when the correction area is divided. The pixels in this area do not need special processing and can be corrected using the conventional position mapping coefficients. The pixels in the non-seam area will be corrected using another set of position mapping coefficients (i.e., the second position mapping coefficients) to maintain their original correction accuracy and effect.

[0145] The first position mapping coefficients refer to the position transformation polynomial coefficients used for pixel correction in the seam area. These coefficients are optimized to make the pixels in the seam area transition smoothly with the adjacent areas. By using the first position mapping coefficients, the discontinuity at the seam can be effectively reduced or eliminated, improving the consistency and visual effect of the overall image.

[0146] The second position mapping coefficients refer to the position transformation polynomial coefficients used for pixel correction in the non-seam area. These coefficients are mainly used to maintain the correction accuracy and effect in the non-seam area. By using the second position mapping coefficients, it can be ensured that the pixels in the non-seam area still have high accuracy and quality after correction.

[0147] The regions to be fused refer to the correction regions after the correction process. Each correction region contains a seam region and a non-seam region, and has been corrected according to the corresponding first position mapping coefficient and second position mapping coefficient. The regions to be fused are the basis for the final fusion into the target correction image. By smoothly fusing these regions together, a high-quality target correction image can be obtained.

[0148] Specifically, the seam edge regions between adjacent correction regions are first determined, including finding all adjacent correction regions. The boundaries of each correction region are marked in the image. Based on the boundary information, the junctions or overlapping parts between adjacent correction regions are determined. These junctions are the seam edge regions.

[0149] Then, each correction area is divided into a seam area and a non-seam area, including defining a distance threshold. For example, the area within a certain range from the seam edge (such as 5 pixels wide) is defined as the seam area, and the rest is defined as the non-seam area. Pixels whose distance from the seam edge is less than the threshold are divided into the seam area. Pixels whose distance from the seam edge is greater than or equal to the threshold are divided into the non-seam area.

[0150] Next, determine the first position mapping coefficient corresponding to the seam area and the second position mapping coefficient corresponding to the non-seam area, including selecting a set of representative pixels in the seam area as control points. Record the actual positions (X*, Y*) of these control points after the preliminary global correction. Set each control point at the ideal position after correction (U, V). For each selected control point and its corresponding initial correction position (X*, Y*) and target expected position (U, V), establish a set of equations. Use the least squares method or other optimization methods to solve the optimal polynomial coefficients A (n) and B (n) through the above set of equations, which are the first position mapping coefficients.

[0151] Similarly, a set of representative pixels are selected as control points in the non-seam area. The actual positions (X*, Y*) of these control points after the preliminary global correction are recorded. The ideal position (U, V) after correction is set for each control point. For each selected control point and its corresponding initial correction position (X*, Y*) and target expected position (U, V), a set of equations is established. The optimal polynomial coefficients A(n) and B(n) are solved by the above set of equations using the least squares method or other optimization methods. These coefficients are the second position mapping coefficients.

[0152] Based on the first position mapping coefficient and the second position mapping coefficient, the pixels in each correction area are corrected, including calculating the new position (U, V) of each pixel (X*, Y*) in the seam area using the first position mapping coefficients A(n) and B(n). Substitute the coordinates (X*, Y*) of each pixel into the polynomial equation to calculate the new coordinates (U, V). According to the calculated new position (U, V), each pixel is moved from the original position (X*, Y*) to the new position (U, V). If (U, V) is not an integer coordinate, an interpolation technique (such as bilinear interpolation) can be used to fill in the new pixel value.

[0153] Similarly, for each pixel point (X*, Y*) in the non-seam area, use the second position mapping coefficients A(n) and B(n) to calculate its new position (U, V). Substitute the coordinates (X*, Y*) of each pixel point into the polynomial equation to calculate the new coordinates (U, V). According to the calculated new position (U, V), move each pixel point from the original position (X*, Y*) to the new position (U, V). If (U, V) is not an integer coordinate, an interpolation technique (such as bilinear interpolation) can be used to fill in the new pixel value.

[0154] Finally, all the corrected pixels are reassembled into a new image part, namely the area to be fused. A new blank image is created with the same size as the original image to be fused. Each area to be fused is filled into the new target image one by one according to its boundary information to obtain the target fused image.

[0155] Since different position mapping coefficients are used for the seam area and the non-seam area, the distortion problem in different areas can be handled more accurately, and the accuracy of local correction can be improved. And the use of special position mapping coefficients in the seam area can better preserve the detail information and reduce the distortion caused by correction.

[0156] In one of the embodiments, the distance between each correction area and the central axis is determined; based on the distance between each correction area and the central axis, the first position mapping coefficient corresponding to the seam area in each correction area, and the second position mapping coefficient corresponding to the non-seam area, the pixel points in each correction area are corrected to obtain the area to be fused corresponding to each correction area.

[0157] Specifically, first, the weight coefficient corresponding to each correction area is calculated according to the distance between each correction area and the central axis. Then, the third position mapping coefficient and the second position mapping coefficient are weighted by the calculated weight coefficients to obtain the fourth position mapping coefficient and the fifth position mapping coefficient. Finally, the pixel points are corrected according to the fourth position mapping coefficient and the fifth position mapping coefficient to generate the area to be fused. Through this method, the correction accuracy and smoothness can be further improved, the discontinuity at the seam can be reduced, and the quality and consistency of the overall image can be improved.

[0158] In one of the embodiments, for each of the correction areas, a partial differential series is added to the first position mapping coefficient corresponding to the seam area in the correction area to obtain a third position mapping coefficient corresponding to the seam area in the correction area; a weight coefficient corresponding to the correction area is determined according to the distance between the correction area and the central axis; the third position mapping coefficient corresponding to the seam area and the second position mapping coefficient corresponding to the non-seam area in the correction area are weighted by the weight coefficient corresponding to the correction area to obtain a fourth position mapping coefficient corresponding to the seam area and a fifth position mapping coefficient corresponding to the non-seam area in the correction area; the pixel points in each correction area are corrected according to the fourth position mapping coefficient corresponding to the seam area and the fifth position mapping coefficient corresponding to the non-seam area in each correction area to obtain the area to be fused corresponding to each correction area.

[0159] Among them, the partial differential sequence refers to a set of differential coefficient sequences used to describe local changes. In image processing, the partial differential sequence can be used to capture the detailed changes in the local area of ​​the image. By adding the partial differential sequence to the first position mapping coefficient corresponding to the seam area, the pixel position in the seam area can be adjusted more finely to further reduce the discontinuity at the seam.

[0160] The weight coefficient refers to a value calculated according to the distance between the correction area and the central axis, and is used to smoothly transition from the position mapping coefficient of the seam area to the position mapping coefficient of the non-seam area.

[0161] The third position mapping coefficient refers to the new position mapping coefficient obtained by adding the partial differential series to the first position mapping coefficient corresponding to the seam area. It is used to more finely adjust the pixel position in the seam area and further improve the correction accuracy and smoothness at the seam.

[0162] The fourth position mapping coefficient refers to a new position mapping coefficient obtained by weighting the third position mapping coefficient by the weight coefficient, and is used to perform a final correction on the pixel points in the seam area to ensure a smooth transition at the seam.

[0163] The fifth position mapping coefficient refers to a new position mapping coefficient obtained by weighting the second position mapping coefficient corresponding to the non-seam area by the weight coefficient, and is used to perform final correction on the pixels in the non-seam area to ensure consistency and smooth transition in the entire correction area.

[0164] Specifically, the first step is to add partial differential series, including selecting a set of appropriate partial differential series ΔA(n) and ΔB(n) to describe the local changes in the seam area. These partial differential series can be determined by local analysis of the image or based on prior knowledge. The partial differential series ΔA(n) and ΔB(n) are added to the first position mapping coefficients A1(n) and B1(n) to obtain new position mapping coefficients A3(n) and B3(n):

[0165] A3(n)= A1(n)+ ΔA(n)

[0166] B3(n)= B1(n)+ ΔB(n)

[0167] Then the weight coefficient corresponding to the correction area is determined, including calculating the distance d from each pixel point (X, Y) in each correction area to the central axis. If the central axis is a vertical line, the distance d can be expressed as |X−X c ∣; If it is a horizontal line, the distance d can be expressed as ∣Y−Y c ∣. Use Gaussian function or other smooth function to define the weight coefficient w:

[0168] W=

[0169] Among them, σ is a parameter that controls the degree of smoothness and can be adjusted according to actual needs. D is the distance from the pixel to the central axis.

[0170] Next, weighted processing is performed, including using a weight coefficient w to perform weighted processing on the third position mapping coefficients A3(n) and B3(n) and the second position mapping coefficients A2(n) and B2(n) for the seam area to obtain fourth position mapping coefficients A4(n) and B4(n):

[0171] A4(n)=w×A3(n)+(1−w)×A2(n)

[0172] B4(n)=w×B3(n)+(1−w)×B2(n)

[0173] For the non-seam area, the second position mapping coefficients A2(n) and B2(n) are directly used, that is, the fifth position mapping coefficients A5(n) and B5(n) are the same as the second position mapping coefficients:

[0174] A5(n)= A2(n)

[0175] B5(n)= B2(n)

[0176] Then, the pixels in each correction area are corrected according to the fourth position mapping coefficient and the fifth position mapping function, including selecting the corresponding fourth position mapping coefficient A4(n) and B4(n) or the fifth position mapping coefficient A5(n) and B5(n) for each pixel (X*, Y*) in each correction area according to whether the pixel belongs to the seam area or the non-seam area. Substitute the coordinates (X*, Y*) of each pixel into the polynomial equation to calculate the new coordinates (U, V):

[0177] For seam areas:

[0178] U=A4(1)+A4(2)×X*+A4(3)×Y*+A4(4)×X*×Y*+A4(5)X* 2 +A4(6)×Y* 2

[0179] V=B4(1)+B4(2)×X*+B4(3)×Y*+B4(4)×X*×Y*+B4(5)X* 2 +B4(6)×Y* 2

[0180] For non-seam areas:

[0181] U=A5(1)+A5(2)×X*+A5(3)×Y*+A5(4)×X*×Y*+A5(5)X* 2 +A5(6)×Y* 2

[0182] V=B5(1)+B5(2)×X*+B5(3)×Y*+B5(4)×X*×Y*+B5(5)X* 2 +B5(6)×Y* 2

[0183] Finally, according to the calculated new position (U, V), each pixel is moved from the original position (X*, Y*) to the new position (U, V). If (U, V) is not an integer coordinate, an interpolation technique (such as bilinear interpolation) can be used to fill in the new pixel value. All the corrected pixels are reassembled into a new image part, that is, the area to be fused. Make sure that all pixels in each correction area have been correctly corrected and there are no omissions or overlaps.

[0184] By adding the partial differential series to the first position mapping coefficient corresponding to the seam area, the pixel position in the seam area can be adjusted more finely, further reducing the discontinuity at the seam. This method can better adapt to the local distortion in the seam area and improve the correction accuracy. The weight coefficient is further calculated based on the distance between the correction area and the central axis to ensure a smooth transition from the seam area to the non-seam area, avoiding obvious boundaries or discontinuities.

[0185] In an exemplary embodiment, as shown in FIG3 , steps 302 to 306 are included. Among them:

[0186] Step 302, obtaining an image to be corrected, obtaining at least one pixel point from the image to be corrected, and determining an initial position and an initial expected position of each pixel point;

[0187] Step 304, based on the initial position and the initial expected position of each pixel point, calibrate each pixel point in the image to be calibrated to obtain an initial calibrated image;

[0188] Step 306, determining the central axis of the initial corrected image; determining multiple axis radius ranges with the central axis of the initial corrected image as the center; and dividing the initial corrected image into multiple image regions based on the multiple axis radius ranges;

[0189] Step 308, for each image area, obtaining at least one pixel point from the image area, and determining an initial correction position and a target expected position of the at least one pixel point;

[0190] Step 310, based on the initial correction position and the target expected position of at least one pixel point, determine a first position transformation polynomial; determine the position mapping coefficient in the first position transformation polynomial; based on the position mapping coefficient in the first position transformation polynomial and the initial correction position of each pixel point in the targeted image area, determine the target expected position of each pixel point in the targeted image area; move each pixel point in the targeted image area from the initial correction position of each pixel point to the target expected position of each pixel point, and obtain a correction area corresponding to the targeted image area;

[0191] Step 312, determine the seam edge area between adjacent correction areas; divide each correction area into a seam area and a non-seam area according to the seam edge area between adjacent correction areas; determine the first position mapping coefficient corresponding to the seam area and the second position mapping coefficient corresponding to the non-seam area in each correction area; determine the distance between each correction area and the central axis; for each of the correction areas, add a partial differential series to the first position mapping coefficient corresponding to the seam area in the correction area to obtain a third position mapping coefficient corresponding to the seam area in the correction area; determine the correction area according to the distance between the correction area and the central axis. weight coefficients corresponding to the targeted correction areas; weighting the third position mapping coefficients corresponding to the seam areas and the second position mapping coefficients corresponding to the non-seam areas in the targeted correction areas respectively through the weight coefficients corresponding to the targeted correction areas, so as to obtain the fourth position mapping coefficients corresponding to the seam areas and the fifth position mapping coefficients corresponding to the non-seam areas in the targeted correction areas; correcting the pixels in each correction area according to the fourth position mapping coefficients corresponding to the seam areas and the fifth position mapping coefficients corresponding to the non-seam areas in each correction area, so as to obtain the areas to be fused corresponding to each correction area; fusing the areas to be fused corresponding to each correction area to obtain the target correction image.

[0192] It should be understood that, although the steps in the flowcharts involved in the above embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps is not strictly limited in order, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above embodiments may include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.

[0193] Based on the same inventive concept, the embodiment of the present application also provides an image correction device for implementing the image correction method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in one or more image correction device embodiments provided below can refer to the limitations of the image correction method above, and will not be repeated here.

[0194] In an exemplary embodiment, as shown in FIG4 , an image correction device 400 is provided, comprising: a first determination module 402 , a first correction module 404 , a division module 406 , a second determination module 408 , a second correction module 410 and a fusion module 412 , wherein:

[0195] The first determination module 402 is used to obtain the image to be corrected, obtain at least one pixel point from the image to be corrected, and determine the initial position and the initial expected position of each pixel point;

[0196] A first correction module 404 is used to correct each pixel in the image to be corrected based on the initial position and the initial expected position of each pixel to obtain an initial corrected image;

[0197] A division module 406, for dividing the initial corrected image into a plurality of image regions;

[0198] A second determination module 408 is used to obtain at least one pixel point from each image area, and determine an initial correction position and a target expected position of the at least one pixel point;

[0199] The second correction module 410 is used to correct each pixel of the image area based on the initial correction position of at least one pixel and the target expected position to obtain a correction area corresponding to the image area;

[0200] The fusion module 412 is used to fuse the correction areas corresponding to the image areas to obtain a target corrected image.

[0201] In one embodiment, the second correction module 410 is used to determine a first position transformation polynomial based on an initial correction position and a target expected position of at least one pixel point; determine a position mapping coefficient in the first position transformation polynomial; determine the target expected position of each pixel point in the targeted image area based on the position mapping coefficient in the first position transformation polynomial and the initial correction position of each pixel point in the targeted image area; move each pixel point in the targeted image area from the initial correction position of each pixel point to the target expected position of each pixel point to obtain a correction area corresponding to the targeted image area.

[0202] In one embodiment, the division module 406 is used to determine the central axis of the initial corrected image; determine multiple axis radius ranges with the central axis of the initial corrected image as the center; and divide the initial corrected image into multiple image regions based on the multiple axis radius ranges.

[0203] In one embodiment, the fusion module 412 is used to determine the seam edge area between adjacent correction areas; divide each correction area into a seam area and a non-seam area according to the seam edge area between adjacent correction areas; determine a first position mapping coefficient corresponding to the seam area and a second position mapping coefficient corresponding to the non-seam area in each correction area; correct the pixel points in each correction area according to the first position mapping coefficient corresponding to the seam area and the second position mapping coefficient corresponding to the non-seam area in each correction area to obtain the area to be fused corresponding to each correction area; fuse the areas to be fused corresponding to each correction area to obtain a target corrected image.

[0204] In one embodiment, the fusion module 412 is used to determine the distance between each correction area and the central axis; according to the distance between each correction area and the central axis, the first position mapping coefficient corresponding to the seam area of ​​each correction area and the second position mapping coefficient corresponding to the non-seam area, the pixel points in each correction area are corrected to obtain the area to be fused corresponding to each correction area.

[0205] In one embodiment, the fusion module 412 is used to add a partial differential series to the first position mapping coefficient corresponding to the seam area in the correction area for each of the correction areas, so as to obtain a third position mapping coefficient corresponding to the seam area in the correction area; determine the weight coefficient corresponding to the correction area according to the distance between the correction area and the central axis; perform weighted processing on the third position mapping coefficient corresponding to the seam area and the second position mapping coefficient corresponding to the non-seam area in the correction area according to the weight coefficient corresponding to the correction area, so as to obtain a fourth position mapping coefficient corresponding to the seam area and a fifth position mapping coefficient corresponding to the non-seam area in the correction area; perform correction on the pixels in each correction area according to the fourth position mapping coefficient corresponding to the seam area and the fifth position mapping coefficient corresponding to the non-seam area in each correction area, so as to obtain the area to be fused corresponding to each correction area.

[0206] Each module in the above-mentioned image correction device can be implemented in whole or in part by software, hardware or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute the operations corresponding to each module.

[0207] In an exemplary embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be shown in FIG5. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. The processor, the memory and the input / output interface are connected via a system bus, and the communication interface is connected to the system bus via the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store data related to image correction. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal via a network connection. When the computer program is executed by the processor, an image correction method is implemented.

[0208] Those skilled in the art will understand that the structure shown in FIG. 5 is merely a block diagram of a partial structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different arrangement of components.

[0209] In one embodiment, a computer device is further provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above method embodiments when executing the computer program.

[0210] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.

[0211] In one embodiment, a computer program product is provided, including a computer program, which implements the steps in the above method embodiments when executed by a processor.

[0212] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations.

[0213] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in this application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, an artificial intelligence (AI) processor, etc., but are not limited to this.

[0214] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.

[0215] The above embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.

Claims

1. An image correction method, characterized in that: The method comprises: Acquire an image to be corrected, acquire at least one pixel point from the image to be corrected, and determine an initial position and an initial expected position of each pixel point; Based on the initial position of each pixel point and the initial expected position, correct each pixel point in the image to be corrected to obtain an initial corrected image; Dividing the initial corrected image into a plurality of image regions; For each of the image regions, obtaining at least one pixel point from the image region, and determining an initial correction position and a target expected position of the at least one pixel point; Based on the initial correction position of the at least one pixel point and the target expected position, correct each pixel point of the targeted image area to obtain a correction area corresponding to the targeted image area; The correction areas corresponding to the image areas are fused to obtain a target correction image.

2. The method according to claim 1, characterized in that The step of correcting each pixel of the image area based on the initial correction position of the at least one pixel and the target expected position to obtain a correction area corresponding to the image area includes: Determining a first position transformation polynomial based on the initial corrected position of the at least one pixel and the target expected position; determining position mapping coefficients in the first position transformation polynomial; Determining a target desired position of each pixel point in the image area based on the position mapping coefficients in the first position transformation polynomial and the initial correction position of each pixel point in the image area; Each pixel point in the targeted image area is moved from an initial correction position of each pixel point to a target expected position of each pixel point to obtain a correction area corresponding to the targeted image area.

3. The method according to claim 1, characterized in that The step of dividing the initial corrected image into a plurality of image regions comprises: Determining the central axis of the initial corrected image; Determine multiple axis radius ranges with the central axis of the initial corrected image as the center; Based on the multiple axis radius ranges, the initial corrected image is divided into multiple image regions.

4. The method according to claim 3, characterized in that The fusing of the correction areas corresponding to the image areas to obtain a target correction image includes: determining seam edge regions between adjacent correction regions; Dividing each of the correction areas into a seam area and a non-seam area according to the seam edge area between the adjacent correction areas; Determine a first position mapping coefficient corresponding to a seam area and a second position mapping coefficient corresponding to a non-seam area in each of the correction areas; Correct the pixels in each of the correction areas according to the first position mapping coefficient corresponding to the seam area and the second position mapping coefficient corresponding to the non-seam area in each of the correction areas, and obtain the area to be fused corresponding to each of the correction areas; The areas to be fused corresponding to the correction areas are fused to obtain a target correction image.

5. The method according to claim 4, characterized in that The step of correcting the pixels in each correction area according to the first position mapping coefficient corresponding to the seam area and the second position mapping coefficient corresponding to the non-seam area in each correction area to obtain the area to be fused corresponding to each correction area includes: Determining the distance between each of the correction areas and the central axis; According to the distance between each correction area and the central axis, the first position mapping coefficient corresponding to the seam area in each correction area and the second position mapping coefficient corresponding to the non-seam area, the pixel points in each correction area are corrected to obtain the area to be fused corresponding to each correction area.

6. The method according to claim 5, characterized in that The method of correcting the pixel points in each correction area according to the distance between each correction area and the central axis, the first position mapping coefficient corresponding to the seam area in each correction area, and the second position mapping coefficient corresponding to the non-seam area, to obtain the area to be fused corresponding to each correction area, comprises: For each of the correction regions, a partial differential sequence is added to the first position mapping coefficient corresponding to the seam region in the correction region to obtain a third position mapping coefficient corresponding to the seam region in the correction region; Determining a weight coefficient corresponding to the targeted correction area according to a distance between the targeted correction area and the central axis; By using the weight coefficient corresponding to the targeted correction area, weighted processing is performed on the third position mapping coefficient corresponding to the seam area and the second position mapping coefficient corresponding to the non-seam area in the targeted correction area, respectively, to obtain the fourth position mapping coefficient corresponding to the seam area and the fifth position mapping coefficient corresponding to the non-seam area in the targeted correction area; According to the fourth position mapping coefficient corresponding to the seam area in each correction area and the fifth position mapping coefficient corresponding to the non-seam area, the pixel points in each correction area are corrected to obtain the area to be fused corresponding to each correction area.

7. An image correction device, characterized in that: The device comprises: A first determination module is used to obtain an image to be corrected, obtain at least one pixel point from the image to be corrected, and determine an initial position and an initial expected position of each pixel point; A first correction module, configured to correct each pixel in the image to be corrected based on the initial position of each pixel and the initial expected position, so as to obtain an initial corrected image; A division module, used for dividing the initial corrected image into a plurality of image regions; A second determination module is used to obtain at least one pixel point from each of the image areas, and determine an initial correction position and a target expected position of the at least one pixel point; A second correction module, configured to correct each pixel of the targeted image area based on the initial correction position of the at least one pixel and the target expected position, to obtain a correction area corresponding to the targeted image area; The fusion module is used to fuse the correction areas corresponding to the image areas to obtain a target correction image.

8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.

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

10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.