Enhancement method and apparatus for infrared image, and electronic device and storage medium

By iteratively segmenting and probability density correction of the source grayscale histogram of infrared images, combined with the fusion of source grayscale histogram and weighted grayscale histogram, the problem of information loss caused by infrared image contrast enhancement in the prior art is solved, and efficient contrast enhancement effect is achieved.

WO2025129899A1PCT designated stage expired Publication Date: 2025-06-26ZHEJIANG UNIVIEW TECH CO LTD

Patent Information

Application Number
PCT/CN2024/092238
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-12-19
Filing Date
2024-05-10
Publication Date
2025-06-26

AI Technical Summary

Technical Problem

The prior art can easily lead to information loss in the image when the contrast enhancement of infrared image is enhanced, and the contrast enhancement effect of infrared image cannot be effectively improved.

Method used

By obtaining the source grayscale histogram of the to-process infrared image, iteratively segmenting iteratively based on its distribution feature information, and obtaining the target sub-histogram set; each target sub-grayscale histogram is corrected for probability density to obtain a weighted grayscale histogram; then the source grayscale histogram and the weighted grayscale histogram are fused to obtain a target grayscale histogram, and then its grayscale mapping curve is determined to achieve contrast enhancement.

Benefits of technology

It effectively reduces information loss in infrared images, improves the contrast enhancement effect of infrared images, and ensures the quality of the image.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024092238_26062025_PF_FP_ABST
    Figure CN2024092238_26062025_PF_FP_ABST
Patent Text Reader

Abstract

The present disclosure relates to the technical field of image processing. Provided are an enhancement method and apparatus for an infrared image, and an electronic device and a storage medium. The method comprises: acquiring a source grayscale histogram of an infrared image to be processed, and performing iterative segmentation on the source grayscale histogram on the basis of distribution characteristic information of the source grayscale histogram, so as to obtain a target sub-histogram set; performing probability density correction on each target grayscale sub-histogram in the target sub-histogram set, so as to obtain a weighted grayscale histogram; fusing the source grayscale histogram and the weighted grayscale histogram, so as to obtain a target grayscale histogram; and determining a grayscale mapping curve of the target grayscale histogram, and performing grayscale mapping on said infrared image on the basis of the grayscale mapping curve, so as to obtain a contrast-enhanced image for said infrared image.
Need to check novelty before this filing date? Find Prior Art

Description

Infrared image enhancement method, device, electronic device and storage medium

[0001] CROSS-REFERENCE TO RELATED APPLICATIONS

[0002] This disclosure claims priority to Chinese patent application No. 2023117533746, filed on December 19, 2023, entitled “Infrared image enhancement method, device, electronic device and storage medium,” which is incorporated herein by reference in its entirety. Technical Field

[0003] The present disclosure relates to the field of image processing technology, and in particular to an infrared image enhancement method, device, electronic device, and storage medium. Background Art

[0004] Thermal infrared monitoring equipment, such as thermal infrared cameras, visualizes the thermal radiation energy emitted by an object. They are widely used in military, medical, industrial, and transportation applications. However, because the thermal radiation energy of the object being measured is relatively low and the temperature variation within the same object's surface is relatively small, the grayscale dynamic range and contrast of infrared images are limited, making them difficult to discern with the naked eye. Contrast enhancement can be used to address this issue in the infrared image visualization process. Therefore, contrast enhancement is crucial for improving infrared image quality.

[0005] Summary of the Invention

[0006] The present disclosure provides an infrared image enhancement method, device, electronic device and storage medium, which are used to solve the problem of information loss in the image easily caused by infrared image contrast enhancement in the prior art, and improve the contrast enhancement effect of the infrared image.

[0007] The present disclosure provides an infrared image enhancement method, comprising:

[0008] Acquiring a source grayscale histogram of the infrared image to be processed, and iteratively segmenting the source grayscale histogram based on distribution feature information of the source grayscale histogram to obtain a target subhistogram set;

[0009] Performing probability density correction on each target sub-grayscale histogram in the target sub-histogram set to obtain a weighted grayscale histogram;

[0010] Fusing the source grayscale histogram and the weighted grayscale histogram to obtain a target grayscale histogram;

[0011] A grayscale mapping curve of the target grayscale histogram is determined, and grayscale mapping is performed on the infrared image to be processed based on the grayscale mapping curve to obtain a contrast enhanced image of the infrared image to be processed.

[0012] The present disclosure also provides an infrared image enhancement device, comprising:

[0013] an acquisition module configured to acquire a source grayscale histogram of the infrared image to be processed;

[0014] a segmentation module configured to iteratively segment the source grayscale histogram based on distribution feature information of the source grayscale histogram to obtain a target subhistogram set;

[0015] a correction module configured to perform probability density correction on each target sub-grayscale histogram in the target sub-histogram set to obtain a weighted grayscale histogram;

[0016] a fusion module configured to fuse the source grayscale histogram and the weighted grayscale histogram to obtain a target grayscale histogram;

[0017] The mapping module is configured to determine a grayscale mapping curve of the target grayscale histogram, and perform grayscale mapping on the infrared image to be processed based on the grayscale mapping curve to obtain a contrast enhanced image of the infrared image to be processed.

[0018] The present disclosure also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements any of the above-described infrared image enhancement methods when executing the computer program.

[0019] The present disclosure also provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the infrared image enhancement method as described above is implemented.

[0020] The present disclosure further provides a computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the infrared image enhancement method as described above is implemented.

[0021] The infrared image enhancement method, device, electronic device and storage medium provided by the present disclosure first obtain a source grayscale histogram of an infrared image to be processed, and iteratively segment the source grayscale histogram based on distribution feature information of the source grayscale histogram to obtain a target subhistogram set; then, probability density correction is performed on each target sub-grayscale histogram in the target subhistogram set to obtain a weighted grayscale histogram; then, the source grayscale histogram and the weighted grayscale histogram are fused to obtain a target grayscale histogram, and then a grayscale mapping curve of the target grayscale histogram is determined, and grayscale mapping is performed on the infrared image to be processed based on the grayscale mapping curve to obtain a contrast-enhanced image of the infrared image to be processed, thereby achieving contrast enhancement of the infrared image. Since it utilizes the distribution feature information of the source grayscale histogram when segmenting the source grayscale histogram, that is, the original grayscale distribution characteristics of the infrared image are taken into account during segmentation, the grayscale range within each segmented target sub-grayscale histogram can belong to the same type of objects, and then the segmented target sub-grayscale histogram is used as a unit for correction, which can effectively reduce the information loss in the infrared image and improve the contrast enhancement effect of the infrared image. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] FIG1 is a schematic diagram of a flow chart of an infrared image enhancement method provided by an embodiment of the present disclosure;

[0023] FIG2 is a flow chart of a method for iteratively segmenting a source grayscale histogram based on distribution feature information of the source grayscale histogram in an embodiment of the present disclosure;

[0024] FIG3 is a schematic diagram of the segmentation effect of segmenting a source grayscale histogram using the average value as a segmentation point in the prior art;

[0025] FIG4 is a schematic diagram of the segmentation effect of segmenting a source grayscale histogram using segmentation points determined based on the mean value, standard deviation, and skewness in an embodiment of the present disclosure;

