CN114119432A - Image processing method, image processing device, electronic equipment and storage medium - Google Patents

Image processing method, image processing device, electronic equipment and storage medium Download PDF

Info

Publication number
CN114119432A
CN114119432A CN202111320515.6A CN202111320515A CN114119432A CN 114119432 A CN114119432 A CN 114119432A CN 202111320515 A CN202111320515 A CN 202111320515A CN 114119432 A CN114119432 A CN 114119432A
Authority
CN
China
Prior art keywords
image
determining
brightness
target
parameter
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202111320515.6A
Other languages
Chinese (zh)
Inventor
杨剑锋
陈奕鑫
谢仁礼
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen TCL Digital Technology Co Ltd
Original Assignee
Shenzhen TCL Digital Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen TCL Digital Technology Co Ltd filed Critical Shenzhen TCL Digital Technology Co Ltd
Priority to CN202111320515.6A priority Critical patent/CN114119432A/en
Publication of CN114119432A publication Critical patent/CN114119432A/en
Priority to PCT/CN2022/120691 priority patent/WO2023082861A1/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/40Image enhancement or restoration using histogram techniques
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • G06F18/241Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/70Denoising; Smoothing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/90Determination of colour characteristics

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Physics & Mathematics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Data Mining & Analysis (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Evolutionary Biology (AREA)
  • Evolutionary Computation (AREA)
  • Artificial Intelligence (AREA)
  • General Engineering & Computer Science (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Image Processing (AREA)
  • Facsimile Image Signal Circuits (AREA)

Abstract

The embodiment of the application discloses an image processing method and device, electronic equipment and a storage medium. The method comprises the following steps: acquiring a first exposure parameter and a second exposure parameter corresponding to a first image; then determining the image type corresponding to the first image according to the first exposure parameter and the second exposure parameter; then acquiring a target histogram corresponding to the first image and a limiting parameter corresponding to the target histogram; and adjusting the brightness of the first image according to the image type, the target histogram and the limiting parameter to obtain a second image. In the embodiment of the application, the image type of the first image is determined, and the first image is adjusted in a targeted manner according to the image type of the first image, so that different areas of the first image have more appropriate image brightness, and a second image with higher image quality is obtained.

Description

Image processing method, image processing device, electronic equipment and storage medium
Technical Field
The present application relates to the field of image processing, and in particular, to an image processing method and apparatus, an electronic device, and a storage medium.
Background
In the prior art, a global algorithm is often adopted for different display pictures of a display screen to improve the picture of the whole image, so that the appearance of the display picture is changed.
However, the brightness distribution in the picture is different for different display pictures, and if the picture is adjusted globally, the details of the dark part of the picture are lost, and the bright part of the picture is overexposed. Eventually resulting in poor quality of the displayed picture.
Disclosure of Invention
The embodiment of the application provides an image processing method and device, electronic equipment and a storage medium. The image processing method can determine the image type of the image, and adjust the image according to the image type, so that the image quality is improved.
In a first aspect, an embodiment of the present application provides an image processing method, including:
acquiring a first exposure parameter and a second exposure parameter corresponding to the first image;
determining an image type corresponding to the first image according to the first exposure parameter and the second exposure parameter;
acquiring a target histogram corresponding to the first image and a limiting parameter corresponding to the target histogram;
and adjusting the brightness of the first image according to the image type, the target histogram and the limiting parameter to obtain a second image.
In a second aspect, an embodiment of the present application provides an image processing apparatus, including:
the first acquisition module is used for acquiring a first exposure parameter and a second exposure parameter corresponding to the first image;
the determining module is used for determining the image type corresponding to the first image according to the first exposure parameter and the second exposure parameter;
the second acquisition module is used for acquiring a target histogram corresponding to the first image and a limiting parameter corresponding to the target histogram;
and the generating module is used for adjusting the brightness of the first image according to the image type, the target histogram and the limiting parameter so as to obtain a second image.
In a third aspect, an embodiment of the present application provides an electronic device, including a memory storing executable program code, and a processor coupled to the memory; the processor calls the executable program codes stored in the memory to execute the steps in the image processing method provided by the embodiment of the application.
In a fourth aspect, the present application provides a computer-readable storage medium, where the storage medium stores a plurality of instructions, and the instructions are suitable for being loaded by a processor to perform the steps in the image processing method provided by the present application.
In the embodiment of the application, the electronic equipment acquires a first exposure parameter and a second exposure parameter corresponding to a first image; then determining the image type corresponding to the first image according to the first exposure parameter and the second exposure parameter; then acquiring a target histogram corresponding to the first image and a limiting parameter corresponding to the target histogram; and adjusting the brightness of the first image according to the image type, the target histogram and the limiting parameter to obtain a second image. In the embodiment of the application, the image type of the first image is determined, and the first image is adjusted in a targeted manner according to the image type of the first image, so that different areas of the first image have more appropriate image brightness, and a second image with higher image quality is obtained.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a first flowchart of an image processing method according to an embodiment of the present application.
Fig. 2 is a second flowchart of the image processing method according to the embodiment of the present application.
Fig. 3 is a graph showing the S-shape of the adaptive coefficient S and the adaptive threshold P provided in the embodiment of the present application.
Fig. 4 is an adjustment graph of the image type of the first image as a dark scene image.
Fig. 5 is an adjustment graph of the image type of the first image as a bright-dark scene image.
Fig. 6 is an adjustment graph of the image type of the first image being a bright-field image.
Fig. 7 is a schematic structural diagram of an image processing apparatus according to an embodiment of the present application.
Fig. 8 is a schematic structural diagram of an electronic device provided in an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
In the related art, in order to improve the picture quality displayed on the display screen, it is currently common to adjust the display pictures in all the scenes by using a single picture adjustment method. However, since the scene of the picture in the video is constantly changed, for example, brightness and color of different display areas are changed, the scene of the picture corresponding to the image in different frames may be different. If a single picture adjustment mode is still adopted, the corresponding display quality of the adjusted picture is worse.
For example, if the brightness of the picture is raised alone, and the dark area is not considered, the picture details in the dark area will be lost. If the brightness of the highlight area is to be suppressed alone, this may result in some areas not being sufficiently bright. Resulting in a poor appearance of the final display.
In order to solve the technical problem, embodiments of the present application provide an image processing method, an image processing apparatus, an electronic device, and a storage medium. The image processing method can determine the image type of the first image, and then process the first image according to the image type, so that the image quality of the final display image is improved.
It should be noted that the image processing method is applicable to any electronic device capable of processing images, such as a television, a smart phone, a computer, a tablet computer, smart glasses, a head-mounted virtual device, and other electronic devices.
Referring to fig. 1, fig. 1 is a first flow chart of an image processing method according to an embodiment of the present disclosure. The image processing method may include the steps of:
110. and acquiring a first exposure parameter and a second exposure parameter corresponding to the first image.
Before acquiring the first exposure parameter and the second exposure parameter corresponding to the first image, the electronic device may acquire an initial image, and then convert a color space of the initial image into an HSV (Hue, Saturation) color space, thereby obtaining the first image. In the HSV color space, H is hue, S is saturation, and V is lightness (brightness).
The initial image may be a still image, such as a photograph. Or a certain frame of image in a dynamic image, such as a frame of image in a video. The color space of the initial image may be an RGB (Red, Green, Blue) color space.
It should be noted that, after the color space of the initial image is converted into the HSV color space, the hue and saturation information of the first image may be retained, and then the brightness information of the first image may be processed.
In some embodiments, the electronic device may obtain a first exposure parameter and a second exposure parameter corresponding to the first image, where the first exposure parameter and the second exposure parameter are parameters for measuring image brightness of the first image, and the overall brightness condition of the first image may be determined by the first exposure parameter and the second exposure parameter, so as to determine an image type corresponding to the first image.
In some embodiments, the electronic device may determine a plurality of reference luminance values in the first image, then determine a first number of pixels corresponding to each of the plurality of reference luminance values in the first image, and finally determine the first exposure parameter according to each of the reference luminance values and the first number of pixels corresponding to each of the reference luminance values.
Specifically, the electronic device may determine a maximum reference brightness value among a plurality of reference brightness values, and then determine the first exposure parameter according to the maximum reference brightness value, each reference brightness value, and the first number of pixels corresponding to each reference brightness value.
For example, the luminance range corresponding to the first image is 0 to 255, a plurality of reference luminance values may be determined in the range, for example, a target luminance range, for example, 150 to 255, is determined in the luminance range of 0 to 255, luminance values in the target luminance range may be determined as reference luminance values, wherein the maximum reference luminance value is 255, each reference luminance value has corresponding pixels, for example, 155 the reference luminance value has 100 ten thousand pixels, and 250 the reference luminance value has 200 ten thousand pixels, and the electronic device may count the number of first pixels corresponding to each reference luminance value.
In some embodiments, the electronic device may determine a plurality of luminance sections within a luminance range corresponding to the first image, then determine a second number of pixels corresponding to a plurality of target luminance sections in the plurality of luminance sections, and finally determine the second exposure parameter according to the second number of pixels corresponding to the plurality of target luminance sections.
For example, the electronic device may determine an initial histogram of the first image, and then determine a luminance range corresponding to the first image according to the initial histogram, for example, the luminance range corresponding to the first image is 0 to 255. The electronic device then determines a plurality of brightness intervals within the brightness range, and the brightness intervals do not overlap with each other. Then, the number of second pixels corresponding to each brightness interval is determined.
For example, the plurality of luminance sections may be divided into a low luminance section, a middle luminance section, and a high luminance section. The number of second pixels corresponding to the low-brightness interval, the number of second pixels corresponding to the medium-brightness interval, and the number of second pixels corresponding to the high-brightness interval can be determined. And then determining a second exposure parameter according to the number of second pixels corresponding to each brightness interval.
Specifically, the second number of pixels corresponding to the middle-luminance interval and the second number of pixels corresponding to the high-luminance interval are added to obtain a first accumulated value, and then the first accumulated value is divided by the number of all pixels in the first image to obtain a second exposure coefficient. Or adding the second pixel number corresponding to the low-brightness interval and the second pixel number corresponding to the medium-brightness interval to obtain a second accumulated value, and dividing the second accumulated value by the number of all pixels in the first image to obtain a second exposure coefficient.
120. And determining the image type corresponding to the first image according to the first exposure parameter and the second exposure parameter.
In some embodiments, the electronic device may determine a first weight value corresponding to the first exposure parameter and a second weight value corresponding to the second exposure coefficient, then determine a third exposure parameter according to the first exposure parameter, the first weight value, the second exposure parameter, and the second weight value, and finally determine an image type corresponding to the first image according to the third exposure coefficient.
For example, the first weight value is λ, and the second weight value is η, where λ ═ 1 — η, η ∈ (0, 1). And then multiplying the first weight value by the first exposure parameter to obtain a first product, multiplying the second weight value by the second exposure parameter to obtain a second product, and adding the first product and the second product to obtain a third exposure parameter.
After determining the third exposure parameter, the electronic device may determine a target parameter range to which the third exposure parameter belongs within a preset parameter range, and finally determine an image type corresponding to the first picture according to the target parameter range.
For example, a first luminance parameter and a second luminance parameter are determined, and the first luminance parameter and the second luminance parameter are preset parameters. And when the third exposure parameter is greater than or equal to the first brightness parameter, determining that the image type of the first image is a full dark scene image. And when the third exposure parameter is greater than or equal to the second brightness parameter but the third exposure parameter is less than the first brightness parameter, determining that the image type of the first image is a bright-dark scene image. And when the third exposure parameter is larger than or equal to zero but the third exposure parameter is smaller than the second brightness parameter, determining the image type of the first image as a bright-field image.
It should be noted that, in practical applications, a plurality of preset parameter ranges may be preset, each preset parameter range corresponds to one image type, and when the third exposure parameter falls within a certain preset parameter range, the image type corresponding to the preset parameter range is determined as the image type corresponding to the first image.
In the embodiment of the application, the third exposure parameter is determined through the first exposure parameter and the second exposure parameter, and finally the image type of the first image is determined through the third exposure parameter, so that the image type of the first image can be accurately determined.
130. And acquiring a target histogram corresponding to the first image and a limiting parameter corresponding to the target histogram.
In some embodiments, the electronic device may determine an initial histogram of the first image, where the initial histogram is the most original histogram of the first image that reflects the brightness distribution of the pixels of the first image. And then, smoothing the initial histogram corresponding to the first image to obtain an adaptive histogram, and determining a target histogram corresponding to the first image according to the adaptive histogram.
And smoothing the initial histogram to obtain an adaptive histogram. The electronic device may use Adaptive Histogram Equalization (CLAHE) to obtain the Adaptive Histogram.
In some embodiments, the electronic device may determine an adaptive coefficient corresponding to the initial histogram, then determine a maximum value and a minimum value in the initial histogram, and finally perform smoothing on the initial histogram according to the adaptive coefficient, the maximum value, and the minimum value to obtain an adaptive histogram.
The adaptive coefficient may be calculated by an algorithm for increasing the amount of energy (OSTU), for example, if the electronic device obtains the adaptive threshold P by the algorithm for increasing the amount of energy (OSTU), the adaptive coefficient is an S-shaped curve using the adaptive highlight preservation starting point P as an argument.
After the adaptive histogram is acquired, a cumulative histogram may be calculated from the adaptive histogram, and the cumulative histogram may be determined as a target histogram corresponding to the first image. Wherein the cumulative histogram represents the cumulative probability distribution of the image components at the gray level.
140. And adjusting the brightness of the first image according to the image type, the target histogram and the limiting parameter to obtain a second image.
In some embodiments, the electronic device determines a target adjustment curve type corresponding to the first image according to the image type, then determines an adaptive adjustment index corresponding to the target adjustment curve type according to the target histogram and the limiting parameter, then determines a target adjustment curve according to the target adjustment curve type and the adaptive adjustment index, and finally adjusts the brightness of the first image according to the target adjustment curve to obtain the second image.
For example, each image type corresponds to an adjustment curve type, and a mapping relationship between the image type and the adjustment curve type may be established first. After the image type of the first image is determined, the target adjustment curve type can be determined according to the mapping relation.
And the electronic equipment calculates the self-adaptive adjustment index corresponding to the type of the target adjustment curve according to the target histogram and the limiting parameter, and then determines the self-adaptive adjustment index as the self-adaptive adjustment index of the type of the target adjustment curve, so that the target adjustment curve is obtained.
And finally, the electronic equipment adjusts the brightness value of each pixel in the first image according to the target adjustment curve, so that a second image is obtained. It can be understood that the brightness value of each pixel in the first image has a mapping brightness value on the target curve, and the brightness value of each pixel in the first image is adjusted to the mapping brightness value, so that the brightness value of at least a part of pixels in the whole first image is changed, thereby obtaining the second image.
It will be appreciated that the second image has a better pixel brightness distribution relative to the first image. For example, when the first image is a bright-dark scene image, after the first image is adjusted, the pixel brightness of the dark region in the second image is changed, and the details of the dark region can be better embodied, that is, the dark region can be seen more clearly. Meanwhile, the brightness of the bright part area in the second image can be kept without being adjusted, so that the situation of overexposure of the bright part area is prevented.
It should be noted that, for different image types, there are corresponding adjustment curve types to adjust the brightness of the pixels of the first image, so as to obtain a second image with better brightness distribution, and the second image has better image quality.
In some embodiments, in generating the second image, the tone, saturation, and mapped luminance value corresponding to each pixel of the first image may be used to generate the second image. The second image has a better brightness distribution than the first image, only the pixels, and the second image has the same hue and saturation as the first image, so as to ensure the consistency of the second image and the first image in color.
In some embodiments, after the electronic device obtains the second image, the color space of the second image is converted to an RGB color space to obtain the target output image.
In the embodiment of the application, the electronic device obtains a first exposure parameter and a second exposure parameter corresponding to a first image; then determining the image type corresponding to the first image according to the first exposure parameter and the second exposure parameter; then acquiring a target histogram corresponding to the first image and a limiting parameter corresponding to the target histogram; and adjusting the brightness of the first image according to the image type, the target histogram and the limiting parameter to obtain a second image. In the embodiment of the application, the image type of the first image is determined, and the first image is adjusted in a targeted manner according to the image type of the first image, so that different areas of the first image have more appropriate image brightness, and a second image with higher image quality is obtained.
Referring to fig. 2, fig. 2 is a second flow chart of an image processing method according to an embodiment of the present disclosure. Wherein, the image processing method may include the steps of:
201. a plurality of reference luminance values are determined in the first image, and a first number of pixels corresponding to each of the plurality of reference luminance values is determined in the first image.
In some embodiments, a luminance range corresponding to the first image may be determined, for example, the luminance range corresponding to the first image is 0 to 255, a plurality of reference luminance values may be determined within the luminance range, for example, a target luminance range, for example, 150 to 255, is determined from the luminance ranges of 0 to 255, luminance values within the target luminance range may be determined as reference luminance values, wherein a maximum reference luminance value is 255, each reference luminance value has corresponding pixels, for example, each reference luminance value has 100 ten thousand corresponding to the reference luminance value, and the electronic device may count the number of first pixels corresponding to each reference luminance value.
202. And determining a first exposure parameter according to each reference brightness value and the first pixel number corresponding to each reference brightness value.
Specifically, the electronic device may determine a maximum reference brightness value among a plurality of reference brightness values, and then determine the first exposure parameter according to the maximum reference brightness value, each reference brightness value, and the first number of pixels corresponding to each reference brightness value.
For example, the electronic device may multiply each reference luminance value by a first number of pixels corresponding to each reference luminance value to obtain a first product, and then add the first products corresponding to the plurality of reference luminance values to obtain a first accumulated value. Meanwhile, the electronic equipment accumulates the number of the first pixels corresponding to each reference brightness value to obtain a second accumulated value. Finally, the first accumulated value is divided by the maximum reference brightness value and then divided by the first accumulated value, and then the first exposure parameter is obtained.
Specifically, please refer to the first exposure coefficient calculation formula:
Figure BDA0003345421120000091
wherein exp is the first exposure coefficient, L is the maximum reference luminance value, k is the reference luminance value, and h (k) is the first number of pixels corresponding to the reference luminance value. Wherein, K is in the luminance range corresponding to the first image, for example, if the luminance range of the first image is 0 to L, K is in the range of 0 to L.
203. And determining a plurality of brightness intervals in a brightness range corresponding to the first image, and determining the number of second pixels corresponding to a plurality of target brightness intervals in the plurality of brightness intervals.
For example, the electronic device may determine an initial histogram of the first image, and then determine a luminance range corresponding to the first image according to the initial histogram, for example, the luminance range corresponding to the first image is 0 to 255. The electronic device then determines a plurality of brightness intervals within the brightness range, and the brightness intervals do not overlap with each other. Then, the number of second pixels corresponding to each brightness interval is determined.
Specifically, the electronic device may determine a first exposure threshold and a second exposure threshold corresponding to the first image, and then determine a plurality of luminance sections within a luminance range corresponding to the first image according to the first exposure threshold and the second exposure threshold.
For example, the first exposure threshold and the second exposure threshold are considered to be set, and the first exposure threshold and the second exposure threshold are within the brightness range corresponding to the first image. [0, t1] this brightness interval is a low brightness interval, (t1, t2) this brightness interval is a medium brightness interval, (t2, L ] this brightness interval is a high brightness interval, where the value of L may be 255.
204. And determining a second exposure parameter according to the second pixel quantity respectively corresponding to the target brightness intervals, and determining the image type corresponding to the first image according to the first exposure parameter and the second exposure parameter.
The electronic device may determine that the number of second pixels corresponding to the low-luminance section is M1, the number of second pixels corresponding to the medium-luminance section is M2, and the number of second pixels corresponding to the high-luminance section is M3.
In some embodiments, the electronic device may add the second number of pixels M1 corresponding to the low-luminance section and the second number of pixels M2 corresponding to the medium-luminance section to obtain the second exposure parameter.
In some implementations, the electronic device can determine an image type corresponding to the first image based on the first exposure parameter and the second exposure parameter.
Specifically, the electronic device may determine a first weight value corresponding to the first exposure parameter and a second weight value corresponding to the second exposure coefficient, then determine a third exposure parameter according to the first exposure parameter, the first weight value, the second exposure parameter, and the second weight value, and finally determine the image type corresponding to the first image according to the third exposure coefficient.
For example, the first weight value is λ, and the second weight value is η, where λ ═ 1 — η, η ∈ (0, 1). And then multiplying the first weight value by the first exposure parameter to obtain a first product, multiplying the second weight value by the second exposure parameter to obtain a second product, and adding the first product and the second product to obtain a third exposure parameter.
After determining the third exposure parameter, the electronic device may determine a target parameter range to which the third exposure parameter belongs within a preset parameter range, and finally determine an image type corresponding to the first picture according to the target parameter range.
For example, a first luminance parameter and a second luminance parameter are determined, and the first luminance parameter and the second luminance parameter are preset parameters. And when the third exposure parameter is greater than or equal to the first brightness parameter, determining that the image type of the first image is a full dark scene image. And when the third exposure parameter is greater than or equal to the second brightness parameter but the third exposure parameter is less than the first brightness parameter, determining that the image type of the first image is a bright-dark scene image. And when the third exposure parameter is larger than or equal to zero but the third exposure parameter is smaller than the second brightness parameter, determining the image type of the first image as a bright-field image.
It should be noted that, in practical applications, a plurality of preset parameter ranges may be preset, each preset parameter range corresponds to one image type, and when the third exposure parameter falls within a certain preset parameter range, the image type corresponding to the preset parameter range is determined as the image type corresponding to the first image.
In the embodiment of the application, the third exposure parameter is determined through the first exposure parameter and the second exposure parameter, and finally the image type of the first image is determined through the third exposure parameter, so that the image type of the first image can be accurately determined.
205. And smoothing the initial histogram corresponding to the first image to obtain a self-adaptive histogram.
In some embodiments, the electronic device may determine an adaptive coefficient corresponding to the initial histogram, then determine a maximum value and a minimum value in the initial histogram, and finally perform smoothing on the initial histogram according to the adaptive coefficient, the maximum value, and the minimum value to obtain an adaptive histogram.
Specifically, please refer to the adaptive smoothing formula, and perform smoothing processing on the initial histogram through the adaptive smoothing formula to obtain the adaptive histogram. The adaptive smoothing formula is as follows:
Figure BDA0003345421120000111
S=fsmooth(p)
wherein h isw(l) For functions corresponding to adaptive histograms, hmaxIs the maximum value in the initial histogram, hminIs the minimum value in the initial histogram, h (l) isThe function corresponding to the initial histogram. And S is an adaptive coefficient.
The adaptive coefficient may be calculated by an algorithm for increasing the amount of energy (OSTU), for example, if the electronic device obtains the adaptive threshold P by the algorithm for increasing the amount of energy (OSTU), the adaptive coefficient is an S-shaped curve using the adaptive highlight preservation starting point P as an argument.
Specifically, referring to fig. 3, fig. 3 is a graph showing an S-shaped curve corresponding to the adaptive coefficient S and the adaptive threshold P according to the embodiment of the present application. Wherein SmaxIs the maximum value of the adaptive coefficient S, SminIs the minimum value of the adaptive coefficient S. The horizontal axis represents the adaptive threshold P and the vertical axis represents the adaptive coefficient S. As can be seen from fig. 3, the adaptive coefficient S gradually decreases as the value of P increases. f. ofsmooth(p) is the sigmoidal curve shown in FIG. 3.
By the method, the self-adaptive smoothing processing of the initial histogram is completed, and the self-adaptive histogram is obtained.
206. And determining a target histogram corresponding to the first image according to the adaptive histogram.
In some embodiments, the electronic device determines a target histogram corresponding to the adaptive histogram by a cumulative histogram calculation formula, wherein the target histogram is the cumulative histogram.
The cumulative histogram calculation formula is as follows:
Figure BDA0003345421120000112
wherein cdfw(l) J is a corresponding brightness value in the range of 0-l for the function corresponding to the cumulative histogram,
Figure BDA0003345421120000121
for the accumulation of luminance values in the range 0-l in the adaptive histogram, Σ hw(l) Is the accumulated value of the brightness values in the adaptive histogram in the range of 0 to L.
Wherein, the cumulative histogram represents the cumulative probability distribution of the image composition in the gray level.
207. And adding the second pixel numbers respectively corresponding to the target brightness intervals to obtain a third pixel number.
In step 203, each luminance interval has a second number of pixels corresponding to the plurality of luminance intervals. Wherein the low-luminance section and the middle-luminance section may be determined as the target luminance section. Then, the second pixel number corresponding to the low-luminance section is determined to be M1, and the second pixel number corresponding to the middle-luminance section is determined to be M2.
The second number of pixels M1 corresponding to the low-luminance section and the second number of pixels M2 corresponding to the medium-luminance section are added to obtain the third number of pixels.
208. And determining a limiting parameter corresponding to the target histogram according to the third pixel number, the first preset coefficient and the second preset coefficient.
Wherein a first preset coefficient and a second preset coefficient may be determined, the first preset coefficient and the second preset coefficient being preset. And then adding the third pixel number and the first preset coefficient to obtain a sum value, and dividing the sum value by the second preset coefficient to obtain the limiting parameter corresponding to the target histogram.
Specifically, the following constraint parameter calculation formula can be adopted for calculation:
Figure BDA0003345421120000122
where limit is a limiting parameter, fmA second number of pixels M2, f corresponding to the middle brightness intervalhThe second number of pixels M1 corresponding to the high brightness interval, α is a first predetermined coefficient, and β is a second predetermined coefficient.
209. And determining the type of the target adjusting curve corresponding to the first image according to the type of the image.
In some embodiments, the electronic device determines a target adjustment curve type corresponding to the first image according to the image type, then determines an adaptive adjustment index corresponding to the target adjustment curve type according to the target histogram and the limiting parameter, then determines a target adjustment curve according to the target adjustment curve type and the adaptive adjustment index, and finally adjusts the brightness of the first image according to the target adjustment curve to obtain the second image.
For example, each image type corresponds to an adjustment curve type, and a mapping relationship between the image type and the adjustment curve type may be established first. After the image type of the first image is determined, the target adjustment curve type can be determined according to the mapping relation.
210. And determining the self-adaptive adjustment index corresponding to the type of the target adjustment curve according to the target histogram and the limiting parameters.
For another example, the dark-scene image corresponds to a type of adjustment curve, the bright-dark-scene image corresponds to a type of adjustment curve, and the bright-scene image corresponds to a type of adjustment curve. But each adjustment curve type corresponds to an adaptive adjustment index.
Specifically, the adaptive index may be determined based on the target histogram and the limiting parameter.
Specifically, the calculation is performed by the following adaptive index calculation formula:
rw(l)=max(limit,1-cdfw(l))
wherein r isw(l) For adaptive index, limit is a limiting parameter, cdfw(l) Is the function corresponding to the target histogram. When the adaptive index is within a range of 0-1, the brightness value of the processed image pixel is increased, for example, after the first image is processed by the adaptive index, the brightness value of the obtained second image pixel is higher. When the adaptive index is in a range greater than 1, the luminance value of the processed image pixel is reduced, for example, the luminance value of the second image pixel obtained after the first image is processed by the adaptive index is lower.
211. And determining a target regulation curve according to the type of the target regulation curve and the adaptive regulation index.
In some embodiments, after the type of the target adjustment curve corresponding to the first image is determined, the adaptive index may be used as the adaptive index corresponding to the first image, so as to obtain the target adjustment curve.
For example, when the image type of the first image is a dark scene image, the target adjustment curve corresponding to the first image is:
Figure BDA0003345421120000131
for example, when the image type of the first image is a bright-dark scene image, the target adjustment curve corresponding to the first image is:
Figure BDA0003345421120000141
for example, when the image type of the first image is a bright scene image, the target adjustment curve corresponding to the first image is:
Figure BDA0003345421120000142
where l is the specific brightness value and N is the endpoint brightness value for low luminance noise suppression. Low bright noise suppression function fN(1) Effective in the range of 0 to N, the noise of the image in the first image processing is suppressed, and the noise is prevented from being enhanced, thereby increasing the image quality of the finally generated second image.
P is the endpoint of the highlight interval of the highlight brightness keeping weight function, and the highlight brightness keeping function fp(l) And the method is effective in a brightness range of P-L, wherein L is the maximum brightness value (255), so that the brightness of the highlighted area of the image is maintained in the first image processing process, and the problem of overexposure of the highlighted area after contrast enhancement is prevented.
212. And adjusting the brightness of the first image according to the target adjustment curve to obtain a second image.
And the electronic equipment adjusts the brightness value of each pixel in the first image according to the target adjustment curve so as to obtain a second image. It can be understood that the brightness value of each pixel in the first image has a mapping brightness value on the target curve, and the brightness value of each pixel in the first image is adjusted to the mapping brightness value, so that the brightness value of at least a part of pixels in the whole first image is changed, thereby obtaining the second image.
It should be noted that, for different image types, there are corresponding adjustment curve types to adjust the brightness of the pixels of the first image, so as to obtain a second image with better brightness distribution, and the second image has better image quality.
Specifically, when the image type of the first image is the dark scene image, the corresponding adjustment curve is as shown in fig. 4, and fig. 4 is an adjustment curve graph when the image type of the first image is the dark scene image.
Wherein the horizontal axis is the luminance value of the first image and the vertical axis is the luminance value of the second image. The curve X1 is a target adjustment curve corresponding to the first image, the curve X2 is a linear gray scale mapping curve, the curve X3 is a gray scale mapping curve without low luminance noise processing in the luminance range of 0 to N, and the curve X4 is a gray scale mapping curve with low luminance noise processing in the luminance range of 0 to N.
As can be seen from fig. 4, when the image type of the first image is a dark scene image, the low brightness suppression is performed on the brightness in the brightness range from 0 to N, so as to reduce the brightness of the pixels in the brightness range, thereby eliminating the low brightness noise, and for the range from N to 255, the brightness of the pixels in the brightness range can be adjusted to be bright, thereby increasing the image brightness.
When the image type of the first image is the bright-dark scene image, the corresponding adjustment curve is shown in fig. 5, and fig. 5 is an adjustment curve graph when the image type of the first image is the bright-dark scene image.
Wherein the horizontal axis is the luminance value of the first image and the vertical axis is the luminance value of the second image. The curve Y1 is a target adjustment curve corresponding to the first image, the curve Y2 is a gray scale mapping curve without low luminance noise processing in the luminance range of 0 to N, and the curve Y3 is a gray scale mapping curve with low luminance noise processing in the luminance range of 0 to N. The curve Y4 is a gray scale mapping curve without the preservation of the brightness range P-255, the curve Y5 is a gray scale mapping curve with the preservation of the brightness range P-255, and the curve Y6 is a linear gray scale mapping curve.
As can be seen from fig. 5, when the image type of the first image is a bright-dark scene image, low-luminance suppression is performed on the luminance in the luminance range of 0 to N, so that the luminance of the pixels in the luminance range is reduced, thereby eliminating low-luminance noise. And in the brightness range of P-255, the brightness of the high-brightness area of the first image is kept, so that the brightness of the high-brightness area is prevented from being lowered, and the brightness of the high-brightness area is prevented from being too dark. Therefore, the second image is obtained, the low-brightness area of the second image has no noise point, and the brightness of the high-brightness area is kept, so that the contrast of the second image is increased, and the image quality of the second image is improved.
When the image type of the first image is a bright-field image, the corresponding adjustment curve is as shown in fig. 6, and fig. 6 is an adjustment curve graph when the image type of the first image is a bright-field image.
Wherein the horizontal axis is the luminance value of the first image and the vertical axis is the luminance value of the second image. The curve Z1 is a target adjustment curve corresponding to the first image, the curve Z2 is a linear gray scale mapping curve, and the curve Z3 is a gray scale mapping curve without the highlight brightness suppression processing in the brightness range of P-255. The curve Z4 is a gray scale mapping curve with high brightness pressing processing in the brightness range of P-255.
As can be seen from fig. 6, when the image type of the first image is a bright-field image, high-brightness suppression is performed in the brightness range of P-255, so as to prevent the image from being too bright and causing overexposure, and thus the generated second image has good image quality.
As can be seen from the above, in the embodiment of the present application, the electronic device determines a plurality of reference luminance values in the first image, and determines a first number of pixels corresponding to each of the plurality of reference luminance values in the first image. Then, determining a first exposure parameter according to each reference brightness value and the number of first pixels corresponding to each reference brightness value, determining a plurality of brightness intervals in a brightness range corresponding to the first image, determining the number of second pixels corresponding to a plurality of target brightness intervals in the plurality of brightness intervals respectively, determining a second exposure parameter according to the number of second pixels corresponding to the plurality of target brightness intervals respectively, and determining the image type corresponding to the first image according to the first exposure parameter and the second exposure parameter.
The electronic equipment performs smoothing processing on the initial histogram corresponding to the first image to obtain an adaptive histogram, determines a target histogram corresponding to the first image according to the adaptive histogram, adds second pixel numbers respectively corresponding to a plurality of target brightness intervals to obtain a third pixel number, and determines a limiting parameter corresponding to the target histogram according to the third pixel number, the first preset coefficient and the second preset coefficient.
And finally, determining a target adjusting curve type corresponding to the first image according to the image type, determining an adaptive adjusting index corresponding to the target adjusting curve type according to the target histogram and the limiting parameter, determining a target adjusting curve according to the target adjusting curve type and the adaptive adjusting index, and adjusting the brightness of the first image according to the target adjusting curve to obtain a second image.
Therefore, a corresponding target adjusting curve is determined according to the actual image type of the first image, and the brightness of the pixels in different brightness value ranges of the first image is adjusted according to the target adjusting curve, so that a second image is generated and has better image quality.
Referring to fig. 7, fig. 7 is a schematic structural diagram of an image processing apparatus according to an embodiment of the present disclosure. Wherein the image processing apparatus includes:
the first obtaining module 310 is configured to obtain a first exposure parameter and a second exposure parameter corresponding to the first image.
The first obtaining module 310 is further configured to determine a plurality of reference luminance values in the first image; determining a first number of pixels corresponding to each of the plurality of reference luminance values within the first image; and determining the first exposure parameter according to each reference brightness value and the first pixel number corresponding to each reference brightness value.
The first obtaining module 310 is further configured to determine a maximum reference brightness value among the plurality of reference brightness values; and determining the first exposure parameter according to the maximum reference brightness value, each reference brightness value and the first pixel number corresponding to each reference brightness value.
The first obtaining module 310 is further configured to determine a plurality of luminance sections within a luminance range corresponding to the first image; determining second pixel numbers respectively corresponding to a plurality of target brightness intervals in the plurality of brightness intervals; and determining the second exposure parameters according to the second pixel quantity respectively corresponding to the target brightness intervals.
The determining module 320 is configured to determine an image type corresponding to the first image according to the first exposure parameter and the second exposure parameter.
The determining module 320 is further configured to determine a first weight value corresponding to the first exposure parameter and a second weight value corresponding to the second exposure coefficient; determining a third exposure parameter according to the first exposure parameter, the first weight value, the second exposure parameter and the second weight value; and determining the image type corresponding to the first image according to the third exposure coefficient.
The determining module 320 is further configured to determine a target parameter range to which the third exposure parameter belongs within a preset parameter range; and determining the image type corresponding to the first picture according to the target parameter range.
The second obtaining module 330 is configured to obtain a target histogram corresponding to the first image and a limiting parameter corresponding to the target histogram.
The second obtaining module 330 is further configured to perform smoothing processing on the initial histogram corresponding to the first image to obtain a self-adaptive histogram; and determining a target histogram corresponding to the first image according to the self-adaptive histogram.
The second obtaining module 330 is further configured to determine an adaptive coefficient corresponding to the initial histogram; determining a maximum value and a minimum value in the initial histogram; and smoothing the initial histogram according to the adaptive coefficient, the maximum value and the minimum value to obtain the adaptive histogram.
A generating module 340, configured to perform brightness adjustment on the first image according to the image type, the target histogram, and the limiting parameter, so as to obtain a second image.
The generating module 340 is further configured to determine a type of a target adjustment curve corresponding to the first image according to the type of the image; determining an adaptive adjustment index corresponding to the type of the target adjustment curve according to the target histogram and the limiting parameter; determining a target regulation curve according to the type of the target regulation curve and the adaptive regulation index; and adjusting the brightness of the first image according to the target adjustment curve to obtain the second image.
In the embodiment of the application, the electronic equipment acquires a first exposure parameter and a second exposure parameter corresponding to a first image; then determining the image type corresponding to the first image according to the first exposure parameter and the second exposure parameter; then acquiring a target histogram corresponding to the first image and a limiting parameter corresponding to the target histogram; and adjusting the brightness of the first image according to the image type, the target histogram and the limiting parameter to obtain a second image. In the embodiment of the application, the image type of the first image is determined, and the first image is adjusted in a targeted manner according to the image type of the first image, so that different areas of the first image have more appropriate image brightness, and a second image with higher image quality is obtained.
Accordingly, embodiments of the present application also provide an electronic device, as shown in fig. 8, which may include an input unit 401, a display unit 402, a memory 403 including one or more computer-readable storage media, a sensor 405, a processor 404 including one or more processing cores, and a power supply 406. Those skilled in the art will appreciate that the electronic device configuration shown in fig. 8 does not constitute a limitation of the electronic device and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components. Wherein:
the input unit 401 may be used to receive input numeric or character information and generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function control. Specifically, in one particular embodiment, input unit 401 may include a touch-sensitive surface as well as other input devices. The touch-sensitive surface, also referred to as a touch display screen or a touch pad, may collect touch operations by a user (e.g., operations by a user on or near the touch-sensitive surface using a finger, a stylus, or any other suitable object or attachment) thereon or nearby, and drive the corresponding connection device according to a predetermined program. Alternatively, the touch sensitive surface may comprise two parts, a touch detection means and a touch controller. The touch detection device detects the touch direction of a user, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives touch information from the touch sensing device, converts the touch information into touch point coordinates, sends the touch point coordinates to the processor 404, and can receive and execute commands sent by the processor 404. In addition, touch sensitive surfaces may be implemented using various types of resistive, capacitive, infrared, and surface acoustic waves. The input unit 401 may include other input devices in addition to the touch-sensitive surface. In particular, other input devices may include, but are not limited to, one or more of a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, a joystick, and the like.
The display unit 402 may be used to display information input by or provided to a user and various graphical user interfaces of the electronic device, which may be made up of graphics, text, icons, video, and any combination thereof. The Display unit 402 may include a Display panel, and optionally, the Display panel may be configured in the form of a Liquid Crystal Display (LCD), an Organic Light-Emitting Diode (OLED), or the like. Further, the touch-sensitive surface may overlay the display panel, and when a touch operation is detected on or near the touch-sensitive surface, the touch operation is transmitted to the processor 404 to determine the type of touch event, and then the processor 404 provides a corresponding visual output on the display panel according to the type of touch event. Although in FIG. 8 the touch sensitive surface and the display panel are two separate components to implement input and output functions, in some embodiments the touch sensitive surface may be integrated with the display panel to implement input and output functions.
The memory 403 may be used for storing software programs and modules, and the processor 404 executes various functional applications and data processing by operating the software programs and modules stored in the memory 403. The memory 403 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application program required by at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data (such as audio data, a phonebook, etc.) created according to the use of the electronic device, and the like. Further, the memory 403 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device. Accordingly, the memory 403 may also include a memory controller to provide the processor 404 and the input unit 401 access to the memory 403.
The electronic device may also include at least one sensor 405, such as a light sensor, motion sensor, and other sensors. In particular, the light sensor may include an ambient light sensor that may adjust the brightness of the display panel according to the brightness of ambient light, and a proximity sensor that may turn off the display panel and/or the backlight when the electronic device is moved to the ear. As one of the motion sensors, the gravity acceleration sensor can detect the magnitude of acceleration in each direction (generally, three axes), detect the magnitude and direction of gravity when the motion sensor is stationary, and can be used for applications (such as horizontal and vertical screen switching, related games, magnetometer attitude calibration) for recognizing the attitude of an electronic device, vibration recognition related functions (such as pedometer and tapping), and the like; as for other sensors such as a gyroscope, a barometer, a hygrometer, a thermometer, and an infrared sensor, which may be further configured to the electronic device, detailed descriptions thereof are omitted.
The processor 404 is a control center of the electronic device, connects various parts of the whole electronic device by various interfaces and lines, performs various functions of the electronic device and processes data by running or executing software programs and/or modules stored in the memory 403 and calling data stored in the memory 403, thereby performing overall monitoring of the electronic device. Optionally, processor 404 may include one or more processing cores; preferably, the processor 404 may integrate an application processor, which mainly handles operating systems, user interfaces, application programs, etc., and a modem processor, which mainly handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into processor 404.
The electronic device also includes a power supply 406 (e.g., a battery) for powering the various components, which may preferably be logically coupled to the processor 404 via a power management system to manage charging, discharging, and power consumption management functions via the power management system. The power supply 406 may also include any component of one or more dc or ac power sources, recharging systems, power failure detection circuitry, power converters or inverters, power status indicators, and the like.
Although not shown, the electronic device may further include a camera, a bluetooth module, and the like, which are not described in detail herein. Specifically, in this embodiment, the processor 404 in the electronic device loads the executable file corresponding to the process of one or more application programs into the memory 403 according to the following instructions, and the processor 404 runs the application programs stored in the memory 403, so as to implement various functions:
acquiring a first exposure parameter and a second exposure parameter corresponding to the first image;
determining an image type corresponding to the first image according to the first exposure parameter and the second exposure parameter;
acquiring a target histogram corresponding to the first image and a limiting parameter corresponding to the target histogram;
and adjusting the brightness of the first image according to the image type, the target histogram and the limiting parameter to obtain a second image.
It will be understood by those skilled in the art that all or part of the steps of the methods of the above embodiments may be performed by instructions or by associated hardware controlled by the instructions, which may be stored in a computer readable storage medium and loaded and executed by a processor.
To this end, the present application provides a computer-readable storage medium, in which a plurality of instructions are stored, and the instructions can be loaded by a processor to execute the steps in any one of the image processing methods provided by the embodiments of the present application. For example, the instructions may perform the steps of:
acquiring a first exposure parameter and a second exposure parameter corresponding to the first image;
determining an image type corresponding to the first image according to the first exposure parameter and the second exposure parameter;
acquiring a target histogram corresponding to the first image and a limiting parameter corresponding to the target histogram;
and adjusting the brightness of the first image according to the image type, the target histogram and the limiting parameter to obtain a second image.
The above operations can be implemented in the foregoing embodiments, and are not described in detail herein.
Wherein the computer-readable storage medium may include: read Only Memory (ROM), Random Access Memory (RAM), magnetic or optical disks, and the like.
Since the instructions stored in the storage medium can execute the steps in any image processing method provided in the embodiments of the present application, beneficial effects that can be achieved by any image processing method provided in the embodiments of the present application can be achieved, which are detailed in the foregoing embodiments and will not be described herein again.
The foregoing detailed description has provided an image processing method, an image processing apparatus, an electronic device, and a storage medium according to embodiments of the present application, and specific examples have been applied in the present application to explain the principles and implementations of the present application, and the descriptions of the foregoing embodiments are only used to help understand the method and the core ideas of the present application; meanwhile, for those skilled in the art, according to the idea of the present application, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present application.

Claims (18)

1. An image processing method, comprising:
acquiring a first exposure parameter and a second exposure parameter corresponding to the first image;
determining an image type corresponding to the first image according to the first exposure parameter and the second exposure parameter;
acquiring a target histogram corresponding to the first image and a limiting parameter corresponding to the target histogram;
and adjusting the brightness of the first image according to the image type, the target histogram and the limiting parameter to obtain a second image.
2. The method according to claim 1, wherein the acquiring a first exposure parameter corresponding to the first image comprises:
determining a plurality of reference luminance values in the first image;
determining a first number of pixels corresponding to each of the plurality of reference luminance values within the first image;
and determining the first exposure parameter according to each reference brightness value and the first pixel number corresponding to each reference brightness value.
3. The method according to claim 2, wherein said determining the first exposure parameter according to each reference luminance value and the corresponding first number of pixels of each reference luminance value comprises:
determining a maximum reference brightness value among the plurality of reference brightness values;
and determining the first exposure parameter according to the maximum reference brightness value, each reference brightness value and the first pixel number corresponding to each reference brightness value.
4. The method according to claim 1, wherein the acquiring a second exposure parameter corresponding to the first image comprises:
determining a plurality of brightness intervals in a brightness range corresponding to the first image;
determining second pixel numbers respectively corresponding to a plurality of target brightness intervals in the plurality of brightness intervals;
and determining the second exposure parameters according to the second pixel quantity respectively corresponding to the target brightness intervals.
5. The method according to claim 4, wherein the determining a plurality of luminance sections within a luminance range corresponding to the first image comprises:
determining a first exposure threshold and a second exposure threshold corresponding to the first image;
and determining the plurality of brightness intervals in the brightness range corresponding to the first image according to the first exposure threshold and the second exposure threshold.
6. The image processing method according to claim 4, wherein the obtaining of the limiting parameter corresponding to the target histogram includes:
adding the second pixel numbers respectively corresponding to the target brightness intervals to obtain a third pixel number;
and determining a limiting parameter corresponding to the target histogram according to the third pixel number, the first preset coefficient and the second preset coefficient.
7. The image processing method according to claim 6, wherein the determining the limiting parameter corresponding to the target histogram according to the third number of pixels, the first preset coefficient and the second preset coefficient includes:
adding the third pixel number and the first preset coefficient to obtain a first result;
and dividing the first result by the second preset coefficient to obtain the limiting parameter.
8. The method according to claim 1, wherein the determining the image type corresponding to the first image according to the first exposure parameter and the second exposure parameter comprises:
determining a first weight value corresponding to the first exposure parameter and a second weight value corresponding to the second exposure coefficient;
determining a third exposure parameter according to the first exposure parameter, the first weight value, the second exposure parameter and the second weight value;
and determining the image type corresponding to the first image according to the third exposure coefficient.
9. The method according to claim 8, wherein the determining the image type corresponding to the first image according to the third exposure parameter comprises:
determining a target parameter range to which the third exposure parameter belongs within a preset parameter range;
and determining the image type corresponding to the first picture according to the target parameter range.
10. The image processing method according to claim 1, wherein the obtaining of the target histogram corresponding to the first image includes:
carrying out smoothing processing on the initial histogram corresponding to the first image to obtain a self-adaptive histogram;
and determining a target histogram corresponding to the first image according to the self-adaptive histogram.
11. The method according to claim 10, wherein the smoothing of the initial histogram corresponding to the first image to obtain an adaptive histogram comprises:
determining an adaptive coefficient corresponding to the initial histogram;
determining a maximum value and a minimum value in the initial histogram;
and smoothing the initial histogram according to the adaptive coefficient, the maximum value and the minimum value to obtain the adaptive histogram.
12. The method of claim 1, wherein the adjusting the brightness of the first image according to the image type, the target histogram and the limiting parameter to obtain a second image comprises:
determining a target adjusting curve type corresponding to the first image according to the image type;
determining an adaptive adjustment index corresponding to the type of the target adjustment curve according to the target histogram and the limiting parameter;
determining a target regulation curve according to the type of the target regulation curve and the adaptive regulation index;
and adjusting the brightness of the first image according to the target adjustment curve to obtain the second image.
13. The method according to claim 12, wherein the adjusting the brightness of the first image according to the target adjustment curve to obtain the second image comprises:
determining a mapping brightness value corresponding to each pixel in the first image according to the target adjusting curve;
and generating the second image according to the mapping brightness value corresponding to each pixel and the tone and the saturation corresponding to each pixel.
14. The method of claim 12, wherein after the adjusting the brightness of the first image according to the target adjustment curve to obtain the second image, the method further comprises:
and converting the color space of the second image into an RGB color space to obtain a target output image.
15. The image processing method according to any one of claims 1 to 14, wherein before said acquiring the first exposure parameter and the second exposure parameter corresponding to the first image, the method further comprises:
obtaining an initial image, and converting the color space of the initial image into an HSV color space to obtain the first image.
16. An image processing apparatus characterized by comprising:
the first acquisition module is used for acquiring a first exposure parameter and a second exposure parameter corresponding to the first image;
the determining module is used for determining the image type corresponding to the first image according to the first exposure parameter and the second exposure parameter;
the second acquisition module is used for acquiring a target histogram corresponding to the first image and a limiting parameter corresponding to the target histogram;
and the generating module is used for adjusting the brightness of the first image according to the image type, the target histogram and the limiting parameter so as to obtain a second image.
17. An electronic device, comprising:
a memory storing executable program code, a processor coupled with the memory;
the processor calls the executable program code stored in the memory to perform the steps in the image processing method according to any one of claims 1 to 15.
18. A computer-readable storage medium storing a plurality of instructions adapted to be loaded by a processor to perform the steps of the image processing method according to any one of claims 1 to 15.
CN202111320515.6A 2021-11-09 2021-11-09 Image processing method, image processing device, electronic equipment and storage medium Pending CN114119432A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202111320515.6A CN114119432A (en) 2021-11-09 2021-11-09 Image processing method, image processing device, electronic equipment and storage medium
PCT/CN2022/120691 WO2023082861A1 (en) 2021-11-09 2022-09-23 Image processing method, image processor, electronic device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111320515.6A CN114119432A (en) 2021-11-09 2021-11-09 Image processing method, image processing device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN114119432A true CN114119432A (en) 2022-03-01

Family

ID=80377794

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111320515.6A Pending CN114119432A (en) 2021-11-09 2021-11-09 Image processing method, image processing device, electronic equipment and storage medium

Country Status (2)

Country Link
CN (1) CN114119432A (en)
WO (1) WO2023082861A1 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115100083A (en) * 2022-08-25 2022-09-23 江苏游隼微电子有限公司 Image brightness self-adaptive adjusting method for vehicle-mounted image
CN115941917A (en) * 2022-12-26 2023-04-07 爱芯元智半导体(上海)有限公司 Curve adjusting method and device and electronic equipment
WO2023082861A1 (en) * 2021-11-09 2023-05-19 深圳Tcl数字技术有限公司 Image processing method, image processor, electronic device and storage medium

Citations (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1874450A (en) * 2005-04-25 2006-12-06 三星电子株式会社 Method and apparatus for adjusting brightness of image
CN101170708A (en) * 2006-10-25 2008-04-30 三星电子株式会社 Display device and method for improving image flashing
CN103680371A (en) * 2013-12-18 2014-03-26 友达光电股份有限公司 Device and method for adjusting displaying feature of display
CN104299204A (en) * 2013-07-17 2015-01-21 王垒 Histogram local image contrast enhancing method and histogram local image contrast enhancing device
CN104301624A (en) * 2014-10-30 2015-01-21 青岛海信移动通信技术股份有限公司 Image shooting brightness control method and device
CN104517272A (en) * 2014-12-31 2015-04-15 深圳市天视通电子科技有限公司 Image enhancing method and device
CN104580925A (en) * 2014-12-31 2015-04-29 安科智慧城市技术(中国)有限公司 Image brightness controlling method, device and camera
US20170206848A1 (en) * 2016-01-19 2017-07-20 Samsung Display Co., Ltd Transparent liquid crystal display apparatus and method of driving the same
CN107403422A (en) * 2017-08-04 2017-11-28 上海兆芯集成电路有限公司 To strengthen the method for picture contrast and its system
CN107610669A (en) * 2017-10-30 2018-01-19 青岛海信电器股份有限公司 Image gray-scale level luminance compensation method and device
CN108924525A (en) * 2018-06-06 2018-11-30 平安科技(深圳)有限公司 Brightness of image method of adjustment, device, computer equipment and storage medium
CN109982012A (en) * 2017-12-28 2019-07-05 展讯通信(上海)有限公司 Image processing method and device, storage medium, terminal
CN112153240A (en) * 2019-06-27 2020-12-29 深圳Tcl数字技术有限公司 Method and device for adjusting image quality and readable storage medium
CN112788251A (en) * 2019-11-07 2021-05-11 中兴通讯股份有限公司 Image brightness processing method and device, and image processing method and device
CN112911166A (en) * 2020-07-03 2021-06-04 珠海市杰理科技股份有限公司 Method, device, chip, medium and camera equipment for adjusting image brightness
CN112950499A (en) * 2021-02-24 2021-06-11 Oppo广东移动通信有限公司 Image processing method, image processing device, electronic equipment and storage medium

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060098973A1 (en) * 2004-11-08 2006-05-11 Patrick Verdier Universal exposure meter method for film and digital cameras
CN110445986B (en) * 2019-07-30 2021-03-23 Oppo广东移动通信有限公司 Image processing method, image processing device, storage medium and electronic equipment
CN111741227B (en) * 2020-06-24 2021-06-15 浙江大华技术股份有限公司 Exposure parameter adjusting method and device
CN114119432A (en) * 2021-11-09 2022-03-01 深圳Tcl数字技术有限公司 Image processing method, image processing device, electronic equipment and storage medium

Patent Citations (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1874450A (en) * 2005-04-25 2006-12-06 三星电子株式会社 Method and apparatus for adjusting brightness of image
CN101170708A (en) * 2006-10-25 2008-04-30 三星电子株式会社 Display device and method for improving image flashing
CN104299204A (en) * 2013-07-17 2015-01-21 王垒 Histogram local image contrast enhancing method and histogram local image contrast enhancing device
CN103680371A (en) * 2013-12-18 2014-03-26 友达光电股份有限公司 Device and method for adjusting displaying feature of display
CN104301624A (en) * 2014-10-30 2015-01-21 青岛海信移动通信技术股份有限公司 Image shooting brightness control method and device
CN104517272A (en) * 2014-12-31 2015-04-15 深圳市天视通电子科技有限公司 Image enhancing method and device
CN104580925A (en) * 2014-12-31 2015-04-29 安科智慧城市技术(中国)有限公司 Image brightness controlling method, device and camera
US20170206848A1 (en) * 2016-01-19 2017-07-20 Samsung Display Co., Ltd Transparent liquid crystal display apparatus and method of driving the same
CN107403422A (en) * 2017-08-04 2017-11-28 上海兆芯集成电路有限公司 To strengthen the method for picture contrast and its system
CN107610669A (en) * 2017-10-30 2018-01-19 青岛海信电器股份有限公司 Image gray-scale level luminance compensation method and device
CN109982012A (en) * 2017-12-28 2019-07-05 展讯通信(上海)有限公司 Image processing method and device, storage medium, terminal
CN108924525A (en) * 2018-06-06 2018-11-30 平安科技(深圳)有限公司 Brightness of image method of adjustment, device, computer equipment and storage medium
CN112153240A (en) * 2019-06-27 2020-12-29 深圳Tcl数字技术有限公司 Method and device for adjusting image quality and readable storage medium
CN112788251A (en) * 2019-11-07 2021-05-11 中兴通讯股份有限公司 Image brightness processing method and device, and image processing method and device
CN112911166A (en) * 2020-07-03 2021-06-04 珠海市杰理科技股份有限公司 Method, device, chip, medium and camera equipment for adjusting image brightness
CN112950499A (en) * 2021-02-24 2021-06-11 Oppo广东移动通信有限公司 Image processing method, image processing device, electronic equipment and storage medium

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2023082861A1 (en) * 2021-11-09 2023-05-19 深圳Tcl数字技术有限公司 Image processing method, image processor, electronic device and storage medium
CN115100083A (en) * 2022-08-25 2022-09-23 江苏游隼微电子有限公司 Image brightness self-adaptive adjusting method for vehicle-mounted image
CN115100083B (en) * 2022-08-25 2022-11-04 江苏游隼微电子有限公司 Image brightness self-adaptive adjusting method for vehicle-mounted image
CN115941917A (en) * 2022-12-26 2023-04-07 爱芯元智半导体(上海)有限公司 Curve adjusting method and device and electronic equipment
CN115941917B (en) * 2022-12-26 2024-04-05 爱芯元智半导体(上海)有限公司 Curve adjustment method and device and electronic equipment

Also Published As

Publication number Publication date
WO2023082861A1 (en) 2023-05-19

Similar Documents

Publication Publication Date Title
CN114119432A (en) Image processing method, image processing device, electronic equipment and storage medium
US20110069089A1 (en) Power management for organic light-emitting diode (oled) displays
CN114119431A (en) Image processing method, image processing device, electronic equipment and storage medium
WO2016033099A1 (en) Environmentally adaptive display adjustment
CN114203119B (en) Display control method, display control device, electronic equipment and storage medium
CN110009587B (en) Image processing method, image processing device, storage medium and electronic equipment
CN107330859B (en) Image processing method and device, storage medium and terminal
CN112071267B (en) Brightness adjusting method, brightness adjusting device, terminal equipment and storage medium
CN112950499B (en) Image processing method, device, electronic equipment and storage medium
CN109104578B (en) Image processing method and mobile terminal
CN113018856A (en) Image processing method, image processing device, electronic equipment and storage medium
CN109729280B (en) Image processing method and mobile terminal
CN112199065A (en) Method and device for determining local display area compensation value, storage medium and terminal equipment
CN114764821B (en) Moving object detection method, moving object detection device, electronic equipment and storage medium
CN111145151A (en) Motion area determination method and electronic equipment
CN114038370B (en) Display parameter adjustment method and device, storage medium and display equipment
CN116797631A (en) Differential area positioning method, differential area positioning device, computer equipment and storage medium
CN113890992A (en) Image processing method, image processing device, electronic equipment and storage medium
CN114242021A (en) Display control method, display control device, electronic equipment and storage medium
CN114143448B (en) Shooting method, shooting device, electronic equipment and readable storage medium
CN114220399B (en) Backlight value control method and device, storage medium and electronic equipment
CN111147753B (en) Method, electronic device and medium for processing photos
CN117036206B (en) Method for determining image jagged degree and related electronic equipment
CN116978321A (en) Image display method, device, electronic equipment and storage medium
CN117409751A (en) Display brightness control method and device, electronic equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination