CN110751603A - Method and system for enhancing image contrast and terminal equipment - Google Patents

Method and system for enhancing image contrast and terminal equipment Download PDF

Info

Publication number
CN110751603A
CN110751603A CN201910918068.0A CN201910918068A CN110751603A CN 110751603 A CN110751603 A CN 110751603A CN 201910918068 A CN201910918068 A CN 201910918068A CN 110751603 A CN110751603 A CN 110751603A
Authority
CN
China
Prior art keywords
histogram
image
brightness
blue
green
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201910918068.0A
Other languages
Chinese (zh)
Inventor
任航
胡涛涛
宋玉龙
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Changchun Institute of Optics Fine Mechanics and Physics of CAS
Original Assignee
Changchun Institute of Optics Fine Mechanics and Physics of CAS
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Changchun Institute of Optics Fine Mechanics and Physics of CAS filed Critical Changchun Institute of Optics Fine Mechanics and Physics of CAS
Priority to CN201910918068.0A priority Critical patent/CN110751603A/en
Publication of CN110751603A publication Critical patent/CN110751603A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • G06T5/90
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/50Image enhancement or restoration by the use of more than one image, e.g. averaging, subtraction
    • G06T5/77
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20021Dividing image into blocks, subimages or windows
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20212Image combination
    • G06T2207/20221Image fusion; Image merging

Abstract

The invention provides a method, a system and a terminal device for enhancing image contrast, which are characterized in that an image is cut into sub-blocks according to the number of selected and optimized horizontal and vertical grids, then the histogram information of each sub-block is counted and is mixed with the integral histogram information of an original image to a certain extent, the synthesized histogram is subjected to histogram cutting and equalization for a color image, a new mapping histogram of each sub-block is obtained, the data of a mapping table is subjected to multipoint sampling, then a spline interpolation algorithm is used for interpolating sampling points, or a new mapping table is subjected to Gaussian blur to a certain extent, a smoother mapping table is obtained, and finally a new pixel value is obtained. The calculated amount is small, the speed is high, the noise generated during contrast adjustment can be effectively inhibited by carrying out smooth interpolation or Gaussian blur on the mapping table, and the picture distortion caused by excessive amplification of information is prevented. The invention has the characteristics of good enhancement effect and prominent detail recovery effect.

Description

