A method, device, system and storage medium for image distortion correction

By performing block correction and adaptive convolution filter processing on the display screen image, combined with the multi-scale anti-mixing correction model, the problem of poor local distortion processing in the prior art is solved, and the visual quality of the image and aliasing elimination effect are improved.

CN119228699BActive Publication Date: 2025-04-04SHENZHEN SEICHITECH TECHN CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411718973.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-11-28
Publication Date
2025-04-04
Estimated Expiration
2044-11-28

AI Technical Summary

Technical Problem

In the distortion correction of display screen images, it is difficult to effectively deal with local distortion, resulting in aliasing and blurring of images, affecting visual quality.

Method used

By chunking the display screen images to be corrected, correcting them using a scale invariant distortion correction model, and constructing an adaptive convolution filter for anti-aliasing processing, combining a multi-scale anti-mixing correction model to process the edge area of ​​the image block, and finally splicing the corrected image sub-blocks into a complete target correction image.

Benefits of technology

It improves the aliasing elimination effect of the display screen image, enhances the local correction accuracy, reduces the computational complexity, and improves the visual coherence and quality of the image.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119228699B_ABST
    Figure CN119228699B_ABST
Patent Text Reader

Abstract

The present application discloses a method, device, system and storage medium for image distortion correction, which are used to improve the aliasing elimination effect of display screen images. The display screen image to be corrected is divided into blocks to generate a plurality of image sub-block sets; the plurality of image sub-blocks are input into a scale-invariant distortion correction model for distortion correction, and a plurality of transformation matrices are generated, wherein the transformation matrix is ​​a set of transformation coefficients of pixel point coordinates before and after correction; an adaptive convolution filter is constructed according to the plurality of transformation matrices; the plurality of image sub-blocks after distortion correction are input into the adaptive convolution filter for anti-aliasing convolution and interpolation calculation, and the plurality of image sub-blocks after pixel point optimization correction are output; the edge areas of the plurality of image sub-blocks after correction are subjected to multi-scale anti-aliasing correction; the plurality of image sub-blocks are spliced ​​to generate a complete target corrected image.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of display screen detection, and in particular to a method, device, system and storage medium for image distortion correction. Background Art

[0002] With the update and iteration of electronic products, display screens are used more frequently, and consumers have higher requirements for product quality. This has led to an increase in the content of display screen inspections and an increase in the accuracy of inspections. The inspection of display screens has increased with the improvement of the precision and functionality of display screens. The more precise the display screen, the more likely the pixels will be distorted before correction. For this reason, it is necessary to use different grayscales, different images, and different templates to light up a specific display screen, and perform distortion correction based on the captured image. Compared with the distortion correction of general images, the distortion correction of display screen images is more complicated.

[0003] Distortion correction is a key step in display inspection, which aims to correct the geometric distortion caused by a specific lens to ensure the geometric accuracy and visual consistency of the display image. Radial distortion is usually caused by the different degrees of bending of light by a specific lens, which manifests as barrel or pincushion distortion; tangential distortion is caused by the non-parallelism of the imaging plane of the camera system and the object plane, which is usually caused by lens assembly errors. Although some distortions have little effect on visual effects, in applications requiring high-precision geometric measurement, distortion may cause serious errors, affecting the accuracy and reliability of display image analysis. The current traditional display image distortion correction methods can be divided into hardware correction and software correction. Hardware correction is usually achieved by improving the lens design, such as adding special lenses to correct the projection light, but this method requires extremely high manufacturing accuracy, is expensive, and has limited effect. The linear distortion correction algorithm in software correction selects a reference object and restores it in combination with camera parameters. It has a good effect on linear distortion correction, but the effect is significantly reduced when dealing with nonlinear distortion, especially in the field of high-precision measurement. The distortion correction process usually requires a transformation and resampling operation of the display screen image. However, due to the discreteness of the display screen image and the limitation of bandwidth, the resampling process will inevitably produce aliasing.

[0004] In the prior art, a polynomial distortion correction model is usually used to perform a distortion correction on the display screen image. After the display screen image is corrected by the model, although the distortion in the center of the display screen image is effectively controlled, significant distortion usually occurs in the four corners of the image. The adverse effects caused by this distortion include not only geometric deformation, but also obvious aliasing and blurring. Especially in the edge areas of the image with significant distortion, wavy artifacts are often seen, which seriously affect the visual quality of the image. In order to solve the above problems, it is usually necessary to construct a convolution filter. This convolution filter belongs to an anti-aliasing correction model, which can achieve adaptive anti-aliasing correction of distorted images to a certain extent, and achieve high-precision correction of the entire distorted image. However, this method only targets the entire display screen image, and it is difficult to take into account the differences in local distortion conditions, which reduces the effect of eliminating aliasing of the display screen image. Summary of the invention

[0005] The present application discloses a method, device, system and storage medium for image distortion correction, which are used to improve the effect of eliminating aliasing of display screen images.

[0006] The first aspect of the present application discloses a method for image distortion correction, comprising:

[0007] Divide the display screen image to be corrected into blocks to generate a plurality of image sub-block sets;

[0008] Inputting several image sub-blocks into a scale-invariant distortion correction model for distortion correction, and generating several transformation matrices, where the transformation matrix is ​​a set of transformation coefficients of pixel point coordinates before and after correction;

[0009] Constructing an adaptive convolution filter based on several transformation matrices;

[0010] Inputting several image sub-blocks after distortion correction into an adaptive convolution filter for anti-aliasing convolution and interpolation calculation, and outputting several image sub-blocks after pixel optimization correction;

[0011] Perform multi-scale anti-aliasing correction on edge areas of several corrected image sub-blocks;

[0012] Several image sub-blocks are spliced ​​together to generate a complete target corrected image.

[0013] Optionally, an adaptive convolution filter is constructed according to several transformation matrices, including:

[0014] Calculate the Jacobian value of the pixel point on each image sub-block, and perform inverse mapping on the Jacobian value to generate the inverse mapped Jacobian value;

[0015] Generate a spatial Gaussian kernel and an intensity Gaussian kernel for each image sub-block;

[0016] Generate a bilateral filter kernel based on a spatial Gaussian kernel and an intensity Gaussian kernel;

[0017] Calculate the adaptive deformable convolution kernel of each pixel according to the Jacobian ratio value and bilateral filter kernel after inverse mapping;

[0018] An adaptive convolution filter is constructed according to several transformation matrices, adaptive deformable convolution kernels and preset interpolation methods.

[0019] Optionally, multi-scale anti-aliasing correction is performed on edge regions of the corrected plurality of image sub-blocks, including:

[0020] Decompose the rectified image sub-blocks into multiple scales, and generate at least two scales for each image sub-block;

[0021] Generate a corresponding comprehensive feature function according to the contrast and texture complexity of each image sub-block;

[0022] Calculate the corresponding adaptive weights for different scales of each image sub-block according to the comprehensive feature function;

[0023] Multi-scale fusion is performed for the edge area of ​​each image sub-block according to the adaptive weights of different scales.

[0024] Optionally, a corresponding comprehensive feature function is generated according to the contrast and texture complexity of each image sub-block, including:

