Method, apparatus and storage medium for processing high dynamic range images

By adjusting and compressing the image data in the analysis unit of the high dynamic range image, the problems of high dynamic range image processing cost and motion problems in the prior art are solved, and efficient dynamic range control and image detail recovery are achieved.

CN114331852BActive Publication Date: 2025-05-27BEIJING XIAOMI MOBILE SOFTWARE CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202011055540.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-09-29
Publication Date
2025-05-27
Estimated Expiration
2040-09-29

AI Technical Summary

Technical Problem

In the prior art, the hardware implementation of high dynamic range imaging technology is high, while software implementation is prone to motion problems and it is difficult to achieve simple and efficient high dynamic range image processing.

Method used

A high dynamic range image processing method is provided, by adjusting the image data in the analysis unit of the image data saturated, determining the bandwidth threshold of the analysis unit, and compressing it according to the image data whose bandwidth threshold exceeds the node value.

Benefits of technology

Localized control of the dynamic range of high dynamic range images is realized, details of some highlights are restored, the dynamic range of the image is increased, and the color of the image at the highlights is accurately restored.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114331852B_ABST
    Figure CN114331852B_ABST
Patent Text Reader

Abstract

The present disclosure relates to a method, apparatus, and storage medium for processing high-dynamic-range images. The processing method includes: adjusting the image data in the analysis unit according to a preset adjustment rule; determining a bandwidth threshold of the analysis unit in the high-dynamic-range image based on the high-dynamic-range image; determining a node value of the image data to be compressed in the high-dynamic-range image according to the bandwidth of the high-dynamic-range image; and compressing the bandwidth of the image data whose bandwidth threshold exceeds the node value to between the node value and the bandwidth of the high-dynamic-range image. The processing method provided by the present disclosure can increase the dynamic range of high-dynamic-range images.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of image processing, and in particular, to a method, apparatus, and storage medium for processing high-dynamic range images. Background Art

[0002] In related technologies, high-dynamic range imaging technology (HDRI) provides a method to display the world as realistically as possible in digital images and videos. In the prior art, there are two implementation schemes. One is a hardware implementation scheme. The hardware implementation scheme of HDRI starts from the imaging sensor and is committed to capturing the real-world HDR (High Dynamic Range) content. The cost of using this method is very high. The other is a software implementation scheme. The software implementation scheme of HDRI is to use an LDR (Low Dynamic Range) camera to capture the same scene under multiple exposures to form multiple frames of LDR images, and then synthesize a single HDR image from the multiple frames of LDR images. Using this method, motion problems are likely to occur during the imaging process. Providing a simple and efficient method for processing high-dynamic range images is an urgent problem to be solved. Summary of the Invention

[0003] To overcome the problems existing in the related technologies, the present disclosure provides a method, apparatus, and storage medium for processing high-dynamic range images.

[0004] According to the first aspect of the embodiments of the present disclosure, there is provided a method for processing a high-dynamic range image, which is applied to an electronic device. The processing method includes:

[0005] Adjusting the image data in the analysis unit for image data saturation according to a preset adjustment rule;

[0006] Determining a bandwidth threshold of the analysis unit in the high-dynamic range image according to the high-dynamic range image;

[0007] Determining a node value of the image data to be compressed in the high-dynamic range image according to the bandwidth of the high-dynamic range image;

[0008] Compressing the bandwidth of the image data whose bandwidth threshold exceeds the node value to between the node value and the bandwidth of the high-dynamic range image.

[0009] Wherein, the adjusting the image data in the analysis unit for image data saturation according to a preset adjustment rule includes:

[0010] An analysis unit for determining the saturation of image data in the high-dynamic range image before gain processing determines, based on the image data before gain processing of each analysis unit and the corresponding threshold value, the analysis unit where the image data in the high-dynamic range image is saturated before gain processing, and adjusts the image data in the analysis unit with saturated image data according to a preset adjustment rule.

[0011] Among them, the determining of the analysis unit where the image data in the high-dynamic range image is saturated before gain processing based on the image data before gain processing of each analysis unit and the corresponding threshold value includes:

[0012] Taking the Bayer array of the high-dynamic range image as the analysis unit, determining the ratios of the pixel value R, the pixel value Gr, the pixel value Gb, and the pixel value B in the Bayer array to the corresponding gain values respectively as the image data before gain processing of the Bayer array;

[0013] Taking the minimum value of the image data before gain processing of the Bayer array. If this minimum value is greater than or equal to the corresponding threshold value, then this Bayer array is the analysis unit where the image data in the high-dynamic range image is saturated before gain processing.

[0014] Among them, the determining of the analysis unit where the image data in the high-dynamic range image is saturated before gain processing further includes:

[0015] If this minimum value is less than the corresponding threshold value, taking the maximum value of the image data before gain processing of the Bayer array. If this maximum value is greater than or equal to the corresponding threshold value, taking the maximum value of the image data before gain processing of the pixel values Gr and Gb in the Bayer array. If this maximum value is greater than or equal to the corresponding threshold value, then this Bayer array is the analysis unit where the image data in the high-dynamic range image is saturated before gain processing.

[0016] Among them, the adjusting of the image data in the analysis unit with saturated image data according to a preset adjustment rule includes:

[0017] Taking the maximum value of the pixel values Gr and Gb in the analysis unit where the image data in the high-dynamic range image is saturated before gain processing;

[0018] Taking the minimum value of the pixel value R and the maximum value of the pixel values Gr and Gb as the adjusted pixel value R';

[0019] Taking the minimum value of the pixel value Gr and the maximum value of the pixel values Gr and Gb as the adjusted pixel value Gr';

[0020] Taking the minimum value of the pixel value Gb and the maximum value of the pixel values Gr and Gb as the adjusted pixel value Gb'

[0021] Taking the minimum value of the pixel value B and the maximum value of the pixel values Gr and Gb as the adjusted pixel value B'.

[0022] Among them, determining the bandwidth threshold of the analysis unit in the high-dynamic range image includes:

[0023] Dividing the high-dynamic range image into one or more image blocks according to a preset division rule;

[0024] Taking the image block as a unit, based on the image data and corresponding threshold of the analysis unit in the image block and the image data and corresponding threshold of the analysis unit before gain processing, determining the analysis unit with saturated image data in the high-dynamic range image, and determining the bandwidth threshold of the analysis unit in the high-dynamic range image based on the number of the determined analysis units with saturated image data in the high-dynamic range image.

[0025] Among them, taking the image block as a unit, based on the image data and corresponding threshold of the analysis unit in the image block and the image data and corresponding threshold of the analysis unit before gain processing, determining the analysis unit with saturated image data in the high-dynamic range image includes:

[0026] Taking the Bayer array of the high-dynamic range image as the analysis unit, and determining the image data before gain processing of the Bayer array by respectively taking the ratios of the pixel value R, pixel value Gr, pixel value Gb, and pixel value B in the Bayer array to the corresponding gain values;

[0027] Determining the Bayer array with the maximum value of the image data before gain processing of the Bayer array in the image block being less than the corresponding threshold and the maximum values of the pixel value R, pixel value Gr, pixel value Gb, and pixel value B in the Bayer array being greater than the corresponding threshold as the analysis unit with saturated image data in the high-dynamic range image.

[0028] Among them, based on the number of the determined analysis units with saturated image data in the high-dynamic range image, determining the bandwidth threshold of the analysis unit in the high-dynamic range image includes:

[0029] Based on the image data of the determined analysis units with saturated image data in the high-dynamic range image, obtaining the corresponding relationship between the gray value and the number of the determined analysis units with saturated image data in the high-dynamic range image;

[0030] According to the obtained corresponding relationship between the gray value and the number of the determined analysis units with saturated image data in the high-dynamic range image, determining the bandwidth threshold of each image block;

[0031] Based on the bandwidth threshold of the image block, determining the bandwidth threshold of each analysis unit in the image block.

[0032] Among them, based on the bandwidth threshold of the image block, determining the bandwidth threshold of each analysis unit includes:

[0033] Upsample the bandwidth threshold of each image block respectively to obtain the bandwidth threshold of each analysis unit in the corresponding image block.

[0034] According to a second aspect of the embodiments of the present disclosure, there is provided a processing apparatus for a high-dynamic range image, the processing apparatus including:

[0035] An adjustment module, which adjusts the image data in the determined analysis units with saturated image data according to a preset adjustment rule;

[0036] A bandwidth threshold determination module, which determines the bandwidth threshold of the analysis units in the high-dynamic range image according to the high-dynamic range image;

[0037] A node value determination module, which determines the node value of the image data to be compressed in the high-dynamic range image according to the bandwidth of the high-dynamic range image;

[0038] A compression module, which compresses the bandwidth of the image data whose bandwidth threshold exceeds the node value to between the node value and the bandwidth of the high-dynamic range image.

[0039] Wherein, the adjustment module is configured to:

[0040] Determine the analysis units with saturated image data in the high-dynamic range image before gain processing, and based on the image data before gain processing of each analysis unit and the corresponding threshold, determine the analysis units with saturated image data in the high-dynamic range image before gain processing, and adjust the image data in the analysis units with saturated image data according to a preset adjustment rule.

[0041] Wherein, the adjustment module is configured to:

[0042] Taking the Bayer array of the high-dynamic range image as the analysis unit, determine the ratios of the pixel value R, the pixel value Gr, the pixel value Gb, and the pixel value B in the Bayer array to the corresponding gain values respectively as the image data before gain processing of the Bayer array;

[0043] Take the minimum value of the image data before gain processing of the Bayer array. If the minimum value is greater than or equal to the corresponding threshold, then the Bayer array is the analysis unit with saturated image data in the high-dynamic range image before gain processing.

[0044] Wherein, the adjustment module is configured to:

[0045] If the minimum value is less than the corresponding threshold, take the maximum value of the image data before the gain processing of the Bayer array. If the maximum value is greater than or equal to the corresponding threshold, take the maximum value of the image data before the gain processing of the pixel values Gr and Gb in the Bayer array. If the maximum value is greater than or equal to the corresponding threshold, then the Bayer array is the analysis unit for the saturation of the image data before the gain processing of the high-dynamic range image.

[0046] Wherein, the adjustment module is configured to:

[0047] Take the maximum value of the pixel values Gr and Gb in the analysis unit for the saturation of the image data before the gain processing of the high-dynamic range image;

[0048] Take the minimum value of the pixel value R and the maximum value of the pixel values Gr and Gb as the adjusted pixel value R';

[0049] Take the minimum value of the pixel value Gr and the maximum value of the pixel values Gr and Gb as the adjusted pixel value Gr';

[0050] Take the minimum value of the pixel value Gb and the maximum value of the pixel values Gr and Gb as the adjusted pixel value Gb'

[0051] Take the minimum value of the pixel value B and the maximum value of the pixel values Gr and Gb as the adjusted pixel value B'.

[0052] Wherein, the bandwidth threshold determination module is configured to:

[0053] Divide the high-dynamic range image into one or more image blocks according to a preset division rule;

[0054] Taking the image block as a unit, based on the image data of the analysis unit in the image block and the corresponding threshold and the image data of the analysis unit before the gain processing and the corresponding threshold, determine the analysis unit for the saturation of the image data of the high-dynamic range image, and based on the number of the determined analysis units for the saturation of the image data of the high-dynamic range image, determine the bandwidth threshold of the analysis unit in the high-dynamic range image.

[0055] Wherein, the bandwidth threshold determination module is configured to:

[0056] Taking the Bayer array of the high-dynamic range image as the analysis unit, determine the image data before the gain processing of the Bayer array by taking the ratios of the pixel values R, Gr, Gb, and B in the Bayer array to the corresponding gain values respectively;

[0057] An analysis unit that determines a Bayer array in which the maximum value of the image data before gain processing of the Bayer array in an image block is less than a corresponding threshold value and the maximum values of the pixel value R, pixel value Gr, pixel value Gb, and pixel value B in the Bayer array are greater than the corresponding threshold values as the image data saturation of the high-dynamic range image.

[0058] Wherein, the bandwidth threshold determination module is configured to:

[0059] Based on the image data of the analysis unit of the image data saturation of the determined high-dynamic range image, obtain the correspondence between the gray value and the number of analysis units of the image data saturation of the determined high-dynamic range image;

[0060] According to the obtained correspondence between the gray value and the number of analysis units of the image data saturation of the determined high-dynamic range image, determine the bandwidth threshold of each image block;

[0061] Based on the bandwidth threshold of the image block, determine the bandwidth threshold of each analysis unit in the image block.

[0062] Wherein, the bandwidth threshold determination module is configured to:

[0063] Upsample the bandwidth threshold of each image block respectively to obtain the bandwidth threshold of each analysis unit in the corresponding image block.

[0064] According to the third aspect of the embodiments of the present disclosure, there is provided a high-dynamic range image processing device, including:

[0065] A processor;

[0066] A memory for storing instructions executable by the processor;

[0067] Wherein, the processor is configured to:

[0068] Adjust the image data in the analysis unit of the image data saturation according to a preset adjustment rule;

[0069] Determine the bandwidth threshold of the analysis unit in the high-dynamic range image according to the described high-dynamic range image;

[0070] Determine the node value of the image data to be compressed in the high-dynamic range image according to the bandwidth of the high-dynamic range image;

[0071] Compress the bandwidth of the image data whose bandwidth threshold exceeds the node value to between the node value and the bandwidth of the high-dynamic range image.

[0072] According to a fourth aspect of the embodiments of the present disclosure, there is provided a non-transitory computer-readable storage medium. When the instructions in the storage medium are executed by a processor of a mobile terminal, the mobile terminal is enabled to execute a method for processing a high-dynamic range image, and the processing method includes:

[0073] Adjusting the image data in the analysis unit for image data saturation according to a preset adjustment rule;

[0074] Determining a bandwidth threshold of an analysis unit in the high-dynamic range image according to the high-dynamic range image;

[0075] Determining a node value of the image data to be compressed in the high-dynamic range image according to the bandwidth of the high-dynamic range image;

[0076] Compressing the bandwidth of the image data whose bandwidth threshold exceeds the node value to between the node value and the bandwidth of the high-dynamic range image.

[0077] The technical solution provided by the embodiments of the present disclosure may include the following beneficial effects: In the method for processing a high-dynamic range image provided by the present disclosure, the saturated image data is adjusted according to a preset adjustment rule, and the threshold bandwidth of each analysis unit is determined, so that each analysis unit has a different bandwidth threshold, and each analysis unit has a different dynamic compression range, which can realize the localized control of the dynamic range, and further can restore some details in the highlight part, increase the dynamic range of the high-dynamic range image, and can accurately restore the color of the image in the highlight part.

[0078] It should be understood that the above general description and the following detailed description are only exemplary and explanatory, and cannot limit the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0079] The accompanying drawings herein are incorporated into the specification and constitute a part of the specification, showing embodiments consistent with the present invention, and are used together with the specification to explain the principles of the present invention.

[0080] Figure 1 Shows a flowchart of a method for processing a high-dynamic range image according to an exemplary embodiment;

[0081] Figure 2 Shows a flowchart of a method for determining an analysis unit in which the image data is saturated before gain processing of a high-dynamic range image based on the image data before gain processing of each analysis unit and the corresponding threshold;

[0082] Figure 3 Shows a flowchart of a method for adjusting the image data in the analysis unit for image data saturation according to a preset adjustment rule;

[0083] Figure 4 shows Figure 1 In step S13, a method flowchart for determining a bandwidth threshold of an analysis unit in the high-dynamic range image;

[0084] Figure 5a shows a schematic diagram of dividing a high-dynamic range image into image blocks according to a preset size;

[0085] Figure 5b shows in Figure 5a the Bayer array diagram in image block BlockM1 in;

[0086] Figure 5c shows the grayscale histogram corresponding to image block BlockM1;

[0087] Figure 5d shows the cumulative distribution histogram corresponding to image block BlockM1;

[0088] Figure 5e shows in Figure 5a the corresponding bandwidth thresholds in each image block in;

