An image processing method, device and computer equipment

By using image downsampling, FGS filtering, and brightness transformation, the problem of high computational cost in traditional low-light image enhancement is solved, and effective image enhancement is achieved on devices with lower computing performance.

CN122089620APending Publication Date: 2026-05-26SPREADTRUM COMMUNICATION (SHANGHAI) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
SPREADTRUM COMMUNICATION (SHANGHAI) CO LTD
Filing Date
2026-02-06
Publication Date
2026-05-26

AI Technical Summary

Technical Problem

Traditional low-light image enhancement methods involve excessive computation when estimating illuminance factors, making them unsuitable for computer devices with low computing power and limiting the applicability of image brightness enhancement.

Method used

The process involves downsampling the image to be processed to generate a downsampled image, generating an initial illumination image, and then performing a fast global smoothing (FGS) filter to obtain an intermediate illumination image. Subsequently, brightness transformation and upsampling are performed, and finally, the target illumination image is used for brightness enhancement.

Benefits of technology

It significantly reduces computational load, making it suitable for computer devices with lower computing performance, thus expanding the applicability of image enhancement while maintaining image enhancement effects.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122089620A_ABST
    Figure CN122089620A_ABST
Patent Text Reader

Abstract

This application relates to an image processing method, apparatus, and computer device. The method includes: downsampling an image to be processed to obtain a downsampled image; generating an initial illumination image based on pixel information of each pixel in the downsampled image; performing FGS filtering on the initial illumination image to obtain an intermediate illumination image; performing brightness transformation and upsampling processing on the intermediate illumination image to obtain a target illumination image of the same size as the image to be processed; and using the target illumination image to enhance the brightness of the image to be processed to obtain the target image. This method can reduce the computational load in the image enhancement process without affecting the image enhancement effect, making it suitable for computer devices with lower computing performance and expanding its applicability.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of image processing technology, and in particular to an image processing method, apparatus and computer equipment. Background Technology

[0002] Images taken in low-light conditions have low visibility and their visual quality is almost unsatisfactory. However, clear details of the target scene are crucial for many vision-based technologies, such as object detection.

[0003] In traditional techniques, the LIME (Low-Light Image Enhancement via Illumination Map Estimation) method is used to enhance images in low light conditions. It enhances the brightness of the original image by estimating the illuminance factor, thereby enhancing the image targets in the original image.

[0004] However, in the aforementioned traditional methods, when estimating illuminance factors, the Augmented Lagrangian Method (ALM) algorithm is used to solve the illuminance map optimization problem, and another accelerated solver is designed to approximate the solution of the problem. This results in a very large computational load for the illuminance factor estimation process, making it unsuitable for computer devices with low computing performance and severely limiting the applicability of brightness enhancement for the original image. Summary of the Invention

[0005] Therefore, it is necessary to provide an image processing method, apparatus, and computer device to address the aforementioned technical problems, which can reduce the amount of computation in the image enhancement process without affecting the image enhancement effect, so as to be applicable to computer devices with low computing performance and expand the scope of application.

[0006] In a first aspect, this application provides an image processing method, comprising:

[0007] The image to be processed is downsampled to obtain a downsampled image;

[0008] An initial illumination image is generated based on the pixel information of each pixel in the downsampled image;

[0009] The initial illumination image is subjected to Fast Global Smoothing (FGS) filtering to obtain the intermediate illumination image;

[0010] The intermediate illumination image is subjected to brightness transformation and upsampling to obtain a target illumination image with the same size as the image to be processed.

[0011] The target image is obtained by using the target illumination image to enhance the brightness of the image to be processed.

[0012] In one embodiment, the step of performing brightness transformation and upsampling processing on the intermediate illuminance image to obtain a target illuminance image with the same size as the image to be processed includes any one of the following: upsampling the intermediate illuminance image to obtain an upsampled image with the same size as the image to be processed, and performing brightness transformation on the upsampled image using a preset brightness enhancement parameter to obtain the target illuminance image; performing brightness transformation on the intermediate illuminance image using a preset brightness enhancement parameter to obtain a reference illuminance image, and upsampling the reference illuminance image to obtain the target illuminance image with the same size as the image to be processed.

[0013] In one embodiment, upsampling the intermediate illumination image to obtain an upsampled image with the same size as the image to be processed includes: inserting each pixel in the intermediate illumination image into a blank image to obtain each reference pixel in the blank image; wherein the blank image has the same size as the image to be processed; and inserting pixels at each blank pixel position in the blank image according to the positional relationship between each blank pixel position in the blank image and each reference pixel to obtain the upsampled image.

[0014] In one embodiment, pixel insertion is performed at each blank pixel position in the blank image based on the positional relationship between each blank pixel position and each reference pixel. This includes: for each blank pixel position in the blank image, selecting a target pixel corresponding to the blank pixel position from each reference pixel based on the positional relationship between the blank pixel position and each reference pixel; determining a target pixel value corresponding to the blank pixel position based on the positional relationship between each target pixel and the blank pixel position, the pixel information corresponding to each target pixel, and the pixel information corresponding to the blank pixel position; wherein, the pixel information corresponding to each target pixel includes the pixel information of pixels in the image to be processed that have the same pixel position as the target pixel and the illuminance value of the target pixel in the intermediate illuminance image; the pixel information corresponding to the blank pixel position includes the pixel information of pixels in the image to be processed that have the same pixel position as the blank pixel; and inserting a pixel with the pixel value of the target pixel value at the blank pixel position.

[0015] In one embodiment, determining the target pixel value corresponding to the blank pixel position based on the positional relationship between each target pixel and the blank pixel position, the pixel information corresponding to each target pixel, and the pixel information corresponding to the blank pixel position includes: for each target pixel, determining the target weight of the target pixel based on the positional relationship between the target pixel and the blank pixel position, the pixel information of pixels in the image to be processed that have the same pixel position as the target pixel, and the pixel information corresponding to the blank pixel position; and weighting the illuminance values ​​of each target pixel in the intermediate illuminance image according to the target weight of each target pixel to obtain the target pixel value corresponding to the blank pixel position.

[0016] In one embodiment, determining the target weight of the target pixel based on the positional relationship between the target pixel and the blank pixel position, the pixel information of the pixels in the image to be processed that have the same pixel position as the target pixel, and the pixel information corresponding to the blank pixel position includes: determining a first weight based on the positional relationship between the target pixel and the blank pixel position; determining the absolute value of the difference between the pixel information of the pixels in the image to be processed that have the same pixel position as the target pixel and the pixel information corresponding to the blank pixel position, and determining a second weight based on the absolute value of the difference; and determining the target weight of the target pixel based on the product of the first weight and the second weight.

[0017] In one embodiment, generating an initial illumination image based on the image information of the downsampled image includes any one of the following: in response to the image to be processed being an RGB image, generating an initial illumination image based on the maximum value of each color channel value of each pixel in the downsampled image; in response to the image to be processed being a non-RGB image, converting the downsampled image to an RGB image, and generating an initial illumination image based on the maximum value of each color channel value of each pixel in the converted RGB image.

[0018] In one embodiment, the step of performing Fast Global Smoothing (FGS) filtering on the initial illumination image to obtain an intermediate illumination image includes: for any two adjacent pixels in the initial illumination image, determining a Gaussian weight between the two adjacent pixels based on a preset Gaussian weight parameter and the difference between the illumination values ​​of the two adjacent pixels; and using the determined Gaussian weight, performing a preset number of FGS filtering cycles on each pixel row and each pixel column in the initial illumination image to obtain the intermediate illumination image.

[0019] Secondly, this application also provides an image processing apparatus, comprising:

[0020] The downsampling module is used to downsample the image to be processed to obtain a downsampled image;

