CN113038109B - Image overexposure correction method and circuit system - Google Patents

Image overexposure correction method and circuit system Download PDF

Info

Publication number
CN113038109B
CN113038109B CN201911361071.3A CN201911361071A CN113038109B CN 113038109 B CN113038109 B CN 113038109B CN 201911361071 A CN201911361071 A CN 201911361071A CN 113038109 B CN113038109 B CN 113038109B
Authority
CN
China
Prior art keywords
channel
channel value
value
overexposure
image
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.)
Active
Application number
CN201911361071.3A
Other languages
Chinese (zh)
Other versions
CN113038109A (en
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.)
Realtek Semiconductor Corp
Original Assignee
Realtek Semiconductor Corp
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 Realtek Semiconductor Corp filed Critical Realtek Semiconductor Corp
Priority to CN201911361071.3A priority Critical patent/CN113038109B/en
Publication of CN113038109A publication Critical patent/CN113038109A/en
Application granted granted Critical
Publication of CN113038109B publication Critical patent/CN113038109B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N9/00Details of colour television systems
    • H04N9/64Circuits for processing colour signals
    • H04N9/73Colour balance circuits, e.g. white balance circuits or colour temperature control
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/80Camera processing pipelines; Components thereof
    • H04N23/84Camera processing pipelines; Components thereof for processing colour signals
    • H04N23/88Camera processing pipelines; Components thereof for processing colour signals for colour balance, e.g. white-balance circuits or colour temperature control

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Image Processing (AREA)
  • Color Television Image Signal Generators (AREA)

Abstract

An image overexposure correction method and a circuit system are disclosed, wherein the circuit system mainly comprises an image processor, and after receiving image information, the image overexposure correction method is executed on an overexposure area in an input image.

Description