[0026] FIG5 is a schematic structural diagram of an infrared image enhancement device provided in an embodiment of the present disclosure;

[0027] FIG6 is a schematic structural diagram of an electronic device provided by an embodiment of the present disclosure. DETAILED DESCRIPTION

[0028] The technical solutions in the present disclosure will be described below in conjunction with the drawings in the present disclosure. Obviously, the described embodiments are only part of the embodiments in the present disclosure.

[0029] The histogram equalization algorithm is used to enhance the contrast of infrared images. It adjusts the grayscale distribution of infrared images to a uniform distribution and performs grayscale mapping based on this uniform distribution to achieve the purpose of contrast enhancement. Although the uniform distribution has the highest information entropy of all distributions and can produce the strongest contrast effect in visual perception, it converts the original grayscale distribution from a relatively concentrated grayscale range to a uniform distribution across the entire grayscale range, resulting in information loss in the image.

[0030] The infrared image enhancement method disclosed herein is described below with reference to Figures 1-4. The infrared image enhancement method can be applied to electronic devices such as thermal infrared monitoring equipment, terminal devices, or servers, and the terminal devices and servers can be communicatively connected to the thermal infrared monitoring equipment. The terminal devices may include mobile phones, computers, vehicle-mounted devices, tablet computers, wearable devices, etc.; the servers may include standalone servers, cluster servers, or cloud servers, etc. The infrared image enhancement method can also be applied to infrared image enhancement devices provided in electronic devices such as thermal infrared monitoring equipment, terminal devices, or servers, and the infrared image enhancement devices may be implemented using software, hardware, or a combination of both.

[0031] FIG1 exemplarily shows a flow chart of an infrared image enhancement method provided by an embodiment of the present disclosure. Referring to FIG1 , the infrared image enhancement method may include the following steps 110 to 140 .

[0032] Step 110: Obtain a source grayscale histogram of the infrared image to be processed, and iteratively segment the source grayscale histogram based on distribution feature information of the source grayscale histogram to obtain a target subhistogram set.

[0033] Grayscale statistics are performed on the infrared image to be processed to obtain a source grayscale histogram of the infrared image to be processed. Alternatively, grayscale statistics can be performed on the infrared image to be processed first, and then the grayscale histogram obtained from the grayscale statistics can be grayscale filtered based on a grayscale threshold to obtain the source grayscale histogram of the infrared image to be processed. The grayscale threshold can be a preset grayscale threshold or can be adaptively determined based on the grayscale histogram obtained from the grayscale statistics.

[0034] In an example embodiment, obtaining a source grayscale histogram of an infrared image to be processed may include: performing grayscale statistics on the infrared image to be processed to obtain a first grayscale histogram; sorting the statistical values ​​of the first grayscale histogram in descending order to obtain a second grayscale histogram, and determining the cumulative distribution of the second grayscale histogram; locating a target grayscale value in the cumulative distribution whose first cumulative distribution ratio is greater than or equal to a preset proportion threshold, and determining the statistical value corresponding to the target grayscale value in the second grayscale histogram as a target grayscale threshold; and performing grayscale filtering on the second grayscale histogram based on the target grayscale threshold to obtain a source grayscale histogram.

[0035] For example, grayscale statistics can be performed on the infrared image to be processed to obtain a first grayscale histogram H s ={h s (0),h s (1),…,h s (i),…,h s (L)}. Among them, h s (i) represents the number of pixels with grayscale value equal to i; L is the maximum grayscale value that can be represented in the grayscale histogram. Assuming that the image data bit depth is n bits, L = 2n-1.

[0036] For the first grayscale histogram H s Sort the statistical values ​​in descending order to obtain the second grayscale histogram DH s , then the second grayscale histogram DH can be determined using the following formula (1): s Cumulative distribution DF s (k):

[0037] Among them, k represents the grayscale sequence number of the grayscale histogram.

[0038] For the cumulative distribution DF s Each cumulative distribution value in (k), such as the i-th cumulative distribution value DF s (i), the corresponding cumulative distribution ratio can be determined Based on each cumulative distribution ratio, the cumulative distribution DF s (k) locates the first cumulative distribution ratio greater than or equal to the preset proportion threshold P preset Grayscale number k τ , that is, the target grayscale value, can be expressed as the following formula (2):

[0039] Among them, the preset proportion threshold P preset You can take an empirical value, such as 0.99.

[0040] Furthermore, the grayscale number k can be τ The corresponding statistical value is determined as H s The target grayscale threshold τ can be used as the threshold for filtering the effective grayscale level. τ can be expressed by the following expression (3):

[0041] τ=DH s (k τ ) (3)

[0042] After obtaining the target grayscale threshold τ, the first grayscale histogram H can be calculated based on the target grayscale threshold τ using the following formula (4): s Perform grayscale filtering to obtain the source grayscale histogram H v ={h v (0),h v (1),…,h v (L)}. Formula (4) can be expressed as:

[0043] Among them, h s (k) represents the first grayscale histogram H s The number of pixels with grayscale value equal to k, h v (k) represents the source grayscale histogram H v The number of pixels whose grayscale value is equal to k.

[0044] In this way, by further performing grayscale filtering based on a target grayscale threshold on the first grayscale histogram obtained by performing grayscale statistics on the infrared image to be processed, outliers can be filtered out, thereby improving the accuracy of the grayscale histogram. Moreover, the target grayscale threshold can be adaptively calculated and determined based on the first grayscale histogram, without involving the setting of an initial grayscale threshold. This improves the accuracy of the target grayscale threshold, provides strong adaptability, and has a time complexity of only O(L·logL), resulting in high time efficiency.

[0045] In an exemplary embodiment, the infrared image to be processed may be preprocessed first, for example, at least one of non-uniformity correction, bad pixel correction, and stripe noise correction may be performed to improve the image quality.

[0046] For example, the distribution feature information may include the average value of the grayscale, or the distribution feature information may include the average value, standard deviation, and skewness of the grayscale. After obtaining the source grayscale histogram, the distribution feature information may be used to determine the grayscale segmentation points of the source grayscale histogram, and then the source grayscale histogram may be iteratively segmented using the grayscale segmentation points to obtain a target subhistogram set, which includes the segmented histogram segments. Since the original distribution features of the source grayscale histogram are taken into account when determining the grayscale segmentation points, the grayscale range within each segmented histogram segment can belong to the same type of object.

[0047] Step 120: Perform probability density correction on each target sub-grayscale histogram in the target sub-histogram set to obtain a weighted grayscale histogram.

[0048] In an exemplary embodiment, step 120 may include: determining the probability density sum of each target sub-grayscale histogram in the target sub-histogram set; performing weighted processing on the target sub-grayscale histogram based on the probability density sum to obtain a weighted grayscale sub-histogram corresponding to the target sub-grayscale histogram; and determining each weighted grayscale sub-histogram as a weighted grayscale histogram.

[0049] For example, for each target sub-grayscale histogram, after obtaining its corresponding weighted grayscale sub-histogram, the weighted grayscale sub-histogram may be normalized, and then each normalized weighted grayscale sub-histogram may be determined as a weighted grayscale histogram.