Method and system for enhancing image contrast and terminal equipment
Technical Field
The present invention relates to the field of image processing technologies, and in particular, to a method, a system, and a terminal device for enhancing image contrast.
Background
Image enhancement is one of the most important issues in low-level image processing. Image contrast enhancement is a basic method of image pre-processing. Histogram equalization is a standard technique for enhancing image contrast, and aims to improve the quality of low-contrast images and provide better visual effect for human eyes. The task of image enhancement is very complex due to the lack of a general unifying theory and effective image quality evaluation criteria.
Histogram equalization algorithms have so far been roughly divided into Global Histogram Equalization (GHE) and Local Histogram Equalization (LHE). For a global histogram equalization algorithm, a plurality of improved algorithms can meet different applications, the algorithms are used for equalizing the whole image, and the algorithms have some defects, such as change of characteristics of image mean brightness and the like, over-enhancement and noise amplification. To keep the image brightness unchanged after equalization, a brightness-preserving double histogram equalization (BBHE) algorithm has emerged, which can keep the image average brightness unchanged after enhancement. In addition, weighted threshold fast contrast enhancement algorithms (WTHE) have been proposed that reduce over-enhancement and avoid noise amplification, but with less enhancement for local details. In order to solve the problems, a local histogram equalization algorithm is applied, and a local method has three modes of sub-block non-overlapping, sub-block overlapping and sub-block Partial Overlapping (POSHE). The subblock non-overlapping mode can generate block effect, so the subblock non-overlapping mode is rarely adopted; the sub-block overlapping mode has large calculation amount and low processing speed; the partial overlap mode of the sub-blocks can keep better image contrast and the processing speed is higher, so that the method is widely applied to the proposal that a sliding block window with a fixed size moves on an image, and the histogram is smoothed by utilizing the average value in the sliding block window, thereby achieving the purpose of enhancement. However, the above algorithms may distort the picture to some extent when processing the image, and the processing is not fine enough.
In view of the above, it is desirable to provide an image processing method.
Disclosure of Invention
The invention mainly aims to provide an image contrast enhancement method, a system and a terminal device, which can enhance the processing of image details and enhance the image contrast under the condition of keeping the image undistorted by the enhancement method.
In order to achieve the above object, the present invention provides an image contrast enhancement method, including:
longitudinally and transversely dividing an image to be processed to obtain different subblocks;
acquiring the segmented image, and interlacing to separate pixel values and brightness values to calculate a brightness fusion coefficient and a histogram fusion coefficient of the image to be processed;
fusing the histograms of the red, green, blue and brightness channels of the sub-blocks with the histograms of the red, green, blue and brightness channels of the image to be processed according to the brightness fusion coefficient and the histogram fusion coefficient to obtain a mapping table;
and interpolating adjacent subblocks of the image to be processed according to the mapping table to obtain a pixel value for adjusting each subblock, so as to adjust the pixel of the corresponding part of the image to be processed.
Preferably, the fusing the histograms of the red, green, blue and luminance channels of the sub-block with the histograms of the red, green, blue and luminance channels of the image to be processed according to the luminance fusion coefficient and the histogram fusion coefficient includes:
respectively calculating the histograms of red, green, blue and brightness channels of the whole image to be processed and the histogram of the red, green, blue and brightness channels of each sub-block;
combining the brightness fusion coefficient and the histogram fusion coefficient to fuse the histograms of the red, green, blue and brightness channels of the sub-blocks and the histograms of the red, green, blue and brightness channels of the image to be processed;
and cutting the histogram of the subblock according to the fusion result and then recalculating to obtain the mapping table.
Preferably, the merging, with the combination of the luminance merging coefficient and the histogram merging coefficient, the histograms of the red, green, blue and luminance channels of the sub-block and the histograms of the red, green, blue and luminance channels of the image to be processed, and the specific process includes:
HistB=(HistB*Adaptation+(100-Adaptation)*HistgramB)/100;
HistG=(HistG*Adaptation+(100-Adaptation)*HistgramG)/100;
HistR=(HistR*Adaptation+(100-Adaptation)*HistgramR)/100;
HistL=(HistL*Adaptation+(100-Adaptation)*HistgramL)/100;
the Adaptation is a histogram fusion coefficient, HistB is blue histogram data, HistG is green histogram data, HistR is red histogram data, and HistL is luminance histogram data.
Preferably, after the histogram fusion, the method further comprises:
and (3) performing brightness histogram fusion on the fused result, wherein the fusion process is as follows:
HistB=(HistB*Correction+(100-Correction)*HistL)/100;
HistG=(HistG*Correction+(100-Correction)*HistL)/100;
HistR=(HistR*Correction+(100-Correction)*HistL)/100;
wherein, the Correction is a brightness fusion coefficient.
Preferably, the number of sub-blocks is 8 by 8 blocks.
Preferably, the obtaining the mapping table by recalculating after clipping the histogram of the sub-block according to the fusion result includes:
clipping the histogram of the sub-block in a CAHE mode;
and equalizing the clipped histogram to obtain a mapping table of each sub-block.
A second aspect of an embodiment of the present invention provides an image contrast enhancement system, including:
the segmentation module is used for longitudinally and transversely segmenting the image to be processed to obtain different subblocks;
the acquisition module is used for acquiring the segmented image to perform interlacing so as to separate pixel values and brightness values, so as to calculate a brightness fusion coefficient and a histogram fusion coefficient of the image to be processed;
the fusion module is used for fusing the histograms of the red, green, blue and brightness channels of the sub-blocks with the histograms of the red, green, blue and brightness channels of the image to be processed according to the brightness fusion coefficient and the histogram fusion coefficient to obtain a mapping table;
and the adjusting module is used for interpolating adjacent subblocks of the image to be processed according to the mapping table to obtain a pixel value for adjusting each subblock, so as to adjust the pixel of the corresponding part of the image to be processed.
Preferably, the fusion module is specifically configured to:
respectively calculating the histograms of red, green, blue and brightness channels of the whole image to be processed and the histogram of the red, green, blue and brightness channels of each sub-block;
combining the brightness fusion coefficient and the histogram fusion coefficient to fuse the histograms of the red, green, blue and brightness channels of the sub-blocks and the histograms of the red, green, blue and brightness channels of the image to be processed;
and cutting the histogram of the subblock according to the fusion result and then recalculating to obtain the mapping table.
A third aspect of embodiments of the present invention provides a terminal device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor implements the method of any one of the first aspect when executing the computer program.
A fourth aspect of embodiments of the present invention provides a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements the method of any one of the first aspect mentioned above.
The invention has the beneficial effects that: firstly, longitudinally and transversely dividing an image to be processed to obtain different subblocks; acquiring the segmented image, and interlacing to separate pixel values and brightness values to calculate a brightness fusion coefficient and a histogram fusion coefficient of the image to be processed; then, fusing the histograms of the red, green, blue and brightness channels of the subblocks with the histograms of the red, green, blue and brightness channels of the image to be processed according to the brightness fusion coefficient and the histogram fusion coefficient to obtain a mapping table; and finally, interpolating adjacent subblocks of the image to be processed according to a mapping table to obtain a pixel value for adjusting each subblock, so as to adjust the pixels of the corresponding part of the image to be processed. The calculation amount is small in the process, the speed is high, the noise generated in contrast adjustment can be effectively inhibited by carrying out smooth interpolation or Gaussian blur on the mapping table, and the picture distortion caused by excessive amplification of information is prevented. The invention has the characteristics of good enhancement effect and prominent detail recovery effect.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention, are incorporated in and constitute a part of this specification, illustrate embodiments of the invention and together with the description serve to explain the invention without limiting the invention to the right. It is obvious that the drawings in the following description are only some embodiments, and that for a person skilled in the art, other drawings can be derived from them without inventive effort. In the drawings:
FIG. 1 is a schematic flow chart of a method for enhancing image contrast according to the present invention;
FIG. 2 is a diagram illustrating the structure of an image contrast enhancement system according to the present invention;
fig. 3 is a schematic structural diagram of a terminal device according to an embodiment of the present invention.
Detailed Description
The technical problems solved, the technical solutions adopted and the technical effects achieved by the embodiments of the present invention are clearly and completely described below with reference to the accompanying drawings and the specific embodiments. It is to be understood that the described embodiments are merely a few, and not all, of the embodiments of the present application. All other equivalent or obviously modified embodiments obtained by the person skilled in the art on the basis of the embodiments presented in the present application fall within the scope of protection of the invention without inventive step. The embodiments of the invention can be embodied in many different ways as defined and covered by the claims.
It should be noted that in the following description, numerous specific details are set forth in order to provide an understanding. It may be evident, however, that the subject invention may be practiced without these specific details.
It should be noted that, unless explicitly defined or conflicting, the embodiments and technical features in the present invention may be combined with each other to form a technical solution.
Referring to fig. 1, the method for enhancing image contrast of the present invention includes the steps of:
and S101, performing longitudinal and transverse segmentation on the image to be processed to obtain different subblocks.
Preferably, the number of sub-blocks is 8 by 8 blocks.
And S102, acquiring the segmented image, interlacing the segmented image to separate pixel values and brightness values, and calculating a brightness fusion coefficient and a histogram fusion coefficient of the image to be processed.
In the embodiment provided by the invention, an image is input firstly, the image is divided into a plurality of columns and a plurality of lines to form a plurality of sub-blocks, then the interlaced alternate columns are carried out to collect information such as pixel values, brightness values and the like, the brightness average value, the mean square error and the color cast degree of sampled data are calculated, and the number of the sub-blocks, the cutting amount, the cutting limit, the brightness fusion coefficient and the histogram fusion coefficient are determined.
Determining the number of horizontal and vertical grids: the determination of the horizontal and vertical grid numbers is similar to a CALEH algorithm, the reasonable selection of the grids can also have important influence on the result of the algorithm, the excessive grid number can obviously increase the calculation amount, the insufficient grid number can make the result tend to approach the integral histogram equalization, generally, 8-8 grids can be selected, and the optimization can be simply performed through the following principle: the smaller the mean square deviation of the brightness of the image, i.e. the more uniform the brightness of the whole image, the more the number of meshes is used, e.g. 8 x 8, otherwise the fewer meshes are used, e.g. 4 x 4. This is because when the brightness of the image is consistent, the histogram data difference of each small block is not very large, and if the brightness is inconsistent, the histogram information difference between each small block may be very large, which may cause obvious defects in interpolation.
And S103, fusing the histograms of the red, green, blue and brightness channels of the sub-blocks with the histograms of the red, green, blue and brightness channels of the image to be processed according to the brightness fusion coefficient and the histogram fusion coefficient to obtain a mapping table.
In this step, the image is divided by a predetermined number of meshes, and histogram information HistgramB (HistB, i.e., a full-image blue component histogram, the same applies below), HistgramG (HistG, a full-image green component histogram), and HistgramR (HistR, a full-image red component histogram) is acquired for each block. Calculating histograms of red, green, blue and luminance Lightness channels of the whole image; and calculating histograms of the full image red, green, blue and Lightness channels as: acquiring histogram data HistgramB, HistgramG and HistgramR of the whole graph and a brightness histogram HistgramL, wherein the brightness is defined as: lightness ═ (R19595 + G38469 + B7472) > > 16.
And calculating histograms of the red, green and blue sub-blocks and the Lightness channels of the sub-blocks, fusing the histograms with the histogram of the whole image, and fusing the red, green, blue and Lightness channels.
And fusing the sub-block histogram and the global histogram, wherein the following codes are shown:
HistB=(HistB*Adaptation+(100-Adaptation)*HistgramB)/100;
HistG=(HistG*Adaptation+(100-Adaptation)*HistgramG)/100;
HistR=(HistR*Adaptation+(100-Adaptation)*HistgramR)/100;
HistL=(HistL*Adaptation+(100-Adaptation)*HistgramL)/100;
the Adaptation is a histogram fusion coefficient, the effective range of the histogram fusion coefficient is [0,100], when the value is smaller, the global histogram has the dominant effect, and the effect is closer to the common histogram equalization.
And fusing the fused result with the brightness histogram again, wherein the fusing process is as follows:
HistB=(HistB*Correction+(100-Correction)*HistL)/100;
HistG=(HistG*Correction+(100-Correction)*HistL)/100;
HistR=(HistR*Correction+(100-Correction)*HistL)/100;
wherein, the Correction is a brightness fusion coefficient, the effective range is [0,100], when the value is larger, the more independent among channels, the effect is closer to the common histogram equalization.
Index in the above code indicates the Index range of the histogram tone scale, and the effective value [0, Bins-1 ], Bins is the number of histograms, and 256 in 8 bits.
And S104, interpolating adjacent subblocks of the image to be processed according to the mapping table to obtain a pixel value for adjusting each subblock, so as to adjust the pixels of the corresponding part of the image to be processed.
In the step, K equal parts are taken from Bins of the mapping table to obtain mapping table values corresponding to each equal part of data to form K two-dimensional coordinate point sequences, and the accumulated data can be equally divided into K equal parts according to the accumulated data of the histogram to obtain K two-dimensional sequence points. And fitting a smooth mapping curve passing through each sampling point by using a spline interpolation algorithm according to the K two-dimensional coordinate points.
And taking 0 in the smooth curve table as an interpolation result corresponding to each color level in the Bins to serve as a new mapping table result. For a Bins-256 image, the K value is suggested to be around 32. Or another processing method is to perform one-dimensional mean value or gaussian smoothing on the mapping table, and the smooth window can be selected to be about 7 WindowSize. The smoothing can bring certain benefits, especially for the areas with relatively gentle image transformation, the color block feeling caused by enhancement can be weakened to a certain extent, and the method is popularized to all algorithms based on the histogram enhancement technology.
And carrying out re-interpolation on the mapping table of the sub-block to obtain a smooth mapping table. And carrying out bilinear interpolation on each small block according to the process of the CLAHE algorithm to obtain a final enhancement effect, wherein linear interpolation in a single direction of a mapping table is only used for half of sub blocks of the first row, the first column, the last row and the last column close to the edge of the image, and mapping table bilinear interpolation is used for other parts of the sub blocks and other sub blocks to obtain a final result.
The image contrast enhancement method provided by the invention has small calculated amount and high speed, and can effectively inhibit noise generated during contrast adjustment by carrying out smooth interpolation or Gaussian blur on the mapping table, thereby preventing picture distortion caused by excessive amplification of information. The invention has the characteristics of good enhancement effect and prominent detail recovery effect.
Example two
Fig. 2 is a system for enhancing image contrast according to a second embodiment of the present invention, and only the portions related to the second embodiment of the present invention are shown for convenience of illustration.
The enhancement system comprises:
the segmentation module 21 is configured to perform vertical and horizontal segmentation on the image to be processed to obtain different subblocks;
the acquisition module 22 is configured to acquire the segmented image, and perform interlacing to separate pixel values and brightness values to calculate a brightness fusion coefficient and a histogram fusion coefficient of the image to be processed;
the fusion module 23 is configured to fuse the histograms of the red, green, blue, and luminance channels of the sub-block with the histograms of the red, green, blue, and luminance channels of the image to be processed according to the luminance fusion coefficient and the histogram fusion coefficient to obtain a mapping table;
and the adjusting module 24 is configured to interpolate adjacent subblocks of the image to be processed according to the mapping table to obtain a pixel value for adjusting each subblock, so as to perform pixel adjustment on a corresponding part of the image to be processed.
Preferably, the fusion module 23 is specifically configured to:
respectively calculating the histograms of red, green, blue and brightness channels of the whole image to be processed and the histogram of the red, green, blue and brightness channels of each sub-block;
combining the brightness fusion coefficient and the histogram fusion coefficient to fuse the histograms of the red, green, blue and brightness channels of the sub-blocks and the histograms of the red, green, blue and brightness channels of the image to be processed;
and cutting the histogram of the subblock according to the fusion result and then recalculating to obtain the mapping table.
The working process of the image contrast enhancement device is referred to the implementation process of the image contrast enhancement method in the above embodiment, and is not described herein again.
EXAMPLE III
Fig. 3 is a schematic structural diagram of a terminal device according to a fourth embodiment of the present invention. As shown in fig. 3, the terminal device 3 of this embodiment includes: a processor 30, a memory 31 and a computer program 32, such as a dual-atlas based language parsing method program, stored in the memory 31 and executable on the processor 30. The processor 30, when executing the computer program 32, implements the steps of the first embodiment of the method, such as the steps S101 to S104 shown in fig. 1. The processor 30, when executing the computer program 32, implements the functions of the various modules/units in the above-described apparatus embodiments, such as the functions of the modules 21 to 24 shown in fig. 2.
Illustratively, the computer program 32 may be partitioned into one or more modules/units that are stored in the memory 31 and executed by the processor 30 to implement the present invention. The one or more modules/units may be a series of computer program instruction segments capable of performing specific functions, which are used to describe the execution process of the computer program 32 in the terminal device 3. For example, the computer program 32 may be divided into different modules, and the specific functions of the modules are as follows:
the segmentation module is used for longitudinally and transversely segmenting the image to be processed to obtain different subblocks;
the acquisition module is used for acquiring the segmented image to perform interlacing so as to separate pixel values and brightness values, so as to calculate a brightness fusion coefficient and a histogram fusion coefficient of the image to be processed;
the fusion module is used for fusing the histograms of the red, green, blue and brightness channels of the sub-blocks with the histograms of the red, green, blue and brightness channels of the image to be processed according to the brightness fusion coefficient and the histogram fusion coefficient to obtain a mapping table;
and the adjusting module is used for interpolating adjacent subblocks of the image to be processed according to the mapping table to obtain a pixel value for adjusting each subblock, so as to adjust the pixel of the corresponding part of the image to be processed.
Preferably, the fusion module is specifically configured to:
respectively calculating the histograms of red, green, blue and brightness channels of the whole image to be processed and the histogram of the red, green, blue and brightness channels of each sub-block;
combining the brightness fusion coefficient and the histogram fusion coefficient to fuse the histograms of the red, green, blue and brightness channels of the sub-blocks and the histograms of the red, green, blue and brightness channels of the image to be processed;
and cutting the histogram of the subblock according to the fusion result and then recalculating to obtain the mapping table.
The terminal device 3 may be a desktop computer, a notebook, a palm computer, a cloud server, or other computing devices. The terminal device may include, but is not limited to, a processor 30, a memory 31. It will be understood by those skilled in the art that fig. 3 is only an example of the terminal device 3, and does not constitute a limitation to the terminal device 3, and may include more or less components than those shown, or combine some components, or different components, for example, the terminal device may also include an input-output device, a network access device, a bus, etc.
The Processor 30 may be a Central Processing Unit (CPU), other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic device, discrete hardware component, etc. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The memory 31 may be an internal storage unit of the terminal device 3, such as a hard disk or a memory of the terminal device 3. The memory 31 may also be an external storage device of the terminal device 3, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like, which are provided on the terminal device 3. Further, the memory 31 may also include both an internal storage unit and an external storage device of the terminal device 3. The memory 31 is used for storing the computer program and other programs and data required by the terminal device. The memory 31 may also be used to temporarily store data that has been output or is to be output.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and reference may be made to the related descriptions of other embodiments for parts that are not described or illustrated in a certain embodiment.
Those of ordinary skill in the art would appreciate that the modules, elements, and/or method steps of the various embodiments described in connection with the embodiments disclosed herein may be implemented as electronic hardware, or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
In the several embodiments provided in the present application, it should be understood that the disclosed system, apparatus and method may be implemented in other manners. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units is only one logical division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, all or part of the flow of the method according to the embodiments of the present invention may also be implemented by a computer program, which may be stored in a computer-readable storage medium, and when the computer program is executed by a processor, the steps of the method embodiments may be implemented. Wherein the computer program comprises computer program code, which may be in the form of source code, object code, an executable file or some intermediate form, etc. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, usb disk, removable hard disk, magnetic disk, optical disk, computer Memory, Read-Only Memory (ROM), Random Access Memory (RAM), electrical carrier wave signals, telecommunications signals, software distribution medium, etc. It should be noted that the computer readable medium may contain content that is subject to appropriate increase or decrease as required by legislation and patent practice in jurisdictions, for example, in some jurisdictions, computer readable media does not include electrical carrier signals and telecommunications signals as is required by legislation and patent practice.
The above-mentioned embodiments are only used for illustrating the technical solutions of the present invention, and not for limiting the same; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.

