CN107305685B - Image contrast enhancement method and apparatus - Google Patents

Image contrast enhancement method and apparatus Download PDF

Info

Publication number
CN107305685B
CN107305685B CN201610246494.0A CN201610246494A CN107305685B CN 107305685 B CN107305685 B CN 107305685B CN 201610246494 A CN201610246494 A CN 201610246494A CN 107305685 B CN107305685 B CN 107305685B
Authority
CN
China
Prior art keywords
pixel
brightness
image
value
values
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
CN201610246494.0A
Other languages
Chinese (zh)
Other versions
CN107305685A (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 CN201610246494.0A priority Critical patent/CN107305685B/en
Publication of CN107305685A publication Critical patent/CN107305685A/en
Application granted granted Critical
Publication of CN107305685B publication Critical patent/CN107305685B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/73Deblurring; Sharpening
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10024Color image

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Facsimile Image Signal Circuits (AREA)
  • Image Processing (AREA)
  • Picture Signal Circuits (AREA)

Abstract

The invention provides an image contrast enhancement method and a device thereof, which calculate the degree of influencing the definition according to the characteristics influencing the definition (such as dense fog, dust or dense smoke) in an image; then, the brightness of the pixel corresponding to the characteristics is adjusted according to the degree so as to enhance the image contrast and remove the phenomenon influencing the definition in the image.

Description

Image contrast enhancement method and apparatus
Technical Field
The present invention relates to an image contrast enhancement method and apparatus, and more particularly, to an image contrast enhancement method and apparatus for removing a region affecting sharpness in an image.
Background
Generally, Histogram Equalization (Histogram Equalization) is mostly used for enhancing image contrast. The method has the problems of unobvious contrast improvement effect, unnatural images and the like. In particular, in the scenes such as dense fog, mountain mist, sand dust or dense smoke, a good result cannot be obtained by enhancing the image contrast by utilizing the common histogram equalization.
Therefore, when the image contrast is enhanced, dense fog, mountain mist, sand dust or dense fog in the image can be removed simultaneously, and the definition of the image can be improved.
Disclosure of Invention
The invention provides an image contrast enhancement method and device, which can remove phenomena (such as dense fog, dust or dense smoke) influencing definition in an image simultaneously besides increasing the image contrast.
An embodiment of the present invention provides an image contrast enhancement method, which is applied to a device for adjusting each pixel in an input image to enhance the contrast of the input image. The method comprises the following steps: receiving each pixel in an input image; sequentially estimating a degree of low contrast of the corresponding pixel according to a pixel characteristic of the corresponding pixel, and converting the degree into an adjusting weight through an increasing function; calculating a plurality of brightness values and an adjustment value corresponding to each brightness value according to a brightness relationship between the corresponding pixel and a plurality of adjacent pixels around the pixel and the adjustment weight of the corresponding pixel in sequence, and generating a brightness distribution histogram of each pixel according to the brightness values and the adjustment values, wherein the brightness distribution histogram represents the relationship between the brightness values and the adjustment values; accumulating the adjustment values of the corresponding brightness values in each brightness distribution histogram to generate a total brightness distribution histogram, wherein the total brightness distribution histogram represents the relationship between the brightness values and the accumulated adjustment values; sequentially accumulating the adjustment value of each brightness value in the total brightness distribution histogram, and taking the accumulated result as the adjustment value corresponding to the current brightness value in the sequential accumulation process; adjusting the adjustment value in equal proportion to a range between a minimum brightness value and a maximum brightness value to generate an image histogram corresponding to the input image, wherein the image histogram represents a plurality of brightness values and an output pixel corresponding to each brightness value; and mapping the luminance value of each pixel to a certain luminance value of the image histogram and outputting the corresponding output pixel.
An embodiment of the present invention provides an image contrast enhancement apparatus for adjusting each pixel of an input image to enhance contrast of the input image. The device comprises an image extraction device and an image processor. The image extraction device receives the input image and sequentially extracts a plurality of pixels in the input image. The image processor is electrically connected with the image extraction device and is used for executing the following steps: receiving each pixel in an input image; sequentially estimating a degree of low contrast of the corresponding pixel according to a pixel characteristic of the corresponding pixel, and converting the degree into an adjusting weight through an increasing function; calculating a plurality of brightness values and an adjustment value corresponding to each brightness value according to a brightness relationship between the corresponding pixel and a plurality of adjacent pixels around the pixel and the adjustment weight of the corresponding pixel in sequence, and generating a brightness distribution histogram of each pixel according to the brightness values and the adjustment values, wherein the brightness distribution histogram represents the relationship between the brightness values and the adjustment values; accumulating the adjustment values of the corresponding brightness values in each brightness distribution histogram to generate a total brightness distribution histogram, wherein the total brightness distribution histogram represents the relationship between the brightness values and the accumulated adjustment values; sequentially accumulating the adjustment value of each brightness value in the total brightness distribution histogram, and taking the accumulated result as the adjustment value corresponding to the current brightness value in the sequential accumulation process; adjusting the adjustment value in equal proportion to a range between a minimum brightness value and a maximum brightness value to generate an image histogram corresponding to the input image, wherein the image histogram represents a plurality of brightness values and an output pixel corresponding to each brightness value; and mapping the luminance value of each pixel to a certain luminance value of the image histogram and outputting the corresponding output pixel.
In summary, embodiments of the present invention provide an image contrast enhancement method and apparatus, which calculate an image histogram according to characteristics of a phenomenon (such as fog, dust, or smoke) affecting sharpness in an image, and adjust each pixel according to the image histogram to output a corresponding output pixel.
For a better understanding of the nature and technical content of the present invention, reference should be made to the following detailed description of the invention, taken in conjunction with the accompanying drawings, which are set forth to illustrate, but are not to be construed to limit the scope of the invention.
Drawings
Fig. 1 is a schematic diagram of an image contrast enhancement apparatus according to an embodiment of the present invention.
Fig. 2 is a flow chart of an image contrast enhancement method according to an embodiment of the present invention.
FIG. 3A is a schematic diagram of the positions of the pixels P12 and P13 in an image according to an embodiment of the invention.
FIG. 3B is a diagram illustrating an embodiment of converting the pixel P12 and its neighboring pixels into RGB image format.
FIG. 4A is a diagram illustrating luminance values of a pixel P12 and its neighboring pixels according to an embodiment of the present invention.
Fig. 4B is a luminance distribution histogram of the pixel P12 according to an embodiment of the present invention.
FIG. 5A is a diagram illustrating luminance values of a pixel P13 and its neighboring pixels according to an embodiment of the present invention.
Fig. 5B is a luminance distribution histogram of the pixel P13 according to an embodiment of the present invention.
FIG. 6A is a histogram of the total luminance distribution of the pixels P12 and P13 according to an embodiment of the present invention.
FIG. 6B is a histogram of the total luminance distribution of the pixels P12 and P13 according to an embodiment of the present invention.
FIG. 6C is an image histogram of pixels P12 and P13 according to an embodiment of the present invention.
Fig. 7 is a flow chart of an image contrast enhancement method according to another embodiment of the present invention.
Description of reference numerals:
100: image contrast enhancement device
110: image extraction device
120: image processor
300: image histogram
Fr: inputting an image
P0-Pn: pixel
P0 'Pn': output pixel
P12 r: red pixel
P12 g: green pixel
P12 b: blue pixel
a1, a2, a3, a 4: potential difference of brightness
b1, b2, b3, b 4: potential difference of brightness
HTgram1, HTgram 2: histogram of brightness distribution
HTgramAll: histogram of total brightness distribution
Ra1, Ra2, Ra3, Ra 4: luminance interval
Rb1, Rb2, Rb3, Rb 4: luminance interval
S310, S320, S330, S340, S350: step (ii) of
S210, S220, S230, S240, S250, S260, S270: step (ii) of
Detailed Description
Hereinafter, the present invention will be described in detail by illustrating various exemplary embodiments thereof through the accompanying drawings. The inventive concept may, however, be embodied in many different forms and should not be construed as limited to the exemplary embodiments set forth herein. Moreover, in the figures, like reference numerals may be used to indicate like elements.
According to the image contrast enhancement method and device provided by the embodiment of the invention, the degree of the definition influenced by the characteristics (such as dense fog, dust or dense smoke) is calculated according to the characteristics influencing the definition in the image; then, the brightness of the pixel corresponding to the characteristics is adjusted according to the degree so as to enhance the image contrast and remove the phenomenon influencing the definition in the image. The image denoising method and the apparatus thereof disclosed in the present invention will be further described below.
First, please refer to fig. 1, which shows a schematic diagram of an image contrast enhancement apparatus according to an embodiment of the present invention. As shown in fig. 1, the image contrast enhancement apparatus 100 is used for adjusting each of the pixels P0-Pn of an input image Fr to enhance the contrast of the input image Fr, and outputting the adjusted output pixels P0 'to Pn'. In this embodiment, the image contrast enhancement apparatus 100 may be a smart phone, a video recorder, a tablet computer, a notebook computer or other apparatuses that need to perform image contrast enhancement, which is not limited in the present invention.
The image contrast enhancement apparatus 100 includes an image extraction device 110 and an image processor 120. As shown in fig. 1, the image extraction device 110 receives an input image Fr and sequentially extracts a plurality of pixels P0 to Pn in the input image Fr. Further, the image extraction device 110 extracts the continuous images, and the input image Fr is one of the continuous images. The input image Fr is composed of pixels P0 Pn.
The image processor 120 is electrically connected to the image extraction device 110 and configured to perform the following steps to sequentially adjust each of the pixels P0-Pn in the input image Fr according to the feature affecting the sharpness of the image, so as to enhance the contrast of the input image Fr and simultaneously remove the feature affecting the sharpness of the input image Fr. For convenience of explanation, the pixel P12 in the input image Fr is explained below as shown in fig. 3A. And those skilled in the art can derive the execution steps for adjusting each of the pixels P0 Pn from the execution steps for adjusting the pixel P12.
Please refer to fig. 1-2. Fig. 2 shows a flow chart of an image contrast enhancement method according to an embodiment of the invention. First, the image processor 120 receives each of the pixels P0 to Pn in the input image Fr to further analyze the features affecting the sharpness in the input image Fr (step S210).
It is to be noted that the feature that affects the sharpness is, for example, an image with fog, dust, or smoke, which belongs to a portion of the input image Fr where the contrast is low. The image processor 120 will further analyze the relationship between the pixels P0 Pn in the input image Fr. Therefore, the image processor 120 estimates the degree of low contrast of the corresponding pixel according to a pixel characteristic of the corresponding pixel in sequence, and converts the degree into an adjustment weight through an increasing function (step S220). Taking fig. 3A as an example, the input image Fr is an image 5 × 5 and is composed of pixels P0 to P24, and the image processor 120 estimates the degree of low contrast for each pixel from the pixel P0, and converts the degree of low contrast for each pixel P0 to P24 into an adjustment weight.
More specifically, the pixel in this embodiment is characterized by a color relationship between the corresponding pixel and a plurality of neighboring pixels located around the pixel. At this time, the image processor 120 converts the corresponding pixel and the neighboring pixels into an RGB image format, and then selects a minimum red pixel, a minimum green pixel, and a minimum blue pixel from the corresponding pixel and the neighboring pixels. Then, the image processor 120 selects a minimum value from the smallest red pixel, the smallest green pixel, and the smallest blue pixel, and takes the minimum value as a degree that the corresponding pixel has low contrast.
Take the pixel P12 of fig. 3A as an example, and please refer to fig. 3A and 3B at the same time. In this example, the neighboring pixels around the pixel P12 are P6-P8, P11-P13 and P16-P18, and the neighboring pixels can also be adjusted according to the actual situation, which is not limited by the invention. First, the image processor 120 converts the pixel P12 and the neighboring pixels P6-P8, P11-P13 and P16-P18 into RGB image format. As shown in FIG. 3B, the red pixel P12r of the pixel P12 is 50 and the red pixels adjacent to the pixels P6-P8, P11-P13 and P16-P18 are all 10; the green pixel P12g of pixel P12 is 60 and the green pixels of the neighboring pixels P6-P8, P11-P13 and P16-P18 are all 15; the blue pixel P12b of the pixel P12 is 70 and the blue pixels adjacent to the pixels P6-P8, P11-P13 and P16-P18 are all 20. Next, the image processor 120 selects the smallest red pixel as 10, the smallest green pixel as 15, and the smallest blue pixel as 20. The image processor 120 will select the minimum value 10 as the degree to which the corresponding pixel P12 has low contrast.
The pixel characteristics of the pixels can be adjusted according to the actual situation, which is not limited in the present invention. After obtaining the low contrast level of P12, the image processor 120 converts the value 10 as the low contrast level into an adjustment weight through an increasing function, and the adjustment weight is 3 in this example. The increment function may be changed according to the actual situation, and the present invention is not limited thereto.
After obtaining the adjustment weight (step S220), the image processor 120 calculates a plurality of adjustment values corresponding to the brightness values and each of the brightness values in sequence according to a brightness relationship between the corresponding pixel and a plurality of neighboring pixels around the pixel and the adjustment weight of the corresponding pixel, and generates a brightness distribution histogram of each pixel accordingly. And the luminance distribution histogram represents the relationship between the plurality of luminance values and the plurality of adjustment values (step S230).
More specifically, in the process of calculating the adjustment values corresponding to the luminance values and each of the luminance values, the image processor 120 first uses the corresponding pixel as the center to form a plurality of groups of luminance differences with each of the neighboring pixels, and extracts the luminance value of the corresponding pixel and the luminance value of each of the neighboring pixels. For the example of FIG. 4A, FIG. 4A shows the luminance values of pixel P12 and its neighboring pixels. In this example, the neighboring pixels are P7, P11, P13 and P17, and the neighboring pixels can also be adjusted according to the actual situation, which is not limited by the present invention. Therefore, the pixel P12 and the neighboring pixels P7, P11, P13 and P17 form 4 groups of brightness differences a1, a2, a3 and a 4. The pixel P12 and the neighboring pixels P7, P11, P13 and P17 have brightness values of 131, 128, 132, 130 and 134, respectively.
Next, the image processor 120 uses the smaller luminance value as a start point value and the larger luminance value as an end point value in each group of luminance differences, and respectively corresponds a range from the start point value to the end point value to a luminance range of the luminance values in the luminance distribution histogram. Taking the above example together with reference to fig. 4A and 4B, the starting value and the ending value of the brightness difference a1 are 128 and 131, and the interval between 128 and 131 will correspond to the brightness interval Ra1 of the brightness values 128-131 in the histogram HTgram 1. Similarly, the starting value of the brightness difference a2 is 131 and the ending value is 132, and the interval from 131 to 132 will correspond to the brightness interval Ra2 of the brightness values 131-132 in the brightness distribution histogram HTgram 1. Similarly, the starting value of the brightness difference a3 is 130 and the ending value is 131, and the interval from 130 to 131 will correspond to the brightness interval Ra3 of the brightness values 130-131 in the brightness distribution histogram HTgram 1. Similarly, the starting value of the brightness difference a4 is 131 and the ending value is 134, and the interval from 131 to 134 will correspond to the brightness interval Ra4 of the brightness values 131-134 in the brightness distribution histogram HTgram 1.
Then, the image processor 120 sequentially adds the adjustment weight of the corresponding pixel to the adjustment value corresponding to each brightness value in the plurality of brightness intervals, and the brightness values respectively correspond to the added adjustment values. In response to the above example, the pixel P12 has an adjustment weight of 3, and the adjustment values corresponding to the luminance values 128-131 respectively added to the luminance range Ra1 (i.e. 3 is added to the adjustment values corresponding to the luminance values 128-131); respectively adding up to the adjustment values corresponding to the brightness values 131-132 of the brightness interval Ra2 (i.e. adding 3 to the adjustment values corresponding to the brightness values 131-132); respectively adding up to the adjustment values corresponding to the brightness values 130-131 of the brightness range Ra3 (i.e. adding 3 to the adjustment values corresponding to the brightness values 130-131); and adding the adjustment values corresponding to the luminance values 131-134 of the luminance range Ra4 (i.e. adding 3 to the adjustment values corresponding to the luminance values 131-134) to generate an added adjustment value. Therefore, the luminance values 128 to 134 correspond to the adjustment values after accumulation of 3, 6, 12, 6, 3, and 3, respectively, as shown in the luminance distribution histogram HTgram1 of the pixel P12 in FIG. 4B.
For another example, as shown in fig. 5A and 5B, the pixel P13 and the neighboring pixels P7-P10 form 4 groups of brightness differences B1, B2, B3 and B4, and the brightness values of the pixel P13 and the neighboring pixels P7-P10 are 130, 128, 135 and 131, respectively. In the luminance bit difference b1, the interval between 128 and 130 corresponds to the luminance interval Rb1 of the luminance values 128-130 in the luminance distribution histogram HTgram 2. In the luminance bit difference b2, the interval between 128 and 130 corresponds to the luminance interval Rb2 of the luminance values 128-130 in the luminance distribution histogram HTgram 2. In the brightness difference b3, the interval from 130 to 135 corresponds to the brightness interval Rb3 of the brightness values 130-135 in the brightness distribution histogram HTgram 2. In the brightness difference b4, the interval from 130 to 131 corresponds to the brightness interval R4 of the brightness values 130-131 in the brightness distribution histogram HTgram 2. Therefore, the luminance values 128 to 135 correspond to the adjustment values after accumulation of 6, 12, 6, 3, respectively, as shown in the luminance distribution histogram HTgram2 of the pixel P13 in FIG. 5B.
After generating a luminance distribution histogram for each pixel (i.e., step S230), the image processor 120 accumulates the adjustment values of the corresponding luminance values in each luminance distribution histogram to generate a total luminance distribution histogram. And the overall luminance distribution histogram represents the relationship between the luminance value and the adjustment value of each pixel (step S240). In connection with the above example, the generation of the luminance distribution histograms HTgram1 and HTgram2 of the pixels P12 and P13 is described, and reference is made to fig. 4B, 5B and 6A. The image processor 120 adds the adjustment values of the corresponding luminance values in the cumulative luminance distribution histograms HTgram1 and HTgram2 to generate a total luminance distribution histogram HTgramALL (as shown in fig. 6A). For example, the adjustment value corresponding to the luminance value 128 is 3+6 ═ 9, that is, the adjustment values corresponding to the luminance values 128 in the cumulative luminance distribution histogram HTgram1 and HTgram 2. For another example, the adjustment value corresponding to the luminance value 130 is 6+12 to 18, that is, the adjustment values corresponding to the luminance value 130 in the cumulative luminance distribution histogram HTgram1 and the HTgram 2.
Next, the image processor 120 sequentially accumulates the adjustment value of each luminance value in the histogram of the total luminance distribution, and uses the accumulated result as the adjustment value corresponding to the current luminance value in the sequential accumulation process (step S250). Please refer to fig. 6A and 6B together with the above example. The image processor 120 accumulates the adjustment values corresponding to the luminance values in the total luminance distribution histogram HTgramALL according to the order of the luminance values 0 to 255, and takes the accumulated result as the adjustment value corresponding to the current luminance value, as shown in fig. 6B. For example, the adjustment value corresponding to the brightness value 127 is 0 (i.e., the adjustment values corresponding to the accumulated brightness values 0-127), and the adjustment value corresponding to the brightness value 128 is 9 (i.e., the adjustment values corresponding to the accumulated brightness values 0-128). For another example, the adjustment value corresponding to the brightness value 133 is 69 (i.e., the adjustment values corresponding to the cumulative brightness values 0-133).
Then, the image processor 120 adjusts the output pixels corresponding to each luminance value according to the accumulated adjustment value to generate an image histogram, where the image histogram represents a plurality of output pixels having luminance values corresponding to each luminance value (step S260). Please refer to fig. 6B and fig. 6C together with the above example. The image processor 120 adjusts the output pixels corresponding to the luminance values 0-255 according to the adjustment value of the histogram HTgramALL of the total luminance distribution to generate the image histogram 300 accordingly. The abscissa of the image histogram 300 is a luminance value of 0 to 255, and the ordinate is an output pixel corresponding to each luminance value. For example, the output pixel corresponding to the luminance value 127 is 255 × 0 (0/78); the output pixel corresponding to the luminance value 130 is 255 × 118 (36/78); the output pixel corresponding to the luminance value 134 is 255 × 245 (75/78); and the output pixel corresponding to the luminance value 135 is 255 × 255 (78/78). Of course, the image processor 120 may also generate the output pixel corresponding to each luminance value by other calculation methods according to the above adjustment values, which is not limited in the present invention.
Finally, the image processor 120 maps the luminance value of each of the pixels P0 to Pn to a certain luminance value of the image histogram and outputs the corresponding output pixels P0 'to Pn' (step S270).
Accordingly, the image contrast enhancement method and apparatus provided by the embodiments of the present invention can increase the image contrast between the pixels P0-Pn and simultaneously remove the phenomenon affecting the sharpness (such as fog, dust or smoke) in the image.
Referring next to fig. 7, a flowchart of an image contrast enhancement method according to another embodiment of the invention is shown. In contrast to the previous embodiment, the image processor 120 will perform the steps S320 and S330 after receiving each of the pixels P0-Pn in the input image Fr (i.e., step S310).
In step S320, the image processor 120 performs histogram calculation, which is the same as steps S220 to S270 of the previous embodiment, and therefore, the detailed description thereof is omitted. In step S330, the image processor 120 sequentially adjusts the corresponding pixels P0 Pn by a conversion function to generate adjusted pixels. The conversion function may be Gamma Correction (Gamma Correction), Histogram Equalization (Histogram Equalization), Adaptive Histogram Equalization (Adaptive Histogram Equalization), or other conversion functions that can adjust the pixels P0 Pn, which is not limited by the invention.
After step S330, the image processor 120 generates a pixel scale according to the pixel characteristics of the corresponding pixel (step S340). More specifically, the pixel characteristic is a color relationship of the corresponding pixel. Therefore, in the process of generating the pixel scale, the image processor 120 converts the corresponding pixels into red pixels, green pixels and blue pixels in an RGB image format. The image processor 120 selects a minimum value from the red, green and blue pixels, and adaptively adjusts the selected minimum value to be between 0 and 1 as a pixel ratio. In the present embodiment, the color relationship is a relationship among red pixels, green pixels and blue pixels in an RGB image format, and may be other color relationships, which is not limited in the present invention.
After obtaining the pixel ratio (i.e., step S340), the image processor 120 blends (blending) the corresponding output pixel with the adjusted pixel according to the pixel ratio to generate a blended output pixel (step S350). More specifically, the image processor 120 sets the weight of the corresponding output pixel to be the pixel ratio, and sets the weight of the adjusted pixel to be one minus the pixel ratio. The image processor 120 will then calculate a weighted sum of the corresponding output pixel and the adjusted pixel to produce a blended output pixel. The blended output pixel can be expressed as the following equation (1), as follows:
Figure GDA0002270917680000091
where Pi "is the blended output pixel, Pi' is the output pixel, Pfi is the adjusted pixel generated in step 330, and ω is the pixel ratio.
Accordingly, the image contrast enhancement method and apparatus provided by the embodiment of the present invention can adjust the ratio of the output pixel Pi' to the adjusted pixel Pfi in the mixed output pixel Pi ″ according to the amount of influence on the sharpness (such as fog, dust or smoke) in the image. If the influence on the sharpness is large, the image processor 120 calculates a high pixel ratio; conversely, if the influence on the sharpness is small, the image processor 120 calculates a low pixel ratio.
In summary, the image contrast enhancement method and apparatus provided in the embodiments of the present invention calculate the degree of the sharpness affected by the features (such as dense fog, dust, or dense smoke) according to the features affecting the sharpness in the image; then, the brightness of the pixel corresponding to the characteristics is adjusted according to the degree so as to enhance the image contrast and remove the phenomenon influencing the definition in the image.
The above description is only an example of the present invention, and is not intended to limit the scope of the present invention.

Claims (10)

1. An image contrast enhancement method is applied to an image contrast enhancement device for adjusting each pixel of an input image to enhance the contrast of the input image, and the method comprises:
receiving each pixel in the input image;
sequentially estimating a degree of low contrast of the corresponding pixel according to a pixel characteristic of the corresponding pixel, and converting the degree into an adjusting weight through an increasing function;
calculating a plurality of brightness values and an adjustment value corresponding to each brightness value according to a brightness relation between the corresponding pixel and a plurality of adjacent pixels around the pixel and the adjustment weight of the corresponding pixel in sequence, and generating a brightness distribution histogram of each pixel according to the brightness values and the adjustment values, wherein the brightness distribution histogram represents the relation between the brightness values and the adjustment values;
accumulating the adjustment values of the corresponding brightness values in each brightness distribution histogram to generate a total brightness distribution histogram, wherein the total brightness distribution histogram represents the relationship between the brightness values and the accumulated adjustment values;
sequentially accumulating the adjustment value of each brightness value in the total brightness distribution histogram, and taking the accumulated result as the adjustment value corresponding to the current brightness value in the sequential accumulation process;
adjusting an output pixel corresponding to each brightness value according to the accumulated adjustment values to generate an image histogram, wherein the image histogram represents the brightness values and the output pixel corresponding to each brightness value; and
and mapping the brightness value of each pixel to a certain brightness value of the image histogram, and outputting the corresponding output pixel.
2. The image contrast enhancement method of claim 1, wherein the step of estimating the degree to which the corresponding pixel has low contrast, further comprises:
converting the corresponding pixel and the adjacent pixels into an RGB image format;
selecting a smallest red pixel, a smallest green pixel and a smallest blue pixel from the corresponding pixel and the adjacent pixels; and
selecting a minimum value from the smallest red pixel, the smallest green pixel and the smallest blue pixel, and using the minimum value as the degree of the corresponding pixel.
3. The method of claim 1, wherein the step of calculating the adjustment value corresponding to each of the luminance values further comprises:
forming a plurality of groups of brightness differences with each adjacent pixel by taking the corresponding pixel as a center, and extracting the brightness value of the corresponding pixel and the brightness value of each adjacent pixel;
in each group of brightness difference, using a smaller brightness value as a starting point value and a larger brightness value as an end point value, and respectively corresponding a range from the starting point value to the end point value to a brightness range of the brightness values in the brightness distribution histogram; and
and sequentially adding the adjusting weight of the corresponding pixel to the adjusting value corresponding to each brightness value in the brightness intervals, wherein the brightness values respectively correspond to the added adjusting values.
4. The method of image contrast enhancement as claimed in claim 1, wherein after the step of receiving each of the pixels in the input image, further comprising:
sequentially adjusting the corresponding pixels through a conversion function to generate the adjusted pixels;
generating a pixel proportion according to the pixel characteristic of the corresponding pixel; and
and mixing the corresponding output pixel and the adjusted pixel according to the pixel proportion to generate the mixed output pixel.
5. The image contrast enhancement method of claim 4, wherein the pixel characteristic is a corresponding color relationship of the pixel, and the step of generating the pixel scale further comprises:
converting the corresponding pixel into a red pixel, a green pixel and a blue pixel in an RGB image format; and
a minimum value is selected from the red, green and blue pixels and adaptively adjusted to be between 0 and 1 as the pixel ratio.
6. The image contrast enhancement method of claim 4, wherein the step of blending the corresponding output pixel with the adjusted pixel according to the pixel proportion further comprises:
setting the weight of the corresponding output pixel as the pixel proportion, and setting the adjusted weight of the pixel as one minus the pixel proportion;
and calculating the weighted sum of the corresponding output pixel and the adjusted pixel to generate the mixed output pixel.
7. An image contrast enhancement apparatus for adjusting each pixel of an input image to enhance the contrast of the input image, the apparatus comprising:
an image extraction device for receiving the input image and extracting a plurality of pixels in the input image in sequence;
an image processor electrically connected to the image extracting device for executing the following steps:
receiving each pixel in the input image;
sequentially estimating a degree of low contrast of the corresponding pixel according to a pixel characteristic of the corresponding pixel, and converting the degree into an adjusting weight through a monotone increasing function;
calculating a plurality of brightness values and an adjustment value corresponding to each brightness value according to a brightness relation between the corresponding pixel and a plurality of adjacent pixels around the pixel and the adjustment weight of the corresponding pixel in sequence, and generating a brightness distribution histogram of each pixel according to the brightness values and the adjustment values, wherein the brightness distribution histogram represents the relation between the brightness values and the adjustment values;
accumulating the adjustment values of the corresponding brightness values in each brightness distribution histogram to generate a total brightness distribution histogram, wherein the total brightness distribution histogram represents the relationship between the brightness values and the accumulated adjustment values;
sequentially accumulating the adjustment value of each brightness value in the total brightness distribution histogram, and taking the accumulated result as the adjustment value corresponding to the current brightness value in the sequential accumulation process;
adjusting an output pixel corresponding to each brightness value according to the accumulated adjustment values to generate an image histogram, wherein the image histogram represents the brightness values and the output pixel corresponding to each brightness value; and
and mapping the brightness value of each pixel to a certain brightness value of the image histogram, and outputting the corresponding output pixel.
8. The image contrast enhancement device of claim 7, wherein the image processor sequentially adjusts the corresponding pixels through a transfer function to generate the adjusted pixels, generates a pixel ratio according to the pixel characteristics of the corresponding pixels, and blends the corresponding output pixels and the adjusted pixels according to the pixel ratio to generate the blended output pixels.
9. The image contrast enhancement device of claim 8, wherein the pixel characteristic is a color relationship of the corresponding pixel, and in generating the pixel scale, the image processor converts the corresponding pixel into a red pixel, a green pixel, and a blue pixel in an RGB image format, selects a minimum value from the red pixel, the green pixel, and the blue pixel, and adaptively adjusts the minimum value to be between 0 and 1 as the pixel scale.
10. The image contrast enhancement device of claim 8, wherein when blending the corresponding output pixel and the adjusted pixel according to the pixel scale, the image processor sets the weight of the corresponding output pixel to the pixel scale, sets the weight of the adjusted pixel to one minus the pixel scale, and calculates the weighted sum of the corresponding output pixel and the adjusted pixel to generate the blended output pixel.
CN201610246494.0A 2016-04-20 2016-04-20 Image contrast enhancement method and apparatus Active CN107305685B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610246494.0A CN107305685B (en) 2016-04-20 2016-04-20 Image contrast enhancement method and apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610246494.0A CN107305685B (en) 2016-04-20 2016-04-20 Image contrast enhancement method and apparatus

Publications (2)

Publication Number Publication Date
CN107305685A CN107305685A (en) 2017-10-31
CN107305685B true CN107305685B (en) 2020-06-05

Family

ID=60152208

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610246494.0A Active CN107305685B (en) 2016-04-20 2016-04-20 Image contrast enhancement method and apparatus

Country Status (1)

Country Link
CN (1) CN107305685B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110049225B (en) * 2018-01-15 2021-01-05 瑞昱半导体股份有限公司 Contrast enhancement method and device based on histogram adjustment
CN110717862B (en) * 2018-07-11 2022-07-19 瑞昱半导体股份有限公司 Contrast enhancement method based on dynamic range compression and electronic device thereof

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101814179A (en) * 2009-02-19 2010-08-25 富士通株式会社 Image enhancement method and image enhancement device
CN103034979A (en) * 2012-11-30 2013-04-10 声泰特(成都)科技有限公司 Ultrasonic image definition improving method
CN105427265A (en) * 2015-12-25 2016-03-23 武汉鸿瑞达信息技术有限公司 Color image contrast enhancement method and system
CN105447822A (en) * 2014-06-27 2016-03-30 展讯通信(上海)有限公司 Image enhancement method, device and system

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10490167B2 (en) * 2014-03-25 2019-11-26 Intel Corporation Techniques for image enhancement using a tactile display

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101814179A (en) * 2009-02-19 2010-08-25 富士通株式会社 Image enhancement method and image enhancement device
CN103034979A (en) * 2012-11-30 2013-04-10 声泰特(成都)科技有限公司 Ultrasonic image definition improving method
CN105447822A (en) * 2014-06-27 2016-03-30 展讯通信(上海)有限公司 Image enhancement method, device and system
CN105427265A (en) * 2015-12-25 2016-03-23 武汉鸿瑞达信息技术有限公司 Color image contrast enhancement method and system

Also Published As

Publication number Publication date
CN107305685A (en) 2017-10-31

Similar Documents

Publication Publication Date Title
CN107680056B (en) Image processing method and device
TWI591583B (en) Image contrast enhancement method and apparatus thereof
US7421120B2 (en) Apparatus correcting image by luminance histogram
US8965120B2 (en) Image processing apparatus and method of controlling the same
US20100329553A1 (en) Image signal processing device
CN105407296B (en) Real-time video enhancement method and device
JP4810473B2 (en) Image processing apparatus and image processing program
GB2547842A (en) Image processing device and method, image pickup device, program, and recording medium
JP5648849B2 (en) Image processing apparatus and image processing method
US8036459B2 (en) Image processing apparatus
CN107305685B (en) Image contrast enhancement method and apparatus
US8294791B2 (en) Image correction apparatus for digital dodging
JP2014010776A (en) Image processing apparatus, image processing method, and program
JP2005130486A (en) Video signal processing apparatus
CN115239578A (en) Image processing method and device, computer readable storage medium and terminal equipment
WO2016200480A1 (en) Color filter array scaler
JP2012044560A (en) Image processing apparatus, image processing method, and imaging apparatus
KR20160069452A (en) Image processing device, image processing method and program
JP5312171B2 (en) Image processing apparatus and method
CN110717862B (en) Contrast enhancement method based on dynamic range compression and electronic device thereof
CN115514946B (en) Method, system, electronic device and storage medium for adjusting image quality
JP5754929B2 (en) Image processing apparatus and image processing method
RU2008120938A (en) METHOD AND DEVICE FOR INCREASING CONTRAST
JP6843510B2 (en) Image processing equipment, image processing methods and programs
JP5775413B2 (en) Image processing apparatus, image processing method, and program

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