[0050] Among them, performing weighted processing on the target sub-grayscale histogram based on the probability density and obtaining a weighted grayscale sub-histogram corresponding to the target sub-grayscale histogram can include: for each grayscale value in the target sub-grayscale histogram, determining the weighted probability density of the grayscale value based on the number of pixels of the grayscale value, the maximum probability density, the minimum probability density and the probability density sum; and normalizing the weighted probability density of each grayscale value respectively to obtain a weighted grayscale sub-histogram corresponding to the target sub-grayscale histogram.

[0051] For each grayscale value in the target sub-grayscale histogram, the first difference between the number of pixels of the grayscale value and the minimum probability density can be determined, and the second difference between the maximum probability density and the minimum probability density can be determined; the ratio of the first difference to the second difference is obtained, and the probability density and the ratio are exponentially weighted; the product of the exponential weighted result and the maximum probability density is determined as the weighted probability density corresponding to the grayscale value.

[0052] For example, for the i-th target sub-grayscale histogram H i , assuming H i The grayscale range is [l min ,l max ], then its probability density and β i It can be expressed as the following formula (5)

[0053] Among them, h v (k) represents the target sub-grayscale histogram H i The number of pixels with grayscale value k.

[0054] The grayscale histogram H of the target sub- i The gray level k in the equation has a weighted probability density h w (k) can be expressed as the following formula (6):

[0055] Among them, h vmin represents the minimum probability density, hvmax represents the maximum probability density, h v (k) represents the target sub-grayscale histogram H i The number of pixels with grayscale value k.

[0056] Get the weighted probability density h w (k) After that, h can be calculated using the following formula (7) w (k) Perform normalization:

[0057] Based on formula (7), the target sub-grayscale histogram H i After the weighted probability density corresponding to each gray value in is normalized, the weighted gray histogram H can be obtained. w ={h w (0),h w (1),…,h w (L)}.

[0058] Step 130: Fusing the source grayscale histogram and the weighted grayscale histogram to obtain a target grayscale histogram.

[0059] For example, the source grayscale histogram and the weighted grayscale histogram may be fused using the cumulative distribution of the source grayscale histogram, for example, an adaptive linear combination of the two may be performed. Step 130 may include: determining the cumulative distribution of the source grayscale histogram; and fusing the source grayscale histogram and the weighted grayscale histogram based on the cumulative distribution to obtain a target grayscale histogram.

[0060] For example, for each grayscale value in the source grayscale histogram, the cumulative distribution probability of the grayscale value can be determined based on the following formula (8):

[0061] Among them, c(k) represents the cumulative distribution probability corresponding to the gray value k in the source gray histogram, h v (i) represents the number of pixels with grayscale value i in the source grayscale histogram. After the cumulative distribution probability calculation of each grayscale value in the source grayscale histogram is performed as shown in formula (8), the overall cumulative distribution of the source grayscale histogram can be obtained.

[0062] Furthermore, each grayscale value in the source grayscale histogram and the weighted grayscale histogram can be fused based on the following formula (9):

[0063] Among them, h d (k) represents the number of pixels after grayscale value k is fused, h v (k) represents the source grayscale histogram H v The number of pixels with gray value k, h w(k) represents the weighted grayscale histogram H w The number of pixels with gray value k.

[0064] After performing the fusion process as described in formula (9) on each grayscale value in the source grayscale histogram and the weighted grayscale histogram, the target grayscale histogram H can be obtained. d ={h d (0),h d (1),…,h d (L)}.

[0065] Step 140: Determine a grayscale mapping curve of the target grayscale histogram, and perform grayscale mapping on the infrared image to be processed based on the grayscale mapping curve to obtain a contrast enhanced image of the infrared image to be processed.

[0066] After obtaining the target grayscale histogram, a grayscale mapping curve can be constructed based on the cumulative distribution of the target grayscale histogram, and the grayscale mapping curve can be used to complete the grayscale mapping of the infrared image to be processed, thereby achieving contrast enhancement of the infrared image to be processed.

[0067] The cumulative distribution of the target grayscale histogram can be determined according to the following formula (10):

[0068] Among them, c d (k) represents the cumulative distribution probability of the gray value k in the target gray histogram, h d (i) represents the number of pixels with gray value i in the target grayscale histogram.

[0069] After determining the cumulative distribution probability of each grayscale value in the target grayscale histogram according to formula (10), the cumulative distribution F of the target grayscale histogram can be obtained. d , which can be expressed as F d ={c d (0),c d (1),…,c d (L)}.

[0070] Get the cumulative distribution F of the target grayscale histogram d Afterwards, the grayscale mapping curve can be constructed according to the following formula (11):

[0071] Among them, Curve(k) represents the grayscale mapping output of grayscale value k, c d (k) represents the cumulative distribution probability of grayscale value k, and L represents the maximum grayscale value that can be represented in the grayscale histogram.

[0072] The infrared image enhancement method provided by the embodiment of the present disclosure first obtains the source grayscale histogram of the infrared image to be processed, and iteratively segments the source grayscale histogram based on the distribution feature information of the source grayscale histogram to obtain a target sub-histogram set; then, probability density correction is performed on each target sub-grayscale histogram in the target sub-histogram set to obtain a weighted grayscale histogram; then, the source grayscale histogram and the weighted grayscale histogram are fused to obtain a target grayscale histogram, and then a grayscale mapping curve of the target grayscale histogram is determined, and grayscale mapping is performed on the infrared image to be processed based on the grayscale mapping curve to obtain a contrast enhanced image of the infrared image to be processed, thereby realizing contrast enhancement of the infrared image. Since it utilizes the distribution feature information of the source grayscale histogram when segmenting the source grayscale histogram, that is, the original grayscale distribution characteristics of the infrared image are taken into account during segmentation, the grayscale range within each segmented target sub-grayscale histogram can belong to the same type of objects, and then the segmented target sub-grayscale histogram is used as a unit for correction, which can effectively reduce the information loss in the infrared image and improve the contrast enhancement effect of the infrared image.

[0073] Based on the infrared image enhancement method of the embodiment corresponding to Figure 1, in an exemplary embodiment, Figure 2 exemplarily shows a flow chart of a method for iteratively segmenting a source grayscale histogram based on the distribution feature information of the source grayscale histogram. The method may include the following steps 111 to 119.

[0074] Step 111: Determine the initial to-be-processed sub-histogram set and the initial result sub-histogram set corresponding to the current number of iterations.

[0075] After obtaining the source grayscale histogram of the infrared image to be processed, the number of iterations can be initialized to 0, and then the current iteration can be started. In each iteration, the initial set of subhistograms to be processed and the initial set of subhistograms with the current number of iterations are first determined. The initial set of subhistograms to be processed is used to save the subhistograms to be segmented and processed in the current iteration, and the initial set of subhistograms with the results is used to save the subhistograms that do not need to be segmented.

[0076] The initial value of the current number of iterations is 0. When the current number of iterations is 0, the initial subhistogram set to be processed is determined to be the source grayscale histogram, and the initial result subhistogram set is determined to be an empty set. When the current number of iterations is greater than 0, the initial subhistogram set to be processed is updated to the target subhistogram set to be processed obtained after the previous iteration of the current number of iterations, and the initial result subhistogram set is updated to the target result subhistogram set obtained after the previous iteration. In this way, after entering each round of iteration, the initial subhistogram set to be processed and the initial result subhistogram set that do not need to be processed corresponding to the current number of iterations can be determined.

