Image correction method, device and system and storage medium

Through the image correction method combined with RGB-D sensor and elastic grid model, the error and robustness of image correction in complex scenes are solved, and the accurate expansion correction of non-planar objects, accurate separation of shadowed areas and real-time compensation of dynamic lighting is achieved, which significantly improves the accuracy and robustness of image correction.

CN120219246AActive Publication Date: 2025-06-27BEIJING TIANJIU RENHE TECH CO LTD

Patent Information

Application Number
CN202510712143.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-30
Publication Date
2025-06-27
Estimated Expiration
2045-05-30

AI Technical Summary

Technical Problem

The existing image correction technology has significant limitations in complex scenarios, including errors in the correction of non-planar objects, misjudgment of shadowed areas, and the inability to adapt to dynamic ambient light changes in real time.

Method used

Color images and three-dimensional point cloud data were collected through RGB-D sensors, and elastic grid models were constructed for finite element analysis to generate preliminary corrected images. Combining multispectral light sources and generative adversarial networks for shadow separation and repair, and dynamic light compensation is performed through real-time ambient light sensors.

Benefits of technology

Significantly reduce the error in the correction of non-planar objects, efficiently distinguish real content from shadowed areas, adapt to dynamic ambient light changes in real time, improve complex texture generation capabilities, and improve image correction accuracy and robustness.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120219246A_ABST
    Figure CN120219246A_ABST
Patent Text Reader

Abstract

The invention relates to the field of image correction, and provides an image correction method, device and system and a storage medium, and the method comprises the steps: synchronously collecting a color image and three-dimensional point cloud data of a target object through an RGB-D sensor, constructing an elastic mesh model (including a rigidity attribute), and achieving the high-precision surface expansion based on finite element analysis. Generating a geometric correction image; in combination with a multispectral shadow separation and generative adversarial network (GAN) restoration technology, shielding shadows are eliminated, and textures with consistent illumination are generated; and finally, optimizing global illumination uniformity through dynamic compensation perceived by ambient light. Through the technical scheme, the error of expansion correction of a non-planar object is reduced, the real content and the shadow area are efficiently distinguished, the dynamic ambient light change is adapted in real time, and the complex texture generation capability is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of image correction, and specifically, to an image correction method, device, system, and storage medium. Background Art

[0002] Current image correction technologies mainly cover directions such as geometric correction, shadow elimination, and illumination compensation. In the field of geometric correction, traditional methods rely on two-dimensional image processing algorithms. For example, affine transformation or projective transformation is achieved through edge detection or feature point matching to adjust tilted or curved image regions into a planar view. For the problem of shadow interference, mainstream solutions include shadow detection based on threshold segmentation combined with histogram stretching compensation, or using deep learning models to generate and repair the content of shadow regions. In terms of illumination compensation, existing technologies mostly adopt automatic white balance algorithms with fixed parameters or manually adjust the brightness of fill lights to improve illumination uniformity. In addition, super-resolution reconstruction technology based on deep learning is also used for image detail restoration.

[0003] Although the above methods have partially solved the basic image correction requirements, there are still significant limitations in complex scenarios. Traditional geometric correction methods rely on two-dimensional image features and cannot perceive the three-dimensional deformation characteristics of target objects, resulting in significant errors in the unfolding correction of non-planar objects such as bound books and wrinkled papers, and texture stretching or breaking is likely to occur when processing curved surfaces. In terms of illumination processing, shadow segmentation algorithms based on color thresholds are difficult to distinguish real content from shadow regions, especially prone to misjudgment on low-contrast or complex material surfaces, resulting in information loss or overexposure. Existing white balance and fill light technologies mostly adopt fixed parameters or lag response mechanisms and cannot adapt to dynamic ambient light changes in real time, resulting in color temperature fluctuations and uneven illuminance. In addition, deep learning-based repair methods based purely on data driving rely on large-scale two-dimensional training sets, lack the ability to fuse multi-modal physical information (such as three-dimensional geometry and material properties), are prone to semantic distortion or logical contradictions when generating complex textures, and rely on high-performance computing devices, making it difficult to achieve real-time processing on embedded terminals. Summary of the Invention

[0004] The present invention proposes an image correction method, device, system, and storage medium, aiming to reduce the error in the unfolding correction of non-planar objects, efficiently distinguish real content from shadow regions, adapt to dynamic ambient light changes in real time, and improve the ability to generate complex textures.

