A contrast enhancement method and system based on block segmentation

Through the block-based contrast enhancement method, combined with S-curve transformation, gamma operation and block processing, the problem of poor noise enhancement and detail contrast improvement in the existing technology is solved, and effective contrast enhancement and noise reduction of the image are achieved. Suppression, improves the dynamic range and detail fidelity of the image.

CN118570112BActive Publication Date: 2024-10-29ZHEJIANG XINMAI SILICON CO LTD
View PDF 11 Cites 0 Cited by

Patent Information

Application Number
CN202411025613.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-30
Publication Date
2024-10-29
Estimated Expiration
2044-07-30

AI Technical Summary

Technical Problem

When existing contrast enhancement methods enhance the contrast of local details of an image, it is easy to enhance noise, and the contrast improvement is not ideal.

Method used

A block-based contrast enhancement method is used to perform S-curve transformation, gamma operation and block processing on the image. Detailed areas and flat areas are determined based on the mean standard deviation within the block. Mean filtering of different window sizes is performed respectively, and based on The image after Gaussian filtering is subjected to local contrast enhancement processing to suppress the enhancement of noise.

Benefits of technology

It effectively reduces noise interference during the contrast enhancement process, enhances the contrast of local details of the image, and improves the dynamic range and detail fidelity of the image.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118570112B_ABST
    Figure CN118570112B_ABST
Patent Text Reader

Abstract

The present invention discloses a contrast enhancement method and system based on block division, and relates to the field of image processing technology. The method comprises: performing S-curve transformation on an image according to an image mean value, and outputting an S-curve image according to the turning point of the S-curve as a first output image; performing gamma operation on the image, and outputting a second output image; performing the same block division processing on the first output image and the second output image respectively, calculating the mean of the standard deviation within the block of the second output image, presetting a first reference value, comparing the mean of the standard deviation within the block with the first reference value to determine the detail area and the flat area, and performing different degrees of enhancement on the corresponding area of ​​the first output image according to the determined detail area and the flat area. Then, performing local contrast enhancement processing on the first output image according to the relationship between the image after mean filtering and the first output image. The present invention can effectively reduce noise interference in the process of image contrast enhancement and enhance the contrast of local details of the image.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of video signal processing, and in particular to a contrast enhancement method and system based on block segmentation. Background Art

[0002] Existing contrast enhancement schemes generally include contrast enhancement methods based on histogram enhancement, methods based on nonlinear contrast stretching, contrast enhancement based on mathematical transformation, etc. These methods will enhance noise in the process of contrast enhancement and do not improve the contrast of local details of the image very well. Summary of the invention

[0003] In order to solve at least one shortcoming of the prior art, the present application provides a contrast enhancement method based on block division, which increases the contrast of local details of the image while suppressing the enhancement of noise as the contrast is enhanced. To achieve the above purpose, the present application adopts the following technical solutions:

[0004] A contrast enhancement method based on block segmentation comprises the following steps:

[0005] Perform normalization processing on the input image to obtain the image mean; perform S-curve transformation on the image according to the image mean, and the turning point of the S-curve is determined according to 1 minus the image mean; use the mean value of the dark area below the image mean as the bright area suppression parameter, and use the mean value of the bright area above the image mean as the dark area brightening parameter of the image, and output the first output image;

[0006] Perform gamma operation on the image and output a second output image;

[0007] The first output image and the second output image are respectively subjected to the same block processing, the mean of the standard deviation within the block of the second output image is calculated, a first reference value is preset, the mean of the standard deviation within the block and the first reference value are compared to determine the detail area and the flat area, mean filtering is performed on the detail area and the flat area respectively, and the filtering window of the detail area is larger than the filtering window of the flat area; local contrast enhancement processing is performed on the first output image according to the relationship between the image after mean filtering and the first output image.

[0008] The preferred solution also includes the steps of: performing Gaussian filtering on the image after the mean filtering, and performing local contrast enhancement on the first output image according to the relationship between the image after the Gaussian filtering and the first output image.

[0009] A preferred solution is a method for performing local contrast enhancement processing on the first output image according to the relationship between the Gaussian filtered image and the first output image, comprising:

[0010] ,in, yout a block image representing a first output image; filter represents the image after Gaussian filtering; α represents the contrast enhancement coefficient. The larger α is, the higher the contrast enhancement degree is. imgout Represents the output contrast-enhanced image.

[0011] A preferred solution, a method for outputting a first output image, specifically includes:

[0012] If the pixel value is less than or equal to the turning point, the bright area suppression parameter is used for enhancement; if the pixel value is greater than the turning point, the dark area brightening parameter is used for enhancement; all pixel points are traversed and the corresponding enhancement is performed, and then the second output image is output.

[0013] A preferred solution is to perform gamma operation on an image and output a second output image, specifically comprising:

[0014] Select different gamma parameters to perform multiple gamma operations on the image and calculate the standard deviation after each gamma operation;

[0015] If the image mean is greater than 128, weighted processing is performed based on the principle that the larger the gamma parameter, the higher the weight of the calculated standard deviation; if the image mean is less than or equal to 128, weighted processing is performed based on the principle that the smaller the gamma parameter, the higher the weight of the calculated standard deviation.

[0016] The preferred solution is a method for performing mean filtering on the detail area and the flat area respectively, comprising: performing mean filtering on the flat area using a minimum window.

[0017] The present application also proposes a block-based contrast enhancement system, corresponding to a block-based local contrast enhancement method, including the following structure:

[0018] An S-curve transformation unit is used to transform the image into an S-curve according to the mean value of the input image, wherein the turning point of the S-curve is determined according to 1 minus the image mean value; the mean value of the dark area lower than the image mean value is used as the bright area suppression parameter, and the mean value of the bright area higher than the image mean value is used as the image dark area brightening parameter; and the turning point and the output S-curve image are used as the first output image;

[0019] A gamma operation unit, used for performing a gamma operation on the image and outputting a second output image;

[0020] The block enhancement unit performs the same block processing on the first output image and the second output image respectively, calculates the mean of the standard deviation in the block of the second output image, presets a first reference value, compares the size of the mean of the standard deviation in the block and the first reference value to determine the detail area and the flat area, performs mean filtering on the detail area and the flat area respectively, and the filtering window of the detail area is larger than the filtering window of the flat area; and performs local contrast enhancement processing on the first output image according to the relationship between the image after the mean filtering and the first output image.

[0021] The preferred solution further includes a Gaussian filtering unit for performing Gaussian filtering on the image after the mean filtering, and performing local contrast enhancement processing on the first output image according to the relationship between the image after the Gaussian filtering and the first output image.

[0022] In a preferred solution, the block enhancement unit includes a local contrast enhancement unit, which is used to perform local contrast enhancement processing on the first output image according to the relationship between the image after Gaussian filtering and the first output image:

[0023] ,in, yout a block image representing a first output image; filter represents the image after Gaussian filtering; α represents the contrast enhancement coefficient. The larger α is, the higher the contrast enhancement degree is. imgout Represents the output contrast-enhanced image.

[0024] In a preferred embodiment, the gamma operation unit includes a multiple operation unit and a weighted processing unit, wherein

[0025] The multiple operation unit is used to select different gamma parameters to perform multiple gamma operations on the image and calculate the standard deviation after each gamma operation;

[0026] The weighted processing unit is used to implement: if the image mean is greater than 128, weighted processing is performed according to the principle that the larger the gamma parameter, the higher the weight of the calculated standard deviation; if the image mean is less than or equal to 128, weighted processing is performed according to the principle that the smaller the gamma parameter, the higher the weight of the calculated standard deviation.

[0027] The application has the following beneficial effects: the scheme enhances the dynamic range of the image based on the adaptive S-curve; judges the standard of image noise and details according to the gamma operation, then divides the image with increased dynamic range and the gamma operation image into blocks, and performs filtering operations of different window sizes on the input image according to the size of the mean of the standard deviation within the block, so as to distinguish the contrast enhancement degree of the flat area and the detail area. It can effectively reduce the noise interference in the process of image contrast enhancement and enhance the contrast of local details of the image. BRIEF DESCRIPTION OF THE DRAWINGS