[0077] For example, recur can be used to represent the current number of iterations, and the current number of iterations recur can be initialized to 0. represents the initial set of subhistograms to be processed, Represents the initial result subhistogram set, then when the current iteration number recur=0, the initial subhistogram set to be processed corresponding to the current iteration number is The initial result subhistogram set corresponding to the current number of iterations is Among them, H v Represents the source grayscale histogram. When the current iteration count recur>0, the initial set of to-be-processed subhistograms corresponding to the current iteration count is the target set of to-be-processed subhistograms obtained after (recur-1) iterations, and the initial set of result subhistograms corresponding to the current iteration count is the target set of result subhistograms obtained after (recur-1) iterations.

[0078] Step 112: for each initial sub-histogram to be processed in the set of initial sub-histograms to be processed, determine whether the initial sub-histogram to be processed needs to be segmented.

[0079] In each iteration, after determining the set of initial subhistograms to be processed, for each initial subhistogram in the set of initial subhistograms to be processed, whether the initial subhistogram to be processed needs to be segmented can be determined based on the joint discrimination condition of the current number of iterations and the skewed distribution. If it is determined that the initial subhistogram to be processed does not need to be segmented, step 113 is executed; if it is determined that the initial subhistogram to be processed needs to be segmented, step 114 is executed.

[0080] Determining whether the initial sub-histogram to be processed needs to be segmented includes:

[0081] Determine whether the initial sub-histogram to be processed meets the joint discrimination condition of the current number of iterations and the skewed distribution; if the initial sub-histogram to be processed meets the joint discrimination condition of the current number of iterations and the skewed distribution, determine that the initial sub-histogram to be processed needs to be split; if the initial sub-histogram to be processed does not meet the joint discrimination condition of the current number of iterations and the skewed distribution, determine that the initial sub-histogram to be processed does not need to be split.

[0082] The joint judgment condition of the current number of iterations and the skewed distribution includes an iteration number judgment condition and a skewed distribution judgment condition.

[0083] For example, the skewed distribution judgment condition can be based on skewness. The skewed distribution judgment condition includes: when the absolute value of the skewness of the initial sub-histogram to be processed is greater than a preset skewness threshold, the initial sub-histogram to be processed is judged to be a skewed distribution, otherwise it is a symmetrical distribution.

[0084] For example, the iteration number determination condition can be designed based on an iteration number constraint interval consisting of a preset minimum number of iterations and a preset maximum number of iterations. For example, the iteration number determination condition may include: if the current iteration number is less than the preset minimum number of iterations, determining that segmentation is required; if the current iteration number is greater than or equal to the preset minimum number of iterations and less than the preset maximum number of iterations, determining that conditional segmentation is required; and if the current iteration number is greater than or equal to the preset maximum number of iterations, determining that segmentation is not required.

[0085] Based on this, determining whether the initial sub-histogram to be processed meets the joint discrimination condition of the current number of iterations and the skewed distribution can include: when it is determined that segmentation is required based on the current number of iterations, or when it is determined as conditional segmentation based on the current number of iterations and a skewed distribution based on the skewed distribution discrimination condition, determining that the initial sub-histogram to be processed meets the joint discrimination condition of the current number of iterations and the skewed distribution; when it is determined that segmentation is not required based on the current number of iterations, or when it is determined as conditional segmentation based on the current number of iterations and a symmetric distribution based on the skewed distribution discrimination condition, determining that the initial sub-histogram to be processed does not meet the joint discrimination condition of the current number of iterations and the skewed distribution.

[0086] For example, the skewness of the initial sub-histogram to be processed can be determined based on the mean value and standard deviation of the initial sub-histogram to be processed. sub , the initial sub-histogram to be processed H can be determined according to the following formula (12): sub Skewness of:

[0087] Among them, skew represents skewness, l max Indicates the maximum grayscale value of the subhistogram to be processed, l min Indicates the minimum grayscale value of the subhistogram to be processed, h sub (i) represents the number of pixels with grayscale value i in the sub-histogram to be processed, σ represents the standard deviation of the sub-histogram to be processed, and μ represents the average value of the sub-histogram to be processed.

[0088] The standard deviation σ can be determined according to the following formula (13):

[0089] The average value μ can be determined according to the following formula (14):

[0090] Step 113: Move the initial sub-histogram to be processed into the first result sub-histogram set.

[0091] The initialization state of the first result subhistogram set is the initial result subhistogram set, that is, after entering the current iteration, the first result subhistogram set can be initialized to the initial result subhistogram set determined in step 111. The first result subhistogram set can store subhistograms that no longer need to be segmented in this iteration.

[0092] Step 114: Move the initial sub-histogram to be processed into the first sub-histogram set to be processed.

[0093] In the current iteration, the first sub-histogram set to be processed can be initialized as an empty set. In the process of processing each initial sub-histogram to be processed in the initial sub-histogram set to be processed, when it is determined that the initial sub-histogram to be processed needs to be split, the initial sub-histogram to be processed can be moved into the first sub-histogram set to be processed, that is, the first sub-histogram set to be processed saves the sub-histograms that still need to be split.

[0094] For example, in combination with steps 112 to 114, it can be understood that in the current iteration, after determining the initial subhistogram set to be processed and the initial result subhistogram set, a first result subhistogram set and a first subhistogram set to be processed can be obtained based on the initial subhistogram set to be processed and the initial result subhistogram set. This may include:

[0095] When the iteration number judgment condition determines that segmentation is required, all subhistograms in the initial subhistogram set to be processed are moved into the first subhistogram set to be processed;

[0096] When the iteration number discrimination condition is determined to be conditional segmentation, a skew distribution condition discrimination is performed on each initial sub-histogram to be processed in the initial sub-histogram set to be processed; if it is determined to be a skewed distribution, segmentation is required and it is moved into the first sub-histogram set to be processed; if it is determined to be a symmetric distribution, segmentation is not required and it is moved into the first result sub-histogram set;

[0097] When the iteration number judgment condition is that segmentation is not required, the first subhistogram set to be processed is set to an empty set, and all initial subhistograms to be processed in the initial subhistogram set to be processed are moved into the first result subhistogram set.

[0098] For example, suppose the variable recur represents the current number of iterations, Represents the initial set of subhistograms to be processed, represents the initial result subhistogram set, S ′ proc represents the first subhistogram set to be processed, S ′ res Represents the first result histogram set, recurmin Indicates the preset minimum number of iterations, recur max Indicates the preset maximum number of iterations, skew indicates skewness, τ skew Indicates the preset skewness threshold, and recur can be initialized to 0. In each round of iteration, you can initialize initialization Then we have:

[0099] If recur <recur min , the initial sub-histogram set to be processed All subhistograms in are moved into the first subhistogram set S to be processed ′ proc In, that is

[0100] If recur min ≤recur <recur max , then for Each initial subhistogram to be processed H in sub , that is, for Can be based on H sub The skewness judgment H sub Whether segmentation is needed. If |skew|≥τ skew , then the initial sub-histogram to be processed H sub If you need to continue splitting, then H sub Move into the first subhistogram set S to be processed ′ proc In the ′ proc =S ′ proc +{H sub}; Otherwise, it is considered that H sub No need to split, H sub Move into the first result histogram set S ′ res , that is, S ′ res =S ′ res +{H sub}.

