Method and system for correcting vertical offset of single image
By segmenting a single image into vertical strips and using a one-dimensional phase correlation method for image correction, the problem of vertical offset distortion within a single image is solved, achieving high-precision self-correction and adaptive capabilities, and improving the accuracy of image analysis.
Patent Information
- Application Number
- CN202511543868.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-28
- Publication Date
- 2025-11-28
AI Technical Summary
Existing technologies cannot effectively correct non-rigid vertical offset distortions within a single image, introduced by line scanning or stitching processes, without external references, which affects the accuracy of subsequent analysis tasks.
By virtually dividing a single image into multiple vertical strips along the horizontal direction, the strip with the richest features is selected as the anchor strip using the horizontal gradient energy. The sub-pixel-level relative vertical displacement between adjacent strips is calculated using the one-dimensional phase correlation method, and image correction is performed through dense displacement field reconstruction.
It achieves high precision through self-correction, eliminates vertical misalignment between different columns in the image, ensures the accuracy of subsequent analysis tasks, and has adaptability, robustness, and high computational efficiency.
Smart Images

Figure CN121032869A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of precision optical inspection technology, and in particular to a method and system for correcting vertical offset of a single image. Background Technology
[0002] In fields such as semiconductor wafer manufacturing and precision optical inspection, high-resolution images are typically acquired using line scanning cameras or by moving field-of-view stitching. During this process, due to minute mechanical vibrations in the equipment during image acquisition and synchronization errors between scanning speed and sensor readout rate, the resulting single image often contains a unique distortion: a small, inconsistent vertical displacement between different columns of the image. To address this distortion problem, the most relevant existing technologies currently include: 1. General image registration / stitching algorithms: such as SIFT, SURF and other feature point or region-based cross-correlation algorithms. These algorithms are mainly used to align and stitch multiple independent images into a larger image.
[0003] 2. Reference-based correction method: This type of method calculates the deformation field by comparing the image to be corrected with a pre-acquired, distortion-free "gold" reference image, and then corrects the image.
[0004] 3. Simple image filtering or line-by-line processing methods: For example, reduce the jaggedness of the image by using simple smoothing filters or trying to detect and adjust obvious "broken lines".
[0005] The shortcomings of existing technologies are as follows: 1. Reliance on external references: Most of the methods described above require an ideal, distortion-free reference image as a calibration benchmark. In many practical applications (such as online detection), such an ideal reference image is unavailable.
[0006] 2. Causes subsequent analysis failure: Since simple filtering methods cannot completely handle this distortion and cannot restore the geometric consistency of the damaged image, subsequent tasks that rely on precise geometry, such as size measurement, defect detection, or feature localization, will produce serious errors or fail completely. Summary of the Invention
[0007] In view of this, the purpose of this application is to propose a method and system for vertical offset correction of a single image, which can specifically solve the existing problems.
[0008] The present invention aims to solve the technical problem that existing technologies cannot effectively correct non-rigid vertical offset distortions that exist within a single image and are introduced by line scanning or stitching processes without external reference.
[0009] Specifically, the core technical problem to be solved by this invention is: how to achieve high-precision self-correction by using only the internal structural information of a single distorted image, eliminating vertical misalignment between different columns in the image, restoring its proper and accurate geometric shape, thereby ensuring the accuracy of subsequent high-precision analysis tasks.
[0010] To achieve the above objectives, this application proposes a method for vertical offset correction of a single image, comprising: Step 1, Feature Anchoring: The single image to be corrected is virtually divided into multiple vertical strips along the horizontal direction. The horizontal gradient energy of each strip is calculated and compared as a structural feature index. The strip with the richest features is selected as the anchoring strip and serves as the zero-point reference for all subsequent displacement calculations. Step 2, Chain-like relative displacement calculation: Starting from the anchoring strip, the sub-pixel level relative vertical displacement between adjacent strips is calculated in a chain using the one-dimensional phase correlation method, and the total offset of each strip is accumulated. Step 3, Image correction based on dense displacement field reconstruction: Based on the total offset of each strip, a continuously changing dense displacement field covering the entire image is generated through interpolation and smoothing, and the original image is reverse-remapped using this dense displacement field to complete the smoothing correction.
[0011] To achieve the above objectives, this application also proposes a single-image vertical offset correction system, comprising: Feature anchoring module: The single image to be corrected is virtually divided into multiple vertical strips along the horizontal direction. The horizontal gradient energy of each strip is calculated and compared as a structural feature index. The strip with the richest features is selected as the anchoring strip and serves as the zero-point reference for all subsequent displacement calculations. Chain-type relative displacement calculation module: Starting from the anchoring strip, the sub-pixel level relative vertical displacement between adjacent strips is calculated in a chain using the one-dimensional phase correlation method, and the total offset of each strip is accumulated. The image correction module based on dense displacement field reconstruction generates a continuously changing dense displacement field covering the entire image based on the total offset of each strip through interpolation and smoothing. This dense displacement field is then used to perform reverse remapping on the original image to complete smoothing correction.
[0012] In summary, the advantages of this application and the user experience it brings are as follows: 1. Strong adaptability and versatility: This method is based entirely on the internal structure of the image itself for self-correction, without the need for any external reference images or prior knowledge of device parameters. Therefore, it has a strong adaptability to images from different devices and in different scenarios.
[0013] 2. High correction accuracy: It innovatively combines the sub-pixel accuracy of the phase correlation method in one-dimensional signal processing with the powerful ability of the dense displacement field model to describe complex deformations, enabling sub-pixel accuracy correction and completely eliminating the "jitter" and "misalignment" effects introduced by line scanning.
[0014] 3. High computational efficiency: By cleverly decomposing the complex two-dimensional image deformation problem into a series of one-dimensional signal alignment problems and using Fourier transform for acceleration, its computational efficiency is far higher than that of traditional image registration methods that directly perform iterative optimization in two-dimensional space.
[0015] 4. Good robustness: Through the "feature anchoring" step, the most robust structure in the image is selected as the benchmark, and the phase correlation method, which is insensitive to changes in image noise and brightness, is adopted to ensure the stability and reliability of the entire algorithm under different image content and noise levels. Attached Figure Description
[0016] In the accompanying drawings, unless otherwise specified, the same reference numerals throughout the various drawings denote the same or similar parts or elements. These drawings are not necessarily drawn to scale. It should be understood that these drawings depict only some embodiments disclosed in this application and should not be construed as limiting the scope of this application.
[0017] Figure 1 A flowchart illustrating a single-image vertical offset correction method according to an embodiment of this application is shown.
[0018] Figure 2 A schematic diagram illustrating the process of dividing vertical stripes according to an embodiment of this application is shown.
[0019] Figure 3 A schematic diagram illustrating the actual effect of a single-image vertical offset correction method according to an embodiment of this application is shown.
[0020] Figure 4 A schematic diagram of a single-image vertical offset correction system according to an embodiment of this application is shown.
[0021] Figure 5 A schematic diagram of the structure of an electronic device provided in one embodiment of this application is shown.
[0022] Figure 6 A schematic diagram of a storage medium provided in one embodiment of this application is shown. Detailed Implementation
[0023] The present application will now be described in further detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are for illustrative purposes only and are not intended to limit the invention. Furthermore, it should be noted that, for ease of description, only the parts relevant to the invention are shown in the accompanying drawings.
[0024] It should be noted that, unless otherwise specified, the embodiments and features described in this application can be combined with each other. This application will now be described in detail with reference to the accompanying drawings and embodiments.
[0025] like Figure 1 As shown, the single-image vertical offset correction method of this application includes the following steps:
[0026] Step 1: Establishing the internal reference baseline (feature anchoring) A single image is virtually divided into multiple vertical strips along the horizontal direction. The horizontal gradient energy of each strip is calculated and compared as a structural feature index. The strip with the richest features is selected as the anchor strip and serves as the zero-point reference for all subsequent displacement calculations.
[0027] Specifically, firstly, the input image I to be corrected is virtually divided into M vertical strips of equal width along its horizontal direction (X-axis) S1, S2, ..., S... M Let m be the width of the overlapping portion between two adjacent strips, such as... Figure 2 As shown.
[0028] To find the most reliable alignment reference within an image, this invention proposes the concept of "anchor strips." This is achieved by adjusting each strip S... i We calculate its horizontal gradient energy to assess the richness of its horizontal structural features. Here, we first define a 1x3 Sobel operator k in the horizontal direction. h : , For strip S i For each pixel value with coordinates (x, y), its horizontal gradient value G i (x,y) can be obtained through its connection with k h The convolution yields: , in Table convolution operations.
[0029] Then S can be calculated. i Gradient energy E i Here it is defined as the sum of the squares of the gradient magnitudes: , Select the strip S with the highest gradient energy. k This serves as an "anchor strip." It contains the strongest vertical edge (i.e., the object's horizontal profile) and is the most stable and reliable reference point throughout the entire calibration process.
[0030] 2. Step Two: Calculation of relative displacement based on phase correlation chain Starting from the anchoring strip, the sub-pixel-level relative vertical displacement between adjacent strips is calculated using a one-dimensional phase correlation chain method, and the total offset of each strip is accumulated.
[0031] Specifically, step two includes the following sub-steps: 2.1 Extracting the one-dimensional signal of the anchoring region: using the anchoring strip S k Centered on the data, calculate the adjacent strips S sequentially to both sides (i = k to M-1, and i = k to 1). i and S i+1 The relative vertical displacements between them. First, extract the non-overlapping regions N from them. i N i+1 One-dimensional signal V of vertical structure i (y) and V i+1 (y). This is done by averaging the pixel values of each row in the non-overlapping region within each strip: , , 2.2 Phase-related calculation of displacement: for V i (y) and V i+1 (y) is subjected to Fourier transform to obtain V i ( ) and V i+1 ( ): , , Where F represents the Fourier transform operator.
[0032] Then calculate the cross power spectrum C( of the two signals). ):
[0033] Here, conj represents the complex conjugate operation.
[0034] Due to arbitrary signals Both can be represented as a combination of their amplitude and phase: , Where || represents the modulo operation. This represents the phase angle, therefore for the mutual power C( The normalized cross-power spectrum obtained after normalization contains only phase information: , Then to Perform inverse Fourier transform, using This indicates that a pulse function is obtained. : , Then seek Two signals V can be obtained from the peak value. i (y) and V i+1 The pixel displacement d between (y) {i,i+1} : , 2.3 Calculate the chain displacement: First, define the anchoring strip S. k Total offset D k The value is 0. Then, the relative position of each strip to S can be calculated using chain-like displacement accumulation. k Displacement bias D i : .
[0035] 3. Step Three: Image Reconstruction Based on Dense Displacement Field Based on the total offset of each strip, a continuously varying dense displacement field covering the entire image is generated through interpolation and smoothing. This dense displacement field is then used to perform reverse remapping on the original image to complete the smoothing correction.
[0036] Specifically, based on the displacement offset D of each strip obtained in the previous step... i The set can be used to construct an initial, piecewise sparse displacement field F. sparse , , In each strip S i The internal structure is constant.
[0037] To achieve smooth pixel-level correction, it is necessary to adjust F... sparse Interpolation is performed to form a dense displacement field F. dense : , in This represents the specific vertical displacement at position (x, y).
[0038] First, we define the x-coordinate of the center position of all stripes as C. i Then, for any pixel (x, y), its displacement value By calculating the center C of the strip on both sides of its location. i and C i+1 displacement D i and D i+1 Linear interpolation yields: , Having obtained the dense displacement field, we can calculate the original coordinates of each pixel (x, y): , Since y is a sub-pixel precision floating-point value, it cannot be directly mapped to the image I to be corrected. Therefore, bilinear interpolation is used here to calculate the corrected image. Each pixel value: Pick The coordinates of the four nearest neighbor pixels are Q11=(x1, y1) (top left), Q12=(x1, y2) (bottom left), Q21=(x2, y1) (top right), and Q22=(x2, y2) (bottom right), where x1=floor(x'), x2=x1+1, y1=floor(y'), y2=y1+1, and floor represents rounding down. , For the offset of the decimal part, then It can be represented as: .
[0039] Figure 3 The diagram illustrates the actual effect of the single-image vertical offset correction method according to an embodiment of this application. It can be seen that this application effectively solves the distortion problem.
[0040] The application provides a single-image vertical offset correction system, which is used to perform the single-image vertical offset correction method described in the above embodiments, such as... Figure 4 As shown, the system includes: Feature anchoring module: The single image to be corrected is virtually divided into multiple vertical strips along the horizontal direction. The horizontal gradient energy of each strip is calculated and compared as a structural feature index. The strip with the richest features is selected as the anchoring strip and serves as the zero-point reference for all subsequent displacement calculations. Chain-type relative displacement calculation module: Starting from the anchoring strip, the sub-pixel level relative vertical displacement between adjacent strips is calculated in a chain using the one-dimensional phase correlation method, and the total offset of each strip is accumulated. The image correction module based on dense displacement field reconstruction generates a continuously changing dense displacement field covering the entire image based on the total offset of each strip through interpolation and smoothing. This dense displacement field is then used to perform reverse remapping on the original image to complete smoothing correction.
[0041] The single-image vertical offset correction system provided in the above embodiments of this application and the single-image vertical offset correction method provided in the embodiments of this application are based on the same inventive concept and have the same beneficial effects as the methods adopted, run or implemented by the applications stored therein.
[0042] This application also provides an electronic device corresponding to the single-image vertical offset correction method provided in the foregoing embodiments, for executing the single-image vertical offset correction method. This application does not limit the scope of the embodiments.
[0043] Please refer to Figure 5 This illustrates a schematic diagram of an electronic device provided by some embodiments of this application. For example... Figure 5 As shown, the electronic device 20 includes: a processor 200, a memory 201, a bus 202, and a communication interface 203. The processor 200, the communication interface 203, and the memory 201 are connected via the bus 202. The memory 201 stores a computer program that can run on the processor 200. When the processor 200 runs the computer program, it executes the single-image vertical offset correction method provided in any of the foregoing embodiments of this application.
[0044] The memory 201 may include high-speed random access memory (RAM) or non-volatile memory, such as at least one disk storage device. Communication between this system network element and at least one other network element is achieved through at least one communication interface 203 (which can be wired or wireless), such as the Internet, wide area network, local area network, or metropolitan area network.
[0045] Bus 202 can be an ISA bus, PCI bus, or EISA bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc. The memory 201 is used to store programs. After receiving an execution instruction, the processor 200 executes the program. The single-image vertical offset correction method disclosed in any of the foregoing embodiments of this application can be applied to the processor 200, or implemented by the processor 200.
[0046] The processor 200 may be an integrated circuit chip with signal processing capabilities. In implementation, each step of the above method can be completed by the integrated logic circuitry in the hardware of the processor 200 or by instructions in software form. The processor 200 may be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it may also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), an off-the-shelf programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this application. The general-purpose processor may be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of this application can be directly embodied in the execution of a hardware decoding processor, or executed by a combination of hardware and software modules in the decoding processor. The software modules may reside in random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, or other mature storage media in the art. The storage medium is located in memory 201. The processor 200 reads the information in memory 201 and, in conjunction with its hardware, completes the steps of the above method.
[0047] The electronic device provided in this application embodiment and the single-image vertical offset correction method provided in this application embodiment are based on the same inventive concept and have the same beneficial effects as the methods they adopt, operate or implement.
[0048] This application also provides a computer-readable storage medium corresponding to the single-image vertical offset correction method provided in the foregoing embodiments. Please refer to... Figure 6 The computer-readable storage medium shown is an optical disc 30, on which a computer program (i.e., a program product) is stored. When the computer program is run by a processor, it executes the single-image vertical offset correction method provided in any of the foregoing embodiments.
[0049] It should be noted that examples of the computer-readable storage medium may also include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other optical and magnetic storage media, which will not be elaborated here.
[0050] The computer-readable storage medium provided in the above embodiments of this application and the single-image vertical offset correction method provided in the embodiments of this application are based on the same inventive concept and have the same beneficial effects as the methods adopted, run or implemented by the application programs stored therein.
[0051] It should be noted that: The algorithms and displays provided herein are not inherently related to any particular computer, virtual system, or other device. Various general-purpose systems can also be used in conjunction with the teachings herein. The required structure for constructing such systems is apparent from the above description. Furthermore, this application is not directed to any particular programming language. It should be understood that the content of this application described herein can be implemented using various programming languages, and the above description of specific languages is for the purpose of disclosing the best mode of implementation of this application.
[0052] Numerous specific details are set forth in the specification provided herein. However, it will be understood that embodiments of this application may be practiced without these specific details. In some instances, well-known methods, structures, and techniques have not been shown in detail so as not to obscure the understanding of this specification.
[0053] Similarly, it should be understood that, in order to simplify this application and aid in understanding one or more of the various inventive aspects, in the above description of exemplary embodiments of this application, various features of this application are sometimes grouped together into a single embodiment, figure, or description thereof. However, this method of disclosure should not be construed as reflecting an intention that the claimed application requires more features than are expressly recited in each claim. Rather, as reflected in the following claims, inventive aspects lie in fewer than all features of a single foregoing disclosed embodiment. Therefore, the claims following the detailed description are hereby expressly incorporated into that detailed description, wherein each claim itself is a separate embodiment of this application.
[0054] Those skilled in the art will understand that modules in the device of the embodiments can be adaptively changed and placed in one or more devices different from that embodiment. Modules, units, or components in the embodiments can be combined into a single module, unit, or component, and further, they can be divided into multiple sub-modules, sub-units, or sub-components. Except where at least some of such features and / or processes or units are mutually exclusive, any combination can be used to combine all features disclosed in this specification (including the accompanying claims, abstract, and drawings) and all processes or units of any method or device so disclosed. Unless expressly stated otherwise, each feature disclosed in this specification (including the accompanying claims, abstract, and drawings) may be replaced by an alternative feature that serves the same, equivalent, or similar purpose.
[0055] Furthermore, those skilled in the art will understand that although some embodiments described herein include certain features but not others included in other embodiments, combinations of features from different embodiments are intended to be within the scope of this application and form different embodiments. For example, in the following claims, any of the claimed embodiments can be used in any combination.
[0056] The various component embodiments of this application can be implemented in hardware, or as software modules running on one or more processors, or a combination thereof. Those skilled in the art will understand that microprocessors or digital signal processors (DSPs) can be used in practice to implement some or all of the functions of some or all of the components in the virtual machine creation system according to the embodiments of this application. This application can also be implemented as a device or system program (e.g., a computer program and computer program product) for performing part or all of the methods described herein. Such an implementation of this application can be stored on a computer-readable medium, or can be in the form of one or more signals. Such signals can be downloaded from an Internet website, provided on a carrier signal, or provided in any other form.
[0057] It should be noted that the above embodiments are illustrative of this application and not restrictive, and that those skilled in the art can devise alternative embodiments without departing from the scope of the appended claims. In the claims, any reference signs placed between parentheses should not be construed as limiting the claims. The word "comprising" does not exclude the presence of elements or steps not listed in the claims. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. This application can be implemented by means of hardware comprising several different elements and by means of a suitably programmed computer. In the unit claims enumerating several systems, several of these systems may be embodied by the same item of hardware. The use of the words first, second, and third, etc., does not indicate any order. These words can be interpreted as names.
[0058] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any person skilled in the art can easily conceive of various variations or substitutions within the technical scope disclosed in this application, and these should all be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A method for vertical offset correction of a single image, based on feature anchoring and dense displacement field, characterized in that, include: Step 1, Feature Anchoring: The single image to be corrected is virtually divided into multiple vertical strips along the horizontal direction. The horizontal gradient energy of each strip is calculated and compared as a structural feature index. The strip with the richest features is selected as the anchoring strip and serves as the zero-point reference for all subsequent displacement calculations. Step 2, Chain-like relative displacement calculation: Starting from the anchoring strip, the sub-pixel level relative vertical displacement between adjacent strips is calculated in a chain using the one-dimensional phase correlation method, and the total offset of each strip is accumulated. Step 3, Image correction based on dense displacement field reconstruction: Based on the total offset of each strip, a continuously changing dense displacement field covering the entire image is generated through interpolation and smoothing, and the original image is reverse-remapped using this dense displacement field to complete the smoothing correction.
2. The method according to claim 1, characterized in that, Step one specifically includes: First, the input image I to be corrected is virtually divided into M vertical strips of equal width along its horizontal X-axis: S1, S2, ..., S... M Let the width of the overlapping portion between two adjacent strips be m; By analyzing each strip S i To assess the richness of its horizontal structural features, we first calculate its horizontal gradient energy. We then define a 1x3 Sobel operator k in the horizontal direction. h : , For strip S i For each pixel value at coordinate (x, y), the horizontal gradient value G i (x,y) through k h The convolution yields: , in Represents the convolution operation; Calculate S i Gradient energy E i , defined as the sum of the squares of the gradient magnitudes: , Select the strip S with the highest gradient energy. k As an anchoring strip.
3. The method according to claim 2, characterized in that, Step two specifically includes: 2.1 Extracting the one-dimensional signal of the anchoring region: using the anchoring strip S k Centered on the data, calculate the adjacent strips S to both sides sequentially. i and S i+1 The relative vertical displacement between them; extract the representative non-overlapping region N. i N i+1 One-dimensional signal V of vertical structure i (y) and V i+1 (y); 2.2 Phase-related calculation of displacement: for V i (y) and V i+1 (y) is subjected to Fourier transform to obtain V i ( ) and V i+1 ( ) , , Where F represents the Fourier transform operator; Calculate the cross power spectrum C( of the two signals). ): , Where conj represents the complex conjugate operation; Represents the phase angle, for mutual power C( The normalized cross-power spectrum obtained after normalization contains only phase information: , right Perform inverse Fourier transform, using This indicates that a pulse function is obtained. : , Seeking Two signals V can be obtained from the peak value. i (y) and V i+1 The pixel displacement d between (y) {i,i+1} : , 2.3 Calculate the chain displacement: First, define the anchoring strip S. k Total offset D k The value is 0, and the calculation of each strip relative to S is performed by chain displacement accumulation. k Displacement bias D i : 。 4. The method according to claim 3, characterized in that, V is calculated by averaging the pixel values of each row in the non-overlapping region within each strip. i (y) and V i+1 (y): , 。 5. The method according to claim 3 or 4, characterized in that, Step three specifically includes: Based on the displacement deviation D of each strip i The set is used to construct an initial, piecewise sparse displacement field F. sparse , , In each strip S i Its internal structure is constant; For F sparse Interpolate to form a dense displacement field F dense : , in This represents the specific vertical displacement at position (x, y); The original coordinates (x, y) of each pixel are calculated: , The corrected image is calculated using bilinear interpolation. The value of each pixel.
6. The method according to claim 5, characterized in that, Define the x-axis coordinate of the center position of all stripes as C. i Then, for any pixel (x, y), its displacement value By calculating the center C of the strip on both sides of its location. i and C i+1 displacement D i and D i+1 Linear interpolation yields: 。 7. The method according to claim 6, characterized in that, The method used is bilinear interpolation to calculate the corrected image. Each pixel value includes: Pick The coordinates of the four nearest neighbor pixels are: top-left pixel Q11 = (x1, y1), bottom-left pixel Q12 = (x1, y2), top-right pixel Q21 = (x2, y1), and bottom-right pixel Q22 = (x2, y2), where x1 = floor(x'), x2 = x1 + 1, y1 = floor(y'), and y2 = y1 + 1. `floor` represents rounding down. , For the offset of the decimal part, then Represented as: 。 8. A single-image vertical offset correction system, characterized in that, include: Feature anchoring module: The single image to be corrected is virtually divided into multiple vertical strips along the horizontal direction. The horizontal gradient energy of each strip is calculated and compared as a structural feature index. The strip with the richest features is selected as the anchoring strip and serves as the zero-point reference for all subsequent displacement calculations. Chain-type relative displacement calculation module: Starting from the anchoring strip, the sub-pixel level relative vertical displacement between adjacent strips is calculated in a chain using the one-dimensional phase correlation method, and the total offset of each strip is accumulated. The image correction module based on dense displacement field reconstruction generates a continuously changing dense displacement field covering the entire image based on the total offset of each strip through interpolation and smoothing. This dense displacement field is then used to perform reverse remapping on the original image to complete smoothing correction.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, The processor executes the computer program to implement the method as described in any one of claims 1-7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, The program is executed by a processor to implement the method as described in any one of claims 1-7.