[0025] Calculate the contrast characteristic function of each image sub-block;

[0026] Calculate the texture complexity feature function of each image sub-block;

[0027] Determine the contrast weight and texture complexity weight of each image sub-block;

[0028] The comprehensive feature function of each image sub-block is calculated according to the contrast weight, the texture complexity weight, the contrast feature function and the texture complexity feature function.

[0029] Optionally, a texture complexity feature function is calculated for each image sub-block, including:

[0030] The texture complexity feature function is calculated based on the gradient assignment and local entropy of each image sub-block.

[0031] Optionally, determining a contrast weight and a texture complexity weight of each image sub-block includes:

[0032] Calculate the grayscale mean of each image sub-block;

[0033] Calculate the contrast coefficient of each image sub-block according to its own grayscale mean and the grayscale mean of the adjacent image sub-blocks;

[0034] Draw a reference line parallel to each edge of each image sub-block;

[0035] Take the pixel points on the edge reference line to perform edge grayscale analysis and generate the texture complexity coefficient of each image sub-block;

[0036] The contrast weight and texture complexity weight of each image sub-block are calculated according to the contrast coefficient and the texture complexity coefficient.

[0037] Optionally, adjacent image sub-blocks have overlapping areas;

[0038] Several image sub-blocks are stitched together to generate a complete target corrected image, including:

[0039] Determine the overlapping area between adjacent image sub-blocks;

[0040] Calculate the respective contrast features and texture complexity features based on adjacent image sub-blocks and redundant overlapping areas;

[0041] Calculate respective adaptive weights according to the contrast characteristics and texture complexity characteristics of adjacent image sub-blocks;

[0042] Calculate the splicing pixel value according to the overlapping area and adaptive weight between adjacent image sub-blocks;

[0043] Adjacent image sub-blocks are spliced ​​according to the splicing pixel values, so that several image sub-blocks are spliced ​​to generate a complete target corrected image.

[0044] The second aspect of the present application discloses a device for image distortion correction, comprising:

[0045] A first generating unit, used for dividing the display screen image to be corrected into blocks to generate a plurality of image sub-block sets;

[0046] The second generating unit is used to input a plurality of image sub-blocks into a scale-invariant distortion correction model for distortion correction, and generate a plurality of transformation matrices, where the transformation matrix is ​​a set of transformation coefficients of pixel point coordinates before and after correction;

[0047] A construction unit, used for constructing an adaptive convolution filter according to a plurality of transformation matrices;

[0048] An output unit, used for inputting the several image sub-blocks after distortion correction into an adaptive convolution filter for anti-aliasing convolution and interpolation calculation, and outputting the several image sub-blocks after pixel optimization correction;

[0049] A correction unit, used for performing multi-scale anti-aliasing correction on edge areas of the corrected plurality of image sub-blocks;

[0050] The third generating unit is used to splice a plurality of image sub-blocks to generate a complete target corrected image.

[0051] Optionally, the construction unit includes:

[0052] Calculate the Jacobian value of the pixel point on each image sub-block, and perform inverse mapping on the Jacobian value to generate the inverse mapped Jacobian value;

[0053] Generate a spatial Gaussian kernel and an intensity Gaussian kernel for each image sub-block;

[0054] Generate a bilateral filter kernel based on a spatial Gaussian kernel and an intensity Gaussian kernel;

[0055] Calculate the adaptive deformable convolution kernel of each pixel according to the Jacobian ratio value and bilateral filter kernel after inverse mapping;

[0056] An adaptive convolution filter is constructed according to several transformation matrices, adaptive deformable convolution kernels and preset interpolation methods.

[0057] Optional, correction unit, including:

[0058] A decomposition module, used for performing multi-scale decomposition on the corrected image sub-blocks, where each image sub-block generates at least two scales;

[0059] A generation module, used for generating a corresponding comprehensive feature function according to the contrast and texture complexity of each image sub-block;

[0060] A calculation module, used for calculating corresponding adaptive weights for different scales of each image sub-block according to the comprehensive feature function;

[0061] The fusion module is used to perform multi-scale fusion for the edge area of ​​each image sub-block according to adaptive weights of different scales.

[0062] Optionally, generate modules, including:

[0063] A first calculation submodule, used for calculating a contrast characteristic function of each image subblock;

[0064] The second calculation submodule is used to calculate the texture complexity characteristic function of each image subblock;

[0065] A determination submodule, used to determine the contrast weight and texture complexity weight of each image subblock;

[0066] The third calculation submodule is used to calculate the comprehensive feature function of each image sub-block according to the contrast weight, the texture complexity weight, the contrast feature function and the texture complexity feature function.

[0067] Optionally, the second computing submodule includes:

[0068] The texture complexity feature function is calculated based on the gradient assignment and local entropy of each image sub-block.

[0069] Optionally, determine the submodules, including:

[0070] Calculate the grayscale mean of each image sub-block;

[0071] Calculate the contrast coefficient of each image sub-block according to its own grayscale mean and the grayscale mean of the adjacent image sub-blocks;

[0072] Draw a reference line parallel to each edge of each image sub-block;

[0073] Take the pixel points on the edge reference line to perform edge grayscale analysis and generate the texture complexity coefficient of each image sub-block;

[0074] The contrast weight and texture complexity weight of each image sub-block are calculated according to the contrast coefficient and the texture complexity coefficient.

[0075] Optionally, adjacent image sub-blocks have overlapping areas;

[0076] The third generation unit includes:

[0077] Determine the overlapping area between adjacent image sub-blocks;

[0078] Calculate the respective contrast features and texture complexity features based on adjacent image sub-blocks and redundant overlapping areas;

[0079] Calculate respective adaptive weights according to the contrast characteristics and texture complexity characteristics of adjacent image sub-blocks;

[0080] Calculate the splicing pixel value according to the overlapping area and adaptive weight between adjacent image sub-blocks;

[0081] Adjacent image sub-blocks are spliced ​​according to the splicing pixel values, so that several image sub-blocks are spliced ​​to generate a complete target corrected image.

[0082] A third aspect of the present application provides a system for image distortion correction, comprising:

[0083] Processor, memory, input-output unit, and bus;

[0084] The processor is connected to the memory, the input and output unit, and the bus;

[0085] The memory stores a program, and the processor calls the program to execute the first aspect and any optional method of the first aspect.

[0086] A fourth aspect of the present application provides a computer-readable storage medium, on which a program is stored. When the program is executed on a computer, the program executes the first aspect and any optional method of the first aspect.

[0087] It can be seen from the above technical solutions that the embodiments of the present application have the following advantages:

[0088] In this application, the image that needs to be corrected for distortion is first divided into blocks, and each block is corrected according to its degree of distortion, and the specific distortion of each block is corrected in a targeted manner. For blocks with severe distortion, each image area can be independently corrected according to its specific degree of distortion, and more sophisticated correction parameters or algorithms can be used to improve local correction accuracy, and complex calculations can be avoided in unnecessary areas, thereby improving overall calculation efficiency and overall correction effect.