[0089] Figure 5f shows a schematic diagram of compressing the bandwidth of image data in an analysis unit whose bandwidth threshold exceeds the node value to between the node value and the bandwidth of the high-dynamic range image;

[0090] Figure 6 shows Figure 4 In step S132 in, a method flowchart for determining, in units of image blocks, analysis units where the image data of the high-dynamic range image is saturated, based on the image data of the analysis units in the image block and the corresponding thresholds, as well as the image data of the analysis units before gain processing and the corresponding thresholds;

[0091] Figure 7 shows Figure 1 In step S13 in, a method flowchart for determining the bandwidth threshold of the analysis units in the high-dynamic range image based on the number of analysis units where the image data of the high-dynamic range image is saturated;

[0092] Figure 8 shows a block diagram of a processing device for a high-dynamic range image shown according to an exemplary embodiment;

[0093] Figure 9 shows a block diagram of a processing device for a high-dynamic range image shown according to an exemplary embodiment (general structure of a mobile terminal). Detailed implementation manners

[0094] Exemplary embodiments will be described in detail herein, and examples thereof are shown in the accompanying drawings. When the following description refers to the accompanying drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present invention. On the contrary, they are merely examples of devices and methods consistent with some aspects of the present invention as detailed in the appended claims.

[0095] In an HDR (High Dynamic Range) scenario, the overexposure problem of data acquired by an image or video acquisition device may stem from two aspects: one is that the dynamic range limitation of the imaging sensor causes high dynamic range image data to saturate; on the other hand, gain processing such as lens shading correction (LSC) and auto white balance correction (AWB) of the high dynamic range image by an image signal processor (ISP) causes the image data to exceed the processing bandwidth of the image signal processor. The saturation of high dynamic range image data caused by the dynamic range limitation of the imaging sensor is less severe than the saturation of high dynamic range image data after gain processing. The present disclosure aims to process high dynamic range image data to solve the problems brought about by the saturation of high dynamic range image data. For example, it is possible to process the high dynamic range image data after gain processing to solve the problems brought about by the saturation of the high dynamic range image data after gain processing.

[0096] Figure 1 The flowchart of a method for processing a high dynamic range image according to an exemplary embodiment is shown. As Figure 1 shown, the method for processing a high dynamic range image is used in an electronic device and includes the following steps:

[0097] In step S11, the image data in the analysis unit for image data saturation is adjusted according to a preset adjustment rule;

[0098] In step S12, according to the high dynamic range image, the bandwidth threshold of the analysis unit in the high dynamic range image is determined;

[0099] In step S13, according to the bandwidth of the high dynamic range image, the node value of the image data to be compressed in the high dynamic range image is determined;

[0100] In step S14, the bandwidth of the image data whose bandwidth threshold exceeds the node value is compressed to between the node value and the bandwidth of the high dynamic range image.

[0101] In the method for processing a high-dynamic range image provided by the present disclosure, the image data in the analysis unit for adjusting the saturation of the image data is first adjusted according to a preset adjustment rule, so that the saturated image data is as close as possible to the true value. Among them, the analysis unit can be any unit that can be used to analyze high-dynamic range images. For example, the analysis unit can be a Bayer Pattern.

[0102] After preprocessing the image data of the saturated high-dynamic range image, determine the bandwidth threshold of the analysis unit in the high-dynamic range image. According to the bandwidth of the high-dynamic range image, determine the node value for compressing the image data of the high-dynamic range image; compress the bandwidth of the image data in the analysis unit whose bandwidth threshold exceeds the node value to between the node value and the bandwidth of the high-dynamic range image.

[0103] The method for processing a high-dynamic range image provided by the present disclosure can be a method for processing a high-dynamic range image after gain processing. In the method for processing a high-dynamic range image provided by the present disclosure, the saturated image data is adjusted according to a preset adjustment rule, and the threshold bandwidth of each analysis unit is determined, so that each analysis unit has a different bandwidth threshold, so that each analysis unit has a different dynamic compression range, enabling localized control of the dynamic range, and then being able to recover some of the details in the highlights, increasing the dynamic range of the high-dynamic range image, and being able to accurately recover the color of the image in the highlights.

[0104] The embodiment of the present disclosure provides a method for processing a high-dynamic range image, wherein adjusting the image data in the analysis unit for adjusting the saturation of the image data according to a preset adjustment rule includes:

[0105] Determine the analysis unit in which the image data of the high-dynamic range image is saturated before gain processing, and based on the image data before gain processing and the corresponding threshold of each analysis unit, determine the analysis unit in which the image data of the high-dynamic range image is saturated before gain processing, and adjust the image data in the analysis unit for adjusting the saturation of the image data according to a preset adjustment rule.

[0106] In the method for processing a high-dynamic range image provided by the present disclosure, the high-dynamic range image data that is saturated before gain processing can be first adjusted according to a preset adjustment rule. According to the image data before gain processing of each analysis unit and the corresponding threshold, determine the analysis unit in which the image data of the high-dynamic range image is saturated before gain processing, and adjust the image data in the analysis unit for adjusting the saturation of the image data according to a preset adjustment rule.

[0107] In the method for processing a high-dynamic range image provided by the present disclosure, a method for determining the analysis unit in which the image data of the high-dynamic range image is saturated before gain processing according to the image data before gain processing of each analysis unit and the corresponding threshold is also provided. Such asFigure 2 As shown Figure 2 The following is a flowchart of a method for determining an analysis unit where the image data before gain processing of a high-dynamic range image is saturated, showing the image data before gain processing based on each analysis unit and the corresponding threshold:

[0108] In step S111, using the Bayer array of the high-dynamic range image as the analysis unit, the ratios of the pixel values R, Gr, Gb, and B in the Bayer array to the corresponding gain values are respectively determined as the image data before gain processing of the Bayer array;

[0109] In step S112, the minimum value of the image data before gain processing of the Bayer array is taken. If this minimum value is greater than or equal to the corresponding threshold, then this Bayer array is the analysis unit where the image data before gain processing of the high-dynamic range image is saturated.

[0110] In the method for processing a high-dynamic range image provided by the present disclosure, the analysis unit can be a Bayer array (Bayer Pattern), or any other unit that can be used to analyze a high-dynamic range image. To determine the image data before gain processing, the ratios of the pixel values R, Gr, Gb, and B in the Bayer array to the corresponding gain values, gain_R, gain_Gr, gain_Gb, gain_B, are obtained, and the image data before gain processing is obtained, that is, R / gain_R, Gr / gain_Gr, Gb / gain_Gr, B / gain_B are obtained respectively.

[0111] Take the minimum value of the image data before gain processing of the Bayer array. If this minimum value is greater than or equal to the corresponding threshold, then this Bayer array is the analysis unit where the image data before gain processing of the high-dynamic range image is saturated. Take the minimum value among R / gain_R, Gr / gain_Gr, Gb / gain_Gr, B / gain_B. If this minimum value is greater than or equal to the corresponding threshold Threshold0, then this Bayer array is the analysis unit where the image data before gain processing of the high-dynamic range image is saturated. Among them, the corresponding threshold Threshold0 represents the maximum bandwidth of the image data before gain processing. To improve the accuracy of determination, considering noise, a bias offset can be introduced, and the corresponding threshold can be Threshold0 - offset.

[0112] If the minimum value among the image data before gain processing in the Bayer array, i.e., R / gain_R, Gr / gain_Gr, Gb / gain_Gr, B / gain_B of the pixel values, is greater than or equal to the corresponding threshold Threshold0 - offset, Min(R / gain_R, Gr / gain_Gr, Gb / gain_Gr, B / gain_B) >= Threshold0 - offset, it indicates that the image data of each channel in the RGB (Red, Green, Blue) channels at this Bayer array before gain processing of the high - dynamic - range image after gain processing is saturated. Then, this Bayer array needs to be pre - processed, that is, adjusted according to the preset adjustment rules.

[0113] In the method for processing high - dynamic - range images provided by the present disclosure, if this minimum value is less than the corresponding threshold, it further includes the part shown by the dashed line in Figure 2 as follows:

[0114] In step S113, if this minimum value is less than the corresponding threshold, take the maximum value of the image data before gain processing of the Bayer array. If this maximum value is greater than or equal to the corresponding threshold, take the maximum value of the image data before gain processing of the pixel values Gr and Gb in the Bayer array. If this maximum value is greater than or equal to the corresponding threshold, then this Bayer array is the analysis unit for saturated image data before gain processing of the high - dynamic - range image.

[0115] In the method for processing high - dynamic - range images provided by the present disclosure, if the maximum value among R / gain_R, Gr / gain_Gr, Gb / gain_Gr, B / gain_B of the pixel values is greater than or equal to the corresponding threshold Threshold0, Max(R / gain_R, Gr / gain_Gr, Gb / gain_Gr, B / gain_B) >= Threshold0 - offset, it indicates that the image data of at least one channel in the RGB (Red, Green, Blue) channels at this Bayer array before gain processing of the high - dynamic - range image is saturated. Considering that the light - sensing ability of green is the strongest and the values of its pixel values Gr and Gb are the largest, when performing gain processing on the high - dynamic - range image, for example, when performing automatic white - balance correction gain processing, that is, its gain value is 1. Therefore, take the maximum value of the image data before gain processing of the pixel values Gr and Gb in the Bayer array. If this maximum value is greater than or equal to the corresponding threshold, Max(Gr / gain_Gr, Gb / gain_Gr) >= Threshold0 - offset, it indicates that the image data of at least the green channel in the RGB (Red, Green, Blue) channels at this Bayer array before gain processing of the high - dynamic - range image is saturated. Then, this Bayer array needs to be pre - processed.

[0116] In the high-dynamic-range image processing method provided by the present disclosure, the saturated image data before gain processing of the high-dynamic-range image is preprocessed with a Bayer array as the analysis unit, which can make the preprocessing of the saturated image data before gain processing accurate to the Bayer array, so that the high-dynamic-range image processing method provided by the present disclosure can process the image data more precisely.

[0117] In the high-dynamic-range image processing method provided by the present disclosure, the image data in the analysis unit where the image data saturation is adjusted according to a preset adjustment rule. As Figure 3 shown, Figure 3 The following shows a flowchart of the method for adjusting the image data in the analysis unit where the image data saturation is adjusted according to a preset adjustment rule:

[0118] In step S114, the maximum value of the pixel value Gr and the pixel value Gb in the analysis unit where the image data of the high-dynamic-range image is saturated before gain processing is taken;

[0119] In step S115, the minimum value among the pixel value R and the maximum value of the pixel value Gr and the pixel value Gb is used as the adjusted pixel value R';

[0120] The pixel value Gr is set as the adjusted pixel value Gr' with the minimum value among the pixel value Gr and the maximum value of the pixel value Gr and the pixel value Gb;

[0121] The pixel value Gb is set as the adjusted pixel value Gb' with the minimum value among the pixel value Gb and the maximum value of the pixel value Gr and the pixel value Gb

[0122] The pixel value B is set as the adjusted pixel value B' with the minimum value among the pixel value B and the maximum value of the pixel value Gr and the pixel value Gb.

[0123] In order to make the image data in the Bayer unit where the image data is saturated before gain processing of the high-dynamic-range image closer to the true value. For example, the pixel values in the Bayer array are closer to the true value. Considering that green has the strongest light-sensing ability and its pixel values Gr and Gb are the largest, when performing gain processing on the high-dynamic-range image, such as during automatic white balance correction gain processing, gain processing is performed based on it. The pixel values corresponding to green in the high-dynamic-range image after gain processing are closer to the true value. When performing gain processing on red and blue, their gain values are generally greater than 1, that is, there is a certain difference between the pixel values corresponding to red and blue after gain processing and the true value. Take the maximum value of the pixel value Gr and the pixel value Gb in the Bayer unit where the image data is saturated before gain processing of the high-dynamic-range image, and compare it with the pixel values corresponding to red, blue, and green after gain processing. Take the minimum value among them as the adjusted value of the pixels corresponding to red, blue, and green after gain processing, so that the adjusted values of the pixels corresponding to red, blue, and green after gain processing are closer to the true value. In this way, the degree of distortion of the image data during the compression process can be reduced. Therefore, in the method for processing a high-dynamic-range image provided in the present disclosure, take the maximum value of the pixel value Gr and the pixel value Gb in the Bayer unit where the image data is saturated before gain processing of the high-dynamic-range image, and use the minimum value among the pixel value R and the maximum value of the pixel value Gr and the pixel value Gb as the adjusted pixel value R', R' = Min(R, Max_GrGb); use the minimum value among the pixel value Gr and the maximum value of the pixel value Gr and the pixel value Gb as the adjusted pixel value Gr', Gr' = Min(Gr, Max_GrGb); use the minimum value among the pixel value Gb and the maximum value of the pixel value Gr and the pixel value Gb as the adjusted pixel value Gb', Gb' = Min(Gb, Max_GrGb); use the minimum value among the pixel value B and the maximum value of the pixel value Gr and the pixel value Gb as the adjusted pixel value B', B' = Min(B, Max_GrGb).

[0124] In the method for processing a high-dynamic-range image provided in the present disclosure, a method for determining the bandwidth threshold of the analysis unit in the high-dynamic-range image is also provided, as Figure 4 shown Figure 4 shows Figure 1 in step S13 of, the flowchart of the method for determining the bandwidth threshold of the analysis unit in the high-dynamic-range image:

[0125] In step S121, the high-dynamic-range image is divided into one or more image blocks according to a preset division rule;

[0126] In step S122, taking image blocks as units, based on the image data of the analysis units in the image blocks and the corresponding thresholds, as well as the image data of the analysis units before gain processing and the corresponding thresholds, determine the analysis units where the image data of the high-dynamic-range image is saturated. Based on the number of the determined analysis units where the image data of the high-dynamic-range image is saturated, determine the bandwidth threshold of the analysis units in the high-dynamic-range image.

[0127] In the method for processing a high-dynamic-range image provided by the present disclosure, the high-dynamic-range image can be divided into one or more image blocks according to a preset division rule. The division of the image blocks can be performed according to any rule capable of dividing the high-dynamic-range image into image blocks. For example, it can be divided according to a preset size, or it can be divided according to the number of image blocks. As Figure 5a shown, Figure 5a shows a schematic diagram of dividing a high-dynamic-range image into image blocks according to a preset size. In Figure 5a , a full-frame high-dynamic-range image with a height of W and a width of H is divided into M * N image blocks, and the size of each image block is M0 * N0, where M0 = H / M and N0 = W / N. When M = 1 and N = 1, the full-frame high-dynamic-range image is used as one image block.

[0128] When taking image blocks as units to determine the analysis units where the image data of the high-dynamic-range image is saturated, the analysis units where the image data of the high-dynamic-range image is saturated can be counted based on the image data of each analysis unit in the image block and the corresponding thresholds, as well as the image data of each analysis unit before gain processing and the corresponding thresholds. The analysis unit can be any unit that can be used for statistical analysis of the image block. For example, the analysis unit can be a Bayer array, which can be one Bayer array or a group of Bayer arrays. When the analysis unit is one Bayer array, when performing statistical analysis on the Bayer array, considering the image data in the Bayer array, the pixel values R, Gr, Gb, and B and the corresponding thresholds, as well as the comparison results between the image data in the Bayer array before gain processing and the corresponding thresholds, perform statistical and analysis on the Bayer array. Based on the number of the determined analysis units where the image data of the high-dynamic-range image is saturated, determine the bandwidth threshold of the analysis units in the high-dynamic-range image.

[0129] As Figure 6 shown, Figure 6 shows Figure 4 the flowchart of the method for taking image blocks as units in step S132 to determine the analysis units where the image data of the high-dynamic-range image is saturated based on the image data of the analysis units in the image block and the corresponding thresholds, as well as the image data of the analysis units before gain processing and the corresponding thresholds:

[0130] In step S1221, taking the Bayer array of the high-dynamic range image as the analysis unit, the ratios of the pixel value R, the pixel value Gr, the pixel value Gb, and the pixel value B in the Bayer array to the corresponding gain values are respectively determined as the image data before gain processing of the Bayer array;