[0005] The technical solution of the present invention is as follows: An image correction method, comprising the following steps: S100. Synchronously collect a color image and three-dimensional point cloud data of a target object through an RGB-D sensor; S200. Construct an elastic mesh model of the target object based on the three-dimensional point cloud data. The elastic mesh model consists of a discretized mesh composed of nodes, edges, and patches. The nodes correspond to the spatial coordinates in the three-dimensional point cloud. The edges connect adjacent nodes and are assigned stiffness attributes. The patches are formed by enclosing the edges and are used to calculate the deformation energy. S300. Based on the finite element analysis algorithm, calculate the unfolded shape of the elastic mesh model by minimizing the deformation energy function to generate a preliminary corrected image. S400. Illuminate the target object with a multi-spectral light source, collect the reflection data in the visible light band and the near-infrared band, separate the shadow area and the real content area in the color image, and output a shadow area mask. S500. Input the preliminary corrected image and the shadow area mask into a generative adversarial network to generate an image with the shadow repaired. S600. Real-time obtain the color temperature and brightness data of the ambient light sensor, dynamically adjust the lighting parameters of the fill light, and perform adaptive light compensation on the image with the shadow repaired. S700. Output the target image after surface correction, shadow repair, and light compensation.

[0006] In a possible implementation manner, in step S200, the stiffness attribute of the edge is dynamically adjusted according to the material attribute of the target object, which specifically includes: Match the stiffness coefficient of the target object through a preset material database. Or fit the local curvature through the three-dimensional point cloud data and dynamically adjust the stiffness attribute of the edge.

[0007] In a possible implementation manner, in step S300, the finite element analysis algorithm specifically includes: Discretize the elastic mesh model into finite element units. Define the boundary condition as a fixed constraint on the mesh edge. Calculate the planar coordinates after the mesh is unfolded through the principle of minimum energy.

[0008] In a possible implementation manner, step S300 further includes: Input the preliminary corrected image and the color image into a pre-trained convolutional neural network, and output a fused high-precision corrected image. The loss function of the convolutional neural network includes a structural fidelity constraint and an edge continuity constraint.

[0009] In a possible implementation manner, in step S400, the specific method for separating the shadow area is: Calculate the reflectance difference between the visible light band and the near-infrared band. If the brightness of a certain area is lower than the first threshold in the visible light band and the reflectance is higher than the second threshold in the near-infrared band, it is determined as a shadow area; Perform a masking mark on the area determined as a shadow.

[0010] In a possible implementation manner, in step S500, the generator of the generative adversarial network adopts a U-Net structure, and its input is the color image, the shadow area mask, and the real-time color temperature and brightness parameters collected by the ambient light sensor; the output is a repaired texture consistent with the surrounding illumination.

[0011] In a possible implementation manner, in step S600, the method for dynamically adjusting the parameters of the fill light includes: Predict the change trend of the ambient light through the Kalman filter algorithm; Adjust the RGB channel intensity and color temperature of the fill light according to the prediction result, so that the illuminance uniformity on the surface of the target object reaches a preset threshold.

[0012] An image correction device includes: An RGB-B sensor module that synchronously collects the color image and three-dimensional point cloud data of the target object through an RGB-D sensor; An elastic grid module that constructs an elastic grid model of the target object according to the three-dimensional point cloud data. The elastic grid model consists of a discretized grid composed of nodes, edges, and patches. The nodes correspond to the spatial coordinates in the three-dimensional point cloud. The edges connect adjacent nodes and are given stiffness attributes. The patches are formed by enclosing the edges and are used to calculate the deformation energy; A preliminary correction module that, based on the finite element analysis algorithm, calculates the unfolded form of the elastic grid model by minimizing the deformation energy function to generate a preliminary corrected image; A multi-spectral light source module and a separation module that irradiate the target object with a multi-spectral light source, collect the reflection data in the visible light band and the near-infrared band, separate the shadow area and the real content area in the color image, and output a shadow area mask; A shadow repair module that inputs the preliminary corrected image and the shadow area mask into a generative adversarial network to generate an image after shadow repair; An ambient light sensor array and a light compensation module that obtain the color temperature and brightness data of the ambient light sensor in real time, dynamically adjust the illumination parameters of the fill light, and perform adaptive light compensation on the image after shadow repair; An image output module that outputs the target image after curved surface correction, shadow repair, and light compensation.