[0021] The generation module is used to generate an initial illumination image based on the pixel information of each pixel in the downsampled image;

[0022] The filtering module is used to perform fast global smoothing (FGS) filtering on the initial illumination image to obtain the intermediate illumination image.

[0023] The processing module is used to perform brightness transformation and upsampling on the intermediate illumination image to obtain a target illumination image with the same size as the image to be processed;

[0024] The enhancement module is used to enhance the brightness of the image to be processed using the target illumination image, thereby obtaining the target image.

[0025] Thirdly, this application also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps of the various method embodiments provided in the first aspect above.

[0026] Fourthly, this application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the various method embodiments provided in the first aspect above.

[0027] Fifthly, this application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the various method embodiments provided in the first aspect above.

[0028] In the aforementioned image processing methods, apparatuses, and computer devices, downsampling the image to be processed to obtain a downsampled image significantly reduces its resolution. This allows subsequent core operations such as illumination map generation and FGS filtering to be performed in a low-resolution space, greatly reducing pixel-level computation. Generating an initial illumination image based on the pixel information of each pixel in the downsampled image avoids redundant computations caused by directly processing high-resolution images. Applying FGS filtering to the initial illumination image yields an intermediate illumination image, reducing smoothing complexity while preserving edge information. Performing brightness transformation and upsampling on the low-resolution intermediate illumination image yields a target illumination image of the same size as the image to be processed, avoiding the resource consumption of directly enhancing high-resolution images. Using the target illumination map to enhance the brightness of the image to be processed yields the target image, leveraging the pixel correspondence between the target illumination map and the image to be processed for brightness enhancement. Thus, while maintaining the enhancement effect, the computational load in the image enhancement process is reduced, making it suitable for computer devices with lower computing performance and meeting their real-time image processing needs, thereby expanding the applicability of image enhancement. Attached Figure Description

[0029] To more clearly illustrate the technical solutions in the embodiments of this application or related technologies, the drawings used in the description of the embodiments of this application or related technologies will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.

[0030] Figure 1 An application environment diagram of an image processing method provided in an embodiment of this application;

[0031] Figure 2 A schematic flowchart of an image processing method provided in an embodiment of this application;

[0032] Figure 3 A flowchart illustrating the process of determining an upsampled image, provided in an embodiment of this application;

[0033] Figure 4 This application provides a schematic diagram of inserting reference pixels into a blank image based on an intermediate illumination image, as an embodiment of the present application.

[0034] Figure 5 This application provides a schematic diagram of a pixel insertion process in an embodiment;

[0035] Figure 6 This application provides a schematic diagram of a process for determining target pixel values ​​in an embodiment;

[0036] Figure 7 This application provides a schematic diagram of a process for determining target weights;

[0037] Figure 8 This application provides a schematic flowchart for determining an intermediate illumination image;

[0038] Figure 9 A structural block diagram of an image processing apparatus provided in an embodiment of this application;

[0039] Figure 10 An internal structural diagram of a computer device provided in an embodiment of this application;

[0040] Figure 11 An internal structural diagram of another computer device provided in an embodiment of this application;

[0041] Figure 12 This is an internal structure diagram of a chip module provided in some embodiments of this application. Detailed Implementation

[0042] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0043] It should be noted that the terms "first," "second," etc., used in this application can be used to describe various elements, but these elements are not limited by these terms. These terms are only used to distinguish the first element from the second element. The terms "comprising" and "having," and any variations thereof, used in this application, are intended to cover non-exclusive inclusion. The term "multiple" used in this application refers to two or more. The term "and / or" used in this application refers to one of the embodiments or any combination of multiple embodiments.

[0044] Images taken in low-light conditions have low visibility and their visual quality is almost unsatisfactory. However, clear details of the target scene are crucial for many vision-based technologies, such as object detection.

[0045] In traditional techniques, the LIME method is used to enhance images in low light conditions. It enhances the brightness of the original image by estimating the illuminance factor, thereby enhancing the image targets in the original image.

[0046] However, in the aforementioned traditional methods, when estimating illuminance factors, the augmented Lagrange multiplier algorithm is used to solve the illuminance map optimization problem, and another accelerated solver is designed to approximate the solution to the problem. This results in a very large computational load for the illuminance factor estimation process, making it unsuitable for computer devices with low computing performance and severely limiting the applicability of brightness enhancement for the original image.

[0047] In view of this, and to solve the above-mentioned technical problems, an exemplary embodiment provides an image processing method. This method can be applied to a computer device, which can be a server or an image acquisition device. The server can be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing cloud computing services. The image acquisition device can be, but is not limited to, various smartphones, action cameras, tablets, camcorders, digital cameras, drones, industrial cameras, smartwatches, smart glasses, and other devices with image acquisition capabilities.

[0048] In an exemplary embodiment, the above-described image processing method can be executed by a device such as a chip or a chip module.

[0049] In one exemplary embodiment, the image processing method provided in this application can be applied to, for example, Figure 1 In the application environment shown, the image acquisition device 102 communicates with the server 104 via a network. A data storage system can store the data that the server 104 needs to process. The data storage system can be integrated onto the server 104, or it can be located in the cloud or on another network server. The image acquisition device 102 stores the image to be processed in the data storage system, and then the server 104 retrieves the initial image from the data storage system to execute the image processing method provided in this embodiment.

[0050] In one exemplary embodiment, such as Figure 2 As shown, an image processing method is provided, which is applied to... Figure 1 The following steps are used as an example to illustrate the process of image acquisition device 102:

[0051] S201, downsample the image to be processed to obtain a downsampled image.

[0052] The so-called image to be processed refers to the original image that needs to be enhanced; for example, an original low-light image taken under low-light conditions, which has low visibility and poor visual quality. Optionally, the image to be processed can be in various color formats such as RGB (Red Green Blue) or YUV (Luminance and Chrominance).

[0053] A downsampled image is a low-resolution image obtained by downsampling an image to reduce its resolution.

[0054] Optionally, the image to be processed can be a low-light image acquired by the image acquisition device under low-light conditions; or it can be an image to be processed directly retrieved by the image acquisition device from the database.

[0055] After acquiring the image to be processed, it can be downsampled according to a preset scaling factor to compress its size, resulting in a downsampled image with reduced resolution. The color format of the image to be processed and the downsampled image are the same.

[0056] Optionally, a dark light image L (i.e., the image to be processed, including but not limited to RGB or YUV images) is obtained, and the size of the dark light image L is W*H (Width*Height). According to the preset scaling factor N, the dark light image L is downsampled to obtain a downsampled image Ln. The size of the downsampled image Ln is Wn*Hn, where Wn=W / N and Hn=H / N.

[0057] S202, Generate an initial illumination image based on the pixel information of each pixel in the downsampled image.

[0058] Pixel information refers to the pixel data contained in each pixel of the downsampled image. The pixel data of each pixel in the downsampled image differs depending on the color format of the image to be processed. For example, if the image to be processed is in YUV format, the pixel information of each pixel in the downsampled image includes the luminance component Y (representing the brightness of the location), the blue difference component U, and the red difference component V; if the image to be processed is in RGB format, the pixel information of each pixel in the downsampled image includes the channel values ​​of the R channel, G channel, and B channel.

[0059] The initial illumination image refers to the image obtained by processing the pixel information of each pixel in the downsampled image, which can reflect the illumination level of each area in the image.