[0131] In step S1222, the Bayer array in which the maximum value of the image data before gain processing of the Bayer array in the image block is less than the corresponding threshold value and the maximum values of the pixel value R, the pixel value Gr, the pixel value Gb, and the pixel value B in the Bayer array are greater than the corresponding threshold values is determined as the analysis unit for image data saturation of the high-dynamic range image.

[0132] When analyzing with the Bayer array of the high-dynamic range image as the analysis unit, the Bayer array in which the maximum value of the pixel value R, the pixel value Gr, the pixel value Gb, and the pixel value B in the Bayer array before gain processing is less than the corresponding threshold value and the maximum value after gain processing is greater than the corresponding threshold value can be determined as the analysis unit for image data saturation of the high-dynamic range image.

[0133] After the pixel value R, the pixel value Gr, the pixel value Gb, and the pixel value B in the Bayer array are multiplied by a gain coefficient during gain processing, in order to determine the image data before gain processing, the ratios of the pixel value R, the pixel value Gr, the pixel value Gb, and the pixel value B to the corresponding gain values can be calculated, that is, the pixel value R, the pixel value Gr, the pixel value Gb, and the pixel value B are respectively divided by the corresponding gain values to obtain the image data before gain processing, R / gain_R, Gr / gain_Gr, Gb / gain_Gr, B / gain_B.

[0134] To accurately determine the problem of data saturation caused by gain processing, that is, to accurately determine which image data in the Bayer array is saturated due to gain processing, the Bayer array in which the maximum values of the pixel values R, Gr, Gb, and B in the Bayer array before gain processing are less than the corresponding thresholds and the maximum values after gain processing are greater than the corresponding thresholds is determined as the analysis unit for image data saturation of the high-dynamic range image, where Max(R / gain_R, Gr / gain_Gr, Gb / gain_Gr, B / gain_B) < Threshold0 - offset and Max(R, Gr, Gb, B) > Threshold1. That is, the Bayer array in which the image data is not saturated before gain processing but is saturated after gain processing is determined as the analysis unit for image data saturation of the high-dynamic range image. Among them, the corresponding threshold Threshold0 represents the maximum bandwidth of the image data before gain processing. To improve the accuracy of determination, considering noise, an offset can be introduced, and the corresponding threshold can be Threshold0 - offset. Threshold1 represents the maximum bandwidth of the image data after gain processing.

[0135] In the method for processing a high-dynamic range image provided by the present disclosure, taking an image block as a unit, the Bayer arrays in the image block in which the image data is not saturated before gain processing but is saturated after gain processing are counted. As Figure 5b shown, Figure 5b shows Figure 5a the Bayer array diagram in the image block BlockM1. The image block BlockM1 has a height of M0 and a width of N0. Each Bayer array includes four pixel values, namely pixel value R, pixel value Gr, pixel value Gb, and pixel value B. The part outlined by the dashed line in the figure is a Bayer array. Based on the pixel values R, Gr, Gb, and B in the Bayer array, the Bayer array in which the maximum value of the image data before gain processing of the Bayer array in the image block BlockM1 is less than the corresponding threshold and the maximum values of the pixel values R, Gr, Gb, and B in the Bayer array are greater than the corresponding threshold is determined as the analysis unit for image data saturation of the high-dynamic range image. That is, the Bayer array in which the maximum value of the image data before gain processing is less than the corresponding threshold and the maximum value of the image data after gain processing is greater than the corresponding threshold is determined as the analysis unit for image data saturation of the high-dynamic range image.

[0136] In the method for processing a high-dynamic range image provided by the present disclosure, after determining the Bayer arrays in which the image data is not saturated before gain processing but is saturated after gain processing, according to the number of determined Bayer arrays, the bandwidth threshold of the analysis unit in the high-dynamic range image is determined. As Figure 7 shown, Figure 7 showsFigure 1 In step S13, a method flowchart for determining the bandwidth threshold of the analysis unit in the high-dynamic range image based on the number of analysis units for which the image data of the high-dynamic range image is saturated:

[0137] In step S123, based on the image data of the analysis unit for which the image data of the high-dynamic range image is saturated, a correspondence relationship between the gray value and the number of analysis units for which the image data of the high-dynamic range image is saturated is obtained;

[0138] In step S124, based on the obtained correspondence relationship between the gray value and the number of analysis units for which the image data of the high-dynamic range image is saturated, the bandwidth threshold of each image block is determined;

[0139] In step S125, based on the bandwidth threshold of the image block, the bandwidth threshold of each analysis unit in the image block is determined.

[0140] In the method for processing a high-dynamic range image provided by the present disclosure, based on the image data of the analysis unit for which the image data of the high-dynamic range image is saturated, a correspondence relationship between the gray value and the number of analysis units for which the image data of the high-dynamic range image is saturated is obtained. For example, based on the image data in the Bayer array determined to be saturated in each image block, the pixel value R, the pixel value Gr, the pixel value Gb, and the pixel value B, a correspondence relationship between the gray value of the image block and the number of Bayer arrays determined to be saturated is obtained, that is, a gray histogram of the gray value of the image block and the number of Bayer arrays determined to be saturated is obtained. The gray histogram can be obtained by conventional methods in the art through the pixel value R, the pixel value Gr, the pixel value Gb, and the pixel value B. The gray value is related to the overexposure degree of the image. The larger the gray value, the greater the overexposure degree. As Figure 5c shown, Figure 5c shows the gray histogram corresponding to the image block BlockM1. The horizontal axis is the gray value L, and along the horizontal axis direction, the gray value increases. The vertical axis is the number n of Bayer arrays corresponding to the gray value.

[0141] Based on the obtained correspondence relationship between the gray value and the number of Bayer arrays determined to be saturated, the bandwidth threshold of each image block is determined. In the method for processing a high-dynamic range image provided by the present disclosure, the relationship between the gray value and the cumulative sum of the number of Bayer arrays determined to be saturated can be obtained according to the gray histogram, that is, the cumulative distribution histogram is obtained. As Figure 5d shown, Figure 5d shows the cumulative distribution histogram corresponding to the image block BlockM1, where the horizontal axis is the gray value L, and along the horizontal axis direction, the gray value increases. The vertical axis is the number N of Bayer arrays accumulated in the image block BlockM1 corresponding to the gray value. Based onFigure 5d As shown, the bandwidth threshold of the image block BlockM1 can be determined by referring to the distribution relationship between the gray value L and the cumulative number N of the Bayer arrays. For example, the result obtained by multiplying the cumulative number of the Bayer arrays accumulated in the image block BlockM1 by a system configuration parameter can be used as the bandwidth threshold. As Figure 5d shown, the number of the Bayer arrays accumulated in the image block BlockM1 is N = Num, the system configuration parameter is ratio, and the bandwidth threshold of the image block BlockM1 is the threshold Value0 corresponding to Num0 = Num * ratio. Among them, the system configuration parameter can be determined according to the system configuration of the electronic device. For example, it can be set to a fixed value, such as 0.8.

[0142] According to the above method, the thresholds of all image blocks of the entire-frame high-dynamic range image can be obtained. For example, as Figure 5e shown Figure 5e shows the corresponding bandwidth thresholds in each image block in Figure 5a . For example Figure 5e the threshold 11 in Figure 5a is the threshold of Block11 in Figure 5e the threshold 12 in Figure 5a is the threshold of Block12 in, and so on Figure 5e the threshold MN in Figure 5a is the threshold of BlockMN in

[0143] Based on the bandwidth threshold of the image block, the bandwidth threshold of each analysis unit in the image block is determined. In the method for processing a high-dynamic range image provided in the present disclosure, after determining the bandwidth threshold of the image block, the bandwidth threshold of each analysis unit in the image block can be determined according to the determined bandwidth threshold of the image block. For example, the bandwidth threshold of each image block can be upsampled respectively to obtain the bandwidth threshold of each analysis unit in the corresponding image block. As Figure 5a shown in the image block, the bandwidth threshold 11 corresponding to the image block Block11 can be upsampled to obtain the bandwidth threshold of each Bayer array in the image block Block11. Among them, the upsampling method can be common interpolation methods such as bilinear and bicubic

[0144] In order to determine the compression range of the image data of the high-dynamic range image, the node value of the image data that needs to be compressed is determined according to the bandwidth of the high-dynamic range image, that is, the node at which the high-dynamic range image starts to be compressed is determined. The selection of the node value can be based on the system setting. For example, 80% of the bandwidth of the high-dynamic range image is selected as the node value. The bandwidth of the image data in the analysis unit whose bandwidth threshold exceeds the node value is compressed to between the node value and the bandwidth of the high-dynamic range image. As Figure 5f shownFigure 5f The schematic diagram shows compressing the bandwidth of the image data in the analysis unit whose bandwidth threshold exceeds the node value to between the node value and the bandwidth of the high dynamic range image. The horizontal axis is the input Input, and the point P in the horizontal axis is the bandwidth threshold of the analysis unit. The figure only shows the bandwidth threshold corresponding to one analysis unit, the Bayer array, by way of example. The bandwidth threshold of each analysis unit is different. Point B in the horizontal axis is the bandwidth of the high dynamic range image, and m is the selected node. The vertical axis is the output Output, that is, the bandwidth output value after the bandwidth of the image data of the analysis unit is compressed, wherein the point B in the vertical axis is the bandwidth of the high dynamic range image. The node can be selected according to the bandwidth of the high dynamic range image, for example, 80% of the bandwidth value. The image data of the analysis unit whose bandwidth value is below the node value does not need to be compressed, and this period is a linear region. The image data of the analysis unit whose bandwidth value is above the node value needs to be compressed, and a smooth transition compression curve can be selected so that the compressed image data of the analysis unit can have a smooth transition. By Figure 5f It can be seen that the bandwidth of the image data in the analysis unit after compression is between the node value and the bandwidth of the high dynamic range image.

[0145] The high dynamic range image processing method provided by the present disclosure performs analysis in units of analysis, pre-processes the image data that is saturated before gain processing to make it as close to the true value as possible, and determines the bandwidth threshold of each analysis unit according to the number of analysis units of the image data saturated after gain processing, that is, based on the bandwidth threshold determined by each analysis unit, such as the Bayer array, the high dynamic range image is compressed, so that each analysis unit in the high dynamic range image has a different dynamic compression range, and localized control of the dynamic range is achieved. It also enables the details of the highlights to be fully restored, accurately restores the color of the image in the highlights, and improves the quality of image processing.

[0146] Figure 8 FIG. 1 is a block diagram of a high dynamic range image processing device according to an exemplary embodiment. Figure 8 The device includes an adjustment module 801, a bandwidth threshold determination module 802, a node value determination module 803 and a compression module 804.

[0147] An adjustment module 801 adjusts the image data in the analysis unit determined to be saturated with image data according to a preset adjustment rule;

[0148] A bandwidth threshold determination module 802 is configured to determine a bandwidth threshold of an analysis unit in the high dynamic range image according to the high dynamic range image;

[0149] A node value determination module 803 determines the node value of the image data to be compressed in the high-dynamic range image according to the bandwidth of the high-dynamic range image;

[0150] A compression module 804 compresses the bandwidth of the image data whose bandwidth threshold exceeds the node value to between the node value and the bandwidth of the high-dynamic range image.

[0151] Among them, the adjustment module 801 is configured to:

[0152] An analysis unit that determines the saturation of the image data in the high-dynamic range image before gain processing, based on the image data before gain processing of each analysis unit and the corresponding threshold, determines the analysis unit where the image data in the high-dynamic range image is saturated before gain processing, and adjusts the image data in the analysis unit where the image data is saturated according to a preset adjustment rule.

[0153] Among them, the adjustment module 801 is configured to:

[0154] Taking the Bayer array of the high-dynamic range image as an analysis unit, the ratios of the pixel value R, the pixel value Gr, the pixel value Gb, and the pixel value B in the Bayer array to the corresponding gain values are respectively determined as the image data before gain processing of the Bayer array;

[0155] Take the minimum value of the image data before gain processing of the Bayer array. If the minimum value is greater than or equal to the corresponding threshold, then this Bayer array is the analysis unit where the image data in the high-dynamic range image is saturated before gain processing.

[0156] Among them, the adjustment module 801 is configured to:

[0157] If the minimum value is less than the corresponding threshold, take the maximum value of the image data before gain processing of the Bayer array. If the maximum value is greater than or equal to the corresponding threshold, take the maximum value of the image data before gain processing of the pixel values Gr and Gb in the Bayer array. If the maximum value is greater than or equal to the corresponding threshold, then this Bayer array is the analysis unit where the image data in the high-dynamic range image is saturated before gain processing.

[0158] Among them, the adjustment module 801 is configured to:

[0159] Take the maximum value of the pixel values Gr and Gb in the analysis unit where the image data in the high-dynamic range image is saturated before gain processing;

[0160] Take the minimum value of the pixel value R and the maximum value of the pixel values Gr and Gb as the adjusted pixel value R';

[0161] Take the minimum value of the pixel value Gr and the maximum value of the pixel values Gr and Gb as the adjusted pixel value Gr';

[0162] The adjusted pixel value Gb’ is the minimum value among the pixel value Gb, the pixel value Gr, and the maximum value of the pixel value Gb.

[0163] The adjusted pixel value B’ is the minimum value among the pixel value B, the pixel value Gr, and the maximum value of the pixel value Gb.

[0164] Wherein, the bandwidth threshold determination module 802 is configured to:

[0165] Divide the high-dynamic range image into one or more image blocks according to a preset division rule;

[0166] Taking the image block as a unit, based on the image data of the analysis unit in the image block and the corresponding threshold, as well as the image data of the analysis unit before gain processing and the corresponding threshold, determine the analysis unit where the image data of the high-dynamic range image is saturated. Based on the number of the determined analysis units where the image data of the high-dynamic range image is saturated, determine the bandwidth threshold of the analysis unit in the high-dynamic range image.

[0167] Wherein, the bandwidth threshold determination module 802 is configured to:

[0168] Taking the Bayer array of the high-dynamic range image as the analysis unit, determine the image data before gain processing of the Bayer array by respectively taking the ratios of the pixel value R, the pixel value Gr, the pixel value Gb, and the pixel value B in the Bayer array to the corresponding gain values;

[0169] Determine the Bayer array where the maximum value of the image data before gain processing of the Bayer array in the image block is less than the corresponding threshold and the maximum values of the pixel value R, the pixel value Gr, the pixel value Gb, and the pixel value B in the Bayer array are greater than the corresponding threshold as the analysis unit where the image data of the high-dynamic range image is saturated.

[0170] Wherein, the bandwidth threshold determination module 802 is configured to:

[0171] Based on the image data of the determined analysis unit where the image data of the high-dynamic range image is saturated, obtain the correspondence between the gray value and the number of the determined analysis units where the image data of the high-dynamic range image is saturated;

[0172] According to the obtained correspondence between the gray value and the number of the determined analysis units where the image data of the high-dynamic range image is saturated, determine the bandwidth threshold of each image block;

[0173] Based on the bandwidth threshold of the image block, determine the bandwidth threshold of each analysis unit in the image block.

[0174] Wherein, the bandwidth threshold determination module 802 is configured to:

[0175] Upsample the bandwidth threshold of each image block respectively to obtain the bandwidth threshold of each analysis unit in the corresponding image block.

[0176] Regarding the device in the above embodiments, the specific manners in which each module performs operations have been described in detail in the embodiments related to the method, and will not be elaborated herein.

[0177] Figure 9 The block diagram of a processing device 900 for a high-dynamic range image shown according to an exemplary embodiment is presented. For example, the device 900 can be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, etc.

[0178] Referring to Figure 9 , the device 900 may include one or more of the following components: a processing component 902, a memory 904, a power component 906, a multimedia component 908, an audio component 910, an input / output (I / O) interface 912, a sensor component 914, and a communication component 916.

[0179] The processing component 902 generally controls the overall operation of the device 900, such as operations associated with display, telephone calls, data communication, camera operations, and recording operations. The processing component 902 may include one or more processors 920 to execute instructions to complete all or part of the steps of the above method. In addition, the processing component 902 may include one or more modules to facilitate the interaction between the processing component 902 and other components. For example, the processing component 902 may include a multimedia module to facilitate the interaction between the multimedia component 908 and the processing component 902.