[0013] An image correction system, the system includes: One or more memories for storing instructions; and One or more processors for calling and running the instructions from the memory and performing the image correction method as described in any one of the above.

[0014] A computer-readable storage medium, the computer-readable storage medium comprising: A program that, when run by a processor, performs the image correction method as described in any one of the above.

[0015] The working principle and beneficial effects of the present invention are as follows: The technical solution of the present invention, through the three-dimensional point cloud data based on the RGB-D sensor and the physical simulation of the elastic grid, breaks through the dependence on the plane assumption of traditional 2D geometric correction, accurately restores the unfolded form of curved objects, and eliminates the deformation errors of bound books and wrinkled papers; secondly, the multi-spectral shadow separation combined with GAN texture repair distinguishes the real content from the shadow through the difference in the reflection characteristics of visible light and near-infrared light, and generates a physically reasonable repair texture, overcoming the misjudgment defect of single visible light threshold segmentation; at the same time, the dynamic light compensation realizes millisecond-level adaptive dimming through real-time ambient light perception and prediction algorithms, solving the problems of color temperature fluctuation and local overexposure caused by traditional fixed fill light; finally, the embedded end-to-end processing flow achieves high-efficiency output in low-cost hardware, breaking the dependence of deep learning models on high-performance computing devices. Each step is closely linked, forming a complete technical closed-loop from data acquisition, model construction to real-time compensation, significantly improving the image correction accuracy and robustness in complex scenarios. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] The present invention will be further described in detail below in conjunction with the drawings and specific embodiments.

[0017] Figure 1 It is a flowchart of an image correction method in Embodiment 1; Figure 2 It is a structural block diagram of an image correction device in Embodiment 2. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0018] The technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all of the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts fall within the scope of the present invention.

[0019] Embodiment 1

[0020] As Figure 1 shown, this embodiment proposes an image correction method, including the following steps: S100. Synchronously acquire the color image and three-dimensional point cloud data of the target object through an RGB-D sensor.

[0021] By synchronously obtaining the color image and three-dimensional point cloud data of the target object in step S100, it provides bimodal information of geometry and texture for subsequent processing, breaks through the limitation of traditional 2D images relying on single visual data, realizes the precise modeling of the three-dimensional deformation of the object surface, and solves the problem of surface unfolding error caused by the lack of depth information in two-dimensional geometric correction.

[0022] S200. Construct an elastic mesh model of the target object according to the three-dimensional point cloud data. The elastic mesh model consists of a discretized mesh composed of nodes, edges, and patches. The nodes correspond to the spatial coordinates in the three-dimensional point cloud. The edges connect adjacent nodes and are assigned stiffness attributes. The patches are formed by enclosing the edges and are used to calculate the deformation energy. Step S200 transforms the three-dimensional geometric shape of the target object into a computable elastic mechanics model, providing a structured input for subsequent physical simulation. By introducing stiffness attributes and mesh discretization, it can accurately simulate the deformation behaviors of different materials (such as paper and leather), avoiding stretching or distortion caused by ignoring three-dimensional geometry in traditional 2D correction methods. At the same time, the physical parameters (such as stiffness) of the elastic mesh can be dynamically adjusted according to the material or curvature, significantly improving the accuracy of surface unfolding, especially suitable for complex deformation scenarios such as bound books and wrinkled paper, laying a foundation for generating high-fidelity corrected images in subsequent steps.

[0023] S300. Based on the finite element analysis algorithm, calculate the unfolded form of the elastic mesh model by minimizing the deformation energy function, and generate a preliminary corrected image. Step S300 physically simulates the elastic mesh from a three-dimensional deformed state to a planar form, realizing the automatic correction of geometric distortion. The finite element analysis ensures the physical rationality of the unfolding process through the principle of energy minimization (such as balancing tensile and bending energies), avoiding errors caused by manual intervention. Combining with the stiffness attributes of the elastic mesh, it can adaptively handle local deformation differences (such as different stiffness requirements for the spine and flat pages of a book), and output a planar image with accurate geometric proportions. At the same time, this step provides a geometric benchmark for subsequent shadow repair and light compensation, improving the accuracy and efficiency of overall image correction.

[0024] S400. Irradiate the target object with a multi-spectral light source, collect the reflection data in the visible light band and the near-infrared band, separate the shadow area and the real content area in the color image, and output a shadow area mask.