[0089] Secondly, the edge area of ​​each image block is decomposed at multiple scales to obtain multiple scale levels, each of which processes different levels of detail information. Through multi-scale decomposition, each scale level can specifically process the type of detail that is suitable for it, and the details are dispersed to different levels for processing, thereby avoiding artifacts caused by over-processing at a certain scale and improving image quality.

[0090] Finally, when stitching the corrected image blocks, the edge area may have an unsmooth transition. The multi-scale anti-aliasing correction model is used to process the image blocks. The multi-scale anti-aliasing correction model constructs a convolution filter to process the edge area at multiple scales, making the texture transition more natural and the transition of the entire edge area smoother, reducing the abruptness. The multi-scale anti-aliasing correction model can effectively eliminate the edge mismatch defects caused by the splicing of image blocks, thereby improving the edge transition effect and enhancing the visual coherence of the image. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0092] Figure 1 A schematic diagram of an embodiment of the method for image distortion correction of the present application;

[0093] Figure 2 A schematic diagram of an embodiment of a method for constructing an adaptive convolution filter in the present application;

[0094] Figure 3A schematic diagram of an embodiment of a method for performing multi-scale anti-aliasing correction on edge areas of image sub-blocks of the present application;

[0095] Figure 4 A schematic diagram of an embodiment of a method for generating a comprehensive feature function for the present application;

[0096] Figure 5 A schematic diagram of an embodiment of a method for calculating a texture complexity characteristic function of an image sub-block according to the present application;

[0097] Figure 6 A schematic diagram of an embodiment of a method for calculating contrast weight and texture complexity weight in the present application;

[0098] Figure 7 A schematic diagram of an embodiment of the method for splicing image sub-blocks of the present application;

[0099] Figure 8 A schematic diagram of an embodiment of a device for image distortion correction according to the present application;

[0100] Fig. 9 A schematic diagram of an embodiment of a system for image distortion correction according to the present application. DETAILED DESCRIPTION

[0101] In the following description, specific details such as specific system structures, technologies, etc. are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present application. However, it should be clear to those skilled in the art that the present application may also 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 prevent unnecessary details from obstructing the description of the present application.

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

[0103] It should also be understood that the term “and / or” used in the specification and appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes these combinations.

[0104] As used in the specification and appended claims of this application, the term "if" can be interpreted as "when" or "uponce" 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 "uponce it is determined" or "in response to determining" or "uponce [described condition or event] is detected" or "in response to detecting [described condition or event]", depending on the context.

[0105] 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.

[0106] References to "one embodiment" or "some embodiments" etc. described in the specification of this application mean that one or more embodiments of the present application include specific features, structures or characteristics described in conjunction with the embodiment. Therefore, the statements "in one embodiment", "in some embodiments", "in some other embodiments", "in some other embodiments", etc. that appear in different places in this specification do not necessarily refer to the same embodiment, but mean "one or more but not embodiments", unless otherwise specifically emphasized in other ways. The terms "including", "comprising", "having" and their variations all mean "including but not limited to", unless otherwise specifically emphasized in other ways.

[0107] In the prior art, a polynomial distortion correction model is usually used to perform a distortion correction on the display screen image. After the display screen image is corrected by the model, although the distortion in the center of the display screen image is effectively controlled, significant distortion usually occurs in the four corners of the image. The adverse effects caused by this distortion include not only geometric deformation, but also obvious aliasing and blurring. Especially in the edge areas of the image with significant distortion, wavy artifacts are often seen, which seriously affect the visual quality of the image. In order to solve the above problems, it is usually necessary to construct a convolution filter. This convolution filter belongs to an anti-aliasing correction model, which can achieve adaptive anti-aliasing correction of distorted images to a certain extent, and achieve high-precision correction of the entire distorted image. However, this method only targets the entire display screen image, and it is difficult to take into account the differences in local distortion conditions, which reduces the effect of eliminating aliasing of the display screen image.

[0108] Based on this, the present application discloses a method, device, system and storage medium for image distortion correction, which are used to improve the effect of eliminating aliasing of display screen images.

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

[0110] The method of the present application can be applied to a server, a device, a terminal or other devices with logic processing capabilities, and the present application does not limit this. For the convenience of description, the following description is made by taking the execution subject as an example of a terminal.

[0111] See also Figure 1 The present application provides an embodiment of a method for image distortion correction, comprising:

[0112] 101. Divide the display screen image to be corrected into blocks to generate a plurality of image sub-block sets;

[0113] In this embodiment, the terminal divides the display screen image to be corrected into blocks to generate a plurality of image sub-block sets, which may be uniform blocks without overlap, or blocks with overlap, or blocks in a variety of different ways.

[0114] Specifically, it can be to analyze the content features in the display screen image, such as color, texture, object edge, etc., and divide the area with similar features into a sub-block. This requires the use of image segmentation algorithms, such as threshold-based segmentation, region growing algorithm, etc. First, set a threshold based on a certain feature, and then start from a certain point in the image. If the color difference between adjacent pixels is less than the threshold, they are classified as the same area, and the area is continuously expanded until it can no longer be expanded. This area becomes an image sub-block. Image sub-blocks are grouped according to different content features, and image sub-blocks with different distortions are divided into corresponding groups, which can better adapt to complex distortion patterns.

[0115] 102. Inputting a plurality of image sub-blocks into a scale-invariant distortion correction model for distortion correction, and generating a plurality of transformation matrices, where the transformation matrix is ​​a set of transformation coefficients of pixel point coordinates before and after correction;

[0116] The divided image sub-blocks are input into the scale-invariant distortion correction model for distortion correction. The internal mechanism of the model is based on some mathematical transformations and feature extraction algorithms. When the image sub-blocks are input into the scale-invariant distortion correction model, the model will reposition the pixels in the image sub-blocks according to its internal algorithm. For distorted pixels, the model will calculate their correct positions in the undistorted case.

[0117] The traditional polynomial model has a relatively simple change in the x and y directions, while the change in the x and y directions of the scale-invariant distortion correction model is no longer determined by a single overall factor. The image is not determined by the radial distortion, but by the change in each direction. Therefore, the image can maintain the consistency of scale transformation during correction. At the same time, considering that high-order terms are difficult to include and effectively calculate in the actual modeling process, and the high-order effects on the image are increasingly complex and cannot be analyzed, this embodiment uses second-order radial terms to model lens distortion to achieve a more stable and controllable correction effect.

[0118] Specifically, the formula for high-order terms in actual modeling is:

[0119]

[0120] The formula for the second-order radial term is:

[0121]

[0122] in , which means from the center of the image to the point The radial distance represents the corrected image coordinates, Represents the original image coordinates before correction.

[0123] 103. Construct an adaptive convolution filter according to a number of transformation matrices;

[0124] The terminal constructs an adaptive convolution filter based on several transformation matrices for adaptive convolution filtering. The transformation matrix contains the transformation coefficient information of the pixel coordinates before and after the distortion correction of the image sub-block. These coefficients reflect the geometric transformation of the image during the correction process, such as translation, rotation, scaling and other operations.

[0125] For each transformation matrix, the value of its elements determines the mapping relationship of the pixels.

[0126] An adaptive convolution filter is a filter that dynamically adjusts its parameters based on the characteristics of the input data. Unlike traditional fixed-parameter convolution filters, it can adapt to different image contents and transformations. In this case, constructing an adaptive convolution filter based on the transformation information of the image sub-block obtained from the transformation matrix can better process the distortion-corrected image.

[0127] 104. Inputting the plurality of image sub-blocks after distortion correction into an adaptive convolution filter for anti-aliasing convolution and interpolation calculation, and outputting the plurality of image sub-blocks after pixel optimization correction;

[0128] In image processing, aliasing can lead to image quality degradation, such as jagged edges or false textures. When processing the distortion-corrected image sub-blocks, anti-aliasing convolution is particularly important because the previous distortion correction process may introduce some high-frequency components or change the distribution of pixels. For example, after distortion correction of an image sub-block with complex textures, the originally smooth texture may become discontinuous due to the coordinate transformation during the correction process. Anti-aliasing convolution can smooth these discontinuous parts to a certain extent while retaining the important features of the image.

[0129] Interpolation calculation is used to supplement or adjust the pixel values ​​in the image sub-block in this process. After distortion correction, the pixel coordinates of the image sub-block may change irregularly, resulting in missing or inaccurate pixel positions. Interpolation calculation can estimate these missing or inaccurate pixel values ​​based on the values ​​of the surrounding pixels. For example, if a pixel in the image sub-block moves to a non-integer coordinate position after distortion correction, interpolation calculation can calculate the approximate value of this non-integer coordinate pixel based on the values ​​of the integer coordinate pixels around the pixel.

[0130] 105. Perform multi-scale anti-aliasing correction on edge regions of the corrected plurality of image sub-blocks;

[0131] In this embodiment, it is necessary to perform multi-scale anti-aliasing correction on the edge areas of several corrected image sub-blocks. Because the image is processed in blocks and pixel processing is performed on different blocks, the edge area needs to be processed before stitching so that the resulting image will not be abnormal at the stitching.

[0132] In an image, the edge region is the boundary between different objects or different regions. After the previous distortion correction and convolution interpolation operations, although the overall image quality has been improved, the edge region may still have aliasing due to its special pixel value change characteristics. For example, during the correction process, if the edge region is not processed finely enough, the edge may appear jagged or blurred. In addition, the previous correction operation may leave some distortion residues in the edge region, affecting the visual effect of the image. The multi-scale method can analyze and process the edge region at different levels of detail. At a small scale, the tiny details of the edge, such as thin lines or tiny texture changes, can be captured; at a large scale, the overall direction and macro structure of the edge can be grasped.

[0133] 106. Several image sub-blocks are stitched together to generate a complete target corrected image.

[0134] Before stitching, feature points at the edges of sub-blocks are detected to ensure feature matching between adjacent image sub-blocks. Due to the previous distortion correction and anti-aliasing processing, each image sub-block has certain differences in the coordinate system, and coordinate transformation will be performed to ensure that the sub-blocks can be correctly aligned when stitching. After a series of operations, the corrected image sub-blocks are stitched together to generate a complete target corrected image.

[0135] In this embodiment, if there is no overlapping portion when dividing the blocks, it is necessary to align the edge pixels; if there is an overlap, it is necessary to align the overlapping pixels.

[0136] In this embodiment, the image to be corrected for distortion is first divided into blocks, and each block is corrected according to its degree of distortion, and the specific distortion of each block is corrected in a targeted manner. For blocks with severe distortion, each image area can be independently corrected according to its specific degree of distortion, and more sophisticated correction parameters or algorithms can be used to improve local correction accuracy, and complex calculations can be avoided in unnecessary areas, thereby improving overall calculation efficiency and overall correction effect.

[0137] Secondly, the edge area of ​​each image block is decomposed at multiple scales to obtain multiple scale levels, each of which processes different levels of detail information. Through multi-scale decomposition, each scale level can specifically process the type of detail that is suitable for it, and the details are dispersed to different levels for processing, thereby avoiding artifacts caused by over-processing at a certain scale and improving image quality.

[0138] Finally, when stitching the corrected image blocks, the edge area may have an unsmooth transition. The multi-scale anti-aliasing correction model is used to process the image blocks. The multi-scale anti-aliasing correction model constructs a convolution filter to process the edge area at multiple scales, making the texture transition more natural and the transition of the entire edge area smoother, reducing the abruptness. The multi-scale anti-aliasing correction model can effectively eliminate the edge mismatch defects caused by the splicing of image blocks, thereby improving the edge transition effect and enhancing the visual coherence of the image.

[0139] See also Figure 2 The present application provides an embodiment of a method for constructing an adaptive convolution filter, comprising:

[0140] 201. Calculate the Jacobian value of the pixel point on each image sub-block, and perform inverse mapping on the Jacobian value to generate the inverse mapped Jacobian value;

[0141] Extract the pixel coordinates of each pixel from the target distorted image block to ensure that complete pixel coordinate information is obtained. Input each pixel coordinate into the Jacobian calculation formula.

[0142] Specifically, the general formula of Jacobi calculation formula is:

[0143]

[0144] in: and Indicates that the target contains a function Partial derivatives with respect to x and y.

[0145] and Another objective function Partial derivatives with respect to x and y.

[0146] In image correction, as well as These two symbols represent the Jacobian matrix of the inverse mapping transformation and the inverse mapping transformation itself. That is:

[0147] : In the image correction model, the coordinates after distortion correction are The inverse transformation that maps back to the original distorted coordinates can be understood as a transformation function from the corrected coordinates to the distorted coordinates.

[0148]

[0149] Represents the inverse mapping transformation In the correction coordinates The Jacobian matrix at . It reflects the local scaling and distortion characteristics of the inverse mapping at the current position. The Jacobian value after inverse mapping is obtained.

[0150] 202. Generate a spatial Gaussian kernel and an intensity Gaussian kernel for each image sub-block;

[0151] The spatial Gaussian kernel is a traditional Gaussian kernel that assigns weights based on the spatial distance between pixels. s The (x,y) formula is as follows:

[0152]

[0153] : The standard deviation of the spatial Gaussian kernel controls the influence of spatial distance. Larger Higher values ​​will cause more distant pixels to participate in the filtering, resulting in a stronger smoothing effect.

[0154] The intensity Gaussian kernel assigns weights based on the differences between pixel values, making neighborhoods with similar pixel values ​​more influential. r The (x,y) formula is as follows:

[0155]

[0156] : The standard deviation of the intensity Gaussian kernel controls the influence range of pixel value similarity. Smaller The value will make the contribution of the neighborhood with a large difference from the current pixel value smaller, thereby maintaining the clarity of the edge. I(x,y) is the grayscale value at the coordinate (x,y).

[0157] 203. Generate a bilateral filter kernel according to the spatial Gaussian kernel and the intensity Gaussian kernel;