[0060] Optionally, the color format of the downsampled image is first determined. If the downsampled image is in RGB format (such as a color photograph), the maximum value of the R, G, and B channels of each pixel in the downsampled image is directly extracted as the illuminance value of that pixel. Based on the extracted illuminance values ​​of each pixel in the downsampled image, an initial illuminance image of the same size as the downsampled image is generated to complete the conversion from image pixel information to image illumination distribution. The illuminance value of each pixel in the initial illuminance image is the maximum value extracted from the R, G, and B channels of the pixel at the same position in the downsampled image. The pixel information of each pixel in the initial illuminance image is its illuminance value.

[0061] Correspondingly, if the downsampled image is in a non-RGB format (such as YUV or grayscale), it can be converted into an RGB format downsampled image based on the pixel information of each pixel in the downsampled image (such as the luminance component Y, the blue difference component U, and the red difference component V), and the initial illumination image can be generated by processing the RGB format downsampled image as described above.

[0062] S203, perform FGS filtering on the initial illuminance image to obtain the intermediate illuminance image.

[0063] An intermediate illumination image refers to a transitional image obtained after the initial illumination image has been filtered by FGS.

[0064] FGS (Fast Global Smoothing) filtering is a global optimization edge-preserving filtering method that is derived from weighted least squares and can be converted into 1D (One-Dimensional) processing.

[0065] Optionally, the FGS filtering algorithm is used to perform global smoothing calculation on the illuminance values ​​of all pixels in the initial illuminance image. This algorithm suppresses and corrects local illuminance noise and abrupt changes caused by low light environment and image downsampling in the initial illuminance image. While preserving the overall light intensity distribution trend of the initial illuminance image, the illuminance values ​​of each pixel are smoothly adjusted. After the global smoothing calculation of the entire initial illuminance image is completed, the illuminance values ​​of each pixel after FGS filtering optimization are arranged sequentially according to the pixel coordinate position of the initial illuminance image, and finally an intermediate illuminance image with the same size as the initial illuminance image is generated.

[0066] S204, perform brightness transformation and upsampling on the intermediate illumination image to obtain a target illumination image with the same size as the image to be processed.

[0067] The target illumination image refers to the final illumination image, which is the same size as the image to be processed, after the intermediate illumination image has undergone brightness transformation and upsampling.

[0068] Optionally, the intermediate illumination image can be upsampled first to obtain an upsampled image of the same size as the image to be processed. Then, a preset brightness enhancement parameter is used to perform brightness transformation on the upsampled image to obtain the target illumination image. Here, the upsampled image refers to the image of the same size as the image to be processed obtained after upsampling the intermediate illumination image; the preset brightness enhancement parameter refers to parameters used to adjust the image brightness in advance, such as brightness gain factor, gamma correction coefficient, etc., which can be pre-configured according to scene requirements. Optionally, interpolation processing is performed on the illuminance value of each pixel in the intermediate illumination image to obtain an upsampled image of the same size as the image to be processed; the preset brightness enhancement parameter (such as brightness gain factor) is used to perform brightness transformation on each pixel in the upsampled image to finally generate the target illumination image. For each pixel, the brightness transformation can be performed by performing a non-linear exponential operation on the brightness and brightness gain factor of the pixel in the upsampled image to obtain the enhanced brightness of that pixel.

[0069] Optionally, a preset brightness enhancement parameter can be used to first perform a brightness transformation on the intermediate illuminance image to obtain a reference illuminance image. Then, the reference illuminance image can be upsampled to obtain a target illuminance image with the same size as the image to be processed. Here, the reference illuminance image refers to the image obtained after brightness transformation of the intermediate illuminance image. Optionally, the implementation process of this embodiment differs from the above-described process of upsampling the intermediate illuminance image followed by brightness enhancement in only the execution order. The specific implementation processes of upsampling and brightness enhancement are similar to those described above and will not be repeated here.

[0070] S205: Using the target illumination image, the brightness of the image to be processed is enhanced to obtain the target image.

[0071] The target image refers to the final image obtained after the image to be processed has been enhanced in brightness, and has higher visual quality and clarity.

[0072] Optionally, since the target illumination image and the image to be processed are the same size, a pixel position correspondence between the target illumination image and the image to be processed can be established first. Then, for each pixel in the image to be processed, based on the pixel value of the corresponding pixel in the target illumination image, a preset brightness enhancement formula is used to obtain the brightness-adjusted pixel value. After completing the brightness adjustment of all pixels, a visually optimized target image is generated. The preset brightness enhancement formula can be expressed as: the adjusted brightness value of each pixel = the pixel value of that pixel in the image to be processed / the pixel value of the corresponding pixel in the target illumination image.

[0073] Optionally, the target image can be determined using the following formula: Where R represents the target image, T represents the target illumination image, and L represents the image to be processed.

[0074] Optionally, after obtaining the target image, further processing can be performed on the target image, such as noise reduction, saturation reduction, and target detection.

[0075] In the aforementioned image processing method, downsampling the image to be processed to obtain a downsampled image significantly reduces its resolution, allowing subsequent core operations such as illumination map generation and FGS filtering to be performed in a low-resolution space, greatly reducing pixel-level computation. Generating an initial illumination image based on the pixel information of each pixel in the downsampled image avoids redundant computations caused by directly processing high-resolution images. Applying FGS filtering to the initial illumination image yields an intermediate illumination image, preserving edge information while reducing the complexity of smoothing processing. Brightness transformation and upsampling of the low-resolution intermediate illumination image yields a target illumination image of the same size as the image to be processed, avoiding the resource consumption of directly enhancing high-resolution images. Using the target illumination map to enhance the brightness of the image to be processed yields the target image, leveraging the pixel correspondence between the target illumination map and the image to be processed for brightness enhancement. This approach maintains the enhancement effect while reducing the computational load during image enhancement, making it suitable for computer devices with lower computing performance and meeting their real-time image processing needs, thus expanding the applicability of image enhancement.

[0076] Based on the above embodiments, in an exemplary embodiment, the determination of the upsampled image is further refined. Optionally, such as Figure 3 As shown, the following steps may be included:

[0077] S301, insert each pixel in the intermediate illumination image into the blank image to obtain each reference pixel in the blank image.

[0078] The blank image is the same size as the image to be processed.

[0079] A blank image refers to an image of the same size as the image to be processed, where all pixel values ​​are initially empty. A reference pixel refers to a pixel extracted from the intermediate illumination image and inserted into the blank image, with its position corresponding to its original position in the intermediate illumination image.

[0080] Optionally, a blank image with the same size as the image to be processed can be created first. Each pixel in the blank image has a null value, or the illuminance value of each pixel is initialized to 0. For each pixel in the intermediate illuminance image, based on the pixel's position in the intermediate illuminance image, the position of each reference pixel in the blank image is determined, and the illuminance value of that pixel in the intermediate illuminance image is used as the illuminance value of the corresponding reference pixel. All other pixels in the blank image, except for the reference pixels, remain null or have an illuminance value of 0.

[0081] Optional, such as Figure 4 As shown, for example, if the intermediate illumination image is 1 / 16 of the size of the image to be processed (e.g., if the size of the image to be processed is 8×8, the size of the intermediate illumination image Tn is 2×2), then the size of the blank image Tn_up is 8×8. Each pixel in the intermediate illumination image can be used to determine its corresponding reference pixel in the blank image, while other pixels in the blank image, except for each reference pixel, remain blank.

[0082] S302, based on the positional relationship between each blank pixel position in the blank image and each reference pixel, insert a pixel at each blank pixel position in the blank image to obtain an upsampled image.

[0083] The so-called blank pixel position refers to the coordinate position in a blank image that is not occupied by a reference pixel, that is, the pixel position that needs to be filled by interpolation calculation.

