A method and system for image dynamic range expansion

By constructing multi-level histograms and dynamic mapping curves, the problems of high computational complexity and high resource consumption in image processing are solved, and the dynamic range of images can be effectively expanded with low complexity, making it suitable for real-time processing and embedded device applications.

CN120655555BActive Publication Date: 2025-11-25SHANGHAI INFOTM MICROELECTRONICS
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511140443.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-08-15
Publication Date
2025-11-25
Estimated Expiration
2045-08-15

AI Technical Summary

Technical Problem

Existing image processing techniques suffer from high computational complexity, loss of local details, and high resource consumption when processing high-contrast scenes, and cannot effectively expand the dynamic range of images.

Method used

By constructing multi-level histograms and combining local and global statistical information, a dynamic mapping curve is generated to perform adaptive gain adjustment and preserve details of brightness and darkness.

Benefits of technology

It achieves efficient expansion of image dynamic range with low complexity, preserving local and global details, making it suitable for real-time processing and embedded device applications.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120655555B_ABST
    Figure CN120655555B_ABST
Patent Text Reader

Abstract

The application discloses a kind of image dynamic range expansion method and system, the method includes: obtaining original image including pixel value information;Based on sliding window and upward superposition mechanism, the multi-level histogram of original image is constructed;According to multi-level histogram, obtain mixed histogram;According to mixed histogram, generate mapping curve;Pixel mapping is carried out using mapping curve, adjusts the pixel value of original image.The technical scheme provided by the application, by constructing multi-level histogram, obtain pixel gain mapping curve, can combine local and global statistical information, balance details and overall exposure;Generate dynamic mapping curve, can be based on histogram cumulative distribution function and carry out adaptive gain adjustment, retain light and shade details, can better solve the problem of insufficient image dynamic range;Solve the problem that existing WDR filter cannot consider local and global dynamic demand, high computational complexity, large resource consumption, application is limited and the like.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of image processing technology, and in particular to a method and system for extending the dynamic range of an image. Background Technology

[0002] In the field of image processing technology, dynamic range is a key indicator that measures the ability of a system or device to capture and represent brightness differences in a scene, and is directly related to the detail reproduction and visual effect of an image.

[0003] Traditional image processing methods, such as global histogram equalization, often cannot effectively handle high-contrast scenes, such as backlighting and strong light, resulting in problems such as loss of detail, overexposure, or underexposure distortion in the image.

[0004] In existing technologies, WDR (Wide Dynamic Range) filters often employ complex algorithms based on multi-scale fusion, which typically suffer from the following problems:

[0005] (1) High computational complexity: pyramid transformation and multi-level processing are required, which increases the hardware burden.

[0006] (2) Loss of local details: Global statistical methods cannot distinguish the dynamic needs of local areas of the image.

[0007] (3) High resource consumption: High sampling rate leads to a significant increase in storage and computing overhead.

[0008] Therefore, there is an urgent need for an efficient and low-complexity processing scheme to extend the dynamic range of images, balancing the issues of dynamic extension and resource consumption. Summary of the Invention

[0009] In view of the above-mentioned shortcomings of the current technology, the present invention provides an image dynamic range extension method. By constructing a multi-level histogram to obtain a pixel gain mapping curve, it can combine local and global statistical information to balance details and overall exposure; the generated dynamic mapping curve can perform adaptive gain adjustment based on the histogram cumulative distribution function, preserve brightness and darkness details, and can better solve the problem of insufficient image dynamic range.

[0010] To achieve the above objectives, the embodiments of the present invention adopt the following technical solutions:

[0011] An image dynamic range extension method includes the following steps:

[0012] Obtain the raw image including pixel value information;

[0013] Based on a sliding window and upward stacking mechanism, a multi-level histogram is constructed for the original image;

[0014] Based on the multi-level histogram, obtain the mixed histogram;

[0015] Generate a mapping curve based on the mixed histogram;

[0016] Pixel mapping is performed using mapping curves to adjust the pixel values ​​of the original image.

[0017] According to one aspect of the invention, the original image includes pixel information for red, green, and blue channels.

[0018] According to one aspect of the present invention, constructing a multi-level histogram of the original image based on a sliding window and an upward stacking mechanism includes:

[0019] The preset multi-level histogram is M levels;

[0020] Based on a sliding window, a basic histogram L1 is constructed from the original image;

[0021] Based on the base histogram L1, intermediate histograms L2 to L3 are constructed by stacking them upwards. M-1 ;

[0022] Based on the base histogram L1, construct a global histogram L. M .

[0023] According to one aspect of the invention, constructing a basic histogram L1 from the original image based on a sliding window includes:

[0024] Based on a sliding window of preset size and step size, construct a brightness-based histogram for the sub-images within each window.

[0025] According to one aspect of the present invention, the intermediate layer histograms L2 to L1 are constructed by superimposing them upwards based on the base histogram L1. M-1 include:

[0026] The width and height of the window in layer i are twice the width and height of layer i-1, and the histogram L of the intermediate layer is... i By analyzing the lower-level histogram L i-1 The sum of four adjacent histograms is obtained; where 1 <i<M。

[0027] According to one aspect of the invention, the construction of a global histogram L based on the base histogram L1... M include:

[0028] By summing all the basic histograms, we obtain the global histogram L. M .

[0029] According to one aspect of the present invention, obtaining a mixed histogram based on a multi-level histogram includes:

[0030] Calculate the mean and variance of each histogram separately;

[0031] Obtain balanced weights according to preset rules;

[0032] A mixed histogram is obtained based on the multi-level histogram and balanced weights.

[0033] According to one aspect of the present invention, obtaining the equilibrium weights according to preset rules includes:

[0034] The intensity weights are obtained based on the preset correspondence between variance and intensity weights.

[0035] Spatial weights are obtained based on the preset correspondence between histogram layer levels and spatial weights;

[0036] The equilibrium weight is obtained based on the intensity weight and the spatial weight.

[0037] According to one aspect of the present invention, the step of adjusting the pixel values ​​of the original image by performing pixel mapping using a mapping curve includes:

[0038] The original image is divided into sub-units, and the brightness of each sub-unit is calculated;

[0039] The pixel gain is obtained by finding the mapping curve based on the brightness and using a linear interpolation method between adjacent curve points.

[0040] Adjust the pixel values ​​of the original image based on pixel gain.

[0041] An image dynamic range extension system, based on the image dynamic range extension method described above, includes:

[0042] The image acquisition module is used to acquire the original image, including pixel value information;

[0043] A multi-level histogram construction module is used to construct multi-level histograms from the original image based on a sliding window and an upward stacking mechanism.

[0044] The mixed histogram construction module is used to obtain a mixed histogram based on multi-level histograms;

[0045] The mapping module is used to generate mapping curves based on the mixed histogram;

[0046] The adjustment module is used to perform pixel mapping using mapping curves to adjust the pixel values ​​of the original image.

[0047] Advantages of implementing this invention:

[0048] This invention provides an image dynamic range extension method that obtains pixel gain mapping curves by constructing multi-level histograms. This method can solve the following problems existing in the dynamic range extension of WDR filters: they cannot take into account both local and global dynamic requirements; they have high computational complexity and are not suitable for real-time processing; and they consume a lot of resources, which limits their application in embedded devices.

[0049] This invention uses multi-level histogram fusion to combine local and global statistical information, balancing detail and overall exposure; it generates a dynamic mapping curve that can adaptively adjust gain based on the histogram cumulative distribution function, preserving brightness and darkness details, and effectively solving the problem of insufficient dynamic range of images. Attached Figure Description

[0050] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0051] Figure 1 This is a flowchart of an image dynamic range extension method according to the present invention;

[0052] Figure 2 This is a schematic diagram of a sliding window for the basic histogram described in this invention;

[0053] Figure 3 This is a schematic diagram of a window overflow in the basic histogram described in this invention;

[0054] Figure 4 This is a schematic diagram of the adjacent level histogram as described in this invention;

[0055] Figure 5 This is a schematic diagram of the multi-level histogram described in this invention;

[0056] Figure 6 This is a mapping diagram of variance and intensity weight as described in Embodiment 2 of the present invention. Detailed Implementation

[0057] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0058] Example 1

[0059] like Figure 1As shown, an image dynamic range extension method includes the following steps:

[0060] S1: Obtain the raw image including pixel value information.

[0061] The raw image used in this method needs to include pixel information for the red, green, and blue channels in order to process the pixel data of each channel. Specifically, it can use image data in BAYER RAW format or ordinary RGB format image data, etc.

[0062] S2: Based on the sliding window and upward stacking mechanism, construct a multi-level histogram for the original image.

[0063] Specifically, step S2 includes:

[0064] S21: The preset multi-level histogram is M-level;

[0065] The multi-level histogram constructed by this method resembles a pyramid structure. The first layer is built based on the original image; the second layer is built based on the first layer, the third layer is built based on the second layer, and so on, up to the (M-1)th layer; the final Mth layer is built directly based on the original image as a whole. For example, in a practical application, when the constructed multi-level histogram has 4 layers, M=4.

[0066] S22: Construct a basic histogram L1 for the original image based on a sliding window;

[0067] The specific steps for this process are as follows:

[0068] Based on a sliding window of preset size and step size, construct a brightness-based histogram for the sub-images within each window.

[0069] like Figure 2 As shown, the window size is (HWx, HWy), and the step size is (HUx, HUy). The window starts offset from the top left corner of the image by HOx (horizontal direction) and HOy (vertical direction). The window must be completely within the image area; out-of-bounds configuration is considered illegal. Figure 3 As shown.

[0070] To construct a histogram for each window, the specific steps are as follows:

[0071] First, analyze the brightness distribution of the window. The formula for calculating brightness is:

[0072]

[0073] The horizontal axis of the histogram represents brightness levels, and the vertical axis represents the number of pixels. Brightness is divided into N equal levels, meaning the histogram has N bins. To count the number of pixels corresponding to each brightness level, parameters such as the horizontal jump number BSx and the vertical jump number BSY can be set to skip some pixels, reducing computational complexity.

[0074] If the window size is too large, the bin count will be very high. Therefore, BSx and BSY (down scalar factor) are introduced to skip some pixels and reduce the bin count. Starting from the top left corner of each window, BSx and BSY represent the number of pixels to skip in the horizontal and vertical directions after calculating a pixel, respectively. For example, in a 128x128 window, when BSx = 2 and BSY = 1, only pixels in 42 columns and 64 rows will be collected, reducing the total number of pixels counted from 128x128 = 16384 to 42x64 = 2688.

[0075] S23: Based on the base histogram L1, construct intermediate layer histograms L2 to L3 by stacking them upwards. M-1 ;

[0076] The specific steps for this process are as follows:

[0077] The width and height of the window in layer i are twice the width and height of layer i-1, and the histogram L of the intermediate layer is... i By analyzing the lower-level histogram L i-1 The sum of four adjacent histograms is obtained; where 1 <i<M。

[0078] like Figure 4 As shown, the histogram of the i-th layer is centered on the red dot, and the histogram of the (i-1)-th layer is centered on the green dot. The histogram of the i-th layer is obtained by adding the four adjacent histograms of the (i-1)-th layer.

[0079] like Figure 5 As shown, for example, each origin point represents one pixel, green represents the window range of the base histogram L1, red represents the window range of histogram L2, and blue represents the window range of histogram L3. The upper-level histograms are invalid near their boundaries.

[0080] S24: Construct a global histogram L based on the base histogram L1. M .

[0081] The specific steps for this process are as follows:

[0082] By summing all the basic histograms, we obtain the global histogram L. M The window of the global histogram covers the entire image.

[0083] The more histogram layers there are, the greater the computational cost, and the diminishing marginal returns to expanding the dynamic range of the image. In practical applications, experiments have shown that constructing a four-layer histogram is most suitable, as it controls computational cost while still achieving a certain level of expansion.

[0084] S3: Obtain a mixed histogram based on the multi-level histogram.

[0085] Specifically, step S3 includes:

[0086] S31: Calculate the mean and variance of each histogram.

[0087] The formula for calculating the mean of a histogram is:

[0088] Where Mean represents the mean of the histogram; N is the number of histogram bins; H[x] represents the number of pixels corresponding to histogram bin x, where x is the brightness level.

[0089] The formula for calculating the variance of a histogram is:

[0090] Where Var represents the variance of the histogram; N is the number of histogram bins; H[x] represents the number of pixels corresponding to histogram bin x, where x is the brightness level.

[0091] S32: Obtain the equilibrium weight W according to the preset rules.

[0092] Users can use the calculated histogram mean and variance to set the mapping relationship between the brightness levels and weights of the histogram. Generally, the lower the brightness level and the larger the variance, the larger the equilibrium weight W. For example, users can directly set up a lookup table where different brightness levels and variance ranges correspond to different weight values. Users can also set up a function relationship, such as W=Var / x, and calculate the equilibrium weight based on the brightness level and variance according to the function relationship.

[0093] S33: Obtain a mixed histogram based on the multi-level histogram and balanced weights.

[0094] The formula for calculating a mixture histogram is:

[0095] Where H[x] represents the vertical axis value of the final mixed histogram bin x; M is the number of layers in the multi-level histogram; W m H represents the balanced weights of the m-th level histogram; m [x] represents the number of pixels in bin x of the m-th level histogram, where x is the brightness level.

[0096] S4: Generate a mapping curve based on the mixed histogram.

[0097] Specifically, step S4 includes:

[0098] Obtain the cumulative distribution function of the mixture histogram;

[0099] Generate a mapping curve based on the cumulative distribution function.

[0100] The formula for calculating the cumulative distribution function of a histogram is:

[0101] Where C[i] represents the cumulative distribution, and i is the brightness level; H[x] represents the vertical axis value corresponding to bin x of the mixture histogram.

[0102] The cumulative distribution function is normalized to the entire brightness range, and the vertical axis values ​​corresponding to each bin are connected to generate a mapping curve of pixel gain corresponding to different brightness levels.

[0103] S5: Use mapping curves to perform pixel mapping and adjust the pixel values ​​of the original image.

[0104] Specifically, step S5 includes:

[0105] S51: Divide the original image into sub-units and calculate the brightness L of each sub-unit.

[0106] For example, the pixels of the original image can be grouped into 2×2 Bayer sub-units, and their brightness L can be calculated.

[0107] S52: Find the mapping curve based on the brightness L, and obtain the pixel gain through linear interpolation of adjacent curve points.

[0108] Based on the brightness L of the sub-unit, and the brightness level where brightness L is located, find the vertical axis value corresponding to the brightness level and the adjacent brightness level on the mapping curve. Use linear interpolation of adjacent curve points to obtain the vertical axis value A corresponding to brightness L, and thus obtain the pixel gain value A / L at that point.

[0109] S53: Adjust the pixel values ​​of the original image based on pixel gain.

[0110] The final formula for adjusting the pixel values ​​of the original image is:

[0111] Where R', Gr', Gb', and B' are the adjusted RGB pixel values, and R, Gr, Gb, and B are the pixel values ​​of the original image.

[0112] The beneficial effects of this embodiment are as follows:

[0113] This method obtains pixel gain mapping curves by constructing multi-level histograms, which can solve the following problems of existing WDR filters in dynamic range expansion:

[0114] 1. It cannot simultaneously meet both local and global dynamic needs.

[0115] 2. It has high computational complexity and is not suitable for real-time processing.

[0116] 3. High resource consumption limits its application in embedded devices.

[0117] This method has two major advantages:

[0118] 1. Multi-level histogram fusion: Combines local and global statistical information to balance detail and overall exposure.

[0119] 2. Dynamic mapping curve generation: Adaptive gain adjustment based on histogram cumulative distribution function, preserving details of brightness and darkness.

[0120] Practice has proven that this invention can effectively solve the problem of insufficient dynamic range in images.

[0121] Example 2

[0122] like Figure 1 As shown, an image dynamic range extension method includes the following steps:

[0123] S1: Obtain the raw image including pixel value information.

[0124] The raw image used in this method needs to include pixel information for the red, green, and blue channels in order to process the pixel data of each channel. Specifically, it can use image data in BAYER RAW format or ordinary RGB format image data, etc.

[0125] S2: Based on the sliding window and upward stacking mechanism, construct a multi-level histogram for the original image.

[0126] Specifically, step S2 includes:

[0127] S21: The preset multi-level histogram is M-level;

[0128] The multi-level histogram constructed by this method resembles a pyramid structure. The first layer is built based on the original image; the second layer is built based on the first layer, the third layer is built based on the second layer, and so on, up to the (M-1)th layer; the final Mth layer is built directly based on the original image as a whole. For example, in a practical application, when the constructed multi-level histogram has 4 layers, M=4.

[0129] S22: Construct a basic histogram L1 for the original image based on a sliding window;

[0130] The specific steps for this process are as follows:

[0131] Based on a sliding window of preset size and step size, construct a brightness-based histogram for the sub-images within each window.

[0132] like Figure 2 As shown, the window size is (HWx, HWy), and the step size is (HUx, HUy). The window starts offset from the top left corner of the image by HOx (horizontal direction) and HOy (vertical direction). The window must be completely within the image area; out-of-bounds configuration is considered illegal. Figure 3 As shown.

[0133] To construct a histogram for each window, the specific steps are as follows:

[0134] First, analyze the brightness distribution of the window. The formula for calculating brightness is:

[0135] The horizontal axis of the histogram represents brightness levels, and the vertical axis represents the number of pixels. Brightness is divided into N equal levels, meaning the histogram has N bins. To count the number of pixels corresponding to each brightness level, parameters such as the horizontal jump number BSx and the vertical jump number BSY can be set to skip some pixels, reducing computational complexity.

[0136] If the window size is too large, the bin count will be very high. Therefore, BSx and BSY (down scalar factor) are introduced to skip some pixels and reduce the bin count. Starting from the top left corner of each window, BSx and BSY represent the number of pixels to skip in the horizontal and vertical directions after calculating a pixel, respectively. For example, in a 128x128 window, when BSx = 2 and BSY = 1, only pixels in 42 columns and 64 rows will be collected, reducing the total number of pixels counted from 128x128 = 16384 to 42x64 = 2688.

[0137] S23: Based on the base histogram L1, construct intermediate layer histograms L2 to L3 by stacking them upwards. M-1 ;

[0138] The specific steps for this process are as follows:

[0139] The width and height of the window in layer i are twice the width and height of layer i-1, and the histogram L of the intermediate layer is... i By analyzing the lower-level histogram L i-1 The sum of four adjacent histograms is obtained; where 1 <i<M。

[0140] like Figure 4 As shown, the histogram of the i-th layer is centered on the red dot, and the histogram of the (i-1)-th layer is centered on the green dot. The histogram of the i-th layer is obtained by adding the four adjacent histograms of the (i-1)-th layer.

[0141] like Figure 5 As shown, for example, each origin point represents one pixel, green represents the window range of the base histogram L1, red represents the window range of histogram L2, and blue represents the window range of histogram L3. The upper-level histograms are invalid near their boundaries.

[0142] S24: Construct a global histogram L based on the base histogram L1. M .

[0143] The specific steps for this process are as follows:

[0144] By summing all the basic histograms, we obtain the global histogram L. M The window of the global histogram covers the entire image.

[0145] The more histogram layers there are, the greater the computational cost, and the diminishing marginal returns to expanding the dynamic range of the image. In practical applications, experiments have shown that constructing a four-layer histogram is most suitable, as it controls computational cost while still achieving a certain level of expansion.

[0146] S3: Obtain a mixed histogram based on the multi-level histogram.

[0147] Specifically, step S3 includes:

[0148] S31: Calculate the mean and variance of each histogram.

[0149] The formula for calculating the mean of a histogram is:

[0150] Where Mean represents the mean of the histogram; N is the number of histogram bins; H[x] represents the number of pixels corresponding to histogram bin x, where x is the brightness level.

[0151] The formula for calculating the variance of a histogram is:

[0152] Where Var represents the variance of the histogram; N is the number of histogram bins; H[x] represents the number of pixels corresponding to histogram bin x, where x is the brightness level.

[0153] S32: Obtain the equilibrium weight W according to the preset rules.

[0154] The specific steps for this process are as follows:

[0155] S321: Obtain the intensity weight WI based on the preset correspondence between variance and intensity weight.