[0158] The bilateral filter kernel is a nonlinear filter that can smooth an image while maintaining edge clarity, and is particularly suitable for edge preservation processing of images. Compared with the standard Gaussian convolution kernel, the bilateral filter kernel weights by considering both spatial distance and pixel value similarity, thereby adaptively adjusting the weights during the calculation process. Its spatial distance weight is similar to that of the Gaussian kernel, while the pixel value similarity weight ensures that similar pixels are preferentially retained at the edge. Therefore, the bilateral filter kernel performs well in edge preservation and noise suppression, and effectively avoids the blurring effect caused by traditional Gaussian convolution in edge areas. Due to its adaptive characteristics, the bilateral filter kernel is particularly suitable for local detail processing in image correction tasks, and can significantly improve the visual consistency and detail accuracy of the image.

[0159] The role of the bilateral filter is to adjust the weight of each pixel based on the spatial distance and pixel value difference, ensuring that the image is smoothed while preserving the edges. It can be decomposed into two parts: spatial Gaussian kernel and intensity Gaussian kernel. The weight of the bilateral filter combines the influence of these two kernels, making the smoothing effect weaker at the edges and stronger in uniform areas.

[0160] In pixels The bilateral filter output at It can be expressed as:

[0161]

[0162] in:

[0163] :Indicates that the input image is The pixel value at the location.

[0164] : Spatial Gaussian kernel, based on and spatial distance.

[0165] : Intensity Gaussian kernel, based on and The pixel value difference.

[0166] : Normalization factor to ensure that the weights sum to 1, defined as:

[0167]

[0168] 204. Calculate the adaptive deformable convolution kernel of each pixel point according to the Jacobian ratio value after inverse mapping and the bilateral filter kernel;

[0169] The terminal calculates the adaptive deformation convolution kernel of each pixel based on the Jacobian value and bilateral filter kernel after inverse mapping. According to the homography mapping theory, the homography mapping relationship can be constructed in the process of image correction, and its mathematical expression is as follows:

[0170]

[0171] in, is the transformed image, is the original image, is the homography transformation matrix.

[0172] The mathematical expression of the homography model based on mapping adaptive convolution is as follows:

[0173]

[0174] in, is the target image in the corrected coordinates The convolution result at . Is the homography mapping matrix (transformation matrix), which is used to transform the convolution kernel of the original image pass Mapped into the coordinate system of the target image. represents the inverse transformation of homography mapping, Represents the sampling process, which is performed by applying the convolution operation and the Shannon interpolation formula to the original image. It is a bilateral filter kernel used to smooth the image and reduce aliasing. is the input image. The expression of the adaptive convolution filter means that the original image After inverse transformation, the image is sampled to the position of the target image, and an adaptive convolution kernel is used to achieve anti-aliasing effect. is the Shannon interpolation formula, Represents the homography transformation Adaptive deformable convolution.

[0175] When using the bilateral filter kernel, the entire convolution process can adaptively adjust the smoothing weights to maintain edge details. Combined with the above formula, the adaptive deformation convolution kernel formula is for:

[0176]

[0177] in, is the bilateral filter kernel, calculated by the above formula. This convolution kernel will dynamically adjust its size according to the spatial and intensity differences, thus achieving more natural smoothing and anti-aliasing effects in image correction.

[0178] 205. Construct an adaptive convolution filter according to a number of transformation matrices, an adaptive deformable convolution kernel and a preset interpolation method.

[0179] An adaptive convolution filter is a filter that uses an adaptive algorithm to change the filter parameters and structure according to image changes. In an unknown environment, the adaptive convolution filter can effectively adjust the filter parameters and structure according to the time-varying characteristics of the image through an adaptive algorithm to obtain a processed image.

[0180] The formula for constructing the adaptive convolution filter is shown in step 204.

[0181] In this embodiment, the adaptive convolution filter can adaptively adjust the shape of the convolution kernel according to the blur degree of different images, so as to extract features more accurately. The size or shape of the convolution kernel can also be adaptively adjusted according to the scale of the local features of the image. Images of different scales are calculated using the most appropriate algorithm, and appropriate parameters are adjusted according to the needs of the image to achieve the purpose of improving image quality.

[0182] See also Figure 3 The present application provides an embodiment of a method for performing multi-scale anti-aliasing correction on an edge region of an image sub-block, comprising:

[0183] 301. Decompose the corrected image sub-blocks into multiple scales, and generate at least two scales for each image sub-block;

[0184] The edge area of ​​each image block is decomposed at multiple scales to obtain multiple scale levels, each of which processes detail information at a different level.

[0185] Specifically, the formula is:

[0186]

[0187] in, For the image blocks, For the scale layer.

[0188] 302. Generate a corresponding comprehensive feature function according to the contrast and texture complexity of each image sub-block;

[0189] Contrast reflects the brightness difference of the edge area of ​​the image block. The standard deviation can usually be used to measure the local contrast. , its contrast characteristic function f contrast (I) can be defined as the standard deviation of the brightness value of the area:

[0190]

[0191] in, is the brightness value of the pixel in the image block, is the average brightness of the area.

[0192] Texture complexity reflects the level of detail within an image block, and is measured by gradient magnitude and / or local entropy.

[0193] Gradient amplitude: The larger the gradient amplitude, the higher the texture complexity of the area.

[0194]

[0195] in, and are the gradients of the image in the x and y directions, respectively.

[0196] Local entropy: The higher the entropy value, the more complex the texture.

[0197]

[0198] in, Indicates grayscale level The probability of being in this area.

[0199] It should be noted that the gradient amplitude function and the local entropy function can be selected individually or combined according to a preset rule, which is not limited here.

[0200] In this embodiment, contrast and texture complexity are combined according to a preset rule to define a comprehensive feature function To calculate the adaptive weights, we can combine contrast and texture complexity by weighted averaging:

[0201]

[0202] in, and It is a tuning parameter used to balance the weight of contrast and texture complexity. Usually these two parameters are adjusted according to the actual scene.

[0203] 303. Calculate corresponding adaptive weights for different scales of each image sub-block according to the comprehensive feature function;

[0204] Adaptive weight calculation is performed on edge regions of each scale, and different weights are assigned to each edge region based on the contrast, texture and other characteristics of each scale, expressed as:

[0205]

[0206] in Indicates Block in The weight of the scale, Indicates the contrast or texture characteristics of the area, is the characteristic function. , this patent is designed as an adaptive weight function based on local contrast and texture complexity. Specifically, the feature function The visual importance of a region can be quantified by calculating the contrast and texture complexity of the local region. Detailed definition and calculation method are shown in step 302.

[0207] 304. Perform multi-scale fusion for the edge region of each image sub-block according to adaptive weights of different scales.

[0208] In the edge transition area, the layers after multi-scale decomposition are fused to ensure the smoothness of the transition and the retention of details.

[0209] Specifically, the formula for multi-scale fusion is:

[0210]

[0211] In this embodiment, a multi-scale anti-aliasing correction model is used to process the image block. The multi-scale anti-aliasing correction model can process the edge area at multiple scales by constructing a convolution filter, making the texture transition more natural, the transition of the entire edge area smoother, and reducing the abruptness. The multi-scale anti-aliasing correction model can effectively eliminate the edge mismatch defects caused by the splicing of image blocks, thereby improving the edge transition effect and enhancing the visual coherence of the image.