[0084] Optionally, for each blank pixel position in the blank image, the pixel value at that position can be determined by an interpolation algorithm (such as bilinear interpolation, nearest neighbor interpolation, etc.) based on the positional relationship between the blank pixel position and the positions of each reference pixel point, such as distance and direction. The pixel values ​​of all blank pixel positions are determined and blank pixels are filled according to these pixel values ​​to obtain an upsampled image with the same size as the image to be processed.

[0085] In this embodiment, compared to ordinary upsampling (such as bilinear upsampling, nearest neighbor upsampling, etc.), especially when the upsampling factor is large, simple upsampling can cause diffusion blurring or jagged edges in areas with large gradients in the target illumination map. This results in the target illumination image and the image to be processed not fitting together at the edges, producing diffused black and white edges during image enhancement and restoration. By mapping the pixels of the intermediate illumination image to a blank image of the same size, a basic coordinate framework for upsampling is established, ensuring spatial alignment between the upsampling result and the image to be processed. Through position-relationship driven pixel insertion, the transformation from sparse reference points to a dense pixel matrix is ​​achieved, providing complete illumination map data support for subsequent image enhancement. This process avoids the detail loss problem caused by direct scaling in traditional upsampling methods, laying the foundation for improving image enhancement quality. Furthermore, it ensures that the upsampled image still fits the edges of the image to be processed, thus avoiding black and white edges after image enhancement.

[0086] Based on the above embodiments, in an exemplary embodiment, the pixel insertion process in S302 is further refined. Optionally, such as Figure 5 As shown, the following steps may be included:

[0087] S501, for each blank pixel position in the blank image, select the target pixel corresponding to the blank pixel position from each reference pixel position according to the positional relationship between the blank pixel position and each reference pixel position.

[0088] In this context, target pixels refer to key pixels selected from reference pixels that have a significant impact on the pixel value calculation of the blank pixel location. These target pixels can be several reference pixels closest to the blank pixel location. For example, the four reference pixels located around the blank pixel location are the target pixels corresponding to that blank pixel location.

[0089] Optionally, for any blank pixel location in a blank image, the distance between the blank pixel location and each reference pixel can be calculated based on the positional relationship between the blank pixel location and all reference pixels. Based on the distance, the K nearest reference pixels (e.g., K=4) can be selected as the target pixel location. Alternatively, multiple reference pixels within a preset range of the blank pixel location can be selected as the target pixel location based on the positional relationship between the blank pixel location and each reference pixel. For example, four reference pixels surrounding a blank pixel location can be selected as the target pixel location.

[0090] S502, based on the positional relationship between each target pixel and the blank pixel position, the pixel information corresponding to each target pixel and the pixel information corresponding to the blank pixel position, determine the target pixel value corresponding to the blank pixel position.

[0091] The pixel information corresponding to each target pixel includes the pixel information of the pixels in the image to be processed that have the same pixel position as the target pixel and the illuminance value of the target pixel in the intermediate illuminance image; the pixel information corresponding to the blank pixel position includes the pixel information of the pixels in the image to be processed that have the same pixel position as the blank pixel.

[0092] For each blank pixel location, the pixel information (such as RGB color value, brightness value, etc.) of the pixel at the same location in the image to be processed can be obtained as the pixel information corresponding to the blank pixel location. For each target pixel corresponding to the blank pixel location, the pixel information of the target pixel at the corresponding location in the image to be processed and the illuminance value in the intermediate illuminance map can be obtained as the pixel information corresponding to the target pixel. Then, based on the positional relationship between each target pixel and the blank pixel location, the pixel information corresponding to each target pixel, and the pixel information corresponding to the blank pixel location, the target pixel value corresponding to the blank pixel location can be determined.

[0093] S503, inserts a pixel with the target pixel value at a blank pixel position.

[0094] Optionally, for each blank pixel position, the target pixel value corresponding to the blank pixel position calculated above is directly assigned to the blank pixel position in the blank image to complete the insertion of a single pixel; traverse all blank pixel positions and repeat the above process until all positions in the blank image are filled to form a complete upsampled image.

[0095] In this embodiment, by filtering target pixels, the focus is on the reference pixels that have the greatest impact on the position of blank pixels, reducing interference from irrelevant data and improving computational efficiency. By fusing the dual information of the target pixels (i.e., the pixel information of the corresponding position in the image to be processed and the illuminance value of the intermediate illuminance map) with the pixel information corresponding to the blank pixels, the upsampling process not only relies on the feature data of the intermediate illuminance map, but also combines the feature data of the image to be processed, avoiding edge distortion that may be caused by upsampling the intermediate illuminance map alone. The entire pixel insertion process realizes a precise mapping from local features to the global image, providing a high-quality upsampled image for subsequent processing.

[0096] Based on the above embodiments, in an exemplary embodiment, the process of determining the target pixel value in S502 is further refined. Optionally, as... Figure 6 As shown, the following steps may be included:

[0097] S601, for each target pixel, determine the target weight of the target pixel based on the positional relationship between the target pixel and the blank pixel position, the pixel information of the pixels in the image to be processed that have the same pixel position as the target pixel, and the pixel information corresponding to the blank pixel position.

[0098] The so-called target weight refers to the value that measures the contribution of a target pixel to the pixel value of a blank pixel position. The higher the weight, the greater the influence of the target pixel on the pixel value of the blank pixel position.

[0099] Optionally, the target weight of a target pixel is determined by considering two factors: first, the distance between the target pixel and the blank pixel in the blank image (the closer the distance, the greater the target weight); second, the similarity between the pixel information of pixels in the image that are at the same position as the target pixel and the pixel information of pixels at the same position as the blank pixel. For example, the color difference between these two pixel information is calculated and used as the similarity score (the smaller the color difference, the greater the target weight). The target weight of each target pixel is obtained through a preset weight calculation formula, such as the product of the inverse of the distance and the similarity score.

[0100] S602, according to the target weight of each target pixel, the illuminance value of each target pixel in the intermediate illuminance image is weighted to obtain the target pixel value corresponding to the blank pixel position.

[0101] Optionally, based on the target weight of each target pixel, a weighted average of the illuminance values ​​of each target pixel in the intermediate illuminance image is performed to obtain the target pixel value corresponding to the blank pixel position. Specifically, for each target pixel, the target weight of that target pixel and the illuminance value of that target pixel in the intermediate illuminance image are multiplied to obtain an intermediate value; the intermediate values ​​of all target pixels are summed to obtain a first sum, and the target pixel value corresponding to the blank pixel position is determined based on the ratio between the first sum and the sum of the target weights of all target pixels.

[0102] Optional, such as Figure 4 As shown, taking the blank pixel position Px as an example, the formula for calculating the target pixel value of Px is:

[0103] (1)

[0104] in, This represents the target weight corresponding to the i-th target pixel. This represents the illuminance value of the i-th target pixel in the intermediate illumination image.

[0105] In this embodiment, the target weight is determined by multi-factor fusion, so that target pixels that are close to each other and have similar features receive higher weights, thereby improving the accuracy of pixel value estimation at blank pixel positions. The weighted processing mechanism avoids the influence of a single pixel on the result and enhances the stability of the upsampling process. It is particularly suitable for pixel value calculation in edge regions. By adjusting the weights, the clarity of image edges can be effectively maintained, and the blurring effect common in traditional interpolation methods can be reduced.

[0106] Based on the above embodiments, in an exemplary embodiment, the process of determining the target weight in S601 is further refined. Optionally, as... Figure 7 As shown, the following steps may be included:

[0107] S701, determine the first weight based on the positional relationship between the target pixel and the blank pixel.

[0108] The so-called first weight refers to the weight component calculated based on spatial positional relationship, which is used to measure the spatial proximity of the target pixel and the blank pixel.