Claims (10)

1. A method for enhancing image contrast, the method comprising:
longitudinally and transversely dividing an image to be processed to obtain different subblocks;
acquiring the segmented image, and interlacing to separate pixel values and brightness values to calculate a brightness fusion coefficient and a histogram fusion coefficient of the image to be processed;
fusing the histograms of the red, green, blue and brightness channels of the sub-blocks with the histograms of the red, green, blue and brightness channels of the image to be processed according to the brightness fusion coefficient and the histogram fusion coefficient to obtain a mapping table;
and interpolating adjacent subblocks of the image to be processed according to the mapping table to obtain a pixel value for adjusting each subblock, so as to adjust the pixel of the corresponding part of the image to be processed.
2. The method for enhancing image contrast according to claim 1, wherein the fusing the histograms of the red, green, blue and luminance channels of the sub-blocks with the histograms of the red, green, blue and luminance channels of the image to be processed according to the luminance fusion coefficient and the histogram fusion coefficient comprises:
respectively calculating the histograms of red, green, blue and brightness channels of the whole image to be processed and the histogram of the red, green, blue and brightness channels of each sub-block;
combining the brightness fusion coefficient and the histogram fusion coefficient to fuse the histograms of the red, green, blue and brightness channels of the sub-blocks and the histograms of the red, green, blue and brightness channels of the image to be processed;
and cutting the histogram of the subblock according to the fusion result and then recalculating to obtain the mapping table.
3. The method of claim 2, wherein the merging the histograms of the red, green, blue and luminance channels of the sub-blocks with the histograms of the red, green, blue and luminance channels of the image to be processed according to the luminance merging coefficient and the histogram merging coefficient comprises:
HistB=(HistB*Adaptation+(100-Adaptation)*HistgramB)/100;
HistG=(HistG*Adaptation+(100-Adaptation)*HistgramG)/100;
HistR=(HistR*Adaptation+(100-Adaptation)*HistgramR)/100;
HistL=(HistL*Adaptation+(100-Adaptation)*HistgramL)/100;
the Adaptation is a histogram fusion coefficient, HistB is blue histogram data, HistG is green histogram data, HistR is red histogram data, and HistL is luminance histogram data.
4. The method for enhancing image contrast according to claim 3, further comprising, after performing histogram fusion:
and (3) performing brightness histogram fusion on the fused result, wherein the fusion process is as follows:
HistB=(HistB*Correction+(100-Correction)*HistL)/100;
HistG=(HistG*Correction+(100-Correction)*HistL)/100;
HistR=(HistR*Correction+(100-Correction)*HistL)/100;
wherein, the Correction is a brightness fusion coefficient.
5. An image contrast enhancement method according to any one of claims 1 to 4, wherein the number of sub-blocks is 8 x 8 blocks.
6. The method of claim 2, wherein the clipping the histogram of the sub-block according to the fusion result and then recalculating the mapping table comprises:
clipping the histogram of the sub-block in a CAHE mode;
and equalizing the clipped histogram to obtain a mapping table of each sub-block.
7. An enhancement system for image contrast, the enhancement system comprising:
the segmentation module is used for longitudinally and transversely segmenting the image to be processed to obtain different subblocks;
the acquisition module is used for acquiring the segmented image to perform interlacing so as to separate pixel values and brightness values, so as to calculate a brightness fusion coefficient and a histogram fusion coefficient of the image to be processed;
the fusion module is used for fusing the histograms of the red, green, blue and brightness channels of the sub-blocks with the histograms of the red, green, blue and brightness channels of the image to be processed according to the brightness fusion coefficient and the histogram fusion coefficient to obtain a mapping table;
and the adjusting module is used for interpolating adjacent subblocks of the image to be processed according to the mapping table to obtain a pixel value for adjusting each subblock, so as to adjust the pixel of the corresponding part of the image to be processed.
8. The system for enhancing image contrast of claim 7, wherein the fusion module is specifically configured to:
respectively calculating the histograms of red, green, blue and brightness channels of the whole image to be processed and the histogram of the red, green, blue and brightness channels of each sub-block;
combining the brightness fusion coefficient and the histogram fusion coefficient to fuse the histograms of the red, green, blue and brightness channels of the sub-blocks and the histograms of the red, green, blue and brightness channels of the image to be processed;
and cutting the histogram of the subblock according to the fusion result and then recalculating to obtain the mapping table.
9. A terminal device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that the processor implements the steps of the method according to any of claims 1 to 6 when executing the computer program.
10. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out the steps of the method according to any one of claims 1 to 6.
CN201910918068.0A 2019-09-26 2019-09-26 Method and system for enhancing image contrast and terminal equipment Pending CN110751603A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910918068.0A CN110751603A (en) 2019-09-26 2019-09-26 Method and system for enhancing image contrast and terminal equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910918068.0A CN110751603A (en) 2019-09-26 2019-09-26 Method and system for enhancing image contrast and terminal equipment