[0212] See also Figure 4 The present application provides an embodiment of a method for generating a comprehensive feature function, comprising:

[0213] 401. Calculate the contrast characteristic function of each image sub-block;

[0214] The contrast characteristic function can reflect the degree of change of the pixel gray value. At the edge and contour, the value of this function will increase significantly. According to the calculated contrast characteristic function, the image sub-block can be adaptively contrast enhanced. For the image sub-block with low contrast, the contrast is improved by adjusting its gray value distribution. In some image applications, it is necessary to highlight certain areas of interest. If the contrast characteristic function values ​​of these areas are significantly different from those of other areas, these areas can be highlighted by adjusting the contrast. The formula for calculating the contrast characteristic function is shown in step 302.

[0215] 402. Calculate the texture complexity characteristic function of each image sub-block;

[0216] Different image sub-blocks have different texture features. By calculating the texture complexity feature function of the image sub-block, these different types of textures can be effectively distinguished, thereby classifying the correction type in the image sub-block. The formula for calculating the texture complexity feature function is shown in step 302.

[0217] 403. Determine a contrast weight and a texture complexity weight of each image sub-block;

[0218] According to the calculated contrast characteristic function and texture complexity characteristic function of each image sub-block, the corresponding contrast weight and texture complexity weight are determined respectively. By calculating and applying the contrast weight and texture complexity weight, the edge and texture of the image can be made clearer, thereby improving the overall quality of the image. The formula for calculating the contrast weight and texture complexity weight is shown in step 302.

[0219] 404. Calculate the comprehensive feature function of each image sub-block according to the contrast weight, the texture complexity weight, the contrast feature function and the texture complexity feature function.

[0220] The comprehensive characteristic function of each image sub-block can more comprehensively reflect the degree of distortion of the image sub-block. Distortion correction is performed on each image sub-block based on the calculated comprehensive characteristic function, which integrates more comprehensive issues and makes the correction more precise and accurate.

[0221] In this embodiment, by performing detailed calculations on each image sub-block, the functions and weights corresponding to the contrast and texture complexity are calculated respectively, the contrast and texture complexity are combined to calculate the comprehensive feature function, and the image sub-blocks are analyzed and calculated in many aspects to ensure that the distortion of the image sub-blocks can be corrected more accurately and the processing is more accurate.

[0222] See also Figure 5 The present application provides an embodiment of a method for calculating a texture complexity characteristic function of an image sub-block, comprising:

[0223] 501. Calculate the texture complexity feature function according to the gradient assignment and local entropy of each image sub-block.

[0224] The gradient assignment reflects the drastic degree of pixel value change in the image sub-block, and the local entropy reflects the randomness of the distribution of pixel values ​​in the image sub-block. Combining the two to calculate the texture complexity feature function can more comprehensively describe the texture characteristics of the image.

[0225] For images with regular textures, the gradient assignment shows obvious periodic changes in the texture direction, while the local entropy is relatively stable inside the texture. For irregular textures, the local entropy is high and the gradient assignment is messy in all directions. By combining the two to calculate the texture complexity feature function, it is possible to adapt to different types of textures and accurately measure their complexity. The texture complexity feature function calculated based on gradient assignment and local entropy is used as a classification feature to improve the accuracy of image sub-block classification. The formula for calculating the texture complexity feature function based on gradient assignment and local entropy is shown in step 302.

[0226] See also Figure 6 The present application provides an embodiment of a method for calculating contrast weight and texture complexity weight, including:

[0227] 601. Calculate the grayscale mean of each image sub-block;

[0228] In the same image, the contrast and texture complexity in different image sub-blocks are different, so the importance of contrast function and texture complexity function is naturally different. Contrast weight and texture complexity weight are also different. In traditional algorithms, only the contrast and texture complexity of the whole image are used for simple analysis to obtain importance weight, or contrast weight and texture complexity weight are set manually. There are many subjective experiences. In this embodiment, a method for comparing according to the contrast and texture complexity of the image block itself is proposed, and the importance of contrast and texture complexity in a certain image sub-block is defined respectively, so as to improve the accuracy of subsequent calculations and reduce human experience.

[0229] In this embodiment, the coefficient is calculated for contrast first, and the contrast and texture complexity are pulled to similar angles for importance comparison. The terminal first calculates the grayscale mean of each image sub-block.

[0230] 602. Calculate the contrast coefficient of each image sub-block according to its own grayscale mean and the grayscale mean of the adjacent image sub-blocks;

[0231] The terminal performs grayscale analysis on the current image sub-block and the adjacent image sub-blocks to check the contrast difference between the current image sub-block and the adjacent image sub-blocks. The formula is as follows:

[0232] There are two adjacent pixel sub-blocks:

[0233] Q1=[(U0-U1) 2 +(U0-U2) 2 ]U0

[0234] There are three adjacent pixel sub-blocks:

[0235] Q1=[(U0-U1) 2 +(U0-U2) 2 +(U0-U3) 2 ]U0

[0236] There are four adjacent pixel sub-blocks:

[0237] Q1=[(U0-U1) 2 +(U0-U2) 2 +(U0-U3) 2 +(U0-U4) 2 ]U0

[0238] By comparing the grayscale mean difference between the current image sub-block and the adjacent pixel sub-block, and multiplying it by the grayscale mean U0 of the current image sub-block, the contrast coefficient Q1 can be obtained.

[0239] 603. Draw a reference line parallel to each edge of each image sub-block;

[0240] Next, the terminal draws a reference line parallel to each edge of each image sub-block. An image sub-block has 4 reference lines. Assuming that there are N pixels on each reference line, the grayscale values ​​of the N pixels are registered and divided into multiple levels from 0 to 255. For example, each grayscale value is divided into one texture level.

[0241] 604. Take the pixel points on the edge reference line to perform edge grayscale analysis to generate a texture complexity coefficient of each image sub-block;

[0242] The terminal takes the pixel points on the edge reference line to perform edge grayscale analysis and generates the texture complexity coefficient of each image sub-block.

[0243] Each reference line may have pixels of multiple texture levels, and the pixels on the four reference lines are counted.

[0244] Q2=[T2*(V1-V2) 2 +T3*(V1-V3) 2 +...+Ti*(V1-V i ) 2 ]*(V1) / (T2+T3+...+T i )

[0245] V1 is the gray value of the pixel with the largest proportion on the four reference lines, V i is the gray value of the i-th pixel on the four reference lines except the pixel with the largest proportion, Ti is the number of the i-th pixel except the pixel with the largest proportion, and the texture complexity coefficient Q2 is generated.

[0246] 605. Calculate the contrast weight and texture complexity weight of each image sub-block according to the contrast coefficient and the texture complexity coefficient.

[0247] In this embodiment, the terminal calculates the contrast weight and texture complexity weight of each image sub-block based on the contrast coefficient and the texture complexity coefficient, that is, the contrast coefficient and the texture complexity coefficient are normalized. The weights of the two are the contrast coefficient and the texture complexity coefficient divided by the sum of the two. Contrast weight = contrast coefficient / (contrast coefficient + texture complexity coefficient); Texture complexity weight = texture complexity weight / (contrast coefficient + texture complexity coefficient). The weight calculated in this way introduces the contrast and texture complexity into the same reference system for comparison, which can better obtain the weights in the same image sub-block, making the final calculation formula more accurate.