[0109] Optionally, a first weight table is pre-constructed. Since the position of each pixel in the blank image is fixed, the mapping relationship between the positional relationship between each pixel (e.g., the distance between each pixel determined based on the positional relationship between each pixel) and the weight can be determined in advance by using the row and column positions of each pixel, thereby determining the first weight table. Based on the positional relationship between the target pixel and the blank pixel (e.g., the distance determined based on the positional relationship between the target pixel and the blank pixel), the first weight table is queried to determine the first weight of the target pixel.

[0110] S702, determine the absolute value of the difference between the pixel information of the pixel point with the same pixel position as the target pixel point in the image to be processed and the pixel information corresponding to the blank pixel position, and determine the second weight based on the absolute value of the difference.

[0111] The so-called second weight refers to the weight component calculated based on pixel information similarity, which is used to measure the feature consistency between the target pixel and the blank pixel in the original image;

[0112] The absolute value of the difference refers to the absolute difference between the pixel information (such as the brightness value Y) between the target pixel position and the blank pixel position in the image to be processed.

[0113] Optionally, pixel information of pixels in the image to be processed that are at the same position as the target pixel and pixel information of pixels at the same position as blank pixels can be extracted to calculate the absolute value of the difference between the two pixel information and to calculate the second weight based on the absolute value of the difference.

[0114] Optionally, the absolute value of the difference can be processed using the Gaussian weighting formula to obtain the second weight, where the Gaussian weighting formula is shown below:

[0115] (2)

[0116] in, Represents the target pixel. The second weight; Indicates the pixel in the image to be processed that is related to the target pixel. Pixel information of pixels at the same location; Indicates the position of blank pixels in the image to be processed. Pixel information of pixels at the same location; This indicates the preset Gaussian weight parameters.

[0117] S703 determines the target weight of the target pixel based on the product between the first weight and the second weight.

[0118] Optionally, the first weight and the second weight are multiplied to obtain the target weight, which comprehensively reflects the dual effects of spatial proximity and feature similarity. The target pixel P1 is used relative to the blank pixel position P. x Taking the target weight W1 as an example, W1 = weight_bilinear_1 * weight_diff_1, where weight_bilinear_1 represents the first weight and weight_diff_1 represents the second weight.

[0119] In this embodiment, the calculation of the first and second weights enables independent adjustment of different influencing factors. The product-based weight fusion mechanism significantly increases the weight of spatially adjacent and similar target pixels, improving the accuracy of pixel value estimation at blank pixel locations and effectively enhancing the upsampling precision of edge regions and texture details. This weight calculation method eliminates the need for complex iterative optimization, controlling computational complexity while maintaining accuracy, which aligns with the overall design goals of fast low-light image enhancement methods. Through this weight determination process, the upsampled image can better preserve the edge features and local details of the original image, laying a high-quality data foundation for subsequent processing.

[0120] Based on the above embodiments, in an exemplary embodiment, the process of generating the initial illumination image in S201 is further refined. Optionally, it may include generating the initial illumination image based on the maximum value of each color channel value of each pixel in the downsampled image, in response to the image to be processed being an RGB image.

[0121] An RGB image is a color image composed of three color channels: red (R), green (G), and blue (B). The channel value of each channel is usually in the range of 0-255.

[0122] Optionally, if the downsampled image is an RGB image, for each pixel in the downsampled image, extract the channel values ​​of the R, G, and B channels of that pixel, and select the maximum value among these three channel values ​​as the illuminance value of that pixel in the initial illuminance image. For example, if the channel values ​​of the R, G, and B channels of a pixel are 30, 50, and 20 respectively, then the illuminance value of that pixel in the initial illuminance image is 50. After determining the illuminance values ​​of all pixels in the downsampled image in the initial illuminance image, the initial illuminance image can be generated based on these pixels and their corresponding illuminance values.

[0123] Optionally, in response to the image to be processed being a non-RGB image, the downsampled image is converted into an RGB image, and an initial illumination image is generated based on the maximum value of each color channel value of each pixel in the converted RGB image.

[0124] Non-RGB images refer to images that use non-RGB formats, such as grayscale images, YUV images, and HSV (Hue-Saturation-Value) images.

[0125] Optionally, if the downsampled image is not an RGB image, it can be converted to an RGB image first. For example, for a grayscale image, the conversion can be achieved by copying the single-channel grayscale value to the three RGB channels (R=G=B=grayscale value); for a YUV image, the Y channel (luminance) and UV channel (chrominance) can be converted to RGB values ​​using the standard conversion formula; then, the initial illumination image can be obtained by following the method described above for generating an initial illumination image from an RGB image.

[0126] In this embodiment, the initial illuminance image is generated using the color channel maximum value method, avoiding complex brightness separation algorithms and reducing computational complexity while ensuring the accuracy of illuminance estimation. It supports adaptive processing of RGB and non-RGB images, improving the algorithm's versatility. The use of downsampled images further reduces the computational load in determining the initial illuminance image, aligning with the overall design goals of the fast low-light enhancement method. The initial illuminance image generated by this method effectively reflects the global brightness distribution of the image, laying a reliable foundation for subsequent FGS filtering optimization.

[0127] Based on the above embodiments, in an exemplary embodiment, the process of determining the intermediate illuminance image in S202 is further refined. Optionally, such as Figure 8As shown, it may include:

[0128] S801: For any two adjacent pixels in the initial illumination image, determine the Gaussian weight between the two adjacent pixels based on the preset Gaussian weight parameters and the difference between the illumination values ​​of the two adjacent pixels.

[0129] The so-called Gaussian weight refers to the weight value calculated based on the Gaussian function and the difference in pixel values, which is used to measure the degree of influence between adjacent pixels.

[0130] The so-called preset Gaussian weight parameters refer to the parameters that control the decay rate of the Gaussian function (i.e., the Gaussian weight formula mentioned above). (Value). Optionally, the preset Gaussian weight parameter can be adjusted to any value greater than 0 based on the image noise level.

[0131] Optionally, for any two adjacent pixels in the initial illumination image, obtain the illumination values ​​corresponding to each of these two adjacent pixels; substitute these illumination values ​​into the Gaussian weight formula described above, and combine them with the preset Gaussian weight parameters in the Gaussian weight formula to calculate the Gaussian weight between these two adjacent pixels. That is, first determine the absolute value of the difference between the illumination values ​​corresponding to these two adjacent pixels; then calculate the ratio of the absolute value of the difference to the preset Gaussian weight parameters, and determine the negative of the ratio; thus, determine the exponential function value with the natural constant e as the base and the negative of the ratio as the exponent, as the Gaussian weight between these two adjacent pixels.

[0132] S802, using the determined Gaussian weights, performs a preset number of FGS filters on each pixel row and each pixel column in the initial illumination image to obtain the intermediate illumination image.

[0133] The so-called preset rounds refer to the number of filtering iterations set according to the image blurring requirements, which is usually 1-5 rounds.

[0134] In one optional embodiment, for each round, Gaussian weights are applied to each row of pixels in the first illumination image corresponding to that round to perform FGS filtering, obtaining a row filtering result. Then, Gaussian weights are applied to each column of pixels in the row filtering result to perform FGS filtering, obtaining a column filtering result. The first illumination image corresponding to the first round is the initial illumination image, the first illumination images corresponding to rounds other than the first round are the column filtering results of the previous round, and the column filtering result of the last round is the intermediate illumination image. Specifically, Gaussian weights can be applied to each row of pixels in the initial illumination image for FGS filtering, and the row filtering result can be obtained recursively. Then, using the row filtering result as input, the same Gaussian weights are applied to each column of pixels for FGS filtering, obtaining a column filtering result. If the preset number of rounds is greater than 1, the column filtering result of the previous round is used as the new input image, and the above row filtering-column filtering process is repeated until all rounds are completed. The final output column filtering result is the intermediate illumination image.