Image overexposure correction method and circuit system
Technical Field
The present invention relates to a technique of image overexposure processing, and more particularly, to a method for correcting image overexposure and a circuit system using the same, in which overexposure areas in an image are processed, weight assignment of each channel is performed to avoid color shift, and detailed information is retained without processing non-overexposure areas.
Background
According to the conventional image processing technology, gain adjustment is performed in an image processing flow (Pipeline), and after the gain adjustment, a clipping (Clip) process is performed on a portion of an image that is overexposed (Overexposure) to subtract a luminance value that exceeds a certain threshold, but the clipping method may cause information to be visible on an image that passes through a Color Filter Array (CFA) in an area close to the Overexposure, and thus details are lost in the processing method, and technologies such as Tone Mapping (Tone Mapping) and High Dynamic Range imaging (HDR) are developed.
The high dynamic range imaging technique is to shoot a plurality of images with different exposure settings simultaneously during shooting and then synthesize the images into one image, which can solve the problems of high contrast and uneven exposure, however, the high dynamic range imaging requires a special sensor, i.e. the required cost is high and the processing time of each image is long.
In an image processor (ISP) design, there are many gain-multiplying modules for the obtained image, for example, the image processing module shown in fig. 1 includes a Lens Shading Correction (LSC) module 101 and an Auto White Balance (AWB) module 103. The optical characteristics of the lens of the related device may cause the light received by the central portion of the image sensor to be stronger than the light received by the peripheral portion, which causes the brightness inconsistency between the center and the peripheral portion of the image, and the lens shading correction module 101 can solve the problem that the lens has shading around the lens due to the uneven refraction of the lens on the light; the automatic white balance module 103 can automatically determine appropriate white balance parameters according to the received light attributes. The Precision (Precision) to be preserved is expanded after the gain adjustment of each module, the Precision can be expressed by the depth (bits) of each pixel in the image, and finally the brightness is redistributed to be reduced to the original Precision under the processing of a Tone Mapping (Tone Mapping) module 105. However, in the tone mapping process, if there is no special processing method for an overexposed area in an image, there is a possibility that the Color development phenomenon (Color development) of the overexposed area is reduced to the original accuracy.
Taking the image processed by lens shading correction, automatic white balance and tone mapping as an example, the dynamic range difference of different areas is easily caused because the lens shading correction gives different gains according to the distance from the center of the image. For example, in the process of lens shading correction, the part of an input image close to the center will use smaller gain compensation, and the part far from the center will use larger gain compensation.
If the automatic white balance is performed by taking Green (Green) pixels as the main white balance target, and increasing the gains of Red (Red) and Blue (Blue) causes the proportion of Red (R), green (G) and Blue (B) in the overexposed area to change from the original R: G: B = 1: 1 to Green (G) value, and the Red (R) and Blue (B) values become larger. In other words, after the lens shading correction and the auto white balance, when the color tone mapping process converges to the normal precision, the maximum value at the most peripheral corner of the overexposed region is regarded as the Dynamic Range (Dynamic Range), and the overexposed region near the center is multiplied by the auto white balance gain to maintain the color ratio for color tone mapping, but the red, green and blue ratios of the overexposed region will cause the final result of the overexposed region to generate color cast.
Disclosure of Invention
The invention discloses an image overexposure correction method and a circuit system, wherein the method is applied to an image processing program in the circuit system, and one of the main purposes is to correct pixel values in an overexposure area and avoid color cast caused by lens shadow correction and automatic white balance in the image processing process.
In the method for correcting the image overexposure, an overexposure area of an input image is judged first, respective weight is given to each pixel according to a channel value of each pixel of the overexposure area, wherein a channel value of a current pixel is a first channel value in a color space, peripheral pixels of the current pixel have a second channel value and a third channel value, automatic white balance is performed on the channel value of each pixel in the overexposure area according to expectation that the image saturation of the overexposure area is low, and automatic white balance is performed on the current pixel according to a channel value ratio of the first channel value, the second channel value and the third channel value automatically according to the light attribute of the image.
And then, estimating a second channel value and a third channel value of the current pixel by using the second channel value and the third channel value of peripheral pixels of the current pixel one by one for the pixels in the overexposure area, and calculating a correction value of the first channel value of the current pixel according to the individual weight of each pixel in the overexposure area and the requirement that the variation between the channel values of the pixels in the overexposure area is minimum.
Preferably, the overexposure area is determined by comparing a luminance threshold with each channel value, and pixels with channel values exceeding the luminance threshold are overexposed, or by determining the overexposure area from low-frequency signals in the image.
Preferably, the weight of the first channel value, the second channel value and the third channel value of each pixel is determined as a weight interval according to an upper limit and a lower limit for each channel value, and then the weight interval is calculated by an interpolation method, wherein when the channel value of the pixel does not exceed the lower limit, the pixel is listed as a non-overexposed pixel, and in the method, the pixel belongs to an area without performing image overexposure correction, and thus the image information of the area can be reserved.
According to an embodiment of the circuit system, an image processor is provided for receiving an input image via an input interface and outputting a modified image via an output interface, and a memory is provided for storing image information and processing parameters during processing. The image processor can execute the image overexposure correction method on the overexposed area in the input image.
Preferably, the image processor is provided with a lens shading correction module, an automatic white balance module and a circuit or software module for maintaining image precision, wherein the lens shading correction module and the automatic white balance module are realized by circuits or software.
For a better understanding of the features and technical content of the present invention, reference should be made to the following detailed description and accompanying drawings, which are provided for purposes of illustration and description only and are not intended to limit the invention.
Drawings
FIG. 1 is a schematic diagram of a conventional image processing module;
FIG. 2 is a schematic diagram of an embodiment of circuitry for performing a method for correcting overexposure;
FIG. 3 is a flowchart of an embodiment of a method for correcting overexposure;
FIGS. 4A-4C illustrate an embodiment of a graph showing the assignment of weight values for each color channel;
FIG. 5 is a graph showing the calculation of the probability of overexposure and the weighted average.
Detailed Description
The following is a description of embodiments of the present invention with reference to specific embodiments, and those skilled in the art will understand the advantages and effects of the present invention from the disclosure of the present specification. The invention is capable of other and different embodiments and its several details are capable of modifications and various changes in detail without departing from the spirit and scope of the present invention. The drawings of the present invention are for illustrative purposes only and are not intended to be drawn to scale. The following embodiments will further explain the related art of the present invention in detail, but the disclosure is not intended to limit the scope of the present invention.
It will be understood that, although the terms "first," "second," "third," etc. may be used herein to describe various components or signals, these components or signals should not be limited by these terms. These terms are used primarily to distinguish one element from another element or from one signal to another signal. In addition, the term "or" as used herein should be taken to include any one or combination of more of the associated listed items as the case may be.
In image processing technology, an electronic device or computer system performing image processing may employ a firmware program running in an image processor (ISP) or execute a specific software program. There are many problems in image processing technology, and regarding the processing of overexposure problem affecting image quality, an overexposure area in an image, that is, an area formed by pixels whose luminance values exceed a luminance threshold value, can be determined by a luminance threshold value.
However, in general, the image processor or software operates by adopting some initial processing procedures, so that the real values of the channels (channels) in the image, such as the red channel (R), the green channel (G) and the blue channel (B), are hidden. For example, the initial process may perform a Clip process on the overexposed portion of the image, i.e. the luminance value exceeding a certain threshold is subtracted, but the conventional Clip process is to subtract the value exceeding a pixel value (e.g. 4095, 12 bits) through a gain, which may solve the overexposure problem but loses dynamic range.
It can be seen that the true value should be larger than the known value (clipped to be smaller), and although the true value cannot be obtained, a reasonable estimation value can still be given by using the subjective expectation that the color saturation of the overexposed pixel is lower by the human eye, and based on that the true value is not smaller than the current value, so that the variation between channels (e.g. three values of RGB) can be made smaller by modifying the current value of the overexposed channel (e.g. multiplying by the gain value), and the saturation of the overexposed region can be made to fall better to meet the subjective expectation. Conversely, channels in the image that are not overexposed (e.g., pixels less than the brightness threshold) are not processed, but are retained as reliable information.
Thus, according to the embodiments of the method and the circuit system for correcting overexposure of an image provided by the present invention, based on the above understanding of the overexposed and the non-overexposed areas, the method for correcting overexposed areas of an image firstly finds the area that is overexposed before the channel of overexposure is corrected (multiplied by the gain value), and needs to perform the saturation reduction process on the specific area after the gain is performed.
Still taking the schematic diagram of the image processing display shown in fig. 1 as an example, the embodiment applying the image processing architecture can refer to the circuit system 20 shown in fig. 2, wherein an image processor 201, which can be an Integrated Circuit (IC) or a related circuit for processing an image signal, generally referred to as an Image Signal Processor (ISP), receives an input image from an image source 21 through an input interface 202. The image processor 201 is provided with a Lens Shading Correction (LSC) circuit or software module, an Automatic White Balance (AWB) circuit or software module, and a circuit or software module for maintaining image accuracy as shown in fig. 1.
According to one embodiment, when receiving an input image, the image processor 201 performs an appropriate image processing procedure according to the received image signal using corresponding processing parameters, such as: image sharpening, noise reduction (noise reduction), color space conversion (color space transformation), etc., and includes lens shading correction, automatic white balance, and precision processing performed by processing an overexposed region, the precision being used to represent a dynamic range of an image. The memory 205 of the circuit system 20 is used for storing the image information during processing and the processing parameters required by various image processing programs. Then, the image 22 is outputted via the output interface 203, and the image 22 is the image corrected by the proposed overexposure correction method.
Only the pixels of the overexposed area (judged by a specific threshold value) are processed based on the proposed overexposure correction method, and the non-overexposed area is not processed, so that more reliable image information can be kept. For example, if an image (e.g., 12-bit map, pixel values 0-4095) has an overexposure phenomenon, wherein each color channel value near the central portion can be represented by, for example, "4088, 4080, 4088, 4080.", and the overexposure value far from the central portion such as "4088, 4080, 4088, 4080.", the color channel values of different regions are multiplied by different gain values through lens shading correction, the overexposure value near the central portion (with smaller compensation) may be "4583, 4551, 4526, 4567, 4551, 4526.", and the overexposure value far from the central portion (with larger compensation) may be "6291, 6247, 7124, 6211, 6227, 7060.". Then, automatic white balance is performed, each color channel value is multiplied by a different gain value (R gain, G gain, B gain, if G, G gain = 1), for example, so that the color channel value near the central portion of the image becomes "4874, 4551, 7354, 6850, 4542, 7354", and the pixel far from the central portion becomes "9388, 6247, 11576, 9364, 6227, 11550". Then, the precision is processed by tone mapping, so that the gained image can be pressed back (compression) to approach the original precision, for example, find the maximum value in the image, such as 12-bit 4095, and the other is adjusted according to a specific ratio, as shown in this example, the color channel value near the center of the image is tone mapped and demosaiced to restore the image to "4095, 3024, 4095, 3027, and 4095" (this example shows the color cast near the center), and the value far from the center is "4095, 4038, 4095, 4034, and 4095").
The image processor 201 performs an image overexposure correction method on the overexposed region in the image, and determines whether the overexposed region is determined by taking the current pixel value, the low frequency signal, etc., but the scope of the invention should not be limited.
According to the image overexposure correction method, the main concept is to set an overexposure area in an image by using a threshold value before a conventional lens shading correction processing procedure, and to give relatively small weight to pixels of the overexposure area, for example, in the manner of fig. 4A to 4C.
According to the embodiment shown in fig. 3, at the beginning of the image overexposure correction process, in step S301, before the lens shading correction is performed on the image signal, it is determined pixel by pixel whether each pixel in the input image is an overexposed region, at least one overexposed region is obtained, for example, a brightness threshold is used to compare each pixel value, the pixel whose pixel value exceeds the brightness threshold is overexposed, and the overexposed threshold can be set according to actual requirements, so that the overexposed region is only the overexposed region defined according to requirements. In this way, at least one overexposed region in the image may be derived. In addition, the low-frequency signal in the image can be used as the basis for judging the overexposure, that is, the low-frequency signal in the image is a part with more details and can be used as the basis for judging the overexposure area.
For the processing of the pixels in the overexposed area, for each pixel being processed, the current pixel may be referred to, the pixel value of one of the overexposed areas in the processing of the current pixel is set as the first channel value (one of red, green and blue) in a color space (e.g., red, green and blue color space), and the peripheral pixels of the current pixel include another two channels, which are provided with the second channel value and the third channel value except the first channel, and the second channel value of the peripheral pixels can be used to estimate (restore) the other two channel values of the current pixel.
In step S303, each pixel can be given an individual weight according to the pixel value of each pixel in the overexposed region, taking red, green and blue color space as an example, the pixel value of each color channel (red channel, green channel and blue channel) is given a corresponding weight with a weight value of 0 to 1, and the weight of each color channel value of each pixel value is obtained by interpolation, one of the purposes of this step is to retain the information of the overexposed region and provide for subsequent saturation reduction, which can be referred to fig. 4A to 4C.
For example, according to the received input image, it is determined pixel by pixel whether it is an overexposure region, the pixel value of the current pixel is first obtained, if it is higher than the brightness threshold, it is determined that it is overexposure, i.e. a high weight is given, indicating that the pixel is overexposure; if the pixel value is lower than the brightness threshold value, it is judged as non-overexposure, and finally, the original color information of the pixel is required to be preserved. An embodiment of the weight assignment for each pixel can be seen in fig. 4A to 4C, which show graphs of the weight value assignment for each color channel, wherein the processing parameters are stored in the memory of the proposed circuitry.
Shown as red channel weight (W) in FIG. 4A R ) Graph of (d), vertical axis being red channel weight (W) R ) The horizontal axis represents the red channel value (R). The system sets a threshold value of one (th 0) and a threshold value of two (th 1)Determining a weight value corresponding to each red channel value, wherein in this case, when the red channel value of the pixel is less than (or equal to) one (th 0) of the threshold, the lower limit is set, and the red weight value is 0 (or the lowest); when the red channel value of the pixel is greater than (or equal to) the threshold value two (th 1), the red channel value is an upper limit, and the red weight value is 1; when the red channel value of a pixel is between the threshold value one (th 0) and the threshold value two (th 1), the red weight value may be calculated by interpolation between 0 and 1. Similarly, FIG. 4B and FIG. 4C show the green channel weight (W), respectively G ) Assigning and blue channel weights (W) B ) In the assigned graph, generally, the weight of the first channel value, the second channel value and the third channel value of each pixel in the overexposure area is determined as the weight interval of each channel value according to the upper limit (th 0) and the lower limit (th 1), and then the weight interval is calculated by an interpolation method, and according to the setting of a circuit, when the pixel value of the pixel in the image does not exceed the lower limit, the pixel can be listed as a non-overexposed pixel without performing the image overexposure correction. The related description is not repeated herein.
Then, with reference to step S305 of fig. 3, after determining the position of one or more overexposed areas in the input image, according to the expectation that the image saturation of the overexposed areas is low, the gain adjustment of the auto white balance may be performed on the pixel values of the pixels in the overexposed areas, and the gain parameter for adjusting the ratio of each color channel (R: G: B) may be automatically obtained according to the light property of the received image, that is, the gain adjustment is automatically performed on the current pixel according to a ratio of a channel value of the first channel value, the second channel value, and the third channel value.
After the automatic white balance, according to the embodiment of the proposed image overexposure correction method, it is expected that the saturation of the final image may be lower to meet the subjective expectation of human vision, therefore, after the automatic white balance gain is performed, as in step S307, the image needs to be restored, which includes estimating the second channel value and the third channel value of the current pixel one by one for the pixels in the overexposed region (step S301), for example, in a red, green and blue color space, the channel values of red, green and blue, etc. at each pixel position of the overexposed region can be estimated in advance, wherein the estimation manner can be taken from the color value or low frequency signal of the current point, but should not limit the protection scope of the present invention. According to one embodiment, since each pixel in the image records a color value, i.e. a red, green or blue channel value, the restored image is to estimate all color channel values of each pixel, wherein the other two color values of itself can be estimated by using the other channel values around.
For example, for a red pixel (e.g., a first channel value), the green value of the pixel itself (e.g., a second channel value) is estimated by using the left and right green pixels, the blue value of the pixel itself (e.g., a third channel value) is estimated by using the blue pixel at an oblique angle, and the color values (channel values) of a plurality of peripheral pixels can be directly referred to or averaged, for example, the average value of the second channel values of the plurality of peripheral pixels is used as the second channel value of the current pixel, and the other average value of the third channel values of the plurality of peripheral pixels is used as the third channel value of the current pixel. Another embodiment uses low pass filtered values in the peripheral pixel channels to estimate the green and blue pixel values for pixels other than the red pixel for which this example is directed.
It should be noted that, in order to minimize the saturation of the overexposed region, in the method, the variation between the color channel values (e.g. three values of R, G, and B) is preferably smaller by modifying the color channel values in the overexposed region, i.e. the saturation is calculated to be minimized to meet the subjective expectation. The pixel channel values in the non-overexposed region are determined to be unadjusted and retained as reliable information. After estimating the channel values in the pixels, in step S309, the color channel values (R, G, B) of the pixels in the overexposure area are modified to the maximum value, so as to obtain a plurality of predicted values according to the objective with the minimum variation, and the purpose of predicting the channel values is to minimize the variation among the red, green and blue values of the pixels in the overexposure area, which shows five predicted values. The following case is taken as an example of the current pixel as the first channel, and for convenience of description, the first channel is taken as a red channel, the second channel is a green channel, and the third channel is a blue channel, which can be divided into five modes (patterns).
The first mode is as follows: the red channel is not over-exposed, i.e. not processed; and a second mode: red channel overexposure, green channel not overexposure, blue channel not overexposure; and a third mode: red channel overexposure, green channel overexposure and blue channel overexposure; and a fourth mode: red channel overexposure, green channel not overexposure and blue channel overexposure; and mode five: red channel overexposure, green channel overexposure, blue channel overexposure. In order to minimize the variation between the color channel values, the following equation is used. Where R represents the red channel value of the current pixel estimated in the above embodiment, G represents the green channel value of the current pixel estimated, and B represents the blue channel value of the current pixel estimated.
The variation E has the general formula:
Figure BDA0002336928470000101
in which R, G, B, etc. pixel values are substituted, taking the current pixel as the red channel value (Rchannel) as an example, the red channel value is set as the calculation target, and the green and blue channel values are set as known. According to one embodiment, the peripheral pixel values of the current pixel (red channel) can be used to find the green channel value p and the blue channel value q according to a reasonable estimation under the expectation of low color saturation of the overexposed pixel, and the variance equation is modified as follows:
Figure BDA0002336928470000102
according to the above-mentioned variation equation, in order to obtain the minimum variation, it is understood that the numerical value of R should be close to (p + q)/2, meaning that the closer R is to (p + q)/2, the smaller the variation. Wherein, on the premise of small variation, each color channel value of each pixel can be obtained to calculate v 0xx 、v 100 、v 110 、v1 01 、v 111 The 5 predicted values are equal to calculate the correction value of each color channel, and v is reused in the process 11x And v 10x Obtaining the value of the blue channel (B) overexposure by using v 1xx The value of green (G) overexposure is obtained, from v 0xx And v 1xx The correction value of the red (R) channel is obtained. In the same way, by v x0x And v x1x Deriving correction values for the green (G) channel, and using v xx0 And v xx1 The correction value of the blue (B) channel is obtained.
The three subscripts of the above 5 values v represent the overexposure conditions of the three color channels of red (R), green (G) and blue (B) in the red, green and blue color space, respectively, 0 represents no overexposure, 1 represents overexposure, and x represents unknown.
This example takes the red channel (R) as an example:
in a first mode: the R channel is not overexposed, and in the image overexposure correction method, such pixels are not processed:
v 0xx =R
and a second mode: over-exposure of R channel, non-over-exposure of G channel, non-over-exposure of B channel:
v 100 = max { R, (G + B)/2 } (maximum R and (G + B)/2)
And a third mode: over-exposure of R channel, over-exposure of G channel and non-over-exposure of B channel:
if max (R, G) < B (if the maximum of R and G is less than B, then B is selected)
v 110 =g
Else (else)
v 110 = max { R, (max (R, G) + B)/2 } (maximum of R and G + B divided by 2, maximum when compared with R)
And a fourth mode: over-exposure of R channel, non-over-exposure of G channel and over-exposure of B channel:
if max (R, B) < G (if the maximum of R and B is smaller than G)
v 101 =G
Otherwise (else)
v 101 = max { R, (max (R, B) + G)/2 } (maximum of R and G + value of G divided by 2, maximum value of R compared with)
And a fifth mode: r channel overexposure, G channel overexposure and B channel overexposure
v 111 = max { R, G, B } (the maximum of R, G, and B)Big value)
When a plurality of intermediate predictive values (v) for deriving correction values are derived on the basis of the object of least variation 0xx 、v 100 、v 110 、v 101 、v 111 ) Then, in step S311 of fig. 3, the probability of over-exposure is weighted and averaged according to the previously estimated weights, and the correction value of each color channel value is calculated according to the probability of over-exposure of each color channel.
The probability of overexposure is given by the formula of weighted average, where W R Is the red channel weight, W G Is the green channel weight, and W B For the blue channel weight:
R′=(1-w R )×v 0xx +w R ×{w G ×{(1-w B )×v 110 +w B ×v 111 }+(1-w G )×{(1-w B )×v 100 +w B ×v 101 }}
fig. 5 is a schematic diagram of the calculation of the graph for obtaining the probability of overexposure and the weighted average.
FIG. 5 illustrates a method for calculating a weighted average based on overexposure probability, showing a box with four endpoints representing v 110 、v 111 、v 100 And v 101 Equal number, plus v 0xx In accordance with the weight (W) of each channel R 、W G And W B ) The higher the color channel value is, the higher the weight is given, whereas the lower the color channel value is, the lower the weight is given, so that the weighted average is given to the probability of over-exposure of each color channel finally.
The upper edge of the box shows that one end is v 110 (mode three: R channel overexposure, G channel overexposure, B channel not overexposure), and v at the other end 111 (mode five: R channel overexposure, G channel overexposure, B channel overexposure), it is possible to use the above blue channel weights (W) B ) To give v 11x =v 110 *(1-W B )+v 111 *W B
One end of the lower edge of the square frame is v 100 (mode two: overexposure of R channel, not overexposure of G channel, not overexposure of B channel), andone end is v 101 (mode four: overexposure of R channel, not overexposure of G channel, overexposure of B channel) also according to the above-mentioned blue channel weight (W) B ) Can calculate v 10x =v 100 *(1-W B )+v 101 *W B
When it gives v 11x And v 10x As on the vertical line in the box, according to the green channel weight (W) G ) Calculate v 1xx =v 11x *W G +v 10x *(1-W G )。
This example takes the current pixel as the red channel value (R channel) for example, so v can be calculated 1xx (R channel overexposure) and v 0xx (mode one: R channel is not overexposed), and the red channel weight (W) R ) Obtaining a correction value R "= v for the red channel value 1xx *W R +v 0xx *(1-W R ). The correction value R "is the result R" of the formula output by verifying that the probability of overexposure is given to the weighted average.
In this way, in the same operation manner, the correction value G "= = v of the green channel value can be obtained in the same manner x1x *W G +v x0x *(1-W G ) (ii) a And a correction value B "= v for the blue channel value xx1 *W B +v xx0 *(1-W B )。
Thus, in the method for processing the overexposure phenomenon in the image, in addition to the existing problem that the shadow is caused by uneven light refraction close to the center of the image and far from the center of the image is solved by lens shadow correction processing, and the white balance problem that the image can be close to human eyes is processed by automatic white balance, the saturation of the overexposure area can be reduced, the red channel value, the green channel value and the blue channel value of each block can be kept to be close to the condition of equal proportion (1: 1) and color non-color-shift as far as possible, under the condition that the variation quantity among the color values is minimum, the method can estimate the weight according to the color channel values of each color, give weighted average to the probability of the occurrence of the overexposure, and calculate the corrected value of each color channel value under the condition that the overexposure area does not shift according to the probability of the color channel overexposure of each color.
Finally, because the provided image overexposure correction method only performs correction on an overexposed area in an image in the processing process, the dynamic range of the original image can be kept and the overexposed information is effectively reserved except that the red, green and blue channel values in a red, green and blue color space are kept as close as possible (close to 1: 1) (no color cast), and because the overexposure correction method does not process the non-overexposed area, the details of the non-overexposed area can be reserved, so that the overexposed area is free from color cast, effective tone mapping is performed, and the advantages of low cost and short processing time can be achieved.
The disclosure above is only a preferred embodiment of the present invention, and is not intended to limit the scope of the claims, therefore all equivalent technical changes made by using the contents of the specification and drawings are included in the scope of the claims.
[ notation ] to show
Lens shading correction module 101
Automatic white balance module 103
Tone mapping module 105
Circuit system 20
Image processor 201
Input interface 202
Output interface 203
Memory 205
Image source 21
Image 22
Threshold value of one th0
Threshold value of two th1
Red channel weight W R
Green channel weight W G
Blue channel weight W B
Red channel value R
Green channel value G
Blue channel value B
Correction value R'
Predicted value v 100 ,v 10x ,v 101 ,v 1xx ,v 0xx ,v 110 ,v 11x ,v 111
And S301-S311 image overexposure correction flow.