[0248] See also Figure 7 The present application provides an embodiment of a method for splicing image sub-blocks, comprising:

[0249] 701. Determine an overlapping area between adjacent image sub-blocks;

[0250] For each pair of adjacent image blocks, extract their overlapping areas. Assume that the adjacent image blocks are and , and the overlapping area is The width of the overlapping area can be set to a fixed value as needed. Or adaptively calculate the optimal overlap width.

[0251] 702. Calculate respective contrast features and texture complexity features according to adjacent image sub-blocks and redundant overlapping areas;

[0252] In the overlapping area, the characteristic values ​​of each image block in the overlapping area, namely contrast and texture complexity, are calculated to dynamically adjust the fusion weight.

[0253] Contrast calculation: The contrast is quantified using the standard deviation of brightness across an area.

[0254] Contrast characteristics The calculation is as follows:

[0255]

[0256] in, For image blocks In pixels The brightness value, is the average brightness of the region, image block I k For two adjacent image blocks and .

[0257] Texture complexity calculation: Use image gradient or locality to measure texture complexity.

[0258] Taking gradient amplitude as an example, texture complexity It is expressed as:

[0259]

[0260] in, Represents an image block The texture complexity.

[0261] is an image block and The overlapping area between .

[0262] Gradient Amplitude The larger it is, the richer the details in the image block and the higher the texture complexity.

[0263] 703. Calculate respective adaptive weights according to contrast features and texture complexity features of adjacent image sub-blocks;

[0264] The contrast and texture complexity feature values ​​are used to adaptively adjust the weights in the overlapping area. Define image patches and Weights in overlapping areas and for:

[0265]

[0266]

[0267] in, and It is a tuning parameter used to balance the effects of contrast and texture complexity in weight assignment.

[0268] 704. Calculate a splicing pixel value according to an overlapping area between adjacent image sub-blocks and an adaptive weight;

[0269] In the overlapping area Each pixel in the and Perform weighted fusion to obtain the final spliced ​​pixel value :

[0270]

[0271] Calculating the spliced ​​pixel values ​​ensures that higher weights are given to image patches with more significant feature values, resulting in more natural transitions and less visibility of blocky edges.

[0272] 705. Adjacent image sub-blocks are spliced ​​according to the splicing pixel values, so that several image sub-blocks are spliced ​​to generate a complete target corrected image.

[0273] When the image is divided into blocks, there is some overlap between the image blocks, so an adaptive edge fusion method is used for splicing. This method dynamically adjusts the weight distribution by analyzing the image features of the overlapping area, so as to achieve a natural transition effect during splicing. The adaptive edge fusion method is recursively applied to each pair of adjacent image blocks until all blocks are spliced.

[0274] The undistorted image sub-blocks are spliced ​​to generate a complete corrected image, avoiding the aliasing problem caused by the image resampling process, thereby achieving high-quality restoration of the image correction.

[0275] In this embodiment, by calculating the contrast and texture complexity of each image sub-block, and performing average processing on the overlapping splicing or the overlapping parts, the block effect after splicing can be reduced, making the image look more natural and continuous. By introducing anti-aliasing filtering technology, the aliasing phenomenon is effectively suppressed during the image remapping and interpolation process, ensuring that the corrected image in the high-frequency detail area is clear and has no jagged edges, improving image sharpness, and significantly improving image quality.

[0276] See also Figure 8 The present application provides an embodiment of a device for image distortion correction, comprising:

[0277] The first generating unit 801 is used to divide the display screen image to be corrected into blocks to generate a plurality of image sub-block sets;

[0278] The second generating unit 802 is used to input a plurality of image sub-blocks into a scale-invariant distortion correction model for distortion correction, and generate a plurality of transformation matrices, where the transformation matrix is ​​a set of transformation coefficients of pixel point coordinates before and after correction;

[0279] A construction unit 803, configured to construct an adaptive convolution filter according to a plurality of transformation matrices;

[0280] Optionally, the construction unit 803 includes:

[0281] Calculate the Jacobian value of the pixel point on each image sub-block, and perform inverse mapping on the Jacobian value to generate the inverse mapped Jacobian value;

[0282] Generate a spatial Gaussian kernel and an intensity Gaussian kernel for each image sub-block;

[0283] Generate a bilateral filter kernel based on a spatial Gaussian kernel and an intensity Gaussian kernel;

[0284] Calculate the adaptive deformable convolution kernel of each pixel according to the Jacobian ratio value and bilateral filter kernel after inverse mapping;

[0285] An adaptive convolution filter is constructed according to several transformation matrices, adaptive deformable convolution kernels and preset interpolation methods.

[0286] The output unit 804 is used to input the distortion-corrected image sub-blocks into the adaptive convolution filter for anti-aliasing convolution and interpolation calculation, and output the pixel-optimized and corrected image sub-blocks;

[0287] A correction unit 805, configured to perform multi-scale anti-aliasing correction on edge regions of the corrected plurality of image sub-blocks;

[0288] Optionally, the correction unit 805 includes:

[0289] A decomposition module 8051 is used to perform multi-scale decomposition on the corrected image sub-blocks, where each image sub-block generates at least two scales;

[0290] A generating module 8052, used for generating a corresponding comprehensive feature function according to the contrast and texture complexity of each image sub-block;

[0291] Optionally, the generation module 8052 includes:

[0292] The first calculation submodule 80521 is used to calculate the contrast characteristic function of each image subblock;

[0293] The second calculation submodule 80522 is used to calculate the texture complexity characteristic function of each image subblock;

[0294] Optionally, the second computing submodule 80522 includes:

[0295] The texture complexity feature function is calculated based on the gradient assignment and local entropy of each image sub-block.

[0296] A determination submodule 80523 is used to determine the contrast weight and texture complexity weight of each image subblock;

[0297] Optionally, determining submodule 80523 includes:

[0298] Calculate the grayscale mean of each image sub-block;

[0299] Calculate the contrast coefficient of each image sub-block according to its own grayscale mean and the grayscale mean of the adjacent image sub-blocks;

[0300] Draw a reference line parallel to each edge of each image sub-block;

[0301] Take the pixel points on the edge reference line to perform edge grayscale analysis and generate the texture complexity coefficient of each image sub-block;

[0302] The contrast weight and texture complexity weight of each image sub-block are calculated according to the contrast coefficient and the texture complexity coefficient.

[0303] The third calculation submodule 80524 is used to calculate the comprehensive feature function of each image sub-block according to the contrast weight, the texture complexity weight, the contrast feature function and the texture complexity feature function.

[0304] A calculation module 8053 is used to calculate corresponding adaptive weights for different scales of each image sub-block according to the comprehensive feature function;

[0305] The fusion module 8054 is used to perform multi-scale fusion for the edge area of ​​each image sub-block according to adaptive weights of different scales.