[0135] In another optional embodiment, for each round, Gaussian weights are applied to each pixel column of the second illumination image corresponding to that round, and FGS filtering is performed to obtain a column filtering result. Then, Gaussian weights are applied to each pixel row of the column filtering result, and FGS filtering is performed to obtain a row filtering result. The second illumination image corresponding to the first round is the initial illumination image, the second illumination images corresponding to rounds other than the first round are the row filtering results of the previous round, and the row filtering result of the last round is the intermediate illumination image. Specifically, Gaussian weights can also be applied to each pixel column of the initial illumination image for FGS filtering first, and the column filtering result can be obtained recursively. Then, using the column filtering result as input, the same Gaussian weights are applied to each pixel row for FGS filtering to obtain a row filtering result. If the preset number of rounds is greater than 1, the row filtering result of the previous round is used as the new input image, and the column filtering-row filtering process is repeated until all rounds are completed.

[0136] In this way, during the FGS filtering process, two-dimensional smoothing is achieved through one-dimensional filtering that separates row filtering and column filtering, thereby reducing computational complexity and significantly improving processing efficiency while preserving image edge features.

[0137] Optionally, Gaussian weights are used to perform FGS filtering on each pixel row in the first illumination image corresponding to that round, including:

[0138] S1. For each pixel in the first illumination image corresponding to the round, determine the first reference value of the pixel according to the preset filtering parameters and the first Gaussian weight between the pixel and the previous pixel in the same pixel row.

[0139] The so-called preset filtering parameters refer to the adjustment coefficients that control the smoothness of FGS filtering, which are used to balance the filtering effect and edge preservation ability.

[0140] The so-called first reference value refers to an intermediate variable calculated based on the Gaussian weight of the previous pixel and preset filtering parameters, reflecting the degree of influence of the previous pixel on the current pixel.

[0141] Optionally, for each pixel in the first illumination image corresponding to a round, the first Gaussian weight between the pixel and the previous pixel in the same pixel row can be calculated according to the above Gaussian weight formula, and multiplied with the preset filtering parameters to determine the first reference value of the pixel.

[0142] S2. Determine the second reference value of the pixel based on the preset filtering parameters, the first Gaussian weight, and the second Gaussian weight between the pixel and the next pixel in the same pixel row.

[0143] The so-called second Gaussian weight refers to the Gaussian weight between the current pixel and the next pixel in the same pixel row. The calculation method is the same as the first Gaussian weight, reflecting the spatial influence of the next pixel on the current pixel.

[0144] Alternatively, the same Gaussian weight formula can be used to calculate the second Gaussian weight between a pixel and the next pixel in its row, and then combined with the first Gaussian weight and preset filtering parameters to determine the second reference value of the pixel.

[0145] S3. Determine the third reference value of the pixel based on the preset filtering parameters and the second Gaussian weight.

[0146] Optionally, the preset filtering parameters and the second Gaussian weights are multiplied to determine the third reference value of the pixel.

[0147] As an optional implementation, the calculation formulas for the first reference value, the second reference value, and the third reference value are as follows:

[0148] (3)

[0149] in, Represents the pixels in the first illumination image The first reference value, ∈[0, W-1], the first pixel in the first illuminance image row or column is denoted as the 0th pixel, and the last pixel in the first illuminance image row or column is the (W-1)th pixel, and boundary conditions are set. ; Indicates the preset filtering parameters; It is a 3-point sparse Laplace matrix with a size of W*W; Represents the pixels in the first illumination image With the previous pixel in the same pixel row The first Gaussian weight between them; Represents the pixels in the first illumination image The second reference value; Represents the pixels in the first illumination image The third reference value, Represents the pixels in the first illumination image and the next pixel in the same pixel row The first Gaussian weight between them.

[0150] S4. Determine the first target value of the pixel based on the first reference value, the second reference value, and the third reference value of the pixel, as well as the third reference value of the previous pixel.

[0151] S5. Based on the first reference value, second reference value, and illuminance value of the pixel, as well as the illuminance value and first target value of the previous pixel, determine the second target value of the pixel.

[0152] The so-called first target value refers to the intermediate result that reflects the smoothing trend of pixels in the row direction.

[0153] The so-called second target value refers to a comprehensive adjustment variable that combines the illumination value with the filtering result of the previous pixel, used to balance the smoothing effect and detail preservation.

[0154] Alternatively, the pixel points can be calculated using the following formula. First target value Second target value :

[0155] (4)

[0156] in, ; Pixels in the first illumination image ( The third reference value; Represents the number of pixels in the first illumination image ( The second target value; Represents the pixels in the first illumination image Illuminance value; , .

[0157] S6. Determine the FGS filtering result of the pixel based on the first target value and the second target value of the pixel, as well as the illuminance value of the next pixel.

[0158] The FGS filtering result refers to the final illuminance value of the pixel obtained after row filtering and column filtering, which is the basic unit of intermediate illuminance image.

[0159] Alternatively, the following formula can be used to calculate the pixel points. FGS filtering results :

[0160] (5)

[0161] in, ; This represents the number of pixels in the first illumination image after FGS filtering in the current round. Illuminance value; This represents the number of pixels in the first illumination image after FGS filtering in the current round. The next pixel in the same pixel row Illuminance value; .

[0162] At this point, One iteration of the calculation is completed. Similarly, after the horizontal direction is completed, the calculation can be recursively performed in the vertical direction. At this point, one iteration of the entire graph is completed, and multiple iterations can be performed as needed.

[0163] In this embodiment, Gaussian weights calculated based on the initial illumination difference enable the filtering process to adaptively distinguish between edge and smooth regions, effectively suppressing noise while preserving image edge features. The row / column separation implementation of FGS filtering transforms two-dimensional filtering into two one-dimensional filters, reducing computational complexity and significantly improving processing speed. The optional design of two filtering orders allows for selection of a better processing flow based on image content features (e.g., predominantly horizontal or vertical texture), enhancing the algorithm's adaptability. Through this embodiment, the intermediate illumination image achieves smooth optimization while maintaining edge sharpness, providing a high-quality illumination data foundation for subsequent processing and effectively avoiding the edge blurring problem caused by traditional filtering methods.

[0164] Based on the above embodiments, in an exemplary embodiment, the method may further include the following steps:

[0165] Step 1: Downsample the image to be processed to obtain a downsampled image.

[0166] Step 2: In response to the image to be processed being an RGB image, an initial illumination image is generated based on the maximum value of each color channel value of each pixel in the downsampled image; or, in response to the image to be processed being a non-RGB image, the downsampled image is converted to an RGB image, and an initial illumination image is generated based on the maximum value of each color channel value of each pixel in the converted RGB image.

[0167] Step 3: For any two adjacent pixels in the initial illumination image, determine the Gaussian weight between the two adjacent pixels based on the preset Gaussian weight parameters and the difference between the illumination values ​​of the two adjacent pixels.

[0168] Step 4: Using the determined Gaussian weights, perform a preset number of FGS filters on each pixel row and each pixel column in the initial illumination image to obtain the intermediate illumination image.

[0169] Step 5: Insert each pixel in the intermediate illumination image into the blank image to obtain each reference pixel in the blank image.

[0170] Step 6: For each blank pixel position in the blank image, perform steps 7-12 to obtain an upsampled image.

[0171] Step 7: Based on the positional relationship between the blank pixel position and each reference pixel, select the target pixel corresponding to the blank pixel position from each reference pixel.

[0172] Step 8: Determine the first weight based on the positional relationship between the target pixel and the blank pixel.

[0173] Step 9: Determine the absolute value of the difference between the pixel information of the pixel with the same pixel position as the target pixel in the image to be processed and the pixel information corresponding to the blank pixel position, and determine the second weight based on the absolute value of the difference.

[0174] Step 10: Determine the target weight of the target pixel based on the product of the first weight and the second weight.

[0175] Step 11: Based on the target weight of each target pixel, perform weighted processing on the illuminance values ​​of each target pixel in the intermediate illuminance image to obtain the target pixel value corresponding to the blank pixel position.

[0176] Step 12: Insert a pixel with the target pixel value at the blank pixel position.

[0177] Step 13: Using preset brightness enhancement parameters, perform brightness transformation on the upsampled image to obtain the target illumination image.

[0178] Step 14: Use the target illumination image to enhance the brightness of the image to be processed, and obtain the target image.

[0179] The specific implementation methods of steps 1 to 14 are the same as those in the above method embodiments, and will not be repeated here.

[0180] It should be understood that although the steps in the flowcharts of the above embodiments are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the above embodiments may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages in other steps. It is understood that the steps in different embodiments can be freely combined as needed, and all non-contradictory solutions formed by such combinations are within the scope of protection of this application.

[0181] Based on the same inventive concept, this application also provides an image processing apparatus for implementing the image processing method described above. The solution provided by this apparatus is similar to the implementation scheme described in the above method; therefore, the specific limitations in one or more image processing apparatus embodiments provided below can be found in the limitations of the image processing method described above, and will not be repeated here.

[0182] In one exemplary embodiment, such as Figure 9 As shown, an image processing apparatus is provided, comprising: a downsampling module 901, a generation module 902, a filtering module 903, a processing module 904, and an enhancement module 905, wherein:

[0183] The downsampling module 901 is used to downsample the image to be processed to obtain a downsampled image;

[0184] The generation module 902 is used to generate an initial illumination image based on the pixel information of each pixel in the downsampled image;

[0185] The filtering module 903 is used to perform fast global smoothing (FGS) filtering on the initial illumination image to obtain the intermediate illumination image;

[0186] Processing module 904 is used to perform brightness transformation and upsampling processing on the intermediate illumination image to obtain a target illumination image with the same size as the image to be processed;

[0187] The enhancement module 905 is used to enhance the brightness of the image to be processed using the target illumination image to obtain the target image.

[0188] In an exemplary embodiment, the processing module 904 is specifically configured to: upsample the intermediate illuminance image to obtain an upsampled image of the same size as the image to be processed, and perform illuminance transformation on the upsampled image using preset illuminance enhancement parameters to obtain a target illuminance image; or, perform illuminance transformation on the intermediate illuminance image using preset illuminance enhancement parameters to obtain a reference illuminance image, and upsample the reference illuminance image to obtain a target illuminance image of the same size as the image to be processed.

[0189] In an exemplary embodiment, the processing module 904 includes: a first insertion submodule, configured to insert each pixel in the intermediate illumination image into a blank image to obtain each reference pixel in the blank image; wherein the blank image and the image to be processed have the same size; and a second insertion submodule, configured to insert a pixel at each blank pixel position in the blank image according to the positional relationship between each blank pixel position in the blank image and each reference pixel to obtain an upsampled image.

[0190] In an exemplary embodiment, the second insertion submodule includes: a selection unit, configured to select a target pixel corresponding to the blank pixel position from each reference pixel position based on the positional relationship between the blank pixel position and each reference pixel position for each blank pixel position in the blank image; a pixel value determination unit, configured to determine the target pixel value corresponding to the blank pixel position based on the positional relationship between each target pixel position and the blank pixel position, the pixel information corresponding to each target pixel position, and the pixel information corresponding to the blank pixel position; wherein, the pixel information corresponding to each target pixel position includes the pixel information of the pixel position of the same pixel position as the target pixel position in the image to be processed and the illuminance value of the target pixel position in the intermediate illuminance image; the pixel information corresponding to the blank pixel position includes the pixel information of the pixel position of the same pixel position as the blank pixel position in the image to be processed; and an insertion unit, configured to insert a pixel with the target pixel value at the blank pixel position.

[0191] In an exemplary embodiment, the pixel value determination unit includes: a weight determination subunit, configured to determine the target weight of each target pixel based on the positional relationship between the target pixel and the blank pixel position, the pixel information of the pixels in the image to be processed that have the same pixel position as the target pixel, and the pixel information corresponding to the blank pixel position; and a weighted processing subunit, configured to perform weighted processing on the illuminance values ​​of each target pixel in the intermediate illuminance image based on the target weight of each target pixel to obtain the target pixel value corresponding to the blank pixel position.

[0192] In an exemplary embodiment, the weight determination subunit is specifically used to: determine a first weight based on the positional relationship between the target pixel and the blank pixel; determine the absolute value of the difference between the pixel information of the pixel with the same pixel position as the target pixel in the image to be processed and the pixel information corresponding to the blank pixel position, and determine a second weight based on the absolute value of the difference; and determine the target weight of the target pixel based on the product of the first weight and the second weight.

[0193] In an exemplary embodiment, the generation module 902 is specifically configured to: in response to the image to be processed being an RGB image, generate an initial illumination image based on the maximum value of each color channel value of each pixel in the downsampled image; or, in response to the image to be processed being a non-RGB image, convert the downsampled image to an RGB image, and generate an initial illumination image based on the maximum value of each color channel value of each pixel in the converted RGB image.

[0194] In an exemplary embodiment, the filtering module 903 is specifically configured to: for any two adjacent pixels in the initial illumination image, determine the Gaussian weight between the two adjacent pixels based on the preset Gaussian weight parameters and the difference between the illumination values ​​of the two adjacent pixels; and use the determined Gaussian weight to perform a preset number of FGS filtering cycles on each pixel row and each pixel column in the initial illumination image to obtain an intermediate illumination image.

[0195] Each module in the aforementioned image processing device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device, or stored in the memory of a computer device as software, so that the processor can call and execute the operations corresponding to each module.

[0196] Regarding the modules / units included in the various devices and products described in the above embodiments, they can be software modules / units, hardware modules / units, or a combination of both. For example, for various devices and products applied to or integrated into a chip, all of their modules / units can be implemented using hardware methods such as circuits, or at least some modules / units can be implemented using software programs that run on a processor integrated within the chip, while the remaining (if any) modules / units can be implemented using hardware methods such as circuits; for various devices and products applied to or integrated into a chip module, all of their modules / units can be implemented using hardware methods such as circuits, and different modules / units can be located in the same component (e.g., chip, circuit module, etc.) or different components of the chip module, or at least some modules / units can be implemented using hardware methods such as circuits. The components can be implemented using software programs that run on the processor integrated within the chip module. The remaining (if any) modules / units can be implemented using hardware methods such as circuits. For various devices and products applied to or integrated into the terminal, each of its components / units can be implemented using hardware methods such as circuits. Different modules / units can be located in the same component (e.g., chip, circuit module, etc.) or in different components within the terminal. Alternatively, at least some modules / units can be implemented using software programs that run on the processor integrated within the terminal, while the remaining (if any) modules / units can be implemented using hardware methods such as circuits.

[0197] In one exemplary embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as follows: Figure 10 As shown, this computer device includes a processor, memory, input / output interfaces (I / O), and a communication interface. The processor, memory, and I / O interfaces are connected via a system bus, and the communication interface is also connected to the system bus via the I / O interfaces. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and a database. The internal memory provides the environment for the operating system and computer programs stored in the non-volatile storage media. The database stores images to be processed, target images, etc. The I / O interfaces are used for exchanging information between the processor and external devices. The communication interface is used for communicating with external terminals via a network connection. When the computer program is executed by the processor, it implements an image processing method.

[0198] In one exemplary embodiment, a computer device is provided, which may be an image acquisition device, and its internal structure diagram may be as follows: Figure 11 As shown, the computer device includes a processor, memory, input / output interfaces, a communication interface, a display unit, and an input device. The processor, memory, and input / output interfaces are connected via a system bus, and the communication interface, display unit, and input device are also connected to the system bus via the input / output interfaces. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The input / output interfaces are used for exchanging information between the processor and external devices. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, mobile cellular networks, Near Field Communication (NFC), or other technologies. When the computer program is executed by the processor, it implements an image processing method. The display unit is used to form a visually visible image and can be a display screen, a projection device, or a virtual reality imaging device. The display screen can be an LCD screen or an e-ink screen. The input device of the computer device can be a touch layer covering the display screen, or buttons, trackballs, or touchpads set on the casing of the computer device, or external keyboards, touchpads, or mice, etc.

[0199] Those skilled in the art will understand that Figure 10 and Figure 11 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0200] In one exemplary embodiment, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps in the above-described method embodiments.

[0201] In one exemplary embodiment, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the steps in the above-described method embodiments.

[0202] In one exemplary embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps in the above-described method embodiments.

[0203] Based on the same inventive concept, this application also provides a chip, including a processor coupled to a memory, for executing a computer program or instructions stored in the memory, and implementing the steps in the above method embodiments when the processor executes the computer program or instructions.

[0204] It is understood that the chip involved in the embodiments of this application may be a field-programmable gate array (FPGA), may be an application-specific integrated circuit (ASIC), may be a system on chip (SoC), may be a central processor unit (CPU), may be a network processor (NP), may be a digital signal processor (DSP), may be a microcontroller unit (MCU), may be a programmable logic device (PLD), or other integrated chips, etc.

[0205] Based on the same inventive concept, this application also provides a chip module, such as... Figure 12 As shown, the chip module includes a communication module, a power module, a storage module, and a chip. Among them:

[0206] The power module provides power to the chip module; the storage module stores data and instructions; the communication module enables internal communication within the chip module or communication between the chip module and external devices; this chip corresponds to the chip in the above chip embodiment. The implementation of this chip module can be found in the relevant content of the above chip embodiment, and will not be repeated here.

[0207] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, artificial intelligence (AI) processors, etc., and are not limited to these.

[0208] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.

[0209] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.

Claims

1. An image processing method, characterized in that, The method includes: The image to be processed is downsampled to obtain a downsampled image; An initial illumination image is generated based on the pixel information of each pixel in the downsampled image; The initial illumination image is subjected to Fast Global Smoothing (FGS) filtering to obtain the intermediate illumination image; The intermediate illumination image is subjected to brightness transformation and upsampling processing to obtain a target illumination image with the same size as the image to be processed; The target illumination image is used to enhance the brightness of the image to be processed, thereby obtaining the target image.

2. The method according to claim 1, characterized in that, The step of performing brightness transformation and upsampling processing on the intermediate illumination image to obtain a target illumination image with the same size as the image to be processed includes any one of the following: The intermediate illumination image is upsampled to obtain an upsampled image of the same size as the image to be processed, and the brightness of the upsampled image is transformed using preset brightness enhancement parameters to obtain the target illumination image; Using preset brightness enhancement parameters, the intermediate illuminance image is subjected to brightness transformation to obtain a reference illuminance image, and the reference illuminance image is upsampled to obtain a target illuminance image with the same size as the image to be processed.

3. The method according to claim 2, characterized in that, The step of upsampling the intermediate illumination image to obtain an upsampled image of the same size as the image to be processed includes: Each pixel in the intermediate illumination image is inserted into a blank image to obtain each reference pixel in the blank image; wherein, the blank image has the same size as the image to be processed; Based on the positional relationship between each blank pixel position in the blank image and each reference pixel, a pixel is inserted at each blank pixel position in the blank image to obtain an upsampled image.

4. The method according to claim 3, characterized in that, Based on the positional relationship between each blank pixel position in the blank image and each reference pixel, pixel insertion is performed at each blank pixel position in the blank image, including: For each blank pixel position in the blank image, a target pixel corresponding to the blank pixel position is selected from each reference pixel position according to the positional relationship between the blank pixel position and each reference pixel position. Based on the positional relationship between each target pixel and the blank pixel position, the pixel information corresponding to each target pixel, and the pixel information corresponding to the blank pixel position, the target pixel value corresponding to the blank pixel position is determined; wherein, the pixel information corresponding to each target pixel includes the pixel information of pixels in the image to be processed that have the same pixel position as the target pixel and the illuminance value of the target pixel in the intermediate illuminance image; the pixel information corresponding to the blank pixel position includes the pixel information of pixels in the image to be processed that have the same pixel position as the blank pixel. Insert a pixel with the value of the target pixel at the blank pixel position.

5. The method according to claim 4, characterized in that, The step of determining the target pixel value corresponding to the blank pixel position based on the positional relationship between each target pixel and the blank pixel position, the pixel information corresponding to each target pixel, and the pixel information corresponding to the blank pixel position includes: For each target pixel, the target weight is determined based on the positional relationship between the target pixel and the blank pixel position, the pixel information of the pixels in the image to be processed that have the same pixel position as the target pixel, and the pixel information corresponding to the blank pixel position. Based on the target weight of each target pixel, the illuminance value of each target pixel in the intermediate illuminance image is weighted to obtain the target pixel value corresponding to the blank pixel position.

6. The method according to claim 5, characterized in that, The step of determining the target weight of the target pixel based on the positional relationship between the target pixel and the blank pixel, the pixel information of pixels in the image to be processed that have the same pixel position as the target pixel, and the pixel information corresponding to the blank pixel position includes: The first weight is determined based on the positional relationship between the target pixel and the blank pixel. The absolute value of the difference between the pixel information of the pixel point with the same pixel position as the target pixel point in the image to be processed and the pixel information corresponding to the blank pixel position is determined, and a second weight is determined based on the absolute value of the difference; The target weight of the target pixel is determined based on the product of the first weight and the second weight.

7. The method according to any one of claims 1-6, characterized in that, The step of generating an initial illumination image based on the image information of the downsampled image includes any one of the following: In response to the fact that the image to be processed is an RGB image, an initial illumination image is generated based on the maximum value of each color channel value of each pixel in the downsampled image; In response to the fact that the image to be processed is a non-RGB image, the downsampled image is converted into an RGB image, and an initial illumination image is generated based on the maximum value of each color channel value of each pixel in the converted RGB image.

8. The method according to any one of claims 1-6, characterized in that, The step of performing Fast Global Smoothing (FGS) filtering on the initial illumination image to obtain an intermediate illumination image includes: For any two adjacent pixels in the initial illumination image, the Gaussian weight between the two adjacent pixels is determined based on the preset Gaussian weight parameters and the difference between the illumination values ​​of the two adjacent pixels. Using the determined Gaussian weights, each pixel row and each pixel column in the initial illumination image is subjected to a preset number of FGS filters to obtain an intermediate illumination image.

9. An image processing apparatus, characterized in that, The device includes: The downsampling module is used to downsample the image to be processed to obtain a downsampled image; The generation module is used to generate an initial illumination image based on the pixel information of each pixel in the downsampled image; The filtering module is used to perform Fast Global Smoothing (FGS) filtering on the initial illumination image to obtain an intermediate illumination image; The processing module is used to perform brightness transformation and upsampling processing on the intermediate illumination image to obtain a target illumination image with the same size as the image to be processed; An enhancement module is used to enhance the brightness of the image to be processed using the target illumination image to obtain the target image.

10. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 8.