[0101] If recur≥recur max , then the initial subhistogram to be processed Stop further segmentation and move into the first result subhistogram set S ′ res , that is,

[0102] For example, the preset minimum number of iterations, the preset maximum number of iterations, and the preset skewness threshold can be determined based on experience or experiments. For example, the preset minimum number of iterations can be 2, the preset maximum number of iterations can be 5, and the preset skewness threshold can be 0.5. In this way, limiting the number of iterative segmentation times to a minimum of 2 and a maximum of 5 can avoid premature termination of iterative segmentation when the grayscale histogram is overall symmetrical but locally severely asymmetrical, and can also avoid continuous segmentation within a small grayscale range.

[0103] Step 115: For each first sub-histogram to be processed in the first sub-histogram set to be processed, segment the first sub-histogram to be processed based on the distribution feature information of the first sub-histogram to be processed, and move the segmentation results into the second sub-histogram set to be processed.

[0104] For each first sub-histogram to be processed in the set of first sub-histograms to be processed, a grayscale segmentation point may be determined based on the distribution feature information of the first sub-histogram to be processed, and the first sub-histogram to be processed may be segmented using the grayscale segmentation point.

[0105] For example, the distribution feature information may include a mean value, a standard deviation, and a skewness. Accordingly, segmenting the first sub-histogram to be processed based on the distribution feature information of the first sub-histogram to be processed may include:

[0106] Based on the mean value, standard deviation and skewness of the first sub-histogram to be processed, a grayscale segmentation point of the first sub-histogram to be processed is determined; and the first sub-histogram to be processed is segmented using the grayscale segmentation point.

[0107] For example, the mean, standard deviation, and skewness of the first sub-histogram to be processed can be determined according to the above formulas (12) to (14), and then the grayscale segmentation point of the first sub-histogram to be processed can be determined according to the following formula (15):

[0108] Among them, l seg Represents the grayscale segmentation point, skew represents the skewness, σ represents the standard deviation, and μ represents the mean.

[0109] Assume that the first subhistogram to be processed H sub The grayscale interval is [l min ,l max ], using the grayscale segmentation point l seg For the first sub-histogram H to be processed sub After segmentation, we can get the segmentation interval [l min ,l seg ] and [l seg +1,l max ], corresponding to the segmented sub-histogram H sub1 and Hsub2 , at this time, the split H sub1 and H sub2 Move into the second subhistogram set S to be processed ″ proc In the ″ proc =S ″ proc +{H sub1 ,H sub2}.

[0110] Step 116: After traversing the initial set of subhistograms to be processed, the target set of subhistograms to be processed is updated to the second set of subhistograms to be processed obtained in this round of iteration, the target set of result subhistograms is updated to the first set of result subhistograms obtained in this round of iteration, and the current number of iterations is increased by 1.

[0111] After traversing the initial set of sub-histograms to be processed, the target set of sub-histograms to be processed can be updated is the second subhistogram set S to be processed ″ proc , update the target result subhistogram set The first result histogram set S ′ res , update the current number of iterations, that is: recur=recur+1.

[0112] The target to-be-processed subhistogram set may contain subhistograms that need to be further segmented after processing the initial to-be-processed subhistogram set, and may serve as the initial to-be-processed subhistogram set for the next iteration. The target result subhistogram set may contain subhistograms that do not need to be further segmented after processing the initial to-be-processed subhistogram set, and may serve as the initial result subhistogram set for the next iteration.

[0113] Step 117: Determine whether the iteration is finished.

[0114] For example, when the target sub-histogram set to be processed is an empty set, the iteration is determined to be finished. Alternatively, when the current number of iterations is greater than a preset iteration number threshold, the iteration is determined to be finished.

[0115] If the iteration is complete, execute step 118 ; otherwise, execute step 119 .

[0116] Step 118: Determine the target result subhistogram set finally obtained as the target subhistogram set.

[0117] At the end of the iteration, the final target result subhistogram set Determine the target subhistogram set and output the target subhistogram set.

[0118] Step 119: Enter the next iteration.

[0119] If the iteration is not completed, the next round of iteration will be entered. The target sub-histogram set to be processed obtained in this round of iteration can be used Update the initial set of subhistograms to be processed for the next iteration The target result subhistogram set obtained in this round of iteration can be used Update the initial result subhistogram set for the next iteration That is Repeat steps 111 to 119 until the iteration ends, and the target subhistogram set can be obtained.

[0120] In an exemplary embodiment, after obtaining the source grayscale histogram of the infrared image to be processed, the source grayscale histogram may be normalized to obtain a normalized source grayscale histogram, and then the normalized source grayscale histogram may be iteratively segmented based on the distribution feature information of the normalized source grayscale histogram. v It can be the normalized source grayscale histogram.

[0121] For example, the source grayscale histogram can be converted into a probability density function according to the following formula (16) to achieve normalization of the source grayscale histogram. Formula (16) can be expressed as:

[0122] Among them, h v (i) represents the number of pixels corresponding to grayscale value i in the source grayscale histogram; h on the right side of the formula v (k) represents the number of pixels corresponding to the grayscale value k in the source grayscale histogram; h on the left side of the formula v (k) represents the probability density of gray value k, that is, h v Normalization results of (i).

[0123] The infrared image enhancement method provided by the embodiment of the present disclosure is further described below in conjunction with Figures 3 and 4. Taking the infrared image as a small target object in a large background as an example, Figure 3 exemplifies a schematic diagram of the segmentation effect of segmenting the source grayscale histogram using the average value as the segmentation point, and Figure 4 exemplifies a schematic diagram of the segmentation effect of segmenting the source grayscale histogram using the segmentation point determined based on the average value, standard deviation and skewness. Referring to Figures 3 and 4, the source grayscale histogram corresponding to the infrared image shows a right-skewed distribution. Taking the number of iterations as 2 as an example, a complete source grayscale histogram can be divided into 4 segments. Among them, L11 is the grayscale segmentation point of the first segmentation histogram, and L21 and L22 are the grayscale segmentation points of the second segmentation histogram. It can be seen that the grayscale of the histogram is mainly concentrated in two areas, a large part is concentrated in the low grayscale area, and a small part is concentrated in the high grayscale area. The two areas can represent the background and the target object respectively.

[0124] The segmentation method according to FIG3 has strong adaptability to grayscale distributions that are relatively symmetrical on the left and right. However, for highly skewed distributions such as that shown in FIG3 , the grayscale segmentation point L11 calculated in the first iteration is located inside the low grayscale distribution area. This will segment the grayscale belonging to one object into the grayscale interval of another object, resulting in inaccurate segmentation results. Compared to the method of segmentation using the average value in FIG3 , according to FIG4 , after segmentation using the grayscale segmentation points determined after correcting the average value using the standard deviation and skewness, the grayscale segmentation points of the first iteration can accurately separate the low grayscale distribution area from the high grayscale distribution area, correcting the problem of poor adaptability to highly skewed distributions when segmenting using the average value alone, and further improving the accuracy of grayscale histogram segmentation.