[0306] The third generating unit 806 is used to splice a plurality of image sub-blocks to generate a complete target corrected image.

[0307] The third generation unit includes:

[0308] Determine the overlapping area between adjacent image sub-blocks;

[0309] Calculate the respective contrast features and texture complexity features based on adjacent image sub-blocks and redundant overlapping areas;

[0310] Calculate respective adaptive weights according to the contrast characteristics and texture complexity characteristics of adjacent image sub-blocks;

[0311] Calculate the splicing pixel value according to the overlapping area and adaptive weight between adjacent image sub-blocks;

[0312] Adjacent image sub-blocks are spliced ​​according to the splicing pixel values, so that several image sub-blocks are spliced ​​to generate a complete target corrected image.

[0313] See also Fig. 9 , the present application provides a system for image distortion correction, comprising:

[0314] Processor 901 , memory 902 , input-output unit 903 , and bus 904 .

[0315] The processor 901 is connected to the memory 902 , the input and output unit 903 , and the bus 904 .

[0316] The memory 902 stores a program, and the processor 901 calls the program to execute the following steps: Figure 1 , Figure 2 and Figure 3 , Figure 4 , Figure 5 , Figure 6 and Figure 7 The method in .

[0317] The present application provides a computer-readable storage medium, on which a program is stored, and when the program is executed on a computer, the program performs the following steps: Figure 1 , Figure 2 and Figure 3 , Figure 4 , Figure 5 , Figure 6 and Figure 7 The method in .

[0318] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0319] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, 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 an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.

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

[0321] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0322] 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 technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, read-only memory), random access memory (RAM, random access memory), disk or optical disk and other media that can store program code.

Claims

1. A method for image distortion correction, characterized in that: include: Divide the display screen image to be corrected into blocks to generate a plurality of image sub-block sets; Inputting the plurality of image sub-blocks into a scale-invariant distortion correction model for distortion correction, and generating a plurality of transformation matrices, wherein the transformation matrix is ​​a set of transformation coefficients of pixel point coordinates before and after correction; Constructing an adaptive convolution filter according to the plurality of transformation matrices; Inputting the plurality of image sub-blocks after distortion correction into the adaptive convolution filter for anti-aliasing convolution and interpolation calculation, and outputting the plurality of image sub-blocks after pixel optimization correction; Performing multi-scale anti-aliasing correction on edge areas of the corrected plurality of image sub-blocks; Several image sub-blocks after multi-scale anti-aliasing correction are spliced ​​to generate a complete target corrected image.

2. The method according to claim 1, characterized in that Constructing an adaptive convolution filter according to the plurality of transformation matrices, comprising: Calculating the Jacobian value of each pixel point on the image sub-block, and performing inverse mapping on the Jacobian value to generate an inverse mapped Jacobian value; Generate a spatial Gaussian kernel and an intensity Gaussian kernel for each of the image sub-blocks; Generate a bilateral filter kernel according to the spatial Gaussian kernel and the intensity Gaussian kernel; Calculate the adaptive deformation convolution kernel of each pixel point according to the Jacobian ratio value after inverse mapping and the bilateral filter kernel; An adaptive convolution filter is constructed according to the plurality of transformation matrices, the adaptive deformable convolution kernel and a preset interpolation method.

3. The method according to claim 1, characterized in that Performing multi-scale anti-aliasing correction on edge regions of the corrected plurality of image sub-blocks, including: Decomposing the corrected image sub-blocks at multiple scales, generating at least two scales for each image sub-block; Generate a corresponding comprehensive feature function according to the contrast and texture complexity of each image sub-block; Calculating corresponding adaptive weights for different scales of each image sub-block according to the comprehensive feature function; Multi-scale fusion is performed on the edge area of ​​each image sub-block according to the adaptive weights of different scales.

4. The method according to claim 3, characterized in that Generate the corresponding comprehensive feature function according to the contrast and texture complexity of each image sub-block, including: Calculate the contrast characteristic function of each image sub-block; Calculate the texture complexity feature function of each image sub-block; Determine the contrast weight and texture complexity weight of each image sub-block; The comprehensive characteristic function of each image sub-block is calculated according to the contrast weight, the texture complexity weight, the contrast characteristic function and the texture complexity characteristic function.

5. The method according to claim 4, characterized in that Calculate the texture complexity feature function of each image sub-block, including: The texture complexity feature function is calculated based on the gradient assignment and local entropy of each image sub-block.

6. The method according to claim 4, characterized in that Determine the contrast weight and texture complexity weight of each image sub-block, including: Calculate the grayscale mean of each image sub-block; Calculate the contrast coefficient of each image sub-block according to its own grayscale mean and the grayscale mean of the adjacent image sub-blocks; Draw a reference line parallel to each edge of each image sub-block; Taking pixel points on the edge reference line to perform edge grayscale analysis to generate a texture complexity coefficient for each image sub-block; The contrast weight and the texture complexity weight of each image sub-block are calculated according to the contrast coefficient and the texture complexity coefficient.

7. The method according to any one of claims 1 to 6, characterized in that There are overlapping areas between adjacent image sub-blocks; The plurality of image sub-blocks are stitched together to generate a complete target corrected image, including: Determine the overlapping area between adjacent image sub-blocks; Calculate the respective contrast features and texture complexity features based on adjacent image sub-blocks and redundant overlapping areas; Calculate respective adaptive weights according to the contrast characteristics and texture complexity characteristics of adjacent image sub-blocks; Calculate the splicing pixel value according to the overlapping area and adaptive weight between adjacent image sub-blocks; Adjacent image sub-blocks are spliced ​​according to the splicing pixel values, so that the plurality of image sub-blocks are spliced ​​to generate a complete target corrected image.

8. A device for image distortion correction, characterized in that: include: A first generating unit, used for dividing the display screen image to be corrected into blocks to generate a plurality of image sub-block sets; A second generating unit is used to input the plurality of image sub-blocks into a scale-invariant distortion correction model for distortion correction, and generate a plurality of transformation matrices, wherein the transformation matrix is ​​a set of transformation coefficients of pixel point coordinates before and after correction; A construction unit, configured to construct an adaptive convolution filter according to the plurality of transformation matrices; An output unit, used for inputting the plurality of image sub-blocks after distortion correction into the adaptive convolution filter for anti-aliasing convolution and interpolation calculation, and outputting the plurality of image sub-blocks after pixel optimization correction; A correction unit, used for performing multi-scale anti-aliasing correction on edge regions of the corrected plurality of image sub-blocks; The third generating unit is used to splice a plurality of image sub-blocks after multi-scale anti-aliasing correction to generate a complete target corrected image.

9. A system for image distortion correction, characterized in that: include: A processor, a memory, an input-output unit and a bus, wherein the processor is connected to the memory, the input-output unit and the bus, the memory stores a program, and the processor calls the program to execute the method as claimed in any one of claims 1 to 6.

10. A computer-readable storage medium having a program stored thereon, wherein the program, when executed on a computer, performs the method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Distorted image correction method and device, electronic equipment and storage medium

    CN116777769A

  • Multi-projector projection malformation correction method, medium and system

    CN118628415A