[0028] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0029] Figure 1is a flow chart of a contrast enhancement method based on block according to an embodiment of the present application;

[0030] Figure 2 is a schematic diagram of an S-shaped curve of different turning points disclosed in the embodiments of the present application;

[0031] Figure 3 It is a schematic diagram of the contrast enhancement trend disclosed in the embodiments of the present application. DETAILED DESCRIPTION

[0032] The following will be combined with the accompanying drawings to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present application.

[0033] The terms "first", "second", etc. in the claims and specification of the present application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that the terms used in this way are interchangeable under appropriate circumstances. This is merely a way of distinguishing objects with the same properties in the embodiments of the present application. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, so that a process, method, system, product or apparatus that includes a series of units is not necessarily limited to those units, but may include other units not expressly listed or inherent to these processes, methods, products or apparatus.

[0034] Example 1

[0035] A contrast enhancement method based on block Figure 1 , including the following steps:

[0036] Step 1, normalize the input image to obtain the image mean; perform S-shaped curve transformation on the image according to the image mean, and the turning point of the S-shaped curve is determined according to 1 minus the image mean; the mean value of the dark area below the image mean is used as the bright area suppression parameter, and the mean value of the bright area above the image mean is used as the image dark area brightening parameter, and the S-shaped curve image is output as the first output image according to the turning point and the bright area suppression parameter and the dark area brightening parameter.

[0037] Step 2: perform a gamma operation on the image I and output a second output image.

[0038] Step 3: Perform the same block processing on the first output image and the second output image respectively, calculate the mean standard deviation of the second output image in the block, preset a first reference value, compare the size of the mean standard deviation in the block and the first reference value to determine the detail area and the flat area, perform mean filtering on the detail area and the flat area respectively, and the filter window of the detail area is larger than the filter window of the flat area; perform local contrast enhancement processing on the first output image according to the relationship between the image after mean filtering and the first output image. It should be noted that the local contrast enhancement proposed in this application does not only perform contrast enhancement on the detail area, but adaptively performs different degrees of enhancement processing according to the distinguished flat area and detail area.

[0039] The specific method of S-curve transformation includes: the turning point of the S-curve is determined by 1 minus the image mean, as shown in Formula 1

[0040] T= 1 - meanI Formula 1

[0041] For example, the present application is for brightness data, and the image mean values ​​calculated according to different input image data are different. For example, when the image mean value is 0.35, T=1-0.35, and the value of T is 0.65.

[0042] The calculation of the bright area suppression parameters and dark area brightening parameters is as shown in Formula 2 and Formula 3:

[0043] adark = sumd / countd I ≤ meanI Formula 2

[0044] alight = suml / countl I > meanI Formula 3

[0045] in, meanI represents the mean value of the normalized input image, I is the image after the normalization of the input image (referred to as “image I” in this article), and T represents the turning point; adark Indicates the dark area brightening parameter. sumd represents the sum of the dark pixel values ​​below the mean of the input image, countd Indicates the number of dark pixels below the mean value of the input image; alight represents the bright area suppression parameter, sumd Represents the sum of the bright pixel values ​​above the mean of the input image, countd Indicates the number of bright pixels that are higher than the mean value of the input image.

[0046] Furthermore, the method of outputting an S-shaped curve image as a first output image according to the turning point, the bright area suppression parameter, and the dark area brightening parameter specifically includes:

[0047] If the pixel value is less than or equal to the turning point, the bright area suppression parameter is used for enhancement; if the pixel value is greater than the turning point, the dark area brightening parameter is used for enhancement; after traversing all pixel points and performing corresponding enhancement, the second output image is output. The specific calculation method is shown in Formula 4.

[0048]