[0125] The infrared image enhancement method provided by the embodiment of the present disclosure can determine the grayscale segmentation point based on the mean value, standard deviation and skewness of the source grayscale histogram, and iteratively segment the source grayscale histogram based on the grayscale segmentation point. It can use the standard deviation and skewness to correct the mean value. It has strong adaptability to grayscale histograms with relatively symmetrical grayscale distribution and grayscale histograms with high skewness distribution. It can accurately segment grayscale histograms with high skewness distribution, thereby improving the accuracy of grayscale histogram segmentation. Moreover, whether the sub-grayscale histogram is further segmented can be automatically terminated through conditional judgment. When the skewness of the segmented sub-grayscale histogram is less than the preset skewness threshold, it can be determined that the sub-grayscale histogram is a relatively symmetrical grayscale histogram. At this time, it is considered that the grayscale range within the sub-grayscale histogram belongs to the same type of object and no further segmentation is performed. The number of iterations does not need to be set manually. Instead, the sub-histograms to be processed that need to be further segmented are adaptively determined based on the current number of iterations and the skewness of the sub-grayscale histogram, and the iterative segmentation is terminated when there are no sub-histograms to be processed that need to be further segmented, thereby improving the adaptability of the iterative segmentation.

[0126] The infrared image enhancement device provided by the present disclosure is described below. The infrared image enhancement device described below and the infrared image enhancement method described above can be referenced to each other.

[0127] Figure 5 exemplarily shows a structural schematic diagram of the infrared image enhancement device provided by an embodiment of the present disclosure. Referring to Figure 5, the infrared image enhancement device may include: an acquisition module 510, configured to acquire a source grayscale histogram of the infrared image to be processed; a segmentation module 520, configured to iteratively segment the source grayscale histogram based on the distribution feature information of the source grayscale histogram to obtain a target sub-histogram set; a correction module 530, configured to perform probability density correction on each target sub-grayscale histogram in the target sub-histogram set to obtain a weighted grayscale histogram; a fusion module 540, configured to fuse the source grayscale histogram and the weighted grayscale histogram to obtain a target grayscale histogram; a mapping module 550, configured to determine a grayscale mapping curve of the target grayscale histogram, and perform grayscale mapping on the infrared image to be processed based on the grayscale mapping curve to obtain a contrast enhanced image of the infrared image to be processed.

[0128] In an example embodiment, the segmentation module 520 includes:

[0129] The first updating unit is configured to, when the current number of iterations is 0, determine that the initial subhistogram set to be processed is the source grayscale histogram, and determine that the initial result subhistogram set is an empty set; the initialization value of the current number of iterations is 0; when the current number of iterations is greater than 0, update the initial subhistogram set to be processed to the target subhistogram set to be processed obtained after the previous iteration of the current number of iterations, and update the initial result subhistogram set to the target result subhistogram set obtained after the previous iteration;

[0130] a segmentation judgment unit configured to determine, for each initial sub-histogram to be processed in the set of initial sub-histograms to be processed, whether the initial sub-histogram to be processed needs to be segmented;

[0131] a first segmentation processing unit configured to move the initial sub-histogram to be processed into a first sub-histogram set to be processed when the initial sub-histogram to be processed needs to be segmented;

[0132] The second segmentation processing unit is configured to move the initial subhistogram to be processed into the first result subhistogram set when the initial subhistogram to be processed does not need to be segmented, and the initialization state of the first result subhistogram set is the initial result subhistogram set;

[0133] a segmentation unit configured to segment each first sub-histogram to be processed in the first sub-histogram set to be processed based on the distribution feature information of the first sub-histogram to be processed, and move the segmentation results into the second sub-histogram set to be processed;

[0134] The second updating unit is configured to, after traversing the initial set of subhistograms to be processed, update the target set of subhistograms to be processed to the second set of subhistograms to be processed ultimately obtained in this round of iteration, update the target set of result subhistograms to the first set of result subhistograms ultimately obtained in this round of iteration, and increase the current number of iterations by 1;

[0135] The iterative processing unit is configured to determine whether the iteration is completed, and if the iteration is completed, determine the target result subhistogram set finally obtained as the target subhistogram set; if the iteration is not completed, enter the next round of iteration.

[0136] In an example embodiment, the segmentation judgment unit is specifically configured to: determine whether the initial sub-histogram to be processed meets the joint discrimination condition of the current number of iterations and the skewed distribution; if the initial sub-histogram to be processed meets the joint discrimination condition of the current number of iterations and the skewed distribution, determine that the initial sub-histogram to be processed needs to be segmented; if the initial sub-histogram to be processed does not meet the joint discrimination condition of the current number of iterations and the skewed distribution, determine that the initial sub-histogram to be processed does not need to be segmented.

[0137] In an exemplary embodiment, the distribution feature information includes the mean, standard deviation and skewness; accordingly, the segmentation unit can be specifically configured to: determine the grayscale segmentation point of the first sub-histogram to be processed based on the mean, standard deviation and skewness of the first sub-histogram to be processed; and use the grayscale segmentation point to segment the first sub-histogram to be processed.

[0138] In an exemplary embodiment, the segmentation module 520 further includes an iteration end determination module configured to determine the end of the iteration when the initial set of sub-histograms to be processed is empty.

[0139] In an exemplary embodiment, the acquisition module 510 includes: a statistical unit, configured to perform grayscale statistics on the infrared image to be processed to obtain a first grayscale histogram; a sorting unit, configured to sort the statistical values ​​of the first grayscale histogram in descending order to obtain a second grayscale histogram, and determine the cumulative distribution of the second grayscale histogram; a first determination unit, configured to locate the first target grayscale value in the cumulative distribution whose cumulative distribution ratio is greater than or equal to a preset proportion threshold, and determine the statistical value corresponding to the target grayscale value in the second grayscale histogram as the target grayscale threshold; a filtering unit, configured to perform grayscale filtering on the second grayscale histogram based on the target grayscale threshold to obtain a source grayscale histogram.

[0140] In an exemplary embodiment, the correction module 530 includes: a second determination unit, configured to determine the probability density sum of the target sub-grayscale histogram for each target sub-grayscale histogram in the target sub-histogram set; a weighting unit, configured to perform weighted processing on the target sub-grayscale histogram based on the probability density sum to obtain a weighted grayscale sub-histogram corresponding to the target sub-grayscale histogram; and a third determination unit, configured to determine each weighted grayscale sub-histogram as a weighted grayscale histogram.

[0141] In an exemplary embodiment, the fusion module 540 includes: a fourth determining unit configured to determine the cumulative distribution of the source grayscale histogram; and a fusion unit configured to fuse the source grayscale histogram and the weighted grayscale histogram based on the cumulative distribution to obtain a target grayscale histogram.

[0142] FIG6 illustrates a schematic structural diagram of an electronic device. As shown in FIG6 , the electronic device may include a processor 610, a communication interface 620, a memory 630, and a communication bus 640. The processor 610, the communication interface 620, and the memory 630 communicate with each other via the communication bus 640. The processor 610 may invoke logic instructions in the memory 630 to execute the infrared image enhancement method provided by any of the above method embodiments.

