CN107481202B - Method for enhancing dynamic range of image - Google Patents
Method for enhancing dynamic range of image Download PDFInfo
- Publication number
- CN107481202B CN107481202B CN201710692608.9A CN201710692608A CN107481202B CN 107481202 B CN107481202 B CN 107481202B CN 201710692608 A CN201710692608 A CN 201710692608A CN 107481202 B CN107481202 B CN 107481202B
- Authority
- CN
- China
- Prior art keywords
- original image
- image
- proportion
- channel
- pixel
- 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
Links
- 238000000034 method Methods 0.000 title claims abstract description 27
- 230000002708 enhancing effect Effects 0.000 title claims abstract description 22
- 238000004422 calculation algorithm Methods 0.000 claims description 37
- 230000003044 adaptive effect Effects 0.000 claims description 13
- 238000004364 calculation method Methods 0.000 claims description 12
- 238000010008 shearing Methods 0.000 claims description 11
- 238000001914 filtration Methods 0.000 claims description 5
- 238000005286 illumination Methods 0.000 claims description 4
- 101100129590 Schizosaccharomyces pombe (strain 972 / ATCC 24843) mcp5 gene Proteins 0.000 claims description 2
- 238000005192 partition Methods 0.000 claims 1
- 230000000694 effects Effects 0.000 abstract description 9
- 238000003384 imaging method Methods 0.000 description 7
- 230000000007 visual effect Effects 0.000 description 5
- 230000001186 cumulative effect Effects 0.000 description 3
- 238000005516 engineering process Methods 0.000 description 3
- 238000011156 evaluation Methods 0.000 description 3
- 238000013507 mapping Methods 0.000 description 3
- 238000012545 processing Methods 0.000 description 3
- 230000035945 sensitivity Effects 0.000 description 3
- 238000002834 transmittance Methods 0.000 description 3
- 230000015572 biosynthetic process Effects 0.000 description 2
- 238000003786 synthesis reaction Methods 0.000 description 2
- 238000004458 analytical method Methods 0.000 description 1
- 238000013459 approach Methods 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000000903 blocking effect Effects 0.000 description 1
- 239000002131 composite material Substances 0.000 description 1
- 238000009795 derivation Methods 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 238000005315 distribution function Methods 0.000 description 1
- 238000002474 experimental method Methods 0.000 description 1
- 210000000887 face Anatomy 0.000 description 1
- 230000004927 fusion Effects 0.000 description 1
- 238000003672 processing method Methods 0.000 description 1
- 230000000750 progressive effect Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T5/00—Image enhancement or restoration
- G06T5/73—Deblurring; Sharpening
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T5/00—Image enhancement or restoration
- G06T5/40—Image enhancement or restoration using histogram techniques
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/10—Image acquisition modality
- G06T2207/10024—Color image
Landscapes
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Image Processing (AREA)
Abstract
The embodiment of the invention discloses a method for enhancing the dynamic range of an image, which comprises the following steps: providing an original image; extracting a first proportion that pixel values in a dark channel image in a middle area of an original image are larger than or equal to a first pixel threshold value; judging whether the first proportion is larger than or equal to a first proportion threshold value; if yes, extracting a second proportion that the pixel values of an R channel, a G channel and a B channel in a dark channel image of the original image are all larger than or equal to a second pixel threshold value; judging whether the second proportion is larger than or equal to a second proportion threshold value; if not, enhancing the original image based on a first configuration mode; and if the second proportion is larger than or equal to a second proportion threshold value or the first proportion is smaller than a first proportion threshold value, enhancing the original image based on a second configuration mode. The invention has the advantages of enhancement of various original images, better enhancement effect and better dynamic range of the enhanced images.
Description
Technical Field
The invention relates to the technical field of display, in particular to a method for enhancing the dynamic range of an image.
Background
The dynamic range of an image is defined as the ratio of the brightest and darkest pixel values in the image. The dynamic range observable by the human eye is up to 10000: 1, however, the dynamic range of the digital imaging device and the display device which are widely used at present is limited, and is about 100:1 to 300: 1. When a picture is taken by using an imaging device such as a general camera in daily life, the dynamic range of the imaging device is limited, so that the taken picture may be overexposed in an excessively bright area and underexposed in a dark area. Therefore, the real scene cannot be restored from the photographed picture. The High dynamic range image (High dynamic range image) has a large dynamic range and rich details, and can bring better visual experience.
High dynamic images can be obtained using high dynamic range image imaging techniques. The acquisition of high dynamic images can be achieved by both hardware and software methods, including the use of multiple imaging devices or professional HDRI imaging devices. Software methods are usually based on multi-exposure fusion techniques, which use multiple differently exposed images to synthesize a high-motion image. The technology can capture different dynamic range information of a scene based on images with different exposure levels, and can form a high-quality picture containing the whole dynamic range information by combining the information with different exposure levels.
The above software based approach generally faces two problems: (1) due to the motion of the global camera, registration is required during synthesis, and blurring problems can occur when registration is inaccurate. (2) When capturing images of different dynamic ranges of a scene, the resulting composite image can be confused when there are moving objects in the scene.
Currently, high-end display devices mostly support HDR functions, and high dynamic images can be obtained by using a high dynamic range imaging technology. According to the analysis, the synthesis of high dynamic images faces a lot of difficulties such as high instrument price, immature technology and the like, and the popularization speed of contents cannot keep up with the updating of equipment. However, the image enhancement by the dark channel defogging algorithm is performed uniformly, so that some images enhanced by the dark channel defogging algorithm are poor in effect, such as an image without fog or some special images.
Disclosure of Invention
The technical problem to be solved by the embodiments of the present invention is to provide a method for enhancing a dynamic range of an image. The image dynamic range enhancement effect can be better.
In order to solve the above technical problem, an embodiment of the present invention provides a method for enhancing a dynamic range of an image, including:
providing an original image;
extracting a first proportion that pixel values in a dark channel image of the middle area of the original image are larger than or equal to a first pixel threshold value;
judging whether the first proportion is larger than or equal to a first proportion threshold value;
if yes, extracting a second proportion that the pixel values of an R channel, a G channel and a B channel in a dark channel image of the original image are all larger than or equal to a second pixel threshold value;
judging whether the second proportion is larger than or equal to a second proportion threshold value;
if not, enhancing the original image based on a first configuration mode;
and if the second proportion is larger than or equal to the second proportion threshold value or the first proportion is smaller than the first proportion threshold value, enhancing the original image based on a second configuration mode.
In an embodiment of the present invention, the first configuration is implemented by a dark channel defogging algorithm.
In an embodiment of the present invention, the second configuration is implemented by a contrast-limited adaptive histogram equalization algorithm.
In an embodiment of the present invention, one of the parameters of the contrast-limited adaptive histogram equalization algorithm is a block size, and the block size of each block is the same when the contrast-limited adaptive histogram equalization algorithm divides the original image into a plurality of blocks.
In an embodiment of the present invention, one of the parameters of the restricted contrast adaptive histogram equalization algorithm is a first clipping height, one of the parameters of the first clipping height is a first clipping ratio clip α, and a calculation formula of the first clipping ratio clip α is:
cliprα=a-(1-average/255.0)*(1-cont/255.0)
wherein a is a constant, and a ranges from 1.0 to 3.0; average represents the illumination intensity of the original image; cont represents the contrast of the original image.
In an embodiment of the present invention, the calculation formula of the first clip height clip is:
clip=cliprα*(n1*n2)/(upper-lower)
wherein n1 n2 represents the total number of pixels included in the block after the original image block; the upper represents the maximum value of the gray value of the whole original image, and the lower represents the minimum value of the gray value of the whole original image.
In an embodiment of the present invention, one of the parameters of the contrast-limited adaptive histogram equalization algorithm is a second clipping height, and a calculation formula of the second clipping height cut is as follows:
wherein m and n represent the number of pixels in the length and width of the original image after being blocked, the level represents the gray level, and α represents the second shearing proportion and is a constant.
In an embodiment of the present invention, the first proportional threshold range is 0.3-0.9; alternatively, the second ratio threshold ranges from 0.02 to 0.1.
In an embodiment of the present invention, a calculation formula of the first ratio fDarkRate is as follows:
wherein dark (i, j) represents a dark channel image of the middle region of the original image, M represents the number of pixels over the length of the middle region of the original image, and N represents the number of pixels over the width of the middle region of the original image; k represents the first pixel threshold; wherein the pixel value J of the dark channel imagedarkThe expression formula of (a) is:
wherein I represents the original image; i iscA certain color channel representing I, Ic(y) a value representing a color channel of a single pixel in said original image; omega (x) is one centered on pixel point xAnd filtering a window area, wherein the size of the window is constant.
In an embodiment of the present invention, the expression formula of num1 of the second ratio is as follows:
wherein the numerator represents the number of pixels of R, G, B color channels of the original image, each of which is greater than the second pixel threshold value g, and the denominator is the total number of pixels of the original image.
The embodiment of the invention has the following beneficial effects:
the method for enhancing the dynamic range of the image comprises the following steps: extracting a first proportion that pixel values in a dark channel image in a middle area of an original image are larger than or equal to a first pixel threshold value; judging whether the first proportion is larger than or equal to a first proportion threshold value; if yes, extracting a second proportion that the pixel values of an R channel, a G channel and a B channel in a dark channel image of the original image are all larger than or equal to a second pixel threshold value; judging whether the second proportion is larger than or equal to a second proportion threshold value; if not, enhancing the original image based on a first configuration mode; and if the second proportion is larger than or equal to a second proportion threshold value or the first proportion is smaller than a first proportion threshold value, enhancing the original image based on a second configuration mode. Therefore, the original images are classified, and different types of originals are processed in different configuration modes, so that various original images can be enhanced, the enhancement effect is good, and the dynamic range of the enhanced images is good.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
FIG. 1 is a flow chart of a method for image dynamic range enhancement according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, 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 invention.
The terms "comprising" and "having," and any variations thereof, as appearing in the specification, claims and drawings of this application, are intended to cover non-exclusive inclusions. For example, a process, method, system, article, or apparatus that comprises a list of steps or elements is not limited to only those steps or elements listed, but may alternatively include other steps or elements not listed, or inherent to such process, method, article, or apparatus. Furthermore, the terms "first," "second," and "third," etc. are used to distinguish between different objects and are not used to describe a particular order.
An embodiment of the present invention provides a method for enhancing a dynamic range of an image, please refer to fig. 1, which includes:
s110: providing an original image;
in this embodiment, the original image is an image that will need to be enhanced, and the size and the dynamic range of the original image are not limited.
S120: extracting a first proportion that pixel values in a dark channel image of the middle area of the original image are larger than or equal to a first pixel threshold value;
in a small region (patch) of the outdoor fog-free image non-sky region, at least one of the RGB three channels at some pixel points has an extremely low value. In the presence of fog, the fog density is proportional to the pixel value of the dark channel of the image, while the fog density is proportional to the depth of field of the image and inversely proportional to the transmittance of the image. The transmittance of the image can be estimated from the dark channel image of the image for defogging.
Since the human eye mainly focuses on the middle area of the image when observing the image, the transmittance of the image can be estimated from the dark channel image of the middle area of the original image for defogging. In this embodiment, the calculation process for obtaining the corresponding dark channel image through the original image calculation is as follows: firstly, minimum value filtering is carried out on RGB three color channel images of an image respectively, then the minimum value of a pixel at the same position in the filtered three channel image is selected as the pixel value of a dark channel image, and the expression is as follows:
wherein I represents an input image; i iscA certain color channel representing I, Ic(y) a value representing a color channel of a single pixel in the input image; Ω (x) is a filtering window region centered on pixel point x, where the size of the window is set to be constant, and the size of the window is set to 15 × 15, i.e., the filtering radius is 7; j. the design is a squaredarkIs the dark channel image of image I, i.e. the pixel values. Therefore, the dark channel image corresponding to the middle area of the original image can be obtained, and the pixel value of the dark channel image corresponding to the middle area of the original image can be obtained.
In this embodiment, the range of the first pixel threshold is 60-120, for example, 60, 70, 80, 90, 100, 110, 120, etc., and in this embodiment, the first pixel threshold is 90. In the present embodiment, a first ratio of pixel values greater than or equal to 90 in the dark channel image of the intermediate area is extracted, and the first ratio is denoted as fDarkRate, and a specific expression is as follows:
wherein dark channel image of the middle region of the original image is denoted by dark (i, j), M represents the number of pixels in the length of the middle region of the original image, and N represents the number of pixels in the width of the middle region of the original image; k represents a first pixel threshold, and in this embodiment, k is 90.
In this embodiment, the middle region is located in the middle of the original image, for example, the middle region may be located in the middle of the original image, or may be located at a position with a slightly offset middle, for example, to the left, to the right, to the up, to the down, etc., the size of the middle region may be set according to the user's requirement, for example, the area of the middle region may be 1/4 of the area of the original image, when the distance between the top edge of the middle region and the top edge of the original image is 1/4 of the original image width, the distance between the bottom edge of the middle region and the bottom edge of the original image is 1/4 of the original image width, the distance between the left edge of the middle region and the left edge of the original image is 1/4 of the original image length, and the distance between the right edge of the middle region and the right edge of the original image is 1/4 of, for another example, the area of the intermediate region may be the original image areas 1/2, 1/3, or the like.
S130: judging whether the first proportion is larger than or equal to a first proportion threshold value;
in this embodiment, the display device determines whether the first ratio is greater than or equal to a first ratio threshold, where the first ratio threshold is in a range of 0.3-0.9, for example, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, and the like, in this embodiment, the first ratio threshold is 0.7, and when the first ratio is greater than or equal to 0.7, the display device determines that the original image is a foggy image; and when the first ratio is smaller than a first ratio threshold value, the display device judges that the original image is a fog-free image.
S140: if yes, extracting a second proportion that the pixel values of an R channel, a G channel and a B channel in a dark channel image of the original image are all larger than or equal to a second pixel threshold value;
in order to improve the problem, in the present embodiment, the dark channel images corresponding to the bright regions of the original image have a common point that the pixel values of R, G, B color channels of the image are all larger, so that the pixel values of the R channel, the G channel, and the B channel in the dark channel images of the original image can be extracted by a second ratio that is greater than or equal to a second pixel threshold.
Specifically, in the present embodiment, the range of the second pixel threshold is 200-:
wherein the moleculeThe R, G, B color channels representing the original image each have a pixel value greater than the number of pixels of the second pixel threshold g, which in this embodiment is 240, and the denominator (M × N) is the total number of pixels of the original image.
S150: judging whether the second proportion is larger than or equal to a second proportion threshold value;
through a large number of statistical experiments, in this embodiment, the second ratio threshold is in a range of 0.02-0.1, for example, 0.02, 0.03, 0.04, 0.05, 0.06, 0.07, 0.08, 0.09, 0.1, etc., and at this time, the original image includes a bright area such as a large-area white object, and in this embodiment, the second ratio threshold is 0.05.
In the present embodiment, when the second ratio is greater than or equal to the second ratio threshold, this indicates that the original image is not a foggy image but a bright area such as a white object having a large area is included in the original image, and thus the original image cannot be processed as if the foggy image were processed. When the second ratio is smaller than the second ratio threshold, in conjunction with step S140, it can be obtained that the original image is a foggy image.
S160, if not, enhancing the original image based on a first configuration mode;
and if the judgment result of the real device is not, the second ratio is smaller than a second ratio threshold, and the first ratio is larger than or equal to a first ratio threshold, so that the original image is a foggy image and is not a bright area such as a large-area white object contained in the original image, and the original image is enhanced based on the first configuration mode.
Specifically, in this embodiment, the first configuration is implemented by a dark channel defogging algorithm, that is, the original image is enhanced by the dark channel defogging algorithm, and the dark channel defogging algorithm is an algorithm known to those skilled in the art and can be used to enhance the dynamic range of the foggy original image.
S170, if the second proportion is larger than or equal to the second proportion threshold value or the first proportion is smaller than the first proportion threshold value, enhancing the original image based on a second configuration mode.
In this embodiment, if the second ratio is greater than or equal to the second ratio threshold, this indicates that the original image includes a bright area such as a large-area white object; or if the first ratio is smaller than the first ratio threshold, the original image is not a foggy image but a common fogless image. For a bright area such as a white object with a large area in the original image, or for an ordinary fog-free image, the present embodiment enhances the original image based on the second configuration.
Specifically, in this embodiment, the second configuration is implemented by a constrained Contrast Adaptive Histogram Equalization (C L AHE, Contrast L enhanced Adaptive Histogram Equalization) algorithm, the C L AHE algorithm is an algorithm known to those skilled in the art, and the C L AHE algorithm performs blocking and Contrast clipping on the original image, so that the original image with the above features can be enhanced to obtain a better enhancement effect, and the dynamic range of the original image with the above features can be enhanced.
In this embodiment, since the original images are classified, the first ratio of the first type of original image is greater than or equal to the first ratio threshold, and the second ratio of the first type of original image is smaller than the second ratio threshold, at this time, the first type of original image is a foggy image; the second original image is a fog-free image with a first ratio smaller than the first ratio threshold, or the first ratio is greater than or equal to the first ratio threshold and the second ratio is greater than or equal to the second ratio threshold, and the first original image contains a large area of bright areas such as white objects, and the bright areas are enhanced by the first configuration mode for the first original image and enhanced by the second configuration mode for the second original image, so that different enhancement modes are adopted for the original images with different characteristics, the enhancement effect of the original image is better, and the dynamic range of the enhanced image is better.
In general, the conventional C L AHE algorithm has two important parameters, namely the number of blocks and the shearing height of the histogram, and the C L AHE algorithm uses the same shearing height (default to 0.01) and the number of blocks (default to 8 × 8) for all the original images, which easily causes the original images to be distorted by the C L AHE algorithm.
In order to improve the problem, in the present embodiment, the C L AHE algorithm is modified, the modified C L AHE algorithm does not set the number of blocks any more, but sets a block size instead, in the present embodiment, the block size is set to 64 × 64, of course, in other embodiments of the present invention, the block size may be set to other sizes, when the original image is enhanced by the modified C L AHE algorithm, the modified C L AHE algorithm divides the original image into a plurality of blocks, each block has the same block size, which is 64 × 64 in the present embodiment, so that the details of the original image can be better enhanced.
The shearing height of the conventional C L AHE algorithm, collectively referred to as the second shearing height in the following description, is calculated as follows:
wherein m and n represent the number of pixels in the length and width of the original image after being blocked, the level represents the gray level, for example, the gray level of an 8bits image is 256, and α represents the second cut ratio which is a constant set artificially.
In order to improve the stability and the adaptability of the C L AHE algorithm, the embodiment improves the C L AHE algorithm, the modified C L AHE algorithm sets the clipping height (hereinafter described as the first clipping height) in an adaptive manner, the modified C L AHE algorithm controls the magnitude of image contrast enhancement by setting the first clipping height, and the contrast of the enhanced image finally obtained by the large first clipping height is large.
Based on the above discussion, the first clipping height is reasonably set in combination with the contrast and the brightness of the original image, and a key parameter of the first clipping height is the first clipping proportion, and through a large number of experimental statistics, the first clipping proportion clipr α of the image is set by adopting the following calculation formula, so that a better enhancement effect can be achieved.
cliprα=a-(1-average/255.0)*(1-cont/255.0)
Wherein a is a constant, typically a ranges from 1.0 to 3.0, e.g., 1.0, 1.5, 2.0, 2.5, 3.0, etc.; average represents the illumination intensity of the original image; cont represents the contrast of the original image.
In this embodiment, the calculation formula of average is as follows:
where n is the number of pixels in the width direction of the original image, m is the number of pixels in the height direction of the original image, and gray represents the gray level of the original image.
In the present embodiment, the cont represents the contrast of an image, and the calculation expression is as follows:
where n is the number of pixels in the width direction of the original image, m is the number of pixels in the height direction of the original image, and gray represents the gray level of the original image. The above calculation of cont means that the contrast of the original image is represented by the sum of absolute values of differences in four neighborhoods of the original image, and the larger the difference between a pixel and surrounding pixels is, the larger the contrast of the original image is.
In recent years, image processing techniques based on the visual characteristics of the human eye have attracted more and more attention. The conventional image processing method usually only considers the statistical characteristics of the original image pixels, and performs image enhancement by changing the gray distribution of the original image pixels. At present, objective evaluation indexes for image enhancement are difficult to be consistent with subjective evaluation of human eyes, the evaluation indexes score high images, and the visual effect is not consistent and good. Therefore, it is clearly desirable to improve the subjective quality and objective quality of the image processing results if the visual characteristics of the human eye can be considered while making full use of the statistical characteristics of the image when performing image processing.
Generally, the sensitivity of the human eye to image texture details is related to the background gray level where it is located, the human eye sensitivity is lower for texture details in high gray level backgrounds and low gray level backgrounds, and the sensitivity is higher for texture details in medium and high brightness backgrounds.
From the principle of histogram equalization, it can be known that the mapping curve T is related to the Cumulative Distribution Function (CDF) of the image as follows:
therein, 28-1The maximum gray value of the original image with 8bits, and n × m is the total number of pixels of the original image.
Limiting contrast, which in fact limits the slope of the CDF, also because CDF is an integral of the gray histogram:
CDF(i)=∫Hist(i)di
the magnitude of the contrast enhancement can be defined as the slope of the gray scale mapping function. According to the above expression, the slope of the gray scale mapping function can be obtained as:
from the above derivation, it can be known that the height of the histogram of the image corresponds to the slope of the cumulative distribution histogram of the image, and the slope of the cumulative histogram corresponds to the magnitude of the contrast enhancement.
The C L AHE algorithm uses the average height value of the histogram to represent the histogram level of the medium-luminance area of an original image and calculates the final first clipping height clip according to the average height value, wherein the calculation formula of the first clipping height clip is as follows:
clip=cliprα*(n1*n2)/(upper-lower)
the improved C L AHE algorithm adopts the first shearing height, the visual effect of human eyes can be considered, the illumination intensity and the contrast of the original image can also be considered, and the improved C L AHE algorithm has a better enhancement effect on the original image.
It should be noted that, in the present specification, the embodiments are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments may be referred to each other. For the device embodiment, since it is basically similar to the method embodiment, the description is simple, and for the relevant points, refer to the partial description of the method embodiment.
Through the description of the above embodiments, the present invention has the following advantages:
the method for enhancing the dynamic range of the image comprises the following steps: extracting a first proportion that pixel values in a dark channel image in a middle area of an original image are larger than or equal to a first pixel threshold value; judging whether the first proportion is larger than or equal to a first proportion threshold value; if yes, extracting a second proportion that the pixel values of an R channel, a G channel and a B channel in a dark channel image of the original image are all larger than or equal to a second pixel threshold value; judging whether the second proportion is larger than or equal to a second proportion threshold value; if not, enhancing the original image based on a first configuration mode; and if the second proportion is larger than or equal to a second proportion threshold value or the first proportion is smaller than a first proportion threshold value, enhancing the original image based on a second configuration mode. Therefore, the original images are classified, and different types of originals are processed in different configuration modes, so that various original images can be enhanced, the enhancement effect is good, and the dynamic range of the enhanced images is good.
The above disclosure is only for the purpose of illustrating the preferred embodiments of the present invention, and it is therefore to be understood that the invention is not limited by the scope of the appended claims.
Claims (8)
1. A method for image dynamic range enhancement, comprising:
providing an original image;
extracting a first proportion that pixel values in a dark channel image of the middle area of the original image are larger than or equal to a first pixel threshold value;
judging whether the first proportion is larger than or equal to a first proportion threshold value;
if yes, extracting a second proportion that the pixel values of an R channel, a G channel and a B channel in a dark channel image of the original image are all larger than or equal to a second pixel threshold value;
judging whether the second proportion is larger than or equal to a second proportion threshold value;
if not, enhancing the original image based on a first configuration mode;
and if the second proportion is greater than or equal to the second proportion threshold or the first proportion is smaller than the first proportion threshold, enhancing the original image based on a second configuration mode, wherein the second configuration mode is realized by a contrast-limited adaptive histogram equalization algorithm, one parameter of the contrast-limited adaptive histogram equalization algorithm is a first shearing height, one parameter of the first shearing height is a first shearing proportion clipr α, and a calculation formula of the first shearing proportion clip α is as follows:
clipr α ═ a- (1-average/255.0) × (1-cont/255.0), where a is a constant, a ranges from 1.0 to 3.0, average represents the illumination intensity of the original image, and cont represents the contrast of the original image.
2. The method of claim 1, wherein the first configuration is implemented by a dark channel defogging algorithm.
3. The method of claim 1, wherein one of the parameters of the limited-contrast adaptive histogram equalization algorithm is block size, and wherein the block size of each block is the same when the limited-contrast adaptive histogram equalization algorithm partitions the original image into blocks.
4. The method of image dynamic range enhancement according to claim 1, wherein the first clip height clip is calculated by the formula:
clip=clipr α*(n1*n2)/(upper-lower)
wherein n1 n2 represents the total number of pixels included in the block after the original image block; the upper represents the maximum value of the gray value of the whole original image, and the lower represents the minimum value of the gray value of the whole original image.
5. The method of claim 1, wherein one of the parameters of the constrained contrast adaptive histogram equalization algorithm is a second clipping height, and the second clipping height cut is calculated as follows:
wherein m and n represent the number of pixels in the length and width of the original image after being blocked, the level represents the gray level, and α represents the second shearing proportion and is a constant.
6. The method of image dynamic range enhancement of any one of claims 1-5, wherein the first scale threshold range is 0.3-0.9; alternatively, the second ratio threshold ranges from 0.02 to 0.1.
7. The method of enhancing image dynamic range according to any one of claims 1 to 5, wherein the first proportion fDarkRate is calculated as follows:
wherein dark (i, j) represents a dark channel image of the middle region of the original image, M represents the number of pixels over the length of the middle region of the original image, and N represents the number of pixels over the width of the middle region of the original image; k represents the first pixel threshold; wherein the pixel value J of the dark channel imagedarkThe expression formula of (a) is:
wherein I represents the original image; i iscA certain color channel representing I, Ic(y) a value representing a color channel of a single pixel in said original image; omega (x) is a filtering window area with a pixel point x as the center, and the size of the window is a constant; r, g, b represent R, G, B three color channels.
8. The method of image dynamic range enhancement as claimed in any one of claims 1 to 5, wherein the second scale num1 is expressed as follows:
wherein the numerator represents the number of pixels of R, G, B color channels of the original image, each of which has a pixel value greater than the second pixel threshold g, the denominator being the total number of pixels of the original image, M representing the number of pixels in the length of the middle region of the original image, and N representing the number of pixels in the width of the middle region of the original image; r, g, b represent R, G, B three color channels.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710692608.9A CN107481202B (en) | 2017-08-14 | 2017-08-14 | Method for enhancing dynamic range of image |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710692608.9A CN107481202B (en) | 2017-08-14 | 2017-08-14 | Method for enhancing dynamic range of image |
Publications (2)
Publication Number | Publication Date |
---|---|
CN107481202A CN107481202A (en) | 2017-12-15 |
CN107481202B true CN107481202B (en) | 2020-08-04 |
Family
ID=60600391
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710692608.9A Active CN107481202B (en) | 2017-08-14 | 2017-08-14 | Method for enhancing dynamic range of image |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107481202B (en) |
Families Citing this family (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108470329A (en) * | 2018-02-12 | 2018-08-31 | 深圳市华星光电半导体显示技术有限公司 | A kind of image processing method and system |
CN110390359A (en) * | 2019-01-08 | 2019-10-29 | 电子科技大学 | A kind of recognition methods of Highland Barley In Xizang blade lesion |
CN109858449B (en) * | 2019-02-01 | 2022-08-16 | 安谋科技(中国)有限公司 | Image processing method, apparatus, medium, and system |
CN110009581B (en) * | 2019-03-18 | 2021-02-02 | 深圳市华星光电技术有限公司 | Image processing method, device and storage medium |
JP7510258B2 (en) | 2019-05-27 | 2024-07-03 | キヤノン株式会社 | Image processing device, image processing method, imaging device, program, and storage medium |
CN110852956A (en) * | 2019-07-22 | 2020-02-28 | 江苏宇特光电科技股份有限公司 | Method for enhancing high dynamic range image |
CN111127342B (en) * | 2019-12-05 | 2023-08-08 | Oppo广东移动通信有限公司 | Image processing method, device, storage medium and terminal equipment |
CN111163268B (en) * | 2020-01-09 | 2021-08-24 | 腾讯科技(深圳)有限公司 | Image processing method and device and computer storage medium |
TR202013601A1 (en) * | 2020-08-28 | 2022-03-21 | Aselsan Elektroni̇k Sanayi̇ Ve Ti̇caret Anoni̇m Şi̇rketi̇ | Variable clipping level calculation method for the CLAHE algorithm |
CN116709003A (en) * | 2022-10-09 | 2023-09-05 | 荣耀终端有限公司 | Image processing method and electronic equipment |
Family Cites Families (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR101423835B1 (en) * | 2012-10-15 | 2014-07-29 | 가천대학교 산학협력단 | Liver segmentation method in a medical image |
CN104463816A (en) * | 2014-12-02 | 2015-03-25 | 苏州大学 | Image processing method and device |
CN105225210B (en) * | 2015-10-14 | 2018-03-02 | 南京第五十五所技术开发有限公司 | A kind of self-adapting histogram enhancing defogging method based on dark |
CN106548463B (en) * | 2016-10-28 | 2019-05-10 | 大连理工大学 | Sea fog image automatic defogging method and system based on dark and Retinex |
-
2017
- 2017-08-14 CN CN201710692608.9A patent/CN107481202B/en active Active
Also Published As
Publication number | Publication date |
---|---|
CN107481202A (en) | 2017-12-15 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107481202B (en) | Method for enhancing dynamic range of image | |
Xu et al. | Fast image dehazing using improved dark channel prior | |
EP2852152B1 (en) | Image processing method, apparatus and shooting terminal | |
CN105745914B (en) | Method and system for inverse tone mapping (ITM) | |
US8131098B2 (en) | Image processing device, image processing method, image processing system, program, storage medium, and integrated circuit | |
CN110022469B (en) | Image processing method, image processing device, storage medium and electronic equipment | |
US10013739B2 (en) | Image enhancement methods and systems using the same | |
CN106981054B (en) | Image processing method and electronic equipment | |
GB2549696A (en) | Image processing method and apparatus, integrated circuitry and recording medium | |
US20140079319A1 (en) | Methods for enhancing images and apparatuses using the same | |
CN105208281A (en) | Night scene shooting method and device | |
Pei et al. | Effective image haze removal using dark channel prior and post-processing | |
CN106570838A (en) | Image brightness optimization method and device | |
CN105959510B (en) | A kind of video rapid defogging method | |
CN110298796B (en) | Low-illumination image enhancement method based on improved Retinex and logarithmic image processing | |
CN110852956A (en) | Method for enhancing high dynamic range image | |
US20170347008A1 (en) | Method for adapting a brightness of a high-contrast image and camera system | |
CN106686320B (en) | A kind of tone mapping method based on number density equilibrium | |
CN104299213A (en) | Method for synthesizing high-dynamic image based on detail features of low-dynamic images | |
JP4851505B2 (en) | Image processing apparatus and image processing method | |
CN101873506B (en) | Image processing method for providing depth information and image processing system thereof | |
CN113222869A (en) | Image processing method | |
CN113222870A (en) | Image processing method, device and equipment | |
You et al. | Saturation enhancement of blue sky for increasing preference of scenery images | |
CN110706168A (en) | Image brightness adjusting method |
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 |