[0180] The memory 904 is configured to store various types of data to support the operation of the device 900. Examples of such data include instructions for any application or method operating on the device 900, contact data, phone book data, messages, pictures, videos, etc. The memory 904 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, a magnetic disk, or an optical disk.

[0181] The power component 906 provides power to various components of the device 900. The power component 906 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the device 900.

[0182] The multimedia component 908 includes a screen that provides an output interface between the device 900 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen can be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touches, swipes, and gestures on the touch panel. The touch sensors can sense not only the boundaries of the touch or swipe actions, but also detect the duration and pressure associated with the touch or swipe operation. In some embodiments, the multimedia component 908 includes a front camera and / or a rear camera. When the device 900 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera can receive external multimedia data. Each of the front camera and the rear camera can be a fixed optical lens system or have a focal length and optical zoom capabilities.

[0183] The audio component 910 is configured to output and / or input audio signals. For example, the audio component 910 includes a microphone (MIC) that is configured to receive external audio signals when the device 900 is in an operating mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signals can be further stored in the memory 904 or transmitted via the communication component 916. In some embodiments, the audio component 910 further includes a speaker for outputting audio signals.

[0184] The I / O interface 912 provides an interface between the processing component 902 and a peripheral interface module, which can be a keyboard, a click wheel, buttons, etc. These buttons can include, but are not limited to: a home button, a volume button, a power button, and a lock button.

[0185] The sensor component 914 includes one or more sensors for providing a status assessment of various aspects of the device 900. For example, the sensor component 914 can detect the on / off state of the device 900, the relative positioning of components, such as the display and the keypad of the device 900. The sensor component 914 can also detect a change in the position of the device 900 or a component of the device 900, the presence or absence of user contact with the device 900, the orientation or acceleration / deceleration of the device 900, and the temperature change of the device 900. The sensor component 914 can include a proximity sensor configured to detect the presence of nearby objects without any physical contact. The sensor component 914 can also include a light sensor, such as a CMOS or a CCD image sensor, for use in imaging applications. In some embodiments, the sensor component 914 can further include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.

[0186] The communication component 916 is configured to facilitate communication, either wired or wirelessly, between the device 900 and other devices. The device 900 may access a wireless network based on a communication standard, such as WiFi, 2G, or 3G, or a combination thereof. In an exemplary embodiment, the communication component 916 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 916 further includes a Near Field Communication (NFC) module to facilitate short-range communication. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, Infrared Data Association (IrDA) technology, Ultra Wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.

[0187] In an exemplary embodiment, the device 900 may be implemented by one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Digital Signal Processing Devices (DSPDs), Programmable Logic Devices (PLDs), Field Programmable Gate Arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components for performing the above-described method.

[0188] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions, such as a memory 904 including instructions, is also provided. The above instructions may be executed by a processor 920 of the device 900 to complete the above-described method. For example, the non-transitory computer-readable storage medium may be a ROM, Random Access Memory (RAM), CD-ROM, magnetic tape, floppy disk, and optical data storage device, etc. When the instructions in the storage medium are executed by a processor of a mobile terminal, the mobile terminal is enabled to execute a method for processing a high dynamic range image, and the processing method includes:

[0189] Adjusting the image data in an analysis unit for image data saturation according to a preset adjustment rule;

[0190] Determining a bandwidth threshold of an analysis unit in the high dynamic range image according to the high dynamic range image;

[0191] Determining a node value of the image data to be compressed in the high dynamic range image according to the bandwidth of the high dynamic range image;

[0192] Compressing the bandwidth of the image data whose bandwidth threshold exceeds the node value to between the node value and the bandwidth of the high dynamic range image.

[0193] Other embodiments of the present invention will be readily apparent to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the invention that follow the general principles of the invention and include known common general knowledge or conventional technical means in the technical field not disclosed in this disclosure. The specification and examples are only to be considered as exemplary, and the true scope and spirit of the invention are pointed out by the following claims.

[0194] It should be understood that the present invention is not limited to the exact structures described above and shown in the drawings, and various modifications and changes can be made without departing from its scope. The scope of the present invention is only limited by the appended claims.

Claims

1. A method for processing a high - dynamic - range image, applied to an electronic device, characterized in that, the processing method includes: Based on the image data before gain processing and the corresponding threshold value of each analysis unit, determining the analysis units where the image data of the high - dynamic - range image is saturated before gain processing, and adjusting the image data in the analysis units where the image data is saturated according to a preset adjustment rule; Determining the bandwidth threshold value of the analysis units in the high - dynamic - range image according to the high - dynamic - range image; Determining the node value of the image data that needs to be compressed in the high - dynamic - range image according to the bandwidth of the high - dynamic - range image; Compressing the bandwidth of the image data whose bandwidth threshold value exceeds the node value to between the node value and the bandwidth of the high - dynamic - range image; wherein, the determining the bandwidth threshold value of the analysis units in the high - dynamic - range image includes: Dividing the high - dynamic - range image into one or more image blocks according to a preset division rule; Taking the image block as a unit, based on the image data and the corresponding threshold value of the analysis units in the image block and the image data and the corresponding threshold value of the analysis units before gain processing, determining the analysis units where the image data of the high - dynamic - range image is saturated, and determining the bandwidth threshold value of the analysis units in the high - dynamic - range image based on the number of the determined analysis units where the image data of the high - dynamic - range image is saturated.

2. The processing method according to claim 1, characterized in that, the determining the analysis units where the image data of the high - dynamic - range image is saturated before gain processing based on the image data before gain processing and the corresponding threshold value of each analysis unit includes: Taking the Bayer array of the high - dynamic - range image as the analysis unit, and determining the image data before gain processing of the Bayer array by taking the ratios of the pixel value R, the pixel value Gr, the pixel value Gb, and the pixel value B in the Bayer array to the corresponding gain values respectively; Taking the minimum value of the image data before gain processing of the Bayer array, if the minimum value is greater than or equal to the corresponding threshold value, then this Bayer array is the analysis unit where the image data of the high - dynamic - range image is saturated before gain processing.

3. The processing method according to claim 2, characterized in that, the determining the analysis units where the image data of the high - dynamic - range image is saturated before gain processing further includes: If the minimum value is less than the corresponding threshold value, taking the maximum value of the image data before gain processing of the Bayer array, if the maximum value is greater than or equal to the corresponding threshold value, taking the maximum value of the image data before gain processing of the pixel values Gr and Gb in the Bayer array, if the maximum value is greater than or equal to the corresponding threshold value, then this Bayer array is the analysis unit where the image data of the high - dynamic - range image is saturated before gain processing.

4. The processing method according to claim 2 or 3, characterized in that, the adjusting the image data in the analysis units where the image data is saturated according to a preset adjustment rule includes: Taking the maximum value of the pixel values Gr and Gb in the analysis units where the image data of the high - dynamic - range image is saturated before gain processing; Taking the minimum value of the pixel value R and the maximum value of the pixel values Gr and Gb as the adjusted pixel value R'. Take the minimum value between the pixel value Gr and the maximum value of the pixel values Gr and Gb as the adjusted pixel value Gr'; Take the minimum value between the pixel value Gb and the maximum value of the pixel values Gr and Gb as the adjusted pixel value Gb'; Take the minimum value between the pixel value B and the maximum value of the pixel values Gr and Gb as the adjusted pixel value B'.

5. The processing method according to claim 1, characterized in that, the analysis unit for determining the saturation of the image data of the high-dynamic range image in units of image blocks, based on the image data of the analysis unit in the image block and the corresponding threshold value, as well as the image data of the analysis unit before gain processing and the corresponding threshold value, includes: Taking the Bayer array of the high-dynamic range image as the analysis unit, and determining the ratio of the pixel value R, pixel value Gr, pixel value Gb, and pixel value B in the Bayer array to the corresponding gain value as the image data before gain processing of the Bayer array; Determining the Bayer array in which the maximum value of the image data before gain processing of the Bayer array in the image block is less than the corresponding threshold value and the maximum value of the pixel value R, pixel value Gr, pixel value Gb, and pixel value B in the Bayer array is greater than the corresponding threshold value as the analysis unit for the saturation of the image data of the high-dynamic range image.