[0049] Wherein, Sout represents the output S-curve image. The mean of the dark area lower than the image mean is used as the bright area suppression parameter, and the mean of the bright area higher than the image mean is used as the dark area brightening parameter. The method disclosed in this embodiment can effectively avoid the dark area parameter being set too high to cause the image to be blurred, or the bright area parameter being too low to have no suppression effect on the image, and effectively balances the dynamic range of the image. The method disclosed in this embodiment adjusts the dynamic range of the image by inputting the image mean, thereby improving the adaptability of dynamic range enhancement.

[0050] Figure 2 The S-curves with different turning points and different enhancement parameters are shown. The turning point of the “---” curve is 0.4; the turning point of the “•••” curve is 0.5; the turning point of the “-·-·” curve is 0.6. “—” represents the straight line x=y. The horizontal coordinate X(m) is the grayscale value of the input image, and the vertical coordinate Y(m) is the grayscale value of the output image.

[0051] From the figure, we can see the influence of different turning points and different enhancement parameters on the output image. When the input image is too dark, the higher the turning point value, the more the dark area is brightened. The larger the enhancement parameter, the stronger the degree of brightening the dark area and suppressing the bright area. When the input image is a brighter image, the smaller the turning point value, the stronger the suppression of the bright area of ​​the image. This embodiment discloses a method for obtaining different turning points and enhancement parameters according to different input images, which greatly improves the adaptability of the S-curve.

[0052] Step 2, performing gamma operation on the image I to output a second output image, specifically includes:

[0053] Select different gamma parameters to perform multiple gamma operations on the image and calculate the standard deviation after each gamma operation;

[0054] If the image mean is greater than 128, weighted processing is performed based on the principle that the larger the gamma parameter, the higher the weight of the calculated standard deviation; if the image mean is less than or equal to 128, weighted processing is performed based on the principle that the smaller the gamma parameter, the higher the weight of the calculated standard deviation.

[0055] Exemplarily, three gamma operations are selected, and three groups of gamma parameters of 0.5, 1, and 1.5 are used, as shown in Formula 5. The standard deviation after each gamma operation is calculated according to Formula 6, and the standard deviation is weighted according to the image mean.

[0056] x m = I n (m=1,2,3 n=0.5,1,1.5) Formula 5

[0057]

[0058] in, x m represents the multi-scale gamma transform, stdg m Representation calculation x m If the image mean is higher than 128, the larger the gamma parameter, the higher the standard deviation weight; if the image mean is lower than 128, the smaller the gamma parameter, the higher the standard deviation weight, to avoid the image being too bright or too dark and losing image details. The specific formula is as follows: Formula 7.

[0059]

[0060] The multi-scale gamma transformation is performed on image I mainly because the detail information in image I is more stable than the detail information in sout (the image enhanced by the S curve), which reduces the impact of the brightness change after step 1 on the standard deviation.

[0061] It should be noted that 128 is the 0.5 value of the normalized input image, which is used to determine the original brightness of the input image, and 256 is the maximum value of the input image.

[0062] The reason for setting the weights to 0.5, 0.3, and 0.2 is that when the mean value meanI of the original input image is less than or equal to 128, it indicates that the image brightness is not high and the local dark area details will be lost. Therefore, the value of the gamma parameter (n<1) is selected as the weight of 0.5; (n=1) the weight of 0.3 is to ensure that the details in the original image are not lost; (n>1) the weight of 0.2 is to ensure that the details in the bright area are not lost. When the mean value meanI of the original input image is greater than 128, it indicates that the original input image brightness is high. In order to ensure the details of the bright area, stdg3 is selected as a higher weight.

[0063] There are also other options, such as 0.3, 0.3, 0.4; 0.2, 0.4, 0.4. When selecting parameters, it is necessary to ensure that when mean(I)<=128, the weight setting of stdg1>=stdg2>=stdg3; when mean(I)>128, stdg1<=stdg2<=stdg3. mean(I) It means calculating the average of all pixel values. meanI Represents the image mean.

[0064] Step 3: The specific implementation is as follows:

[0065] The first output image and the second output image are respectively subjected to the same block processing. For example, in this embodiment, the image is divided into 16×16 blocks. Other options include 32×32 or 64×64. As the window size increases, the contrast enhancement degree will also increase. The selection is made according to the needs.