[0143] In addition, the logic instructions in the above-mentioned memory 630 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when sold or used as an independent product. Based on this understanding, the technical solution of the present disclosure is essentially or the part that contributes to the prior art or the part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present disclosure. The aforementioned storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), a disk or an optical disk, etc., each medium that can store program code.

[0144] On the other hand, the present disclosure also provides a computer program product, which includes a computer program. The computer program can be stored on a computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the infrared image enhancement method provided by each of the above method embodiments.

[0145] On the other hand, the present disclosure further provides a computer-readable storage medium having a computer program stored thereon, which is implemented when the computer program is executed by a processor to perform the infrared image enhancement method provided by any of the above method embodiments.

[0146] By way of example, computer-readable storage media include non-transitory computer-readable storage media.

[0147] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, i.e., they may be located in one location or distributed across multiple network units. Some or all of the modules may be selected based on actual needs to achieve the objectives of the present embodiment. Persons of ordinary skill in the art will be able to understand and implement the present invention without inventive effort.

[0148] Through the description of the above embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus the necessary general hardware platform, or of course, by hardware. Based on this understanding, the essence of the above technical solution or the part that contributes to the existing technology can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a magnetic disk, an optical disk, etc., and includes a number of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the method described in each embodiment or certain parts of the embodiment.

[0149] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present disclosure, rather than to limit them. Although the present disclosure has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in each of the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of each embodiment of the present disclosure.

Claims

1. An infrared image enhancement method, comprising: Acquire a source grayscale histogram of the infrared image to be processed, and iteratively segment the source grayscale histogram based on distribution feature information of the source grayscale histogram to obtain a target subhistogram set; Performing probability density correction on each target sub-grayscale histogram in the target sub-histogram set to obtain a weighted grayscale histogram; Fusing the source grayscale histogram and the weighted grayscale histogram to obtain a target grayscale histogram; A grayscale mapping curve of the target grayscale histogram is determined, and grayscale mapping is performed on the infrared image to be processed based on the grayscale mapping curve to obtain a contrast enhanced image of the infrared image to be processed.

2. The infrared image enhancement method according to claim 1, wherein: The iterative segmentation of the source grayscale histogram based on the distribution feature information of the source grayscale histogram to obtain a target subhistogram set includes: When the current number of iterations is 0, the initial sub-histogram set to be processed is determined to be the source grayscale histogram, and the initial result sub-histogram set is determined to be an empty set; the initialization value of the current number of iterations is 0; When the current number of iterations is greater than 0, the initial set of subhistograms to be processed is updated to the target set of subhistograms to be processed obtained after the previous iteration of the current number of iterations, and the initial set of result subhistograms is updated to the target set of result subhistograms obtained after the previous iteration; For each initial sub-histogram to be processed in the set of initial sub-histograms to be processed, determining whether the initial sub-histogram to be processed needs to be segmented; In the case where the initial sub-histogram to be processed needs to be segmented, the initial sub-histogram to be processed is moved into the first sub-histogram set to be processed; If the initial sub-histogram to be processed does not need to be segmented, the initial sub-histogram to be processed is moved into the first result sub-histogram set, and the initialization state of the first result sub-histogram set is state is the initial result sub-histogram set; For each first sub-histogram to be processed in the first sub-histogram set to be processed, segment the first sub-histogram to be processed based on the distribution feature information of the first sub-histogram to be processed, and move the segmentation result into the second sub-histogram set to be processed; After traversing the initial subhistogram set to be processed, the target subhistogram set to be processed is updated to the second subhistogram set to be processed finally obtained in this round of iteration, the target result subhistogram set is updated to the first result subhistogram set finally obtained in this round of iteration, and the current number of iterations is increased by 1; Determine whether the iteration is finished, and if the iteration is finished, determine the target result sub-histogram set finally obtained as the target sub-histogram set; if the iteration is not finished, enter the next round of iteration.

3. The infrared image enhancement method according to claim 2, wherein: The determining whether the initial to-be-processed sub-histogram needs to be segmented comprises: Determine whether the initial to-be-processed sub-histogram satisfies the joint discrimination condition of the current number of iterations and the skewed distribution; When the initial sub-histogram to be processed satisfies the joint discrimination condition of the current number of iterations and the skewed distribution, determining that the initial sub-histogram to be processed needs to be segmented; When the initial sub-histogram to be processed does not satisfy the joint discrimination condition of the current number of iterations and the skewed distribution, it is determined that the initial sub-histogram to be processed does not need to be segmented.

4. The infrared image enhancement method according to claim 2, wherein: The distribution feature information includes a mean value, a standard deviation, and a skewness; and segmenting the first sub-histogram to be processed based on the distribution feature information of the first sub-histogram to be processed includes: Determining a grayscale segmentation point of the first sub-histogram to be processed based on the mean value, the standard deviation and the skewness of the first sub-histogram to be processed; The first sub-histogram to be processed is segmented using the grayscale segmentation points.

5. The infrared image enhancement method according to claim 1, wherein: The step of obtaining a source grayscale histogram of the infrared image to be processed comprises: Performing grayscale statistics on the infrared image to be processed to obtain a first grayscale histogram; Sorting the statistical values ​​of the first grayscale histogram in descending order to obtain a second grayscale histogram, and determining a cumulative distribution of the second grayscale histogram; Locate a target grayscale value in the cumulative distribution whose cumulative distribution ratio is greater than or equal to a preset proportion threshold, and determine a statistical value corresponding to the target grayscale value in the second grayscale histogram as a target grayscale threshold; Grayscale filtering is performed on the second grayscale histogram based on the target grayscale threshold to obtain the source grayscale histogram.

6. The infrared image enhancement method according to claim 2, wherein: The step of obtaining a source grayscale histogram of the infrared image to be processed comprises: Performing grayscale statistics on the infrared image to be processed to obtain a first grayscale histogram; Sorting the statistical values ​​of the first grayscale histogram in descending order to obtain a second grayscale histogram, and determining a cumulative distribution of the second grayscale histogram; Locate a target grayscale value in the cumulative distribution whose cumulative distribution ratio is greater than or equal to a preset proportion threshold, and determine a statistical value corresponding to the target grayscale value in the second grayscale histogram as a target grayscale threshold; Grayscale filtering is performed on the second grayscale histogram based on the target grayscale threshold to obtain the source grayscale histogram.

7. The infrared image enhancement method according to claim 3, wherein: The step of obtaining a source grayscale histogram of the infrared image to be processed comprises: Performing grayscale statistics on the infrared image to be processed to obtain a first grayscale histogram; Sorting the statistical values ​​of the first grayscale histogram in descending order to obtain a second grayscale histogram, and determining a cumulative distribution of the second grayscale histogram; Locate a target grayscale value in the cumulative distribution whose cumulative distribution ratio is greater than or equal to a preset proportion threshold, and determine a statistical value corresponding to the target grayscale value in the second grayscale histogram as a target grayscale threshold; The second grayscale histogram is grayscale filtered based on the target grayscale threshold to obtain the Describe the source grayscale histogram.