Claims (8)

1. An image overexposure correction method comprising:
judging an overexposure area in an image;
giving respective weight to each pixel according to the channel value of each pixel of the overexposure area, wherein the channel value of a current pixel is a first channel value in a color space, and peripheral pixels of the current pixel have a second channel value and a third channel value;
performing automatic white balance on the channel value of each pixel in the overexposure area according to the expectation of the reduction of the image saturation of the overexposure area, and automatically performing gain adjustment on the current pixel according to the channel value proportion of the first channel value, the second channel value and the third channel value according to the light attribute of the image;
estimating a second channel value and a third channel value of the current pixel by the second channel value and the third channel value of the peripheral pixels of the current pixel one by one for the pixels in the overexposure area; and
calculating a correction value of the first channel value of the current pixel according to the respective weight of each pixel in the overexposure area, wherein the correction value enables a variation among the first channel value, the second channel value and the third channel value of each pixel in the overexposure area to be minimum;
wherein, the weight of the first channel value, the second channel value and the third channel value of each pixel is the weight interval of each channel value according to an upper limit and a lower limit, and then the weight interval is calculated by an interpolation method; when the channel value of each pixel does not exceed the lower limit, the pixel is listed as a non-overexposed pixel without executing the image overexposure correction.
2. The image overexposure correction method of claim 1, wherein at least one of the overexposure regions is determined by comparing a luminance threshold with each channel value, and pixels with channel values exceeding the luminance threshold are overexposed, or by determining at least one of the overexposure regions from low frequency signals in the image.
3. The image overexposure correction method of claim 1, wherein the method of estimating the second channel value and the third channel value of the current pixel comprises: taking an average value of the second channel values of a plurality of peripheral pixels as the second channel value of the current pixel, and taking another average value of the third channel values of the plurality of peripheral pixels as the third channel value of the current pixel.
4. The image overexposure correction method of claim 1, wherein in the step of calculating the correction value for the first channel value of the current pixel, the current pixel has 5 modes, the minimum variance among the first channel value, the second channel value and the third channel value is targeted, wherein the 5 modes and the calculation formula thereof comprise:
the first mode is as follows: first channel not overexposed, not processed, v 0xx =R;
And a second mode: the first channel is over-exposed, the second channel is not over-exposed, the third channel is not over-exposed, v 100 =max{R,(G+B)/2};
And a third mode: the first channel is over exposed, the second channel is over exposed, the third channel is not over exposed, wherein:
if max (R, G) < B, v 110 =B;
Otherwise v 110 =max{R,(max(R,G)+B)/2};
And a fourth mode: the first channel is overexposed, the second channel is not overexposed, and the third channel is overexposed, wherein:
if max (R, B) < G, v 101 =G;
Otherwise v 101 =max{R,(max(R,B)+G)/2};
And
and a fifth mode: the first channel overexposure, the second channel overexposure, the third channel overexposure, v 111 =max{R,G,B};
Wherein R represents the currentThe first channel value of a pixel, G representing the second channel value of the current pixel, and B representing the third channel value of the current pixel, v 0xx 、v 100 、v 110 、v 101 、v 111 The correction value is (1-w) to obtain an intermediate predicted value of the correction value for the first channel value R )×v 0xx +w R ×{w G ×{(1-w B )×v 110 +w B ×v 111 }+(1-w G )×{(1-w B )×v 100 +w B ×v 101 } with a weight w R 、w G And w B The weights of the first channel value, the second channel value and the third channel value are respectively.
5. The image overexposure correction method according to any one of claims 1 to 4, wherein the first channel value, the second channel value and the third channel value of each pixel are color values of the pixel or low-pass filtered values of each pixel.
6. Circuitry for correcting an overexposed image, the circuitry comprising:
an image processor, which receives an input image through an input interface and outputs a corrected image through an output interface;
a memory for storing the image information and processing parameters during processing;
the image processor executes an image overexposure correction method for an overexposure area in the input image, and the method comprises the following steps:
judging an overexposure area in an image;
giving respective weight to each pixel according to the channel value of each pixel of the overexposure area, wherein the channel value of a current pixel is a first channel value in a color space, and peripheral pixels of the current pixel have a second channel value and a third channel value;
performing an automatic white balance on the channel value of each pixel in the overexposure area according to the expectation of the reduction of the image saturation of the overexposure area, and automatically performing gain adjustment on the current pixel according to a channel value ratio of the first channel value, the second channel value and the third channel value according to the light attribute of the image;
estimating a second channel value and a third channel value of the current pixel by the second channel value and the third channel value of the peripheral pixels of the current pixel one by one for the pixels in the overexposure area; and
calculating a correction value of the first channel value of the current pixel according to the respective weight of each pixel in the overexposure area, wherein the correction value enables a variation among the first channel value, the second channel value and the third channel value of each pixel in the overexposure area to be minimum;
in the image overexposure correction method, the weights of the first channel value, the second channel value and the third channel value of each pixel are weight intervals judged according to an upper limit and a lower limit for each channel value, and then the weight intervals are calculated by an interpolation method; when the channel value of each pixel does not exceed the lower limit, the pixel is listed as a non-overexposed pixel without executing the image overexposure correction.
7. The circuit system of claim 6, wherein in the image overexposure correction method, at least one of the overexposure regions is determined to compare a luminance threshold with each channel value, and pixels with channel values exceeding the luminance threshold are overexposed; or judging at least one overexposure area by using a low-frequency signal in the image.
8. The circuit system of claim 6, wherein in the image overexposure correction method, the method for estimating the second channel value and the third channel value of the current pixel comprises: taking an average value of the second channel values of a plurality of peripheral pixels as the second channel value of the current pixel, and taking another average value of the third channel values of the plurality of peripheral pixels as the third channel value of the current pixel.
CN201911361071.3A 2019-12-25 2019-12-25 Image overexposure correction method and circuit system Active CN113038109B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911361071.3A CN113038109B (en) 2019-12-25 2019-12-25 Image overexposure correction method and circuit system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911361071.3A CN113038109B (en) 2019-12-25 2019-12-25 Image overexposure correction method and circuit system

Publications (2)

Publication Number Publication Date
CN113038109A CN113038109A (en) 2021-06-25
CN113038109B true CN113038109B (en) 2023-03-24

Family

ID=76458807

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911361071.3A Active CN113038109B (en) 2019-12-25 2019-12-25 Image overexposure correction method and circuit system

Country Status (1)

Country Link
CN (1) CN113038109B (en)

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105827990B (en) * 2016-01-22 2018-12-04 维沃移动通信有限公司 A kind of automatic explosion method and mobile terminal
TWI645373B (en) * 2017-11-13 2018-12-21 瑞昱半導體股份有限公司 Auto exposure control method and electronic device using the same
CN110232659B (en) * 2018-03-06 2022-09-20 展讯通信(天津)有限公司 Image color cast correction method and device and electronic equipment

Also Published As

Publication number Publication date
CN113038109A (en) 2021-06-25

Similar Documents

Publication Publication Date Title
US7421120B2 (en) Apparatus correcting image by luminance histogram
US8368779B2 (en) Image processing apparatus for performing gradation correction on subject image
US20070047803A1 (en) Image processing device with automatic white balance
EP2426928B1 (en) Image processing apparatus, image processing method and program
US8942475B2 (en) Image signal processing device to emphasize contrast
KR100983037B1 (en) Method for controlling auto white balance
RU2496250C1 (en) Image processing apparatus and method
JP6559229B2 (en) Image processing apparatus, imaging apparatus, image processing method, and storage medium storing image processing program of image processing apparatus
CN104869286A (en) Image signal processing apparatus, image signal processing method, and image capturing apparatus
US20120288194A1 (en) Image processing device, image processing method, and integrated circuit
US20140176759A1 (en) Imaging device, imaging method and imaging program
JP2015156615A (en) Image processing system, image processing method, control program, and recording medium
KR101639664B1 (en) Photographing apparatus and photographing method
TW202022799A (en) Metering compensation method and related monitoring camera apparatus
US10218953B2 (en) Image processing apparatus, image processing method, and storage medium
WO2021218603A1 (en) Image processing method and projection system
JP5782311B2 (en) Imaging apparatus and control method thereof
JP6789904B2 (en) Dynamic range compression device and image processing device
CN115239578A (en) Image processing method and device, computer readable storage medium and terminal equipment
JP2005025448A (en) Signal processing device, signal processing program, and electronic camera
JP5932392B2 (en) Image processing apparatus and image processing method
JP2013106151A (en) Image processing apparatus and image processing method
TWI743628B (en) Method for over-exposed image correction and circuit system
CN113038109B (en) Image overexposure correction method and circuit system
US11696044B2 (en) Image capturing apparatus, control method, 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
GR01 Patent grant
GR01 Patent grant