CN112259048B - Self-adaptive Gamma curve adjusting method - Google Patents

Self-adaptive Gamma curve adjusting method Download PDF

Info

Publication number
CN112259048B
CN112259048B CN202011154950.1A CN202011154950A CN112259048B CN 112259048 B CN112259048 B CN 112259048B CN 202011154950 A CN202011154950 A CN 202011154950A CN 112259048 B CN112259048 B CN 112259048B
Authority
CN
China
Prior art keywords
gamma
curve
histogram
interval
coefficient
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
CN202011154950.1A
Other languages
Chinese (zh)
Other versions
CN112259048A (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.)
Hangzhou Guoxin Microelectronics Co.,Ltd.
Original Assignee
Hangzhou Nationalchip Science & Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hangzhou Nationalchip Science & Technology Co ltd filed Critical Hangzhou Nationalchip Science & Technology Co ltd
Priority to CN202011154950.1A priority Critical patent/CN112259048B/en
Publication of CN112259048A publication Critical patent/CN112259048A/en
Application granted granted Critical
Publication of CN112259048B publication Critical patent/CN112259048B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G09EDUCATION; CRYPTOGRAPHY; DISPLAY; ADVERTISING; SEALS
    • G09GARRANGEMENTS OR CIRCUITS FOR CONTROL OF INDICATING DEVICES USING STATIC MEANS TO PRESENT VARIABLE INFORMATION
    • G09G3/00Control arrangements or circuits, of interest only in connection with visual indicators other than cathode-ray tubes
    • G09G3/20Control arrangements or circuits, of interest only in connection with visual indicators other than cathode-ray tubes for presentation of an assembly of a number of characters, e.g. a page, by composing the assembly by combination of individual elements arranged in a matrix no fixed position being assigned to or needed to be assigned to the individual characters or partial characters
    • G09G3/22Control arrangements or circuits, of interest only in connection with visual indicators other than cathode-ray tubes for presentation of an assembly of a number of characters, e.g. a page, by composing the assembly by combination of individual elements arranged in a matrix no fixed position being assigned to or needed to be assigned to the individual characters or partial characters using controlled light sources
    • G09G3/30Control arrangements or circuits, of interest only in connection with visual indicators other than cathode-ray tubes for presentation of an assembly of a number of characters, e.g. a page, by composing the assembly by combination of individual elements arranged in a matrix no fixed position being assigned to or needed to be assigned to the individual characters or partial characters using controlled light sources using electroluminescent panels
    • G09G3/32Control arrangements or circuits, of interest only in connection with visual indicators other than cathode-ray tubes for presentation of an assembly of a number of characters, e.g. a page, by composing the assembly by combination of individual elements arranged in a matrix no fixed position being assigned to or needed to be assigned to the individual characters or partial characters using controlled light sources using electroluminescent panels semiconductive, e.g. using light-emitting diodes [LED]
    • G09G3/3208Control arrangements or circuits, of interest only in connection with visual indicators other than cathode-ray tubes for presentation of an assembly of a number of characters, e.g. a page, by composing the assembly by combination of individual elements arranged in a matrix no fixed position being assigned to or needed to be assigned to the individual characters or partial characters using controlled light sources using electroluminescent panels semiconductive, e.g. using light-emitting diodes [LED] organic, e.g. using organic light-emitting diodes [OLED]
    • GPHYSICS
    • G09EDUCATION; CRYPTOGRAPHY; DISPLAY; ADVERTISING; SEALS
    • G09GARRANGEMENTS OR CIRCUITS FOR CONTROL OF INDICATING DEVICES USING STATIC MEANS TO PRESENT VARIABLE INFORMATION
    • G09G5/00Control arrangements or circuits for visual indicators common to cathode-ray tube indicators and other visual indicators
    • G09G5/10Intensity circuits

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Computer Hardware Design (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Picture Signal Circuits (AREA)
  • Processing Of Color Television Signals (AREA)

Abstract

The invention discloses a self-adaptive Gamma curve adjusting method. The existing method adopts single Gamma curve adjustment and has poor adaptability. The method comprises the steps of firstly, conducting brightness statistics on an image brightness domain to be analyzed to obtain a histogram interval, and then conducting partition proportion coefficient operation on the histogram interval to obtain an adjustment coefficient of each interval; setting low contrast GammalowCurve and high contrast GammahighA curve; finally, according to the adjustment coefficient and division threshold value of each histogram interval, Gamma is obtainedlowCurve and GammahighAnd fitting the curve. The method can adaptively adjust contrast and brightness, can effectively analyze the complexity of the current scene, identifies the contrast required by the current scene, and can more accurately perform adaptive Gamma curve correction according to the change of the scene and the light source.

Description

Self-adaptive Gamma curve adjusting method
Technical Field
The invention belongs to image technical processing, and particularly relates to a self-adaptive Gamma curve adjusting method.
Background
Gamma results from the response curve of a CRT (display/television), i.e. its non-linear dependence of luminance on input voltage. Because the electro-optical characteristics of red, green and blue colors of the liquid crystal screen are inconsistent, the color difference of each gray scale is large, and the color of each gray scale needs to be corrected. Especially, gray scale errors of the dark field are very obvious, and color errors of each gray scale cannot be eliminated through white balance adjustment. And only after the colors of the gray scales are consistent, the color temperature can be adjusted to the required color temperature through the white balance adjustment of the bright and dark fields. On the other hand, the luminance of the display is relatively high, and in order to increase the transmittance of the display and to better represent the color, the luminance of the display needs to be nonlinearly corrected. These are all accomplished by GAMMA correction of the display. After the GAMMA curve is corrected, the following purposes can be realized: the color of the gray scale of the dark field is obviously improved, the color error of each gray scale is obviously reduced, the color detail of the dark field is clear, the brightness and the color of the image are consistent, the transparent brightness is good, and the contrast is obvious.
At present, a conventional Gamma curve correction method is to generate a Gamma curve table based on a preset Gamma curve, and obtain a corrected Gamma value by obtaining an input pixel value and substituting the input pixel value into the Gamma curve table, so as to reduce the pixel brightness distortion caused by the physical characteristics of the display.
The current Gamma correction method still has certain defects in the field of video monitoring, a single Gamma curve can achieve good image effects for fixed scenes, but various over-correction or under-correction conditions can occur in correction under different scenes. For example, in the monitoring field, due to the diversification of the monitored scenes, there are situations of scene change and light change, and in such situations, a single Gamma curve has no good adaptability to the changes, and the correction at this time may cause serious distortion of contrast, even for some areas, the video information is lost due to improper contrast adjustment, and the like.
Disclosure of Invention
The invention provides a self-adaptive Gamma curve adjusting method in consideration of the contrast problem caused by the fact that a single Gamma curve cannot be effectively corrected under the diversified scenes of scenes and rays.
The method firstly carries out histogram statistics, then analyzes the histogram, calibrates the Gamma curve and finally carries out Gamma curve fitting.
The method comprises the following steps of (1) carrying out brightness statistics on the image brightness domain needing to be analyzed, and specifically comprises the following steps:
(1-1) extracting a brightness domain of an image to be analyzed;
(1-2) counting the number of pixel values in the brightness domain of the image to be analyzed, and counting 2kA gray level, k 8,10,12, resulting in 2kSegment histogram G2k];
(1-3) to G [ 2]k]Dividing the interval to obtain n histogram intervals
Figure BDA0002742419920000021
t=0,T[1],T[2],L,T[n],2k,T[i]A division threshold value for the ith histogram interval, i ═ 1,2, L, n;
n is an even number and is configured by a user, n is more than or equal to 6 and less than or equal to 16, and the higher the configured n value is, the higher the precision is; value of interval division
Figure BDA0002742419920000022
An arithmetic distribution.
Step (2) carrying out partition proportion coefficient operation on the histogram interval H [ n ] to finally obtain the adjustment coefficient of each interval, wherein the specific method is as follows:
(2-1) calculating the proportional coefficients of m histogram intervals, the proportional coefficient of each histogram interval
Figure BDA0002742419920000023
j=1,2,L,m,
Figure BDA0002742419920000025
(2-2) expanding the scaling factor into n histogram intervals according to R [ j ], wherein the expanding method comprises the following steps: r < m +1 > ═ R < m >, R < m +2 > ═ R < m-1 >, R < n > -R < 1 >;
(2-3) in order to further improve the sensitivity of Gamma to the scene, designing a weight coefficient W [ n ] to participate in improving the sensitivity of the algorithm to the scene analysis, and adjusting the Gamma curve more quickly to adapt to the scene;
according to the number n of the intervals of the histogram interval, a weighting coefficient W [ i ] of each interval is set by a user in a self-defining way, and weighting operation is carried out, so that an adjusting coefficient C [ i ] is equal to R [ i ] multiplied by W [ i ].
Step (3) setting low contrast GammalowCurve and high contrast GammahighA curve; wherein, GammalowThe curve is Gamma 1.3-2.0 curvehighThe curve is Gamma 2.5-4.0 curve.
Step (4) according to Ci]And T [ i ]]For GammalowCurve and GammahighAnd (3) fitting a curve, wherein the specific method comprises the following steps:
(4-1) pairs of Cj]Linear interpolation is carried out to obtain 2kSection interpolation coefficient F [ l ]]:
Figure BDA0002742419920000024
Wherein the content of the first and second substances,
l=1,2,L,2k
Figure BDA0002742419920000031
| g | represents taking the absolute value,
Figure BDA0002742419920000033
represents rounding up;
(4-2) by F [ l]For GammalowCurve and GammahighFitting the curve to obtain the final fitted Gamma curve Gammafit,GammalowCurve, GammahighCurve, GammafitThe curves all contain 2kValues:
Figure BDA0002742419920000032
the method fully considers the condition of complex scenes with diversified light rays and scenes, ensures that the Gamma correction can self-adaptively adjust the contrast and the brightness under different light sources and scene scenes, and cannot cause the conditions of insufficient image contrast, video information loss caused by over-strong contrast and the like. After the histogram of the image is analyzed, the complexity of the current scene can be effectively analyzed, and what contrast is needed by the current scene is identified, so that the Gamma curve is controlled, and the purpose of adjusting the contrast is achieved. By the method, the self-adaptive Gamma curve correction can be more accurately carried out according to the change of scenes and light sources.
Drawings
FIG. 1 is a general flow chart of the process of the present invention;
FIG. 2 is a diagram illustrating histogram statistical partitioning according to an embodiment of the present invention;
fig. 3 is a schematic diagram of a Gamma calibration curve according to an embodiment of the present invention.
Detailed Description
The invention will be further described with reference to the accompanying drawings and specific embodiments, which are illustrative and are not to be construed as limiting the invention.
Referring to fig. 1, an adaptive Gamma curve adjusting method first performs statistics on a histogram, then performs analysis on the histogram, then performs calibration on a Gamma curve, and finally performs fitting on the Gamma curve.
The method for carrying out brightness statistics on the image brightness domain needing to be analyzed comprises the following specific steps:
extracting a brightness domain of an image to be analyzed;
the number of the pixel values of the brightness domain of the image to be analyzed is counted to obtain 2kA gray level, k 8,10,12, resulting in 2kSegment histogram G2k](ii) a This embodiment selects k to 8.
For an image to be analyzed, an image in a luminance domain is extracted, and when k is 8, the number of pixel values of the image in the luminance domain is counted, and 256 gray levels in total are counted, and the number of pixels appearing in each gray level is counted to obtain 256 sections of histograms G [256 ].
The 256 sections of histograms are subjected to interval division to obtain n histogram intervals
Figure BDA0002742419920000041
t=0,T[1],T[2],L,T[n],2k,T[i]Is the dividing threshold of the ith histogram interval, i is 1,2, L, n.
n is an even number and is configured by a user, n is more than or equal to 6 and less than or equal to 16, and the higher the configured n value is, the higher the precision is; value of interval division
Figure BDA0002742419920000042
An arithmetic distribution. In this embodiment, n is 6.
T[t]A threshold is divided for the interval. According to the determined number n of histogram sections being 6, the method proceeds
Figure BDA0002742419920000043
The distribution of the equal difference can obtain T [ T ]]=[0,43,86,129,172,215,256]As shown in fig. 2.
Carrying out partition proportion coefficient operation on the interval H [ n ] of the histogram to finally obtain the adjustment coefficient of each interval, wherein the specific method comprises the following steps:
calculating the proportional coefficients of m histogram intervals, the proportional coefficient of each histogram interval
Figure BDA0002742419920000044
j=1,2,L,m,
Figure BDA0002742419920000045
According to the scaling coefficient expanded into n histogram intervals by R [ j ], the expanding method is as follows: r < m +1 > ═ R < m >, R < m +2 > ═ R < m-1 >,. cndot, and R < n > -R < 1 >.
In order to further improve the sensitivity of Gamma to scenes, a weight coefficient W [ n ] is designed to participate in improving the sensitivity of an algorithm to scene analysis, and a Gamma curve is adjusted more quickly to adapt to scenes.
According to the number n of the intervals of the histogram interval being 6, setting a weighting coefficient W [ i ] of each interval by a user to perform weighting operation, and obtaining an adjusting coefficient C [ i ] ═ R [ i ] × W [ i ]; in this example, W [ n ] is [1,1,1,1,1,1 ].
The Gamma curve is calibrated by the specific method:
setting low contrast GammalowCurve and high contrast GammahighA curve; wherein, GammalowThe curve is Gamma 1.3-2.0 curvehighThe curve is Gamma 2.5-4.0 curve. As shown in fig. 3.
Fitting to a Gamma curve, i.e. according to Ci]And T [ i ]]For GammalowCurve and GammahighAnd (3) fitting a curve, wherein the specific method comprises the following steps:
to C [ i ]]Linear interpolation is carried out to obtain 2kSection interpolation coefficient F [ l ]]:
Figure BDA0002742419920000051
By F [ l]For GammalowCurve and GammahighFitting the curve to obtain the final fitted Gamma curve Gammafit,GammalowCurve, GammahighCurve, GammafitThe curves all contain 2kValues:
Figure BDA0002742419920000052
the Gamma finally obtained isfitThe curve is used for Gamma correction.
The method firstly considers that under different light rays and scenes, the brightness of images has great difference, and the difference of the scenes causes that a fixed Gamma curve can not be completely adapted, the conditions of overexposure and over-darkness occur in partial scenes, and the serious scenes cause the details of videos to be lost, thereby causing the problems of ineffective monitoring and shot photos and the like.
The method judges the histogram distribution condition of the current scene according to the analysis of the histogram on the scene, and can effectively and correctly analyze what contrast is needed by the current scene, thereby controlling the adjustment of the Gamma curve. Based on the mixing of multiple Gamma and the judgment of scene brightness, good adaptability can be obtained under different scenes and different light sources, so as to achieve the purpose of adapting to the control of scene contrast.
The foregoing is only a preferred embodiment of the present invention, and it should be noted that, for those skilled in the art, various modifications and improvements can be made without departing from the principle of the present invention, and such modifications and improvements should also be considered within the scope of the present invention.

Claims (1)

1. A self-adaptive Gamma curve adjusting method is characterized by comprising the following steps:
the method comprises the following steps that (1) brightness statistics is carried out on an image brightness domain to be analyzed to obtain n histogram intervals H [ n ], wherein n is an even number, and n is more than or equal to 6 and less than or equal to 16; the specific method comprises the following steps:
(1-1) extracting a brightness domain of an image to be analyzed;
(1-2) counting the number of pixel values in the brightness domain of the image to be analyzed, and counting 2kA gray level, k 8,10,12, resulting in 2kSegment histogram G2k];
(1-3) to G [ 2]k]Dividing the interval to obtain n histogram intervals
Figure FDA0003123862140000011
Figure FDA0003123862140000012
Value of interval division
Figure FDA0003123862140000013
An arithmetic distribution;
step (2) carrying out partition proportion coefficient operation on the histogram interval H [ n ] to obtain an adjustment coefficient of each interval; the specific method comprises the following steps:
(2-1) calculating the proportional coefficients of m histogram intervals, the proportional coefficient of each histogram interval
Figure FDA0003123862140000014
(2-2) expanding the scaling factor into n histogram intervals according to R [ j ], wherein the expanding method comprises the following steps: r < m +1 > ═ R < m >, R < m +2 > ═ R < m-1 >, R < n > -R < 1 >;
(2-3) setting a weight coefficient W [ i ] of each section, and performing weighting operation to obtain an adjustment coefficient C [ i ] ═ R [ i ] × W [ i ];
step (3) setting low contrast GammalowCurve and high contrast GammahighA curve; the low contrast GammalowThe curve is Gamma 1.3-2.0, and the high contrast GammahighThe curve is a Gamma 2.5-4.0 curve;
step (4) according to Ci]And T [ i ]]For GammalowCurve and GammahighFitting of a curve, Ci]For the adjustment coefficient of the ith histogram bin, Ti]A division threshold value for the ith histogram bin, i ═ 1,2, …, n; the specific method comprises the following steps:
(4-1) pairs of Cj]Linear interpolation is carried out to obtain 2kSection interpolation coefficient F [ l ]]:
Figure FDA0003123862140000021
Wherein the content of the first and second substances,
l=1,2,…,2k
Figure FDA0003123862140000022
i represents taking the absolute value,
Figure FDA0003123862140000023
represents rounding up;
(4-2) by F [ l]For GammalowCurve and GammahighFitting the curve to obtain the final fitted Gamma curve Gammafit
Figure FDA0003123862140000024
CN202011154950.1A 2020-10-26 2020-10-26 Self-adaptive Gamma curve adjusting method Active CN112259048B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011154950.1A CN112259048B (en) 2020-10-26 2020-10-26 Self-adaptive Gamma curve adjusting method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011154950.1A CN112259048B (en) 2020-10-26 2020-10-26 Self-adaptive Gamma curve adjusting method

Publications (2)

Publication Number Publication Date
CN112259048A CN112259048A (en) 2021-01-22
CN112259048B true CN112259048B (en) 2021-08-06

Family

ID=74262105

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011154950.1A Active CN112259048B (en) 2020-10-26 2020-10-26 Self-adaptive Gamma curve adjusting method

Country Status (1)

Country Link
CN (1) CN112259048B (en)

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TW366512B (en) * 1996-09-18 1999-08-11 Matsushita Electric Ind Co Ltd Plasma display device and the brightness control method
JP2004157526A (en) * 2002-10-15 2004-06-03 Nec Electronics Corp Controller-driver, display device, and display method
CN106886386B (en) * 2017-01-23 2019-06-04 苏州科达科技股份有限公司 The method for generating high-dynamics image from low dynamic image
CN206573822U (en) * 2017-03-16 2017-10-20 杭州仙果科技有限公司 A kind of environment self-adaption formula LED backlight liquid crystal display
CN111402780B (en) * 2020-06-05 2020-09-08 南京芯视元电子有限公司 Display system for improving DAC precision inside micro-display through time division display

Also Published As

Publication number Publication date
CN112259048A (en) 2021-01-22

Similar Documents

Publication Publication Date Title
KR101454609B1 (en) Image processing method and apparatus
KR100953768B1 (en) Compensation for adjacent pixel interdependence
CN112752023B (en) Image adjusting method and device, electronic equipment and storage medium
US20220114928A1 (en) Display management with ambient light compensation
CN109785240B (en) Low-illumination image enhancement method and device and image processing equipment
US9087385B2 (en) Method for improving images captured underwater
US8111301B2 (en) Method of performing auto white balance in YCbCr color space
EP1851951A2 (en) Real-time content based gamma adjustment for digital video display
KR20030072534A (en) Linear average picture level detecting apparatus and automatic normalizing gain embodying method
CN100438570C (en) Sharpness enhancement
JP4352730B2 (en) Auto white balance processing apparatus and method, and image signal processing apparatus
US7336849B2 (en) Exposure correction method for digital images
US20240161452A1 (en) Image enhancement method, device, and computer program
CN112259048B (en) Self-adaptive Gamma curve adjusting method
CN110852971B (en) Video defogging method based on dark channel prior and Retinex and storage medium
Reflectance–Illuminance Retinex image processing: improving the visual realism of color images
CN108830815B (en) Method, device and terminal for improving contrast of image dark area
CN112991240B (en) Image self-adaptive enhancement algorithm for real-time image enhancement
CN113596422A (en) Method for adjusting color correction matrix CCM and monitoring equipment
CN108022226B (en) High dynamic image display method based on biological visual mechanism
CN111816117A (en) Method for adjusting picture brightness of display panel and display device
JP2006180267A (en) Picture quality correcting circuit
CN115205182A (en) Image processing method and device
CN112700752B (en) Brightness adjusting method
Choi et al. Enhanced Depiction of High Dynamic Images Using Tone Mapping Operator and Chromatic Adaptation Transform

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
CP03 Change of name, title or address

Address after: 310012 5-6 / F, block a, East Software Park Innovation Building, 90 Wensan Road, Hangzhou City, Zhejiang Province

Patentee after: Hangzhou Guoxin Microelectronics Co.,Ltd.

Country or region after: China

Address before: 310012 5-6 / F, block a, East Software Park Innovation Building, 90 Wensan Road, Hangzhou City, Zhejiang Province

Patentee before: HANGZHOU NATIONALCHIP SCIENCE & TECHNOLOGY Co.,Ltd.

Country or region before: China