8. The infrared image enhancement method according to claim 4, wherein: The step of obtaining a source grayscale histogram of the infrared image to be processed comprises: Performing grayscale statistics on the infrared image to be processed to obtain a first grayscale histogram; Sorting the statistical values ​​of the first grayscale histogram in descending order to obtain a second grayscale histogram, and determining a cumulative distribution of the second grayscale histogram; Locate a target grayscale value in the cumulative distribution whose cumulative distribution ratio is greater than or equal to a preset proportion threshold, and determine a statistical value corresponding to the target grayscale value in the second grayscale histogram as a target grayscale threshold; Grayscale filtering is performed on the second grayscale histogram based on the target grayscale threshold to obtain the source grayscale histogram.

9. The infrared image enhancement method according to claim 1, wherein: The method of performing probability density correction on each target sub-grayscale histogram in the target sub-histogram set to obtain a weighted grayscale histogram includes: For each target sub-grayscale histogram in the target sub-histogram set, determining the probability density sum of the target sub-grayscale histogram; Performing weighted processing on the target sub-grayscale histogram based on the probability density to obtain a weighted grayscale sub-histogram corresponding to the target sub-grayscale histogram; Each of the weighted grayscale sub-histograms is determined as the weighted grayscale histogram.

10. The infrared image enhancement method according to claim 2, wherein: The method of performing probability density correction on each target sub-grayscale histogram in the target sub-histogram set to obtain a weighted grayscale histogram includes: For each target sub-grayscale histogram in the target sub-histogram set, determining the probability density sum of the target sub-grayscale histogram; Performing weighted processing on the target sub-grayscale histogram based on the probability density to obtain a weighted grayscale sub-histogram corresponding to the target sub-grayscale histogram; Each of the weighted grayscale sub-histograms is determined as the weighted grayscale histogram.

11. The infrared image enhancement method according to claim 3, wherein: The method of performing probability density correction on each target sub-grayscale histogram in the target sub-histogram set to obtain a weighted grayscale histogram includes: For each target sub-grayscale histogram in the target sub-histogram set, determining the probability density sum of the target sub-grayscale histogram; Performing weighted processing on the target sub-grayscale histogram based on the probability density to obtain a weighted grayscale sub-histogram corresponding to the target sub-grayscale histogram; Each of the weighted grayscale sub-histograms is determined as the weighted grayscale histogram.

12. The infrared image enhancement method according to claim 4, wherein: The method of performing probability density correction on each target sub-grayscale histogram in the target sub-histogram set to obtain a weighted grayscale histogram includes: For each target sub-grayscale histogram in the target sub-histogram set, determining the probability density sum of the target sub-grayscale histogram; Performing weighted processing on the target sub-grayscale histogram based on the probability density to obtain a weighted grayscale sub-histogram corresponding to the target sub-grayscale histogram; Each of the weighted grayscale sub-histograms is determined as the weighted grayscale histogram.

13. The infrared image enhancement method according to claim 1, wherein: The step of fusing the source grayscale histogram and the weighted grayscale histogram to obtain a target grayscale histogram includes: Determining a cumulative distribution of the source grayscale histogram; The source grayscale histogram and the weighted grayscale histogram are fused based on the cumulative distribution to obtain a target grayscale histogram.

14. The infrared image enhancement method according to claim 2, wherein: The step of fusing the source grayscale histogram and the weighted grayscale histogram to obtain a target grayscale histogram includes: Determining a cumulative distribution of the source grayscale histogram; The source grayscale histogram and the weighted grayscale histogram are fused based on the cumulative distribution to obtain a target grayscale histogram.

15. The infrared image enhancement method according to claim 3, wherein: The step of fusing the source grayscale histogram and the weighted grayscale histogram to obtain a target grayscale histogram includes: Determining a cumulative distribution of the source grayscale histogram; The source grayscale histogram and the weighted grayscale histogram are fused based on the cumulative distribution to obtain a target grayscale histogram.

16. The infrared image enhancement method according to claim 4, wherein: The step of fusing the source grayscale histogram and the weighted grayscale histogram to obtain a target grayscale histogram includes: Determining a cumulative distribution of the source grayscale histogram; The source grayscale histogram and the weighted grayscale histogram are fused based on the cumulative distribution to obtain a target grayscale histogram.

17. An infrared image enhancement device, comprising: An acquisition module, configured to acquire a source grayscale histogram of an infrared image to be processed; A segmentation module, configured to iteratively segment the source grayscale histogram based on the distribution feature information of the source grayscale histogram to obtain a target subhistogram set; A correction module is configured to perform probability density correction on each target sub-grayscale histogram in the target sub-histogram set to obtain a weighted grayscale histogram; A fusion module, configured to fuse the source grayscale histogram and the weighted grayscale histogram to obtain a target grayscale histogram; The mapping module is configured to determine a grayscale mapping curve of the target grayscale histogram, and perform grayscale mapping on the infrared image to be processed based on the grayscale mapping curve to obtain a contrast enhanced image of the infrared image to be processed.

18. The infrared image enhancement device according to claim 17, wherein: The segmentation module comprises: The first updating unit is configured to, when the current number of iterations is 0, determine that the initial set of sub-histograms to be processed is the source grayscale histogram, and determine that the initial result sub-histogram set is an empty set; the initialization value of the current number of iterations is 0; when the current number of iterations is greater than 0, update the initial set of sub-histograms to be processed to the target set of sub-histograms to be processed obtained after the previous iteration of the current number of iterations, and update the initial result sub-histogram set to The target result subhistogram set obtained after the previous iteration; A segmentation judgment unit, configured to determine, for each initial sub-histogram to be processed in the initial sub-histogram set to be processed, whether the initial sub-histogram to be processed needs to be segmented; A first segmentation processing unit, configured to move the initial sub-histogram to be processed into a first sub-histogram set to be processed when the initial sub-histogram to be processed needs to be segmented; A second segmentation processing unit is configured to move the initial sub-histogram to be processed into a first result sub-histogram set when the initial sub-histogram to be processed does not need to be segmented, and the initialization state of the first result sub-histogram set is the initial result sub-histogram set; a segmentation unit configured to segment, for each first sub-histogram to be processed in the first sub-histogram set to be processed, the first sub-histogram to be processed based on the distribution feature information of the first sub-histogram to be processed, and move the segmentation result into the second sub-histogram set to be processed; A second updating unit is configured to, after traversing the initial subhistogram set to be processed, update the target subhistogram set to be processed to the second subhistogram set to be processed finally obtained in this round of iteration, update the target result subhistogram set to the first result subhistogram set finally obtained in this round of iteration, and increase the current number of iterations by 1; The iteration processing unit is configured to determine whether the iteration is completed, and if the iteration is completed, determine the target result sub-histogram set finally obtained as the target sub-histogram set; if the iteration is not completed, enter the next round of iteration.

19. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the infrared image enhancement method according to any one of claims 1 to 16 is implemented.

20. A computer-readable storage medium having a computer program stored thereon, wherein: When the computer program is executed by a processor, the infrared image enhancement method according to any one of claims 1 to 16 is implemented.

Citation Information

Patent Citations

  • Method for infrared focal plane detector image enhancement

    CN107292856A

  • Image enhancement method and device, computer equipment and storage medium

    CN109801244A

  • Methods and systems for contrast enhancement

    US20100278423A1

Cited By

  • Infrared image enhancement method and device based on histogram matching and curvelet transformation

    CN121961873A

  • An infrared image enhancement method and device based on histogram matching and curvelet transform

    CN121961873B