CN111127343A - Histogram double-control infrared image contrast enhancement method - Google Patents

Histogram double-control infrared image contrast enhancement method Download PDF

Info

Publication number
CN111127343A
CN111127343A CN201911237886.0A CN201911237886A CN111127343A CN 111127343 A CN111127343 A CN 111127343A CN 201911237886 A CN201911237886 A CN 201911237886A CN 111127343 A CN111127343 A CN 111127343A
Authority
CN
China
Prior art keywords
histogram
value
contrast enhancement
infrared image
processing
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.)
Granted
Application number
CN201911237886.0A
Other languages
Chinese (zh)
Other versions
CN111127343B (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.)
Huaqiao University
Original Assignee
Huaqiao University
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 Huaqiao University filed Critical Huaqiao University
Priority to CN201911237886.0A priority Critical patent/CN111127343B/en
Publication of CN111127343A publication Critical patent/CN111127343A/en
Application granted granted Critical
Publication of CN111127343B publication Critical patent/CN111127343B/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/90Dynamic range modification of images or parts thereof
    • G06T5/92Dynamic range modification of images or parts thereof based on global image properties
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/136Segmentation; Edge detection involving thresholding

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Image Processing (AREA)

Abstract

The invention discloses a histogram double-control infrared image contrast enhancement method, which adopts the technical scheme that: firstly, carrying out mean normalization pretreatment on a histogram, and then calculating the ratio of effective gray levels in the histogram; setting a histogram truncation threshold according to the effective gray level ratio, wherein the truncation threshold is in direct proportion to the ratio and is subjected to numerical protection processing; solving a Gamma value of a correction parameter, wherein the Gamma value is in an inverse proportional relation with a truncation threshold; clamping the histogram and then carrying out Gamma correction processing on part of data; and post-processing the histogram data, performing classical histogram equalization operation, and finally outputting the infrared image with enhanced contrast. The method has the advantages that except for the fact that the histogram of the whole graph needs to be counted, the other operations are all the point processing algorithm, therefore, the processing efficiency is high, the occupied resources are small, the real-time performance is good, the calculation is simple, the histogram is directly processed, operation on each pixel point of the image is not needed, internal self-adaptive control is achieved, good contrast enhancement effect can be achieved by adopting default parameters, the control mode is flexible, manual control parameters can be set according to the individual visual perception difference, the sensory requirements of different users are met, and the flexibility of the algorithm is improved.

Description

Histogram double-control infrared image contrast enhancement method
Technical Field
The invention belongs to the field of infrared image and video processing, and particularly relates to a histogram double-control infrared image contrast enhancement method.
Background
The method is influenced by the precision of different infrared shooting equipment, the contrast of the collected infrared image is insufficient, the target is not obvious, and the visual perception effect is poor, so that the contrast enhancement is a basic image processing technology in the field of infrared image processing.
The existing infrared contrast enhancement methods can be divided into two types according to the adjustment object. One method is to directly adjust the image pixels, for example, to directly correct the image pixels by using Gamma values. The method has the defects that the global correction parameter Gamma is a value, and the enhancement effect of the image partial area is insufficient; another method is by performing the gamma correction process directly on the histogram, without performing a two-part process on the histogram. The method has the defects that the data in the histogram are uniformly processed, and the data are insufficiently or excessively enhanced.
Disclosure of Invention
The invention provides a histogram double-control infrared image contrast enhancement method, which is used for solving the defects of detail loss, parameter non-self-adaption and the like in the conventional infrared image contrast enhancement method, so that the contrast enhancement processing becomes simple and effective.
The invention adopts the following technical scheme:
a histogram double-control infrared image contrast enhancement method comprises the following steps:
s1: carrying out mean value normalization processing on the histogram;
s2: calculating the ratio of the effective gray levels in the histogram;
s3: calculating according to the effective gray level ratio to obtain a histogram truncation threshold value and a correction parameter Gamma value;
s4: clamping the histogram by using a threshold value;
s5: performing Gamma correction processing on part of the histogram data;
s6: histogram data post-processing and histogram equalization processing.
The histogram in step S1 is subjected to mean normalization processing, and the specific implementation method is as follows: and (3) counting a histogram of the input image, performing mean normalization preprocessing operation, multiplying the histogram by a theoretical gray difference value after normalization processing, and calculating the theoretical gray difference value by subtracting a theoretical minimum gray level from a theoretical maximum gray level and then adding a constant value 1.
In step S2, the ratio of the effective gray levels in the histogram is calculated, and the specific implementation method is as follows: the total number of gray levels with the histogram value larger than 0 is counted first, and then divided by the theoretical gray difference value.
In step S3, a histogram truncation threshold and a correction parameter Gamma value are calculated, and the specific implementation method includes: and calculating to obtain a truncation threshold of the histogram according to the occupation ratio of the effective gray level, and then calculating to obtain an index correction parameter Gamma value by using the truncation threshold, wherein the truncation threshold is in direct proportion to the occupation ratio of the effective gray level and is subjected to numerical protection treatment, and the Gamma value is in inverse proportion to the truncation threshold.
In step S4, the clamping processing is performed on the histogram, and the specific implementation method is as follows: and carrying out clamping processing on the histogram according to the truncation threshold, and setting the histogram data larger than the truncation threshold to be equal to the truncation threshold so as to prevent excessive contrast enhancement caused by overlarge histogram data.
In step S5, Gamma correction processing is performed on the partial histogram data, and the specific implementation method is as follows: and performing power exponent correction with the parameter of Gamma on partial data smaller than 1 in the histogram to promote small data in the histogram and prevent details in the image from being lost.
The histogram data post-processing and histogram equalization processing in step S6 are specifically implemented by: and adding an adjusting value proportional to the effective gray level ratio to the histogram data after the steps S1-S5, and finally performing classical histogram equalization operation to finally output an image with enhanced contrast.
As can be seen from the above description of the present invention, compared with the prior art, the present invention has the following advantages:
1. the calculation is simple, the histogram is directly processed, and each pixel point of the image does not need to be operated. Internal self-adaptive control, and a better contrast enhancement effect can be achieved by adopting default parameters;
2. the control mode is flexible, and manual control parameters can be set according to individual visual perception difference so as to meet the sensory requirements of different users and increase the flexibility of the algorithm.
Drawings
FIG. 1 is a schematic flow chart of an implementation of the present invention;
FIG. 2 is an illustration of the present invention in a process;
FIG. 3 is a graph of contrast enhancement results when practicing the present invention;
Detailed Description
As shown in fig. 1, the present invention provides a histogram dual-controlled infrared image contrast enhancement method, which comprises: carrying out mean value normalization pretreatment on the histogram; calculating the ratio of the effective gray levels in the histogram; calculating according to the effective gray level ratio to obtain a histogram truncation threshold value and a correction parameter Gamma value; clamping the histogram by using a threshold value; performing Gamma correction processing on part of the histogram data; post-processing and adjusting histogram data.
The invention is further described below by means of specific embodiments.
S1: carrying out mean value normalization processing on the histogram;
firstly, reading an 8-bit infrared image gray scale image Iin, as shown in fig. 2, if the input image is an infrared image in RGB, HIS, YUV, or other color spaces, obtaining the gray scale image of the infrared image according to a color space conversion formula or directly using a luminance channel. For an 8-bit infrared gray image, the minimum gray value kmin is 0, the maximum gray value kmax is 255, the theoretical gray difference value is 28-256, a histogram of the infrared gray image is counted and recorded as an array HistkThe Mean normalization operation is that the histogram is divided by the total pixel number and then multiplied by the theoretical gray difference value, namely, the Hist _ Meank=(Histk(num). Drange, in which Hist _ MeankTo all areThe histogram is normalized by the values, k is the number of gray levels in the histogram, num is the total number of pixels of the image, and drenge is the theoretical gray scale range of the image, in this example, drenge is 256.
S2: the fractional value of the effective gray level in the histogram is calculated,
the gray level of which the gray level data is greater than 0 in the histogram is called an effective gray level, and the effective gray level in the histogram accounts for Ratio: is a histogram HistkThe total number of gray levels with a median value greater than 0 is divided by the theoretical gray level Drange range, i.e. Ratio ═ Σkmin≤k≤kmaxH_bink/Drange, wherein
Figure BDA0002304353640000041
The gray scale representing the histogram is marked with a boolean value and the effective gray scale is marked with 1.
S3: calculating a histogram truncation threshold value and a correction parameter Gamma value;
the histogram truncation threshold can be obtained by multiplying the effective gray level Ratio by the off-key control parameter and controlling the upper limit value, namely T ═ max (1.0, P1 × Ratio), T is the truncation threshold of the mean normalized histogram, P1 is a key control parameter, the default parameter is 2, and a user can also perform corresponding regulation and control according to personal visual perception; the index correction parameter Gamma value is calculated by a truncation threshold value, and the change of the index correction parameter Gamma value Gamma is in inverse proportion to T, namely the Gamma is equal to a1[ solution ] T, in the formula1The value range is [0.25, 0.75 ] for the relevant control parameters]Default value is 0.5.
S4: clamping the histogram;
clamping the mean normalized histogram by using the calculated truncation threshold T, specifically, if the data of the gray level in the mean normalized histogram is greater than the threshold T, the data of the gray level is set to be equal to the truncation threshold T, and the data of the gray level smaller than the truncation threshold T is not changed, that is, the data of the gray level is set to be equal to the truncation threshold T
Figure BDA0002304353640000042
This step operates to prevent the histogram data from being too large, which could cause excessive contrast enhancement in the enhanced image when gray scale mapping is subsequently performed.
S5: performing Gamma correction processing on part of the histogram data;
the histogram Hist _ Mean after the truncation operation is subjected to Gamma index correction parameters obtained by calculationkThe data with the parameter of Gamma value in the histogram of the data smaller than the mean value 1 is corrected, while the data with the parameter of Gamma value larger than or equal to the mean value 1 is kept unchanged, and a histogram Hist _ Gamma after the Gamma power exponent correction is obtainedkI.e. by
Figure BDA0002304353640000051
This operation promotes the small data in the histogram, prevents the small data in the histogram from being merged in subsequent operations, resulting in loss of detail in the enhancement process.
S6: post-processing middle histogram data and equalizing histogram;
after threshold clamping operation and power exponent Gamma correction are carried out on the mean value normalized histogram, the histogram Hist _ Gamma is correctedkAll data in the buffer are uniformly added with an adjustment value as a post-processing operation, namely, Hist _ Enk=Hist_Gammak+ P2 Ratio, where P2 is the relevant adjustment parameter and the value range is [00.5 ]]Defaults to 0.1, and finally processes the histogram Hist _ En processed in the stepskPerforming traditional histogram equalization operation to obtain a mapping table, and performing gray mapping on the input infrared gray image by using the mapping table to obtain an output image I with enhanced contrastoutAs shown in fig. 3.
The histogram double-control infrared image contrast enhancement method provided by the invention is simple in calculation, directly processes the histogram and does not need to operate each pixel point of the image. Internal self-adaptive control, and a better contrast enhancement effect can be achieved by adopting default parameters; the control mode is flexible, and manual control parameters can be set according to individual visual perception difference so as to meet the sensory requirements of different users and increase the flexibility of the algorithm.
The above description is only an embodiment of the present invention, but the design concept of the present invention is not limited thereto, and any insubstantial modifications made by using the design concept should fall within the scope of infringing the present invention.

Claims (6)

1. A histogram double-control infrared image contrast enhancement method is characterized by comprising the following steps:
s1: carrying out mean value normalization processing on the histogram;
s2: calculating the ratio of the effective gray levels in the histogram;
s3: calculating a histogram truncation threshold value and a correction parameter Gamma value;
s4: clamping the histogram;
s5: performing Gamma correction processing on part of the histogram data;
s6: histogram data post-processing and histogram equalization processing.
2. The histogram dual-control infrared image contrast enhancement method according to claim 1, wherein the histogram in the step S1 is subjected to mean normalization preprocessing, and the specific implementation method is as follows: and (4) counting the histogram of the input image, carrying out mean normalization preprocessing operation, and multiplying the histogram normalization processing by a theoretical gray difference value.
3. The histogram dual-controlled infrared image contrast enhancement method according to claim 2, wherein the theoretical gray scale difference is calculated by subtracting the theoretical minimum gray scale from the theoretical maximum gray scale and adding a constant value of 1.
4. The histogram dual-control infrared image contrast enhancement method according to claim 1, wherein the ratio of effective gray levels in the histogram is calculated in step S2, and the specific implementation method is as follows: the total number of gray levels with the histogram value larger than 0 is counted first, and then divided by the theoretical gray difference value.
5. The histogram dual-control infrared image contrast enhancement method according to claim 4, wherein the histogram truncation threshold and the correction parameter Gamma value are calculated in step S3, and the specific implementation method is as follows: and calculating to obtain a truncation threshold of the histogram according to the occupation ratio of the effective gray level, and then calculating to obtain an index correction parameter Gamma value by using the truncation threshold.
6. The histogram dual-controlled infrared image contrast enhancement method according to claim 5, wherein the truncation threshold is proportional to the duty ratio of the effective gray level and is subjected to a numerical protection process, and the Gamma value is inversely proportional to the truncation threshold.
CN201911237886.0A 2019-12-05 2019-12-05 Histogram double-control infrared image contrast enhancement method Active CN111127343B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911237886.0A CN111127343B (en) 2019-12-05 2019-12-05 Histogram double-control infrared image contrast enhancement method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911237886.0A CN111127343B (en) 2019-12-05 2019-12-05 Histogram double-control infrared image contrast enhancement method

Publications (2)

Publication Number Publication Date
CN111127343A true CN111127343A (en) 2020-05-08
CN111127343B CN111127343B (en) 2023-03-24

Family

ID=70497753

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911237886.0A Active CN111127343B (en) 2019-12-05 2019-12-05 Histogram double-control infrared image contrast enhancement method

Country Status (1)

Country Link
CN (1) CN111127343B (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112419195A (en) * 2020-11-26 2021-02-26 华侨大学 Image enhancement method based on nonlinear transformation
CN112488969A (en) * 2020-12-14 2021-03-12 华侨大学 Multi-image fusion enhancement method based on human eye perception characteristics
CN112785532A (en) * 2021-01-12 2021-05-11 安徽大学 Singular value equalization image enhancement algorithm based on weighted histogram distribution gamma correction
CN113298726A (en) * 2021-05-14 2021-08-24 漳州万利达科技有限公司 Image display adjusting method and device, display equipment and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101179650A (en) * 2007-11-23 2008-05-14 西安交通大学 Video image contrast intensifying method and apparatus
US20130016906A1 (en) * 2011-07-14 2013-01-17 Toshiba Tec Kabushiki Kaisha Binarized threshold value determination device, method thereof, and image processing device
CN110310250A (en) * 2019-06-27 2019-10-08 华侨大学 A kind of color histogram equalization methods based on optimal model

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101179650A (en) * 2007-11-23 2008-05-14 西安交通大学 Video image contrast intensifying method and apparatus
US20130016906A1 (en) * 2011-07-14 2013-01-17 Toshiba Tec Kabushiki Kaisha Binarized threshold value determination device, method thereof, and image processing device
CN110310250A (en) * 2019-06-27 2019-10-08 华侨大学 A kind of color histogram equalization methods based on optimal model

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
王利颖等: "一种自适应红外图像增强新算法", 《信号处理》 *

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112419195A (en) * 2020-11-26 2021-02-26 华侨大学 Image enhancement method based on nonlinear transformation
CN112419195B (en) * 2020-11-26 2023-06-20 华侨大学 Nonlinear transformation image enhancement method
CN112488969A (en) * 2020-12-14 2021-03-12 华侨大学 Multi-image fusion enhancement method based on human eye perception characteristics
CN112488969B (en) * 2020-12-14 2023-06-20 华侨大学 Multi-image fusion enhancement method based on human eye perception characteristics
CN112785532A (en) * 2021-01-12 2021-05-11 安徽大学 Singular value equalization image enhancement algorithm based on weighted histogram distribution gamma correction
CN112785532B (en) * 2021-01-12 2022-11-18 安徽大学 Singular value equalization image enhancement algorithm based on weighted histogram distribution gamma correction
CN113298726A (en) * 2021-05-14 2021-08-24 漳州万利达科技有限公司 Image display adjusting method and device, display equipment and storage medium

Also Published As

Publication number Publication date
CN111127343B (en) 2023-03-24

Similar Documents

Publication Publication Date Title
CN111127343B (en) Histogram double-control infrared image contrast enhancement method
CN111161163B (en) Infrared image contrast enhancement method for histogram double gamma correction
CN107730475B (en) Image enchancing method and system
CN107680056B (en) Image processing method and device
US8295596B1 (en) Adaptive histogram-based video contrast enhancement
CN109410126A (en) A kind of tone mapping method of details enhancing and the adaptive high dynamic range images of brightness
CN109686342B (en) Image processing method and device
CN109584191B (en) Self-adaptive image enhancement method and terminal based on histogram
CN110288546B (en) Low-illumination image enhancement method adopting bidirectional gamma conversion
CN110545412B (en) Image enhancement method and computer system
CN111105371A (en) Low-contrast infrared image enhancement method
CN104463806B (en) Height adaptive method for enhancing picture contrast based on data driven technique
CN114187222A (en) Low-illumination image enhancement method and system and storage medium
CN114998165A (en) Histogram transformation based uniform exposure image contrast enhancement method
CN108564633B (en) Gray scale image compression method and device and computer equipment
CN112419195A (en) Image enhancement method based on nonlinear transformation
CN111080563B (en) Histogram equalization method based on traversal optimization
CN109003241B (en) Linear image enhancement method with double control function
CN113808045B (en) Image brightness adjusting method and device
CN113850878B (en) Color histogram-based non-light source AWB (AWB) estimation method and system
CN109417616B (en) Method and apparatus for image processing
CN109801246A (en) A kind of color histogram equalization methods of adaptive threshold
CN113643651B (en) Image enhancement method and device, computer equipment and storage medium
KR101024058B1 (en) Method for controlling a image contrast for local dimming backlight and apparatus thereof
CN114494471A (en) Image contrast enhancement method and system

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