Image tone mapping adjustment method, system, storage medium and terminal
By performing feature region segmentation and adaptive mapping gain calculation on high bit-width images, problems such as poor contrast and abnormal highlight edges in image tone mapping are solved, generating high-quality low bit-width images and improving image imaging effects.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- CHENGDU LIGHT COLLECTOR TECH
- Filing Date
- 2022-11-24
- Publication Date
- 2026-05-05
AI Technical Summary
In existing technologies, negative effects such as poor contrast, abnormal highlight edges, overexposure of highlights, and underexposure of dark areas often occur during image tone mapping, affecting image quality.
By acquiring the feature information of the high bit-width image, it is divided into multiple feature regions. The mapping gain is adaptively calculated according to the different feature regions. Multi-dimensional information processing is adopted, including brightness factor, gradient factor and detail information, to construct a feature tone mapping function, perform preliminary tone mapping and fusion gain calculation, and generate a low bit-width output image.
It improves the preservation of highlight details, edge performance, and dark information in images, thereby enhancing image quality and resolving the negative effects present in traditional methods.
Smart Images

Figure CN115760626B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of image processing technology, and in particular to a method, system, storage medium, and terminal for adjusting image tone mapping. Background Technology
[0002] Currently, in computational photography, photographic devices have limited ability to represent different brightness areas of an image. Therefore, multiple frames are often captured through consecutive bracketing exposures to obtain low dynamic range (LDR) images with varying brightness levels. These LDR images are then fused into a high dynamic range (HDR) image using a high dynamic range (HDR) fusion algorithm. However, the display range of a monitor is limited, typically an 8-bit RGB image. Therefore, it is necessary to map the high-bit-width HDR image to the brightness range that the monitor can display; this process is called tone mapping.
[0003] After HDR fusion, images typically have a high bit width. To map them to a displayable brightness range while ensuring no loss of information in dark areas and no overexposure in highlights, linear compression is clearly not feasible. Therefore, a curve is usually used as the mapping function. This curve has a small compression ratio in dark areas, or even stretches their brightness, and a large compression ratio in bright areas; that is, the curve has a steep slope in the low-brightness range and a shallow slope in the high-brightness range. In computational photography, the Reinhard tone mapping algorithm is the most widely used for tone mapping based on Bayer format data (RAW). Due to the inherent limitations of high bit width images, the large brightness range, and the limitations of the Reinhard tone mapping method, tone mapping results often exhibit negative effects such as poor contrast (blurred appearance), abnormal highlight edges, overexposure in highlights, and underexposure in shadows. In real-world devices and scenes, inherent image limitations and the need for high dynamic range are unavoidable; therefore, these negative effects are common in tone mapping, affecting image quality.
[0004] Therefore, it is necessary to provide a novel method, system, storage medium, and terminal for adjusting image tone mapping to solve the aforementioned problems existing in the prior art. Summary of the Invention
[0005] The purpose of this invention is to provide an image tone mapping adjustment method, system, storage medium, and terminal that can map high bit-width images to the brightness range that a display can show, thereby improving image quality.
[0006] To achieve the above objective, the image tone mapping adjustment method of the present invention includes:
[0007] Obtain the pixel values and image-related information of the input high-bit-width image, and determine the first feature information of the high-bit-width image based on the pixel values and the image-related information;
[0008] The high bit-width image is divided into multiple feature regions based on the first feature information, and image enhancement processing is performed on the feature regions.
[0009] Based on the first feature information, a preliminary tone mapping is performed on each feature region of the high bit-width image to obtain the mapping gain of the pixels in each feature region;
[0010] The brightness and detail information of each layer of the image in the feature region are obtained, and the second feature information based on the original resolution of the high bit-width image is reconstructed according to the brightness information, the detail information and the division relationship of the feature region.
[0011] The fusion weight of the feature region is calculated based on the second feature information, and the mapping gain of each feature region is combined based on the fusion weight to obtain the composite gain of each feature region.
[0012] The high-bit-width image is processed according to the synthesized gain to obtain a low-bit-width output image.
[0013] The beneficial effects of the image tone mapping adjustment method described in this invention are as follows: This scheme divides a high bit-width image into multiple feature regions based on the different first feature information, which facilitates adaptive calculation of tone mapping according to the different feature regions to obtain the mapping gain of different feature regions. This allows the tone mapping to exhibit better effects in different scenes. The generated low bit-width high dynamic range image, while ensuring the effective information of the image, makes the image highlight details better, the edge performance smoother, the dark area information better preserved, and the contrast of the mid-brightness areas that are prone to haziness higher. It effectively improves the phenomena of highlight clipping, loss of dark details, and haziness in the image, thereby improving the image imaging quality.
[0014] Optionally, obtaining the pixel values and image-related information of the input high-bit-width image, and determining the first feature information of the high-bit-width image based on the pixel values and the image-related information, includes:
[0015] Obtain the current scene information, exposure information, image brightness information, and device information of the high bit-width image;
[0016] The white balance coefficient is determined based on the current scene information, the exposure information, the image brightness information, and the device information;
[0017] The luminance factor of the high bit-width image is calculated based on the pixel values at different positions of the high bit-width image, the white balance coefficient, and the image edges.
[0018] Optionally, calculating the luminance factor of the high bit-width image based on the pixel values at different positions of the high bit-width image, the white balance coefficient, and the image edges includes:
[0019] The preliminary brightness information of each position in the high bit-width image is obtained by multiplying the white balance coefficient and the pixel value.
[0020] The preliminary brightness information at each location in the high bit-width image is window-filtered to obtain the brightness factor at each location.
[0021] Optionally, the first feature information further includes a gradient factor and detail information, wherein the gradient factor is calculated based on the brightness factor.
[0022] Optionally, the step of performing preliminary tone mapping on each of the feature regions of the high bit-width image based on the first feature information to obtain the mapping gain of pixels in each feature region includes:
[0023] Establish a standard tone mapping function and obtain the standard parameter information of the standard tone mapping function;
[0024] Calculate the first intermediate parameter and the second intermediate parameter based on the brightness factor and the gradient factor;
[0025] Calculate the feature region parameter information of each feature region based on the first intermediate parameter and the second intermediate parameter respectively, and obtain the feature tone mapping function corresponding to each feature region based on the feature region parameter information;
[0026] The mapping gain of the pixels in each feature region is calculated based on the feature tone mapping function and the luminance factor. The advantage is that the mapping gain of the pixels in each feature region is calculated based on the first feature information, resulting in better tone mapping performance in different scenes.
[0027] Optionally, the mapping gain satisfies the following formula:
[0028]
[0029] ,
[0030] in, The brightness factor of the point (x, y) in the feature region. , The feature tone mapping function represents each of the feature regions, where A, B, C, D, and E represent the feature region parameter information of the feature tone mapping function.
[0031] Optionally, the step of calculating the fusion weight of the feature region based on the second feature information, and combining the mapping gain of each feature region based on the fusion weight to obtain the composite gain at different positions of the high bit-width image, includes:
[0032] Construct a linear function, and calculate the fusion weight for each feature region based on the linear function and the second feature information;
[0033] The synthesized gain is calculated by weighted fusion based on the mapping gain in the feature region and the fusion weight corresponding to the feature region.
[0034] The present invention also provides an image tone mapping adjustment system, comprising:
[0035] The information acquisition module is used to acquire the pixel values and image-related information of the input high bit-width image, and determine the first feature information of the high bit-width image based on the pixel values and the image-related information.
[0036] The segmentation module is used to divide the high bit-width image into multiple feature regions based on the first feature information, and to perform image enhancement processing on the feature regions;
[0037] The mapping gain calculation module is used to perform preliminary tone mapping on each of the feature regions of the high bit-width image based on the first feature information, so as to obtain the mapping gain of the pixel points in each feature region.
[0038] The reconstruction module is used to acquire the brightness information and detail information of each layer of the image in the feature region, and reconstruct the second feature information based on the original resolution of the high bit width image according to the brightness information, the detail information and the division relationship of the feature region;
[0039] The composite gain calculation module is used to calculate the fusion weight of the feature region based on the second feature information, and to combine the mapping gain of each feature region based on the fusion weight to obtain the composite gain of each feature region.
[0040] The conversion output module is used to process the high-bit-width image according to the synthesis gain to obtain a low-bit-width output image.
[0041] The present invention also discloses a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the above-described method for adjusting image tone mapping.
[0042] The present invention also provides a terminal, including: a processor and a memory;
[0043] The memory is used to store computer programs;
[0044] The processor is used to execute the computer program stored in the memory, so that the terminal performs the image tone mapping adjustment method described above. Attached Figure Description
[0045] Figure 1 This is a flowchart of the image tone mapping adjustment method according to an embodiment of the present invention.
[0046] Figure 2 This is a flowchart of step S101 in the image tone mapping adjustment method according to an embodiment of the present invention.
[0047] Figure 3 This is a flowchart of step S103 in the image tone mapping adjustment method according to an embodiment of the present invention.
[0048] Figure 4 This is a schematic diagram of the curve of the feature tone mapping function in the image tone mapping adjustment method according to an embodiment of the present invention.
[0049] Figure 5 This is a structural block diagram of the image tone mapping adjustment system according to an embodiment of the present invention. Detailed Implementation
[0050] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions in the embodiments of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without inventive effort are within the scope of protection of this invention. Unless otherwise defined, the technical or scientific terms used herein should have the ordinary meaning understood by those skilled in the art. The terms "comprising" and similar expressions used herein mean that the element or object preceding the word covers the element or object listed following the word and its equivalents, but do not exclude other elements or objects.
[0051] To address the problems existing in the prior art, embodiments of the present invention provide a method for adjusting image tone mapping, referring to... Figure 1 It includes the following steps:
[0052] S101. Obtain the pixel values and image-related information of the input high-bit-width image, and determine the first feature information of the high-bit-width image based on the pixel values and the image-related information.
[0053] In some embodiments, reference Figure 2 The above process includes the following steps:
[0054] S201. Obtain the current scene information, exposure information, image brightness information, and device information of the high bit-width image;
[0055] S202. Determine the white balance coefficient based on the current scene information, the exposure information, the image brightness information, and the device information;
[0056] S203. Calculate the luminance factor of the high bit-width image based on the pixel values at different positions of the high bit-width image, the white balance coefficient, and the image edges.
[0057] Taking the luminance factor as an example, the current scene information, exposure information, image luminance information, and device information of the high bit-width image are obtained to determine the corresponding white balance coefficient. Subsequently, based on the pixel values, white balance coefficients, and image edges at different locations, the luminance factor of the high bit-width image at different positions is calculated. Since the process of calculating the white balance coefficient is existing technology, this solution does not impose any special limitations on it and will not be elaborated here.
[0058] In some embodiments, calculating the luminance factor of the high bit-width image based on the pixel values at different positions of the high bit-width image, the white balance coefficient, and the image edges includes:
[0059] The preliminary brightness information of each position in the high bit-width image is obtained by multiplying the white balance coefficient and the pixel value.
[0060] The preliminary brightness information at each location in the high bit-width image is window-filtered to obtain the brightness factor at each location.
[0061] Specifically, the white balance coefficients at different locations are calculated through the aforementioned process. Then, using the input pixel values, combined with the white balance coefficient and image edges in different directions, the luminance factor at the H(x,y) coordinate of the high bit-width image is calculated. :
[0062]
[0063]
[0064] in, It represents the pixel value of the input high-bit-width image at the (x,y) coordinates. This corresponds to the white balance coefficient; Y(x,y) represents the initial brightness of each point in the high bit-width image. This indicates that the initial brightness at coordinate (x,y) is Y(x,y). The filtering of the window at point (x,y) can be a combination of edge extraction filters in different directions or a simple Gaussian filter. Different filters are applied to different needs and will bring different benefits, which will not be elaborated here.
[0065] In some embodiments, the first feature information further includes a gradient factor and detail information, wherein the gradient factor is calculated based on the brightness factor. Since the calculation process of the gradient factor is prior art, it will not be described in detail here.
[0066] As for detailed information, it can be converted to the frequency domain through Fourier transform to extract high-frequency detail factors; or multi-level images can be constructed, such as Gaussian pyramids and Laplacian pyramids, to extract multi-level detail factors based on the differences between multi-level images.
[0067] The first feature information includes not only the above-mentioned content, but also noise factor, image edge factor, and mapping scale. The required first feature information is obtained according to the subsequent region division. For example, the signal-to-noise ratio of different regions of the image is extracted based on the noise curve of the device calibration, and the noise factor is calculated by combining single-point, local and global information. The Sobel operator is used to calculate the image edge factor, or the histogram is calculated and the shape and distribution information of the histogram are extracted, which can guide the mapping scale of different brightness ranges in the mapping process. This will not be elaborated here.
[0068] In this embodiment, in order to perform subsequent image segmentation and gain calculation, multi-dimensional, multi-form, and multi-level information is extracted based on the input high bit-width image pixel values, combined with exposure, gain, application scenario, device characteristics, etc. The maximum bit-width and overall brightness level of the image can be calculated by using the exposure time and gain of a single frame before HDR fusion, so as to more accurately handle problems in different situations.
[0069] S102. Divide the high bit-width image into multiple feature regions according to the first feature information, and perform image enhancement processing on the feature regions.
[0070] In this embodiment, the high bit-width image is divided into three regions based on the detail and brightness in the first feature information: a highlight detail region, a regular mapping region, and a darker region. Specifically, regions with high brightness and abundant detail, such as bright billboards, neon lights, and clouds in a clear sky, are classified as highlight detail regions. These regions typically have large pixel values but are not overflowing. The mapping curve corresponding to these regions should meet the following conditions: a large highlight suppression amplitude to avoid overexposure; and appropriate contrast enhancement to prevent blurriness without overexposure. Specifically, the existence of such regions can be initially determined using histogram information and exposure information. If the histogram information is concentrated in the left half or the exposure time is long, then such regions do not exist; otherwise, such regions may exist. Further determination can be made using brightness, detail, and edge factors. If all of these are greater than the corresponding thresholds, or their product or square average is within a certain value range, then it is determined to be a region.
[0071] Areas with brightness within a certain range—neither too bright nor too dark—without significant loss of detail due to overexposure or underexposure, a high signal-to-noise ratio, and sufficient contrast, are classified as regular mapping areas, such as indoor or outdoor buildings. Alternatively, areas with high brightness but lacking detail, such as the center of the midday sun or the center of a large area of strong light, are also considered. These areas typically have centered pixel values and good image and quality information. During mapping, only normal detail needs to be maintained; excessive processing is unnecessary. We can use more conventional or currently mature mapping curves to maintain good results. These areas can also be initially assessed for their potential existence using histogram and exposure information. If they are likely to exist, further filtering can be performed by considering the brightness factor within a certain range and the range and magnitude of the corresponding detail factor.
[0072] For areas with low brightness, there are fewer but existing image details, such as country roads at night or dark rooms with very low light. These areas are classified as darker areas. These areas usually have very low pixel values, poor image quality and details, high noise levels and low signal-to-noise ratio. When color mapping, it is necessary to adjust the mapping curve to appropriately increase their brightness so that they are visible to the human eye.
[0073] S103. Perform preliminary tone mapping on each feature region of the high bit-width image according to the first feature information to obtain the mapping gain of the pixel points in each feature region.
[0074] In some embodiments, reference Figure 3 Step S103 includes:
[0075] S301. Establish a standard tone mapping function and obtain the standard parameter information of the standard tone mapping function;
[0076] S302. Calculate the first intermediate parameter and the second intermediate parameter based on the brightness factor and the gradient factor;
[0077] S303. Calculate the feature region parameter information of each feature region according to the first intermediate parameter and the second intermediate parameter, and obtain the feature tone mapping function corresponding to each feature region according to the feature region parameter information;
[0078] S304. Calculate the mapping gain of the pixels in the feature region based on the feature tone mapping function and the brightness factor for each feature region.
[0079] To ensure overall consistency and broad adaptability of mapping across different regions, a basic model with multiple inflection points and a wide range of adjustability can be set. By adjusting the inflection points and slopes of the mapping curves in different feature regions, the corresponding tone mapping can be made to more perfectly maintain or enhance the required detail information while compressing the bit width.
[0080] With the following feature tone mapping function For example, the following is an explanation:
[0081] A, B, C, D, and E are parameters, and their corresponding curve diagrams are shown below. Figure 4 As shown.
[0082] Simultaneously, tone mapping calculations are performed on the three regions defined in step S102. First, a set of standard values is set, here using the ACES curve as the standard parameter. The characteristic of this curve for tone mapping is that it provides high contrast within a certain brightness range; beyond this range, overexposure or underexposure may occur. Then, the characteristic tone mapping function... The standard value of the intermediate parameter is:
[0083]
[0084]
[0085]
[0086]
[0087]
[0088] Then the first intermediate parameter Second intermediate parameter The calculation process is as follows:
[0089]
[0090]
[0091] in and These are the average values of the luminance factor and gradient factor in the highlight detail area, respectively. It is the average value of the brightness factor in the darker areas.
[0092] For the highlight detail area, its eigentone mapping function The parameters are as follows:
[0093]
[0094]
[0095]
[0096]
[0097] For typical regions, its characteristic tone mapping function The parameters are as follows:
[0098]
[0099]
[0100]
[0101]
[0102]
[0103] For darker areas, its characteristic tone mapping function The parameters are as follows:
[0104]
[0105]
[0106]
[0107]
[0108]
[0109] It can also be subdivided into more or fewer areas depending on the application scenario, which will not be elaborated here.
[0110] In this embodiment, a, b, c, d, and e are coefficient correction constants, which are related to the photography device and the scene, and are selected according to the actual situation. No limitation is made here.
[0111] In some other embodiments, the mapping gain at each location in each region satisfies the following formula:
[0112]
[0113] ,
[0114] in, The brightness factor of the point (x, y) in the feature region. , The feature tone mapping function represents each of the feature regions, where A, B, C, D, and E represent the feature region parameter information of the feature tone mapping function.
[0115] The above calculation process yields the mapping gain value for each region, facilitating subsequent gain synthesis.
[0116] S104. Obtain the brightness information and detail information of each layer of the image in the feature region, and reconstruct the second feature information based on the original resolution of the high bit-width image according to the brightness information, the detail information and the division relationship of the feature region.
[0117] After obtaining different feature regions, image brightness and detail information at different domains, levels, and scales are extracted. Secondary feature information based on the original resolution is reconstructed based on the brightness and detail information of each image layer and the feature region division relationship. Specifically, methods for extracting different levels and scales can include Gaussian pyramids or resolution upsampling / downsampling; numerical calculations can be performed in the linear domain or the log domain, with the linear domain better reflecting the digital characteristics of the image itself, while the log domain better reflects human visual characteristics; a series of intermediate processing steps, such as image enhancement, can be performed to strengthen feature information, allowing different feature regions to better retain some desired characteristics after fusion. For example, using the average pixel value in each block, converting to the log domain, or using a point in the block as a low-resolution downsampled image. The values, etc., are then upsampled back to the original resolution to obtain the reconstruction factor at the original resolution. Upsampling methods include bilinear interpolation, two-dimensional Gaussian functions, etc., which will not be elaborated here. The second feature information includes the second brightness factor at coordinate points (x, y) in each feature region. .
[0118] S105. Calculate the fusion weight of the feature region based on the second feature information, and combine the mapping gain of each feature region based on the fusion weight to obtain the composite gain of each feature region.
[0119] In some embodiments, the step of calculating the fusion weight of the feature region based on the second feature information, and combining the mapping gain of each feature region based on the fusion weight to obtain the composite gain at different positions of the high bit-width image, includes:
[0120] Construct a linear function, and calculate the fusion weight for each feature region based on the linear function and the second feature information;
[0121] The synthesized gain is calculated by weighted fusion based on the mapping gain in the feature region and the fusion weight corresponding to the feature region.
[0122] After obtaining the second feature information of each feature region, the fusion weight of each feature region is calculated based on the second feature information, so as to perform weighted fusion of the mapping gain of each region according to the fusion weight, so as to obtain the final synthetic gain of each region.
[0123] Specifically, taking the linear function construction method as an example, the weight values for the highlight detail area, the normal area, and the darker area are respectively denoted as: , , The calculation process satisfies the following formula:
[0124]
[0125]
[0126] =
[0127]
[0128] Where SPAN is the length of the transition interval. These are the first blur brightness threshold and the second blur brightness threshold, respectively. These parameters are calculated using image-related information and the first feature information from step S101. They are then constrained and adjusted through extensive image testing experiments to smoothly fuse different feature regions while also preserving the characteristics of each region effectively.
[0129] By weighting and fusing the corresponding mapping gains of each region, the final composite gain of each location in the image can be obtained.
[0130]
[0131] in, Indicates the blending weight of the highlight detail area. This represents the fusion weights for typical regions. Indicates the blending weights for darker areas. Indicates the mapping gain of the highlight detail area. Represents the mapping gain of the typical region. This indicates the mapping gain for darker areas.
[0132] S106. Process the high-bit-width image according to the synthesis gain to obtain a low-bit-width output image.
[0133] The final low-bit width output image and high bit width input image The output relationship satisfies the following formula:
[0134]
[0135] This scheme divides the image into regions, allowing for targeted adjustments based on different features at different locations within the image. Adaptively calculating the tone mapping curve enables better tone mapping performance in various scenarios. A tone mapping algorithm is implemented, generating low-bitwidth, high dynamic range images. While preserving effective image information, it improves highlight details, smooths edges, retains dark areas well, and enhances contrast in mid-brightness areas prone to haziness, thus improving image quality. Compared to traditional tone mapping methods, this scheme dynamically calculates and adjusts the tone mapping curve using multiple dimensions—brightness and gradient—dividing the image into multiple regions, each with a different tone mapping curve to achieve ideal results. It employs a more complex tone mapping model with finer parameter adjustments, allowing for more adjustable details and wider applicability. It calculates the smooth fusion weights of the tone mapping gain corresponding to the three regions using block average brightness and upsampling methods. This method can improve issues such as highlight clipping, loss of detail in dark areas, and haziness.
[0136] The present invention also discloses an image tone mapping adjustment system, with reference to Figure 5 ,include:
[0137] The information acquisition module 501 is used to acquire the pixel values and image-related information of the input high bit-width image, and determine the first feature information of the high bit-width image based on the pixel values and the image-related information.
[0138] The segmentation module 502 is used to divide the high bit-width image into multiple feature regions according to the first feature information, and to perform image enhancement processing on the feature regions;
[0139] The mapping gain calculation module 503 is used to perform preliminary tone mapping on each of the feature regions of the high bit-width image according to the first feature information, so as to obtain the mapping gain of the pixel points in each feature region.
[0140] The reconstruction module 504 is used to acquire the brightness information and detail information of each layer of the image in the feature region, and reconstruct the second feature information based on the original resolution of the high bit width image according to the brightness information, the detail information and the division relationship of the feature region;
[0141] The synthesis gain calculation module 505 is used to calculate the fusion weight of the feature region based on the second feature information, and to combine the mapping gain of each feature region based on the fusion weight to obtain the synthesis gain of each feature region.
[0142] The conversion output module 506 is used to process the high bit-width image according to the synthesis gain to obtain a low bit-width output image.
[0143] It should be noted that the structure and principle of the image tone mapping adjustment system described above correspond one-to-one with the steps in the image tone mapping adjustment method described above, so they will not be repeated here.
[0144] It should be noted that the division of the various modules in the above device is merely a logical functional division. In actual implementation, they can be fully or partially integrated into a single physical entity, or they can be physically separated. Furthermore, these modules can be implemented entirely in software via processing element calls; they can be fully implemented in hardware; or some modules can be implemented by processing element calls to software, while others are implemented in hardware. For example, the selection module can be a separate processing element, or it can be integrated into a chip in the above system. Alternatively, it can be stored as program code in the memory of the above system, and its function can be called and executed by a processing element of the system. The implementation of other modules is similar. Moreover, these modules can be fully or partially integrated together, or they can be implemented independently. The processing element mentioned here can be an integrated circuit with signal processing capabilities. In the implementation process, each step of the above method or each of the above modules can be completed through the integrated logic circuits in the hardware of the processor element or through software instructions.
[0145] For example, these modules can be one or more integrated circuits configured to implement the above methods, such as one or more Application Specific Integrated Circuits (ASICs), one or more Digital Signal Processors (DSPs), or one or more Field Programmable Gate Arrays (FPGAs). As another example, when a module is implemented using processing element scheduler code, the processing element can be a general-purpose processor, such as a Central Processing Unit (CPU) or other processor capable of calling program code. Furthermore, these modules can be integrated together as a System-On-a-Chip (SOC).
[0146] The present invention also discloses a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the above-described method for adjusting image tone mapping.
[0147] The storage medium of the present invention stores a computer program, which, when executed by a processor, implements the above-described method. The storage medium includes various media capable of storing program code, such as read-only memory (ROM), random access memory (RAM), magnetic disk, USB flash drive, memory card, or optical disk.
[0148] The present invention also provides a terminal, including: a processor and a memory;
[0149] The memory is used to store computer programs;
[0150] The processor is used to execute the computer program stored in the memory, so that the terminal performs the above-described image tone mapping adjustment method.
[0151] Through the above description of the embodiments, those skilled in the art will clearly understand that, for the sake of convenience and brevity, only the division of the above functional modules is used as an example. In practical applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. The specific working process of the system, device, and unit described above can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.
[0152] In the embodiments of this application, the functional units can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0153] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solutions of the embodiments of this application, essentially, or the parts that contribute to the prior art, or all or part of the technical solutions, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) or processor to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as flash memory, portable hard disk, read-only memory, random access memory, magnetic disk, or optical disk.
[0154] The above description is merely a specific implementation of the embodiments of this application, but the protection scope of the embodiments of this application is not limited thereto. Any changes or substitutions within the technical scope disclosed in the embodiments of this application should be covered within the protection scope of the embodiments of this application. Therefore, the protection scope of the embodiments of this application should be determined by the protection scope of the claims.
[0155] While embodiments of the present invention have been described in detail above, it will be apparent to those skilled in the art that various modifications and variations can be made to these embodiments. However, it should be understood that such modifications and variations fall within the scope and spirit of the invention as set forth in the claims. Furthermore, the invention described herein may have other embodiments and can be implemented or carried out in various ways.
Claims
1. A method for adjusting image tone mapping, characterized in that, include: The process involves acquiring pixel values and image-related information of an input high-bit-width image, and determining first feature information of the high-bit-width image based on the pixel values and the image-related information. This includes: acquiring current scene information, exposure information, image brightness information, and device information of the high-bit-width image; determining a white balance coefficient based on the current scene information, the exposure information, the image brightness information, and the device information; and calculating a brightness factor of the high-bit-width image based on pixel values at different positions, the white balance coefficient, and image edges. The high bit-width image is divided into multiple feature regions based on the first feature information, and image enhancement processing is performed on the feature regions. Based on the first feature information, a preliminary tone mapping is performed on each feature region of the high bit-width image to obtain the mapping gain of the pixels in each feature region; The brightness and detail information of each layer of the image in the feature region are obtained, and the second feature information based on the original resolution of the high bit-width image is reconstructed according to the brightness information, the detail information and the division relationship of the feature region. The fusion weight of the feature region is calculated based on the second feature information, and the mapping gain of each feature region is combined based on the fusion weight to obtain the composite gain of each feature region. The high-bit-width image is processed according to the synthesized gain to obtain a low-bit-width output image.
2. The image tone mapping adjustment method according to claim 1, characterized in that, The step of calculating the luminance factor of the high bit-width image based on the pixel values at different positions of the high bit-width image, the white balance coefficient, and the image edges includes: The preliminary brightness information of each position in the high bit-width image is obtained by multiplying the white balance coefficient and the pixel value. The preliminary brightness information at each location in the high bit-width image is window-filtered to obtain the brightness factor at each location.
3. The image tone mapping adjustment method according to claim 1, characterized in that, The first feature information also includes a gradient factor and detail information, wherein the gradient factor is calculated based on the brightness factor.
4. The image tone mapping adjustment method according to claim 3, characterized in that, The step of performing preliminary tone mapping on each feature region of the high bit-width image based on the first feature information to obtain the mapping gain of pixels in each feature region includes: Establish a standard tone mapping function and obtain the standard parameter information of the standard tone mapping function; Calculate the first intermediate parameter and the second intermediate parameter based on the brightness factor and the gradient factor; Calculate the feature region parameter information of each feature region based on the first intermediate parameter and the second intermediate parameter respectively, and obtain the feature tone mapping function corresponding to each feature region based on the feature region parameter information; The mapping gain of the pixels in each of the feature regions is calculated based on the feature tone mapping function and the luminance factor.
5. The image tone mapping adjustment method according to claim 4, characterized in that, The mapping gain satisfies the following formula: , in, The brightness factor of the point (x, y) in the feature region. , The feature tone mapping function represents each of the feature regions, where A, B, C, D, and E represent the feature region parameter information of the feature tone mapping function.
6. The image tone mapping adjustment method according to claim 1, characterized in that, The step of calculating the fusion weight of the feature region based on the second feature information, and combining the mapping gain of each feature region based on the fusion weight to obtain the composite gain at different positions of the high bit-width image, includes: Construct a linear function, and calculate the fusion weight for each feature region based on the linear function and the second feature information; The synthesized gain is calculated by weighted fusion based on the mapping gain in the feature region and the fusion weight corresponding to the feature region.
7. An image tone mapping adjustment system, characterized in that, include: An information acquisition module is used to acquire pixel values and image-related information of an input high-bit-width image, and determine first feature information of the high-bit-width image based on the pixel values and the image-related information, including: acquiring current scene information, exposure information, image brightness information, and device information of the high-bit-width image; determining a white balance coefficient based on the current scene information, the exposure information, the image brightness information, and the device information; and calculating a brightness factor of the high-bit-width image based on pixel values at different positions of the high-bit-width image, the white balance coefficient, and image edges. The segmentation module is used to divide the high bit-width image into multiple feature regions based on the first feature information, and to perform image enhancement processing on the feature regions; The mapping gain calculation module is used to perform preliminary tone mapping on each of the feature regions of the high bit-width image based on the first feature information, so as to obtain the mapping gain of the pixel points in each feature region. The reconstruction module is used to acquire the brightness information and detail information of each layer of the image in the feature region, and reconstruct the second feature information based on the original resolution of the high bit width image according to the brightness information, the detail information and the division relationship of the feature region; The composite gain calculation module is used to calculate the fusion weight of the feature region based on the second feature information, and to combine the mapping gain of each feature region based on the fusion weight to obtain the composite gain of each feature region. The conversion output module is used to process the high-bit-width image according to the synthesis gain to obtain a low-bit-width output image.
8. A computer-readable storage medium storing a computer program thereon, characterized in that, When the computer program is executed by the processor, it implements the image tone mapping adjustment method according to any one of claims 1 to 6.
9. A terminal, characterized in that, include: Processor and memory; The memory is used to store computer programs; The processor is configured to execute the computer program stored in the memory to cause the terminal to perform the image tone mapping adjustment method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Image fusion method and device, electronic equipment and computer readable storage medium
CN113313661A
High dynamic range image tone mapping method and device, electronic equipment and medium
CN113327208A