[0066] Among them, the method of enhancing the corresponding areas of the first output image to different degrees according to the determined detail areas and flat areas specifically includes: performing n×n mean filtering on the detail areas and performing m×m mean filtering on the flat areas, wherein n is greater than m.

[0067] Exemplarily, this embodiment uses a 5×5 filter window and a 3×3 filter window, and the first reference value (threshold) is preset to 5. The value of 5 is obtained through multiple experiments. When the mean of the 16×16 standard deviation image is greater than the threshold 5, the distinction between details and noise is more accurate.

[0068] According to the above parameters, the specific judgment and processing method includes: calculating the mean of the standard deviation within the 16×16 block, when the mean of the standard deviation within the block is greater than the threshold value 5, judging that the block area is a detail area, and performing a mean filter of a 5×5 filter window on the block area; when the mean of the standard deviation within the block is less than or equal to the threshold value 5, judging that the block area is a flat area, and performing a mean filter of a 3×3 filter window on the block area, the larger the value of the filter window, the higher the degree of detail enhancement.

[0069] As a preferred solution, after enhancing the corresponding data of the first output image to different degrees according to the determined detail area and flat area, the method further includes the step of performing Gaussian filtering on the image after the mean filtering. The purpose is to remove the block effect caused by the filter windows of different sizes in the above method, and perform Gaussian filtering on the output image again.

[0070] Further, according to the relationship between the Gaussian filtered image and the first output image, a method for performing local contrast enhancement processing on the first output image is specifically to enhance the image contrast using the following formula 8:

[0071]

[0072] in, yout represents the block image of the first output image (i.e., the image after Sout is block-divided into 16×16 blocks); filter represents the image after Gaussian filtering; α represents the contrast enhancement coefficient. The larger α is, the higher the contrast enhancement degree is. imgout Represents the output contrast-enhanced image.

[0073] Contrast enhancement trend Figure 3 As shown, the x axis is the value of Sout and the y axis is imgout The square labeled line indicates x=y. When sout>filter, filter / sout<1, then (filter / sout)^α is between 0-1, and sout^(filter / sout)^α is always above the x=y curve. Since filter / sout<1, the smaller α is, the larger (filter / sout)^α is, and the output result is closer to x=y, that is, the smaller α is, the closer it is to x=y, as shown by the triangle labeled line and the circle labeled line.

[0074] When sout<=filter, filter / sout>=1, (filter / sout)^α is always>1, then we know that sout^(filter / sout)^α is always below the x=y curve, and as α gets smaller, it gets closer to x=y, and the output results are shown in the pentagonal and parallelogram annotation lines. Therefore, as filter / sout changes, the pixel difference of the image can be increased, achieving the effect of enhancing the local contrast of the image. ^ is a superscript symbol.

[0075] In the above, for flat areas, it is preferred to use the mean filter with the smallest window (3×3 window filter), so that the fluctuation of the filter / Sout value is limited, which can effectively reduce the contrast enhancement degree of the flat area and effectively suppress the excessive enhancement of the noise in the flat area; for the detail edge area, a larger window filter is used to make the filter / Sout have a larger fluctuation, which can effectively ensure the improvement of the contrast of the detail area. Other instructions, for the detail edge area, the above-disclosed 16×16 small block can be selected to be filtered by more than 5×5 and less than 15×15.

[0076] Embodiment 2:

[0077] A local contrast enhancement system based on block segmentation includes the following structure:

[0078] An S-curve transformation unit is used to transform the image into an S-curve according to the mean value of the input image, wherein the turning point of the S-curve is determined according to 1 minus the image mean value; the mean value of the dark area lower than the image mean value is used as the bright area suppression parameter, and the mean value of the bright area higher than the image mean value is used as the image dark area brightening parameter; and the turning point and the output S-curve image are used as the first output image;

[0079] A gamma operation unit, used for performing a gamma operation on the image and outputting a second output image;