[0025] Step S400 uses the difference in reflection characteristics between the visible light and near-infrared bands to accurately distinguish the shadow area from the real content (such as dark text and stains), greatly reducing the misjudgment rate and effectively avoiding information loss or semantic distortion caused by incorrect repair.

[0026] S500. Input the preliminary corrected image and the shadow area mask into a generative adversarial network to generate an image with the shadow repaired. In step S500, by fusing the geometric correction result and the multispectral shadow detection data, it is ensured that the repaired content strictly matches the morphology of the object after unfolding, avoiding texture misalignment caused by residual geometric distortion in traditional methods. The generative adversarial network can generate filled textures that seamlessly connect with the surrounding lighting environment based on mask-guided repair, solving the common edge artifact problems in threshold segmentation or interpolation repair. The complete repaired image (instead of local filling content) is output, providing a unified processing benchmark for subsequent illumination compensation (S600), and ultimately improving the visual consistency and usability of the overall image correction (such as the OCR recognition rate).

[0027] S600. Obtain the color temperature and brightness data of the ambient light sensor in real time, dynamically adjust the illumination parameters of the fill light, and perform adaptive illumination compensation on the image with the shadow repaired.

[0028] In step S600, through the real-time feedback of the ambient light sensor and the Kalman filter prediction, the fill light parameters are dynamically adjusted to improve the uniformity of the illuminance on the target surface, reduce the standard deviation of the color temperature fluctuation, and overcome the hysteresis and instability of the fixed fill light strategy in a dynamic environment.

[0029] S700. Output the target image after curved surface correction, shadow repair, and illumination compensation.

[0030] In step S700, the geometric correction, shadow repair, and illumination compensation results are fused to output a high-fidelity planarized image, which can be directly used in high-precision scenarios such as OCR recognition and industrial inspection.

[0031] In this embodiment, in step S200, the stiffness attribute of the edge is dynamically adjusted according to the material attribute of the target object, specifically including: Match the stiffness coefficient of the target object through a preset material database; Specifically, the material database stores the standard physical parameters of common materials, including but not limited to: stiffness coefficient ( E ), Poisson's ratio ( ν ), bending stiffness ( κ ). In practical applications, the material type of the target object (such as the book cover is leather) is determined through user input or image recognition, and the corresponding parameters in the database are automatically called to assign to the mesh edges.

[0032] Or dynamically adjust the stiffness attribute of the edge by fitting the local curvature with 3D point cloud data.

[0033] Specifically, the local curvature is calculated as follows: Perform moving least squares (MLS) surface fitting on the point cloud to calculate the principal curvature of each mesh cellκ 1 , κ 2 ; Comprehensive curvature , stiffness coefficient E is κ positively correlated with , where is the reference stiffness α is the curvature weight coefficient (default 0.1).

[0034] By matching through the material database, stiffness parameters conforming to the physical characteristics of known material objects (such as paper and leather) can be quickly and accurately assigned, ensuring the simulation accuracy of subsequent finite element analysis. The dynamic adjustment method based on the fitting of three-dimensional point cloud data can adaptively process unknown materials or complex deformation regions (such as book spines and wrinkles), and automatically optimize the mesh deformation behavior through the correlation between the stiffness coefficient and the curvature (the greater the curvature, the higher the stiffness). The combination of the two methods not only ensures the efficiency of common material correction but also solves the problem of optimizing the partition parameters of objects with mixed materials (such as leather covers with metal fittings), thereby overall improving the adaptability and accuracy of surface correction and avoiding problems such as over-stretching or distortion caused by unified parameter settings in traditional methods.