6. The processing method according to claim 1 or 5, characterized in that, the determining of the bandwidth threshold of the analysis unit in the high-dynamic range image based on the number of analysis units for the saturation of the image data of the high-dynamic range image determined includes: Based on the image data of the analysis unit for the saturation of the image data of the high-dynamic range image determined, obtaining the corresponding relationship between the gray value and the number of analysis units for the saturation of the image data of the high-dynamic range image determined; According to the obtained corresponding relationship between the gray value and the number of analysis units for the saturation of the image data of the high-dynamic range image determined, determining the bandwidth threshold of each image block; Based on the bandwidth threshold of the image block, determining the bandwidth threshold of each analysis unit in the image block.

7. The processing method according to claim 6, characterized in that, the determining of the bandwidth threshold of each analysis unit based on the bandwidth threshold of the image block includes: Upsampling the bandwidth threshold of each image block respectively to obtain the bandwidth threshold of each analysis unit in the corresponding image block.

8. A processing device for a high-dynamic range image, characterized in that, the processing device includes: An adjustment module, based on the image data before gain processing of each analysis unit and the corresponding threshold value, determines the analysis unit with saturated image data before gain processing of the high-dynamic range image, and adjusts the image data in the determined analysis unit with saturated image data according to a preset adjustment rule; A bandwidth threshold determination module, according to the high-dynamic range image, determines the bandwidth threshold of the analysis unit in the high-dynamic range image; A node value determination module, according to the bandwidth of the high-dynamic range image, determines the node value of the image data to be compressed in the high-dynamic range image; A compression module, compresses the bandwidth of the image data whose bandwidth threshold exceeds the node value to between the node value and the bandwidth of the high-dynamic range image; Among them, the bandwidth threshold determination module is configured to: Divide the high-dynamic range image into one or more image blocks according to a preset division rule; Taking the image block as a unit, based on the image data of the analysis unit in the image block and the corresponding threshold, as well as the image data of the analysis unit before gain processing and the corresponding threshold, determine the analysis unit where the image data of the high-dynamic range image is saturated. Based on the number of analysis units where the image data of the high-dynamic range image is saturated determined, determine the bandwidth threshold of the analysis unit in the high-dynamic range image.

9. The processing device according to claim 8, wherein, The adjustment module is configured to: Taking the Bayer array of the high-dynamic range image as the analysis unit, determine the ratio of the pixel value R, pixel value Gr, pixel value Gb, and pixel value B in the Bayer array to the corresponding gain value as the image data before gain processing of the Bayer array; Take the minimum value of the image data before gain processing of the Bayer array. If the minimum value is greater than or equal to the corresponding threshold, then this Bayer array is the analysis unit where the image data before gain processing of the high-dynamic range image is saturated.

10. The processing device according to claim 9, wherein, The adjustment module is configured to: If the minimum value is less than the corresponding threshold, take the maximum value of the image data before gain processing of the Bayer array. If the maximum value is greater than or equal to the corresponding threshold, take the maximum value of the image data before gain processing of the pixel values Gr and Gb in the Bayer array. If the maximum value is greater than or equal to the corresponding threshold, then this Bayer array is the analysis unit where the image data before gain processing of the high-dynamic range image is saturated.

11. The processing device according to claim 9 or 10, wherein, The adjustment module is configured to: Take the maximum value of the pixel values Gr and Gb in the analysis unit where the image data before gain processing of the high-dynamic range image is saturated; Take the minimum value of the pixel value R and the maximum value of the pixel values Gr and Gb as the adjusted pixel value R'; Take the minimum value of the pixel value Gr and the maximum value of the pixel values Gr and Gb as the adjusted pixel value Gr'; Take the minimum value of the pixel value Gb and the maximum value of the pixel values Gr and Gb as the adjusted pixel value Gb'; Take the minimum value of the pixel value B and the maximum value of the pixel values Gr and Gb as the adjusted pixel value B'.

12. The processing device according to claim 8, wherein, The bandwidth threshold determination module is configured to: Taking the Bayer array of the high-dynamic range image as the analysis unit, determine the ratio of the pixel value R, pixel value Gr, pixel value Gb, and pixel value B in the Bayer array to the corresponding gain value as the image data before gain processing of the Bayer array; Determine the Bayer array where the maximum value of the image data before gain processing of the Bayer array in the image block is less than the corresponding threshold and the maximum values of the pixel values R, pixel value Gr, pixel value Gb, and pixel value B in the Bayer array are greater than the corresponding threshold as the analysis unit where the image data of the high-dynamic range image is saturated.

13. The processing device according to claim 8 or 12, It is characterized in that the bandwidth threshold determination module is configured to: Based on the image data of the analysis unit where the image data of the determined high-dynamic range image is saturated, obtain the correspondence between the gray value and the number of analysis units where the image data of the determined high-dynamic range image is saturated; According to the obtained correspondence between the gray value and the number of analysis units where the image data of the determined high-dynamic range image is saturated, determine the bandwidth threshold of each image block; Based on the bandwidth threshold of the image block, determine the bandwidth threshold of each analysis unit in the image block.

14. The processing device according to claim 13, It is characterized in that the bandwidth threshold determination module is configured to: Upsample the bandwidth threshold of each image block respectively to obtain the bandwidth threshold of each analysis unit in the corresponding image block.

15. A processing device for high-dynamic range images, It is characterized in that comprising: a processor; a memory for storing instructions executable by the processor; wherein, the processor is configured to: Based on the image data before gain processing of each analysis unit and the corresponding threshold, determine the analysis units where the image data of the high-dynamic range image is saturated before gain processing, and adjust the image data in the analysis units where the image data is saturated according to a preset adjustment rule; According to the high-dynamic range image, determine the bandwidth threshold of the analysis units in the high-dynamic range image; According to the bandwidth of the high-dynamic range image, determine the node value of the image data to be compressed in the high-dynamic range image; Compress the bandwidth of the image data whose bandwidth threshold exceeds the node value to between the node value and the bandwidth of the high-dynamic range image; wherein, the determination of the bandwidth threshold of the analysis units in the high-dynamic range image includes: Divide the high-dynamic range image into one or more image blocks according to a preset division rule; Taking the image block as a unit, based on the image data of the analysis units in the image block and the corresponding threshold and the image data of the analysis units before gain processing and the corresponding threshold, determine the analysis units where the image data of the high-dynamic range image is saturated, and based on the number of analysis units where the image data of the determined high-dynamic range image is saturated, determine the bandwidth threshold of the analysis units in the high-dynamic range image.

16. A non-transitory computer-readable storage medium, when the instructions in the storage medium are executed by the processor of the mobile terminal, enabling the mobile terminal to execute a processing method for high-dynamic range images, the processing method comprising: Based on the image data before gain processing of each analysis unit and the corresponding threshold, determine the analysis units where the image data of the high-dynamic range image is saturated before gain processing, and adjust the image data in the analysis units where the image data is saturated according to a preset adjustment rule; According to the high-dynamic range image, determine the bandwidth threshold of the analysis units in the high-dynamic range image; According to the bandwidth of the high-dynamic range image, determine the node value of the image data to be compressed in the high-dynamic range image; Compress the bandwidth of the image data whose bandwidth threshold exceeds the node value to between the node value and the bandwidth of the high-dynamic range image; Among them, determining the bandwidth threshold of the analysis unit in the high-dynamic range image includes: Dividing the high-dynamic range image into one or more image blocks according to a preset division rule; Taking the image block as a unit, based on the image data and corresponding threshold of the analysis unit in the image block and the image data and corresponding threshold of the analysis unit before gain processing, determining the analysis unit whose image data in the high-dynamic range image is saturated, and determining the bandwidth threshold of the analysis unit in the high-dynamic range image based on the number of the determined analysis units whose image data in the high-dynamic range image is saturated.

Citation Information

Patent Citations

  • Image processing method, device, storage medium and electronic equipment

    CN110572585A

  • System and method for generating an image result based on availability of a network resource

    US20160140702A1