[0080] The block enhancement unit performs the same block processing on the first output image and the second output image respectively, calculates the mean of the standard deviation within the block of the second output image as an evaluation index parameter, presets a first reference value, compares the size of the mean of the standard deviation within the block and the first reference value to judge the detail area and the flat area, performs mean filtering on the detail area and the flat area respectively, and the filtering window of the detail area is larger than the filtering window of the flat area; and performs local contrast enhancement processing on the first output image according to the relationship between the image after the mean filtering and the first output image.

[0081] The block enhancement unit includes a local contrast enhancement unit, which is used to perform local contrast enhancement on the first output image according to the relationship between the image after Gaussian filtering and the first output image:

[0082]

[0083] in, yout Represents the image after block mean filtering; filter represents the image after Gaussian filtering; α represents the contrast enhancement coefficient. The larger α is, the higher the contrast enhancement degree is. imgout Represents the output contrast-enhanced image.

[0084] Preferably, the gamma operation unit includes a multiple operation unit and a weighted processing unit, wherein

[0085] The multiple operation unit is used to select different gamma parameters to perform multiple gamma operations on the image and calculate the standard deviation after each gamma operation;

[0086] The weighted processing unit is used to implement: if the image mean is greater than 128, weighted processing is performed according to the principle that the larger the gamma parameter, the higher the weight of the calculated standard deviation; if the image mean is less than or equal to 128, weighted processing is performed according to the principle that the smaller the gamma parameter, the higher the weight of the calculated standard deviation.

[0087] Further disclosed is a computer storage medium storing a computer program, which is called to implement a local contrast enhancement method based on block division as disclosed in Example 1.

[0088] Further disclosed is a computer device, comprising a memory and a processor, wherein the memory is used to store one or more computer programs, wherein the one or more computer programs are executed by the processor to implement a block-based local contrast enhancement method as disclosed in Example 1.

[0089] Exemplarily, the computer program can be divided into one or more modules / units, one or more modules / units are stored in a memory and executed by a processor, and the I / O interface transmission of data is completed by an input interface and an output interface to complete the present invention. One or more modules / units can be a series of computer program instruction segments that can complete specific functions, and the instruction segments are used to describe the execution process of the computer program in a computer device.

[0090] The computer device may be a computing device such as a desktop computer, a notebook, a PDA, a cloud server, etc. The computer device may include, but is not limited to, a memory and a processor. Those skilled in the art may understand that this embodiment is only an example of a computer device and does not constitute a limitation on the computer device. The computer device may include more or fewer components, or a combination of certain components, or different components. For example, the computer device may also include an input device, a network access device, a bus, etc.

[0091] The processor may be a central processing unit (CPU), other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.

[0092] The memory can be an internal storage unit of a computer device, such as a hard disk or memory of a computer device. The memory can also be an external storage device of a computer device, such as a plug-in hard disk equipped on a computer device, a Smart Media Card (SMC), a Secure Digital (SD) card, a Flash Card, etc. Furthermore, the memory can also include both the internal storage unit of a computer device and an external storage device. The memory is used to store computer programs and other programs and data required by the computer device. The memory can also be used to temporarily store data in an output device. The aforementioned storage media include various media that can store program codes, such as USB flash drives, mobile hard disks, read-only memories ROM, random access memories RAM, disks or optical disks.

[0093] In several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed. The units may or may not be physically separated, and the components displayed as units may be one physical unit or multiple physical units, that is, they may be located in one place, or they may be distributed in multiple different places. Some or all of the units may be selected according to actual needs to achieve the purpose of the scheme of this embodiment.

Claims

1. A contrast enhancement method based on block segmentation, characterized in that: The following steps are involved: Perform normalization processing on the input image to obtain the image mean; perform S-curve transformation on the image according to the image mean, and the turning point of the S-curve is determined according to 1 minus the image mean; use the mean value of the dark area below the image mean as the bright area suppression parameter, and use the mean value of the bright area above the image mean as the dark area brightening parameter of the image, and output the first output image; Perform gamma operation on the image and output a second output image; The first output image and the second output image are respectively subjected to the same block processing, and the mean of the standard deviation in the block of the second output image is calculated, a first reference value is preset, and the mean of the standard deviation in the block is compared with the first reference value to determine the detail area and the flat area, and the detail area and the flat area are respectively subjected to mean filtering, and the filtering window of the detail area is larger than the filtering window of the flat area; The image after the mean filtering is subjected to Gaussian filtering, and the first output image is subjected to local contrast enhancement processing according to the relationship between the image after the Gaussian filtering and the first output image, specifically including the following formula; , in, yout a block image representing a first output image; filter represents the image after Gaussian filtering; α represents the contrast enhancement coefficient. The larger α is, the higher the contrast enhancement degree is. imgout Represents the output contrast-enhanced image.

2. The block-based contrast enhancement method according to claim 1, characterized in that: The method for outputting a first output image specifically includes: If the pixel value is less than or equal to the turning point, the bright area suppression parameter is used for enhancement; if the pixel value is greater than the turning point, the dark area brightening parameter is used for enhancement; all pixel points are traversed and the corresponding enhancement is performed, and then the second output image is output.

3. The block-based contrast enhancement method according to claim 1, characterized in that: The method of performing gamma operation on an image and outputting a second output image specifically includes: Select different gamma parameters to perform multiple gamma operations on the image and calculate the standard deviation after each gamma operation; If the image mean is greater than 128, weighted processing is performed based on the principle that the larger the gamma parameter, the higher the weight of the calculated standard deviation; if the image mean is less than or equal to 128, weighted processing is performed based on the principle that the smaller the gamma parameter, the higher the weight of the calculated standard deviation.

4. The block-based contrast enhancement method according to claim 1, characterized in that: The method of performing mean filtering on detail areas and flat areas respectively includes: performing mean filtering on flat areas by using a minimum window.

5. A block-based contrast enhancement system, characterized in that: Includes the following structures: An S-curve transformation unit is used to transform the image into an S-curve according to the mean value of the input image, wherein the turning point of the S-curve is determined according to 1 minus the image mean value; the mean value of the dark area lower than the image mean value is used as the bright area suppression parameter, and the mean value of the bright area higher than the image mean value is used as the image dark area brightening parameter; and the turning point and the output S-curve image are used as the first output image; A gamma operation unit, used for performing a gamma operation on the image and outputting a second output image; The block enhancement unit performs the same block processing on the first output image and the second output image, calculates the mean of the standard deviation in the block of the second output image, presets a first reference value, compares the mean of the standard deviation in the block with the first reference value to determine the detail area and the flat area, performs mean filtering on the detail area and the flat area, respectively, and the filtering window of the detail area is larger than the filtering window of the flat area; A Gaussian filter unit, used for performing Gaussian filtering on the image after mean filtering; The block enhancement unit is also used to perform local contrast enhancement processing on the first output image according to the relationship between the image processed by Gaussian filtering and the first output image, which specifically includes the following: , in, yout a block image representing a first output image; filter represents the image after Gaussian filtering; α represents the contrast enhancement coefficient. The larger α is, the higher the contrast enhancement degree is. imgout Represents the output contrast-enhanced image.

6. A block-based contrast enhancement system according to claim 5, characterized in that: The gamma operation unit includes a multi-operation unit and a weighted processing unit, wherein The multiple operation unit is used to select different gamma parameters to perform multiple gamma operations on the image and calculate the standard deviation after each gamma operation; The weighted processing unit is used to implement: if the image mean is greater than 128, weighted processing is performed according to the principle that the larger the gamma parameter, the higher the weight of the calculated standard deviation; if the image mean is less than or equal to 128, weighted processing is performed according to the principle that the smaller the gamma parameter, the higher the weight of the calculated standard deviation.

Citation Information

Patent Citations

  • Method and device for enhancing image details and terminal

    CN109003249A

  • Image adaptive enhancement method and device and image processing device

    CN109325922A

  • An infrared image basic layer processing method and system based on a filtering layering framework

    CN109741276A

  • Infrared image contrast enhancement method and device

    CN111784594A

  • High-dynamic thermal infrared image adaptive preprocessing method facing interference environment

    CN114359083A