[0035] In this embodiment, in step S300, the finite element analysis algorithm specifically includes: Discretize the elastic mesh model into finite element cells. Specifically, the elastic mesh model is discretized into triangular or quadrilateral finite element cells, and each cell contains node coordinates, connection relationships, and material properties (such as stiffness coefficient E , Poisson's ratio ν ). Through Delaunay triangulation or adaptive subdivision algorithms, ensure that the mesh density matches the curvature of the target object, avoiding local sparsity or over-density.

[0036] Define the boundary conditions as fixed constraints on the mesh edges. Specifically, set the node displacements at the edges of the target object to fixed values (such as Δ x =0, Δ y =0), simulating the boundary constraints caused by holding or binding in the actual scenario. At the same time, if there are partially free edges on the target object (such as unbound book pages), some nodes can be defined as free boundaries (Δx, Δy variable), and the deformation energy is balanced by applying virtual spring forces.

[0037] Calculate the planar coordinates after the mesh is unfolded through the principle of minimum energy. Specifically, it includes: Elastic potential energy modeling: Based on the material properties and deformation characteristics of the elastic mesh model, construct a total potential energy function including tensile energy and bending energy. The elastic potential energy of each finite element cell E iIncluding stretching and bending classifications, elastic potential energy E i The calculation formula is: , where, is the element strain tensor, calculated from the nodal displacements; D is the elastic matrix, related to the material parameters ( E , v ); κ is the bending stiffness coefficient, controlling the bending resistance; is the second derivative of the surface, characterizing the bending deformation.

[0038] Global optimization: Solve for the minimum of the total potential energy through the Newton-Raphson iteration method to obtain the expanded planar coordinates. The specific steps include: Construct the Jacobian matrix and the Stiffness Matrix; Solve the linear equations Ku = F , where, K is the stiffness matrix, u is the nodal displacement vector, F is the external force vector (here it is the expansion driving force); Iteratively update the nodal coordinates until convergence.

[0039] Finite element analysis converts the three-dimensional geometric deformation of the target object into a quantifiable mechanical model through physically driven numerical simulation. By replacing traditional geometric interpolation with physical simulation, it eliminates the deformation errors caused by ignoring the material mechanical properties and realizes the following core functions: 1. High-precision surface unfolding: Based on the minimization of the elastic potential energy of the material properties, it simulates the unfolding process of real objects (such as the natural flattening of a bent page of a book), avoiding texture distortion caused by stretching and compression.

[0040] 2. Adaptive deformation compensation: By dynamically adjusting the physical parameters (E, ν, κ), it adapts to the correction requirements of different materials (such as soft fabrics and hard plastics).

[0041] 3. Complex constraint modeling: It supports multi-scene constraint conditions such as fixed boundaries, free edges, and contact forces, improving the processing ability of special objects such as industrial parts and biological tissues.

[0042] In this embodiment, step S300 further includes: Input the preliminary corrected image and the color image into a pre-trained convolutional neural network, and output the fused high-precision corrected image; Among them, the preliminary corrected image is a geometrically corrected image generated by physical simulation, which may have residual local deformation errors or blurs. The color image is the original data collected by the RGB sensor, retaining high-resolution textures and details.

[0043] In this embodiment, the convolutional neural network makes up for the idealized assumption defects of the physical model by learning local deformation patterns not covered by physical simulation (such as minute wrinkles, material anisotropy). At the same time, it fuses the high-frequency textures of the original color image (such as text strokes, metal scratches) to restore the details lost in physical simulation. It enforces edge continuity and structural alignment to avoid breaks or misalignments caused by physical unfolding.

[0044] The loss function of the convolutional neural network includes a structural fidelity constraint and an edge continuity constraint.

[0045] The structural fidelity constraint ensures that the corrected image is consistent with the real image in terms of overall layout and semantic content by fusing structural similarity (SSIM), pixel-level mean squared error (MSE), and perceptual loss (VGG feature matching). For example, the paragraph layout of ancient book pages and the geometric shapes of industrial parts do not deform or distort, solving the problems of blurring or structural misalignment caused by single-pixel loss in traditional methods. The edge continuity constraint enforces edge alignment through the Sobel gradient operator to eliminate possible sawtooth, break, or blurred artifacts remaining after physical simulation unfolding. For example, it repairs the broken text edges at the spine of a bound book. The dual constraints work together to form a multi-level optimization from global to local and from semantic to pixel.

[0046] In this embodiment, in step S400, the specific method for shadow area separation is as follows: Calculate the reflectance difference between the visible light band and the near-infrared band. If the brightness of a certain area is lower than the first threshold in the visible light band and the reflectance is higher than the second threshold in the near-infrared band, it is determined as a shadow area; The first threshold is set according to the visible light reflectance threshold. An area with a visible light reflectance lower than this value is regarded as a low-brightness area; the second threshold is set according to the NIR reflectance threshold. An area with a NIR reflectance higher than this value indicates a non-absorbing material. The first threshold and the second threshold are dynamically adjusted according to the material properties of different target objects.

[0047] The shadow area separation method of this embodiment utilizes the spectral separation characteristics of shadow areas in visible light (low reflectance) and near-infrared (high reflectance), breaking through the limitation of the traditional single-band threshold method that cannot distinguish between shadows and dark contents. Through material-adaptive threshold adjustment, it is compatible with the reflectance characteristic differences of various surfaces such as paper, metal, and cloth.

[0048] Mask and mark the areas determined as shadows.

[0049] The mask marking provides a reliable input for subsequent GAN repair, avoiding semantic contradictions caused by the generation of incorrect areas.

[0050] In this embodiment, in step S500, the generator of the generative adversarial network adopts a U-Net structure, whose input is a color image, a shadow area mask, and the real-time color temperature and brightness parameters collected by an ambient light sensor; the output is a repaired texture consistent with the surrounding light.

[0051] Specifically, the U-Net structure adopts multi-scale feature fusion. Among them, the encoder extracts deep semantic features (such as the fiber direction of the paper and the light direction), the decoder restores details (such as text strokes and material particles), and high-frequency information is retained through skip connections. At the same time, a spatial attention module is embedded in the skip connection to preferentially focus on the mask boundary and high-gradient regions (such as the text edge). And the ambient light parameters are encoded into a conditional vector to dynamically adjust the feature distribution of the middle layer of the network.

[0052] Specifically, the color image is used to provide context information of the repaired area (such as surrounding texture and color distribution) to ensure that the generated content is consistent with the overall scene; the shadow area mask is used to accurately locate the pixel range to be repaired to avoid misoperation of the generator on non-shadow areas; the ambient light parameters (color temperature and brightness) are used to dynamically inject real-time lighting conditions (such as color temperature 5000K and brightness 200lux) to guide the generator to output repaired content that matches the ambient light.

[0053] In this embodiment, in step S600, the method for dynamically adjusting the fill light parameters includes: Predicting the change trend of ambient light through the Kalman filter algorithm; Adjusting the RGB channel intensity and color temperature of the fill light according to the prediction result so that the illuminance uniformity on the surface of the target object reaches a preset threshold.

[0054] The Kalman filter algorithm constructs a dynamic change model of ambient light (color temperature and brightness) through the state equation and the observation equation, fuses sensor observation data and historical states in real time, and predicts the future short-term (such as 100ms) light change trend. At the same time, sensor noise (such as instantaneous flash interference) is filtered out to improve the stability of the prediction result.

[0055] Embodiment 1 of this application can acquire and process relevant data based on artificial intelligence technology. Among them, artificial intelligence (AI) is a theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results.

[0056] The basic technologies of artificial intelligence generally include technologies such as sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, big data processing technologies, operation / interaction systems, and mechatronics. The software technologies of artificial intelligence mainly include several major directions such as computer vision technology, robotics, biometric technology, speech processing technology, natural language processing technology, and machine learning / deep learning.

[0057] Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be completed by instructing relevant hardware through computer-readable instructions. The computer-readable instructions can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above methods. Among them, the aforementioned storage medium can be a non-volatile storage medium such as a magnetic disk, an optical disc, a read-only memory (ROM), or a random access memory (RAM), etc.

[0058] It should be understood that although the steps in the flowchart of the accompanying drawings are shown in sequence according to the indication of the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless there is a clear indication in this article, the execution of these steps has no strict order limit, and they can be executed in other orders. Moreover, at least a part of the steps in the flowchart of the accompanying drawings can include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same moment, but can be executed at different moments. Their execution order is not necessarily sequential, but can be executed alternately or alternately with at least a part of other steps or sub-steps or stages of other steps.

[0059] Embodiment 2

[0060] Further referring to Figure 2 , as an implementation of the method shown in the above Embodiment 1, Embodiment 2 provides an image correction device, and the device embodiment corresponds to the method embodiment shown in Embodiment 1.

[0061] An image correction device, comprising: An RGB-B sensor module that synchronously acquires a color image and three-dimensional point cloud data of a target object through an RGB-D sensor.

[0062] The RGB-B sensor module provides an accurate geometric and color information basis for subsequent processing by synchronously acquiring the color image and three-dimensional point cloud data of the target object. Combining depth information can accurately restore the three-dimensional shape of the object, overcome the data loss problem of traditional two-dimensional image acquisition in complex curved surface scenes, and ensure the integrity of the input data of the subsequent correction module.

[0063] Elastic grid module, which constructs an elastic grid model of the target object based on 3D point cloud data. The elastic grid model consists of a discretized grid formed by nodes, edges, and patches. The nodes correspond to the spatial coordinates in the 3D point cloud, the edges connect adjacent nodes and are assigned stiffness properties, and the patches are formed by enclosing edges and are used to calculate deformation energy.

[0064] The elastic grid module converts the 3D point cloud into an elastic grid model containing nodes, edges, and patches. By assigning stiffness properties to the edges and deformation energy calculation capabilities to the patches, it establishes a digitally model that can be physically simulated, realizes the conversion from geometric data to a mechanical model, provides a computable elastic mechanics framework for high-precision deformation correction, and significantly improves the accuracy of deformation simulation of complex curved surface objects.

[0065] Initial correction module, based on the finite element analysis algorithm, calculates the unfolded form of the elastic grid model by minimizing the deformation energy function and generates an initial correction image.

[0066] Perform energy minimization calculation on the elastic grid model based on the finite element analysis algorithm, achieve high-fidelity unfolding from 3D curved surfaces to 2D planes through physical simulation, break through the limitations of traditional geometric transformation methods, maintain the natural proportion of object textures and structures, and provide a geometric benchmark for subsequent image processing steps.

[0067] Multi-spectral light source module and separation module, irradiate the target object with a multi-spectral light source, collect the reflection data in the visible light band and the near-infrared band, separate the shadow area and the real content area in the color image, and output a shadow area mask.

[0068] The multi-spectral light source module and separation module utilize the differences in multi-spectral reflection characteristics between the visible light and near-infrared bands to accurately distinguish the shadow area and the real content in the image, overcome the limitations of single visible light shadow detection through dual-band analysis, output an accurate shadow area mask, and provide reliable target positioning for subsequent repair.

[0069] Shadow repair module, input the initial correction image and the shadow area mask into a generative adversarial network to generate an image after shadow repair.

[0070] The shadow repair module inputs the initial correction image and the shadow mask into a generative adversarial network, generates repair content that seamlessly connects with the surrounding environmental illumination through deep learning, eliminates shadow artifacts while maintaining the geometric correction result, realizes a visually consistent image repair effect, and significantly improves the usability of the image under complex lighting conditions.

[0071] Ambient light sensor array and illumination compensation module, obtain the color temperature and brightness data of the ambient light sensor in real time, dynamically adjust the lighting parameters of the fill light, and perform adaptive illumination compensation on the image after shadow repair.

[0072] The ambient light sensor array and the light compensation module achieve adaptive compensation of images by dynamically adjusting the parameters of the fill light, eliminate color temperature drift and uneven brightness, ensure color consistency of the output images under different ambient light conditions, and improve the stability of image quality.

[0073] An image output module that outputs a target image after surface correction, shadow repair, and light compensation.

[0074] The image output module integrates the processing results of each module and outputs a target image after a complete correction process, ensuring the superposition of the effects of geometric deformation elimination, shadow repair, and light compensation, and providing a high-quality image output that can be directly used for subsequent applications (such as OCR recognition, digital archiving).

[0075] The image correction device provided in Embodiment 2 of the present invention can implement all the processes of the image correction method in the above embodiment. The functions of each module in the device and the achieved technical effects are respectively the same as the functions and achieved technical effects of the image correction method in the above embodiment, and will not be elaborated here.

[0076] Embodiment 3

[0077] An image correction system, the system includes: One or more memories for storing instructions; and One or more processors for calling and running instructions from the memory to execute the image correction method as described in any one of the above.

[0078] Embodiment 4

[0079] A computer-readable storage medium, the computer-readable storage medium includes: A program, when the program is run by a processor, the image correction method as described in any one of the above is executed.

[0080] The above are only the preferred embodiments of the present invention and are not intended to limit the present invention. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. An image correction method, characterized in that, It includes the following steps: S100. Synchronously collect the color image and three-dimensional point cloud data of the target object through an RGB-D sensor; S200. Construct an elastic mesh model of the target object according to the three-dimensional point cloud data. The elastic mesh model consists of a discretized mesh composed of nodes, edges, and patches. The nodes correspond to the spatial coordinates in the three-dimensional point cloud. The edges connect adjacent nodes and are given stiffness attributes. The patches are formed by enclosing the edges and are used to calculate the deformation energy; S300. Based on the finite element analysis algorithm, calculate the unfolded form of the elastic mesh model by minimizing the deformation energy function to generate a preliminary corrected image; S400. Irradiate the target object with a multi-spectral light source, collect the reflection data in the visible light band and the near-infrared band, separate the shadow area and the real content area in the color image, and output a shadow area mask; S500. Input the preliminary corrected image and the shadow area mask into a generative adversarial network to generate an image with the shadow repaired; S600. Real-time obtain the color temperature and brightness data of the ambient light sensor, dynamically adjust the lighting parameters of the fill light, and perform adaptive light compensation on the image with the shadow repaired; S700. Output the target image after surface correction, shadow repair, and light compensation; 2. The image correction method according to claim 1, wherein In step S200, the stiffness attribute of the edge is dynamically adjusted according to the material attribute of the target object, specifically including: Match the stiffness coefficient of the target object through a preset material database; Or fit the local curvature through the three-dimensional point cloud data and dynamically adjust the stiffness attribute of the edge.

3. A method for image correction according to claim 1, characterized in that, In step S300, the finite element analysis algorithm specifically includes: Discretize the elastic mesh model into finite element units; Define the boundary condition as a fixed constraint on the mesh edge; Calculate the plane coordinates after the mesh is unfolded through the principle of energy minimization.

4. An image correction method according to claim 1, characterized in that, Step S300 further includes: Input the preliminary corrected image and the color image into a pre-trained convolutional neural network to output a fused high-precision corrected image; The loss function of the convolutional neural network includes a structural fidelity constraint and an edge continuity constraint.

5. A method for image correction according to claim 1, characterized in that, In step S400, the specific method for separating the shadow area is: Calculate the difference in reflectivity between the visible light band and the near-infrared band. If the brightness of a certain area is lower than the first threshold in the visible light band and the reflectivity in the near-infrared band is higher than the second threshold, it is determined as the shadow area; Perform mask marking on the area determined to be in shadow.

6. An image correction method according to claim 5, characterized in that, In step S500, the generator of the generative adversarial network adopts a U-Net structure, and its input is the color image, the shadow area mask, and the real-time color temperature and brightness parameters collected by the ambient light sensor; the output is a repaired texture consistent with the surrounding illumination.

7. A method for image correction according to claim 1, characterized in that In step S600, the method for dynamically adjusting the fill light parameters includes: Predict the change trend of the ambient light through the Kalman filter algorithm; Adjust the RGB channel intensity and color temperature of the fill light according to the prediction result so that the surface illuminance uniformity of the target object reaches a preset threshold.

8. An image correction device, characterized in that, It includes: An RGB-B sensor module that synchronously collects the color image and three-dimensional point cloud data of the target object through an RGB-D sensor; An elastic grid module constructs an elastic grid model of a target object based on the three-dimensional point cloud data. The elastic grid model consists of a discretized grid formed by nodes, edges, and patches. The nodes correspond to the spatial coordinates in the three-dimensional point cloud. The edges connect adjacent nodes and are assigned stiffness properties. The patches are formed by enclosing edges and are used to calculate deformation energy; A preliminary correction module, based on the finite element analysis algorithm, calculates the unfolded form of the elastic grid model by minimizing the deformation energy function and generates a preliminary corrected image; A multi-spectral light source module and a separation module irradiate the target object with a multi-spectral light source, collect reflection data in the visible light band and the near-infrared band, separate the shadow area and the real content area in the color image, and output a shadow area mask; A shadow repair module inputs the preliminary corrected image and the shadow area mask into a generative adversarial network to generate an image after shadow repair; An ambient light sensor array and a light compensation module obtain the color temperature and brightness data of the ambient light sensor in real time, dynamically adjust the lighting parameters of the fill light, and perform adaptive light compensation on the image after shadow repair; An image output module outputs the target image after curved surface correction, shadow repair, and light compensation; 9. An image correction system, characterized in that, The system includes: One or more memories for storing instructions; and One or more processors for calling and running the instructions from the memory and executing the method according to any one of claims 1 to 7; 10. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes: A program, when the program is run by a processor, the method according to any one of claims 1 to 7 is executed.

Citation Information

Patent Citations

  • Image shadow detection and elimination method based on GAN

    CN112991329A

  • Finite element modeling method and computer storage medium

    CN114372392A

  • Training method based on illumination optimization model

    CN119862767A

  • Image compensation method and system for display

    CN120017808A

  • Image shadow removal method based on comparative learning

    CN120031758A

Cited By

  • Method for detecting target in multispectral point cloud shadow based on ambient light correction

    CN120931901A

  • Coral reef remote sensing image multi-modal feature generation and restoration method and system

    CN121120447A