Publications (1)

Publication Number Publication Date
CN110751603A true CN110751603A (en) 2020-02-04

Family

ID=69277178

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910918068.0A Pending CN110751603A (en) 2019-09-26 2019-09-26 Method and system for enhancing image contrast and terminal equipment

Country Status (1)

Country Link
CN (1) CN110751603A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114140348A (en) * 2021-11-16 2022-03-04 深圳市联洲国际技术有限公司 Contrast enhancement method, device and equipment
CN114494084A (en) * 2022-04-14 2022-05-13 广东欧谱曼迪科技有限公司 Image color homogenizing method and device, electronic equipment and storage medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101114340A (en) * 2007-09-06 2008-01-30 成都方程式电子有限公司 VLSI realizing system and method of histogram equalization image processing
CN101739672A (en) * 2009-12-02 2010-06-16 北京中星微电子有限公司 Method and device for equalizing histogram based on sub-regional interpolation
CN103440635A (en) * 2013-09-17 2013-12-11 厦门美图网科技有限公司 Learning-based contrast limited adaptive histogram equalization method
US20150371387A1 (en) * 2014-06-19 2015-12-24 Qualcomm Incorporated Local adaptive histogram equalization
CN106897972A (en) * 2016-12-28 2017-06-27 南京第五十五所技术开发有限公司 A kind of self-adapting histogram underwater picture Enhancement Method of white balance and dark primary
CN108280836A (en) * 2018-01-24 2018-07-13 中科创达软件股份有限公司 A kind of image processing method and device
CN108846812A (en) * 2018-05-30 2018-11-20 成都微光集电科技有限公司 A kind of CLHAE image enchancing method based on gray-scale compression

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101114340A (en) * 2007-09-06 2008-01-30 成都方程式电子有限公司 VLSI realizing system and method of histogram equalization image processing
CN101739672A (en) * 2009-12-02 2010-06-16 北京中星微电子有限公司 Method and device for equalizing histogram based on sub-regional interpolation
CN103440635A (en) * 2013-09-17 2013-12-11 厦门美图网科技有限公司 Learning-based contrast limited adaptive histogram equalization method
US20150371387A1 (en) * 2014-06-19 2015-12-24 Qualcomm Incorporated Local adaptive histogram equalization
CN106897972A (en) * 2016-12-28 2017-06-27 南京第五十五所技术开发有限公司 A kind of self-adapting histogram underwater picture Enhancement Method of white balance and dark primary
CN108280836A (en) * 2018-01-24 2018-07-13 中科创达软件股份有限公司 A kind of image processing method and device
CN108846812A (en) * 2018-05-30 2018-11-20 成都微光集电科技有限公司 A kind of CLHAE image enchancing method based on gray-scale compression

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
只(挚)爱图像处理: ""一种强化的基于局部直方图裁剪均衡化的对比度调节算法"", 《HTTPS://WWW.CNBLOGS.COM/IMAGESHOP/P/7993319.HTML》 *

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114140348A (en) * 2021-11-16 2022-03-04 深圳市联洲国际技术有限公司 Contrast enhancement method, device and equipment
CN114494084A (en) * 2022-04-14 2022-05-13 广东欧谱曼迪科技有限公司 Image color homogenizing method and device, electronic equipment and storage medium
CN114494084B (en) * 2022-04-14 2022-07-26 广东欧谱曼迪科技有限公司 Image color homogenizing method and device, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
US8155468B2 (en) Image processing method and apparatus
US9031321B2 (en) Content adaptive edge and detail enhancement for image and video processing
US9530194B2 (en) Method for processing highlights and saturated regions in a digital image
KR101112139B1 (en) Apparatus and method for estimating scale ratio and noise strength of coded image
CN109214996B (en) Image processing method and device
CN108205804A (en) Image processing method, device and electronic equipment
EP2202684A1 (en) Image processing device and program
CN107424137B (en) Text enhancement method and device, computer device and readable storage medium
Iwanami et al. An adaptive contrast enhancement using regional dynamic histogram equalization
CN105335933A (en) Image contrast enhancement method and apparatus
US20210185285A1 (en) Image processing method and apparatus, electronic device, and readable storage medium
CN110751603A (en) Method and system for enhancing image contrast and terminal equipment
Song et al. Hardware-efficient debanding and visual enhancement filter for inverse tone mapped high dynamic range images and videos
US7650042B2 (en) Sign coring for contour reduction
US10650499B1 (en) Fast and effective image inpainting for reticle removal
CN116563172B (en) VR globalization online education interaction optimization enhancement method and device
JP4380498B2 (en) Block distortion reduction device
CN108717687B (en) Image enhancement method based on conversion compression and terminal equipment
CN113283543B (en) WebGL-based image projection fusion method, device, storage medium and equipment
CN114140348A (en) Contrast enhancement method, device and equipment
WO2020241337A1 (en) Image processing device
CN112073718A (en) Television screen splash detection method and device, computer equipment and storage medium
CN114119377A (en) Image processing method and device
CN111179197A (en) Contrast enhancement method and device
CN113196754B (en) Method for reducing banding artifacts, and computer readable storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20200204