[0156] Users can configure the mapping relationship between the variance ranges and intensity weights of a histogram; generally, the larger the variance, the larger the intensity weight (WI). For example, users can directly set up a lookup table where different variance ranges correspond to different intensity weight values. Users can also set up functional relationships, such as... Figure 6 The image shown is an image of one type of function mapping relationship. Based on the mapping relationship, the intensity weight WI is obtained using the variance.

[0157] S322: Obtain the spatial weight WS based on the preset histogram layer level and spatial weight correspondence.

[0158] The spatial weight (WS) of each layer is determined by the histogram layer level. The specific mapping relationship can be set by the user and adjusted according to the actual effect. Generally, the lower the layer, the larger the spatial weight (WS).

[0159] S323: Obtain the equilibrium weight W based on the intensity weight and spatial weight.

[0160] By combining the intensity weight WI and the spatial weight WS, the final equilibrium weight W of the histograms of each layer is calculated. m =WI m *WS m , where m is the level of the histogram.

[0161] S33: Obtain a mixed histogram based on the multi-level histogram and balanced weights.

[0162] The formula for calculating a mixture histogram is:

[0163] Where H[x] represents the vertical axis value of the final mixed histogram bin x; M is the number of layers in the multi-level histogram; W m H represents the balanced weights of the m-th level histogram; m [x] represents the number of pixels in bin x of the m-th level histogram, where x is the brightness level.

[0164] S4: Generate a mapping curve based on the mixed histogram.

[0165] Specifically, step S4 includes:

[0166] Obtain the cumulative distribution function of the mixture histogram;

[0167] Generate a mapping curve based on the cumulative distribution function.

[0168] The formula for calculating the cumulative distribution function of a histogram is:

[0169] Where C[i] represents the cumulative distribution, and i is the brightness level; H[x] represents the vertical axis value corresponding to bin x of the mixture histogram.

[0170] The cumulative distribution function is normalized to the entire brightness range, and the vertical axis values ​​corresponding to each bin are connected to generate a mapping curve of pixel gain corresponding to different brightness levels.

[0171] S5: Use mapping curves to perform pixel mapping and adjust the pixel values ​​of the original image.

[0172] Specifically, step S5 includes:

[0173] S51: Divide the original image into sub-units and calculate the brightness L of each sub-unit.

[0174] For example, the pixels of the original image can be grouped into 2×2 Bayer sub-units, and their brightness L can be calculated.

[0175] S52: Find the mapping curve based on the brightness L, and obtain the pixel gain through linear interpolation of adjacent curve points.

[0176] Based on the brightness L of the sub-unit, and the brightness level where brightness L is located, find the vertical axis value corresponding to the brightness level and the adjacent brightness level on the mapping curve. Use linear interpolation of adjacent curve points to obtain the vertical axis value A corresponding to brightness L, and thus obtain the pixel gain value A / L at that point.

[0177] S53: Adjust the pixel values ​​of the original image based on pixel gain.

[0178] The final formula for adjusting the pixel values ​​of the original image is:

[0179] Where R', Gr', Gb', and B' are the adjusted RGB pixel values, and R, Gr, Gb, and B are the pixel values ​​of the original image.

[0180] The beneficial effect of this embodiment is that this method also obtains a mixed histogram by adjusting the weight setting method, which can better improve the expansion effect of the dynamic range of the image.

[0181] Example 3

[0182] An image dynamic range extension system, based on the image dynamic range extension method as described in Embodiment 1 or 2, includes:

[0183] The image acquisition module is used to acquire the original image, including pixel value information;

[0184] A multi-level histogram construction module is used to construct multi-level histograms from the original image based on a sliding window and an upward stacking mechanism.

[0185] The mixed histogram construction module is used to obtain a mixed histogram based on multi-level histograms;

[0186] The mapping module is used to generate mapping curves based on the mixed histogram;

[0187] The adjustment module is used to perform pixel mapping using mapping curves to adjust the pixel values ​​of the original image.

[0188] Example 4

[0189] A computer program product comprising a computer program that, when executed, implements the steps of the image dynamic range extension method as described in Embodiment 1 or 2.

[0190] Example 5

[0191] A readable storage medium storing a computer program as described in Embodiment 4, wherein the computer program, when executed, implements the steps of the image dynamic range extension method as described in Embodiment 1 or 2.

[0192] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.

Claims

1. A method for extending the dynamic range of an image, characterized in that, Includes the following steps: Obtain the raw image including pixel value information; Based on the sliding window and upward stacking mechanism, a multi-level histogram is constructed for the original image; Based on the multi-level histogram, obtain the mixed histogram; Generate a mapping curve based on the mixed histogram; Pixel mapping is performed using mapping curves to adjust the pixel values ​​of the original image; The construction of multi-level histograms for the original image based on a sliding window and upward stacking mechanism includes: The preset multi-level histogram is M levels; Based on a sliding window, a basic histogram L1 is constructed from the original image; Based on the base histogram L1, intermediate layer histograms L2 to LM-1 are constructed by stacking them upwards. Construct a global histogram LM based on the basic histogram L1; The construction of the basic histogram L1 of the original image based on the sliding window includes: Based on a sliding window of preset size and step size, construct a brightness-based histogram for the sub-images within each window; The construction of intermediate layer histograms L2 to LM-1 by stacking them upwards based on the base histogram L1 includes: The width and height of the window in layer i are twice the width and height of layer i-1, respectively. The intermediate layer histogram Li is obtained by adding the four adjacent histograms of the lower layer histogram Li-1; where 1 <i<M; The construction of the global histogram LM based on the base histogram L1 includes: Add all the basic histograms together to obtain the global histogram LM.

2. The image dynamic range extension method according to claim 1, characterized in that, The original image includes pixel information from the red, green, and blue channels.

3. The image dynamic range extension method according to claim 1, characterized in that, The process of obtaining a mixed histogram based on multi-level histograms includes: Calculate the mean and variance of each histogram separately; According to preset rules, obtain balanced weights; A mixed histogram is obtained based on the multi-level histogram and balanced weights.

4. The image dynamic range extension method according to claim 3, characterized in that, The step of obtaining the equilibrium weights according to preset rules includes: The intensity weights are obtained based on the preset correspondence between variance and intensity weights. Spatial weights are obtained based on the preset correspondence between histogram layer levels and spatial weights; The equilibrium weight is obtained based on the intensity weight and the spatial weight.

5. The image dynamic range extension method according to claim 1, characterized in that, The step of using a mapping curve to perform pixel mapping and adjust the pixel values ​​of the original image includes: The original image is divided into sub-units, and the brightness of each sub-unit is calculated; The pixel gain is obtained by finding the mapping curve based on the brightness and using a linear interpolation method between adjacent curve points. Adjust the pixel values ​​of the original image based on pixel gain.

6. An image dynamic range extension system, characterized in that, The image dynamic range extension method according to any one of claims 1 to 5 includes: The image acquisition module is used to acquire the original image, including pixel value information; A multi-level histogram construction module is used to construct multi-level histograms from the original image based on a sliding window and an upward stacking mechanism. The mixed histogram construction module is used to obtain a mixed histogram based on multi-level histograms; The mapping module is used to generate mapping curves based on the mixed histogram; The adjustment module is used to perform pixel mapping using mapping curves to adjust the pixel values ​​of the original image; The construction of multi-level histograms for the original image based on a sliding window and upward stacking mechanism includes: The preset multi-level histogram is M levels; Based on a sliding window, a basic histogram L1 is constructed from the original image; Based on the base histogram L1, intermediate layer histograms L2 to LM-1 are constructed by stacking them upwards. Construct a global histogram LM based on the basic histogram L1; The construction of the basic histogram L1 of the original image based on the sliding window includes: Based on a sliding window of preset size and step size, construct a brightness-based histogram for the sub-images within each window; The construction of intermediate layer histograms L2 to LM-1 by stacking them upwards based on the base histogram L1 includes: The width and height of the window in layer i are twice the width and height of layer i-1, respectively. The intermediate layer histogram Li is obtained by adding the four adjacent histograms of the lower layer histogram Li-1; where 1 <i<M; The construction of the global histogram LM based on the base histogram L1 includes: Add all the basic histograms together to obtain the global histogram LM.

Citation Information

Patent Citations

  • Image tone mapping method and system, terminal equipment and storage medium

    CN116664434A

  • Real time analytics using hybrid histograms

    US20080140347A1