CN112116542B - Image contrast enhancement method, device, electronic equipment and storage medium - Google Patents

Image contrast enhancement method, device, electronic equipment and storage medium Download PDF

Info

Publication number
CN112116542B
CN112116542B CN202011018981.4A CN202011018981A CN112116542B CN 112116542 B CN112116542 B CN 112116542B CN 202011018981 A CN202011018981 A CN 202011018981A CN 112116542 B CN112116542 B CN 112116542B
Authority
CN
China
Prior art keywords
image
enhanced
contrast enhancement
bias point
point information
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202011018981.4A
Other languages
Chinese (zh)
Other versions
CN112116542A (en
Inventor
张龙
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Xi'an Yu Vision Mdt Infotech Ltd
Original Assignee
Xi'an Yu Vision Mdt Infotech Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Xi'an Yu Vision Mdt Infotech Ltd filed Critical Xi'an Yu Vision Mdt Infotech Ltd
Priority to CN202011018981.4A priority Critical patent/CN112116542B/en
Publication of CN112116542A publication Critical patent/CN112116542A/en
Application granted granted Critical
Publication of CN112116542B publication Critical patent/CN112116542B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • G06T5/90
    • G06T5/70
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/90Determination of colour characteristics
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10024Color image

Abstract

The embodiment of the invention discloses an image contrast enhancement method, an image contrast enhancement device, electronic equipment and a storage medium. The image contrast enhancement method comprises the following steps: determining bias point information in an image to be enhanced according to pixel point information of the image to be enhanced; performing color cast correction on the image to be enhanced according to the color cast point information; and carrying out contrast enhancement on the image to be enhanced after the color cast correction so as to obtain an enhanced image. The method and the device can enhance the contrast of the image to be enhanced, simultaneously maintain the color of the image, and improve the quality of the image after the contrast enhancement and the scene adaptability of the image contrast enhancement.

Description

Image contrast enhancement method, device, electronic equipment and storage medium
Technical Field
The embodiment of the invention relates to the technical field of image processing, in particular to an image contrast enhancement method, an image contrast enhancement device, electronic equipment and a storage medium.
Background
Because of the influence of factors such as poor illumination condition of shooting environment, limitation of image acquisition equipment and the like, the problems of low integral gray value and non-ideal contrast of the actually acquired image generally exist, and the visual effect of the image is influenced. It is desirable to improve the contrast of images and improve the image quality by using image contrast enhancement techniques. The image contrast enhancement technology is usually processed in a space domain or a frequency domain, and common methods in the space domain include a linear stretching algorithm, a histogram equalization process, an exponential transformation process and the like, wherein the histogram equalization algorithm and the linear stretching algorithm are relatively common, and the image contrast enhancement technology has the characteristics of low complexity, small operation amount and capability of obviously improving the image quality.
However, in some scene images (such as low-light images), some areas may be in insufficient shooting illumination or in shadow areas, so that some pixels of these areas often lose information along with the problem of difficult information acquisition, for example, the value of 0 of one or both channels of a color image. If the contrast enhancement is directly performed on the low-illumination image, the phenomenon that the image subjected to the contrast enhancement is color-distorted in the area where the information is lost can be caused, and the quality of the image is affected.
Disclosure of Invention
The embodiment of the invention provides an image contrast enhancement method, an image contrast enhancement device, electronic equipment and a storage medium, which are used for solving the problem that color distortion occurs when a color image is subjected to contrast enhancement.
In a first aspect, an embodiment of the present invention provides an image contrast enhancement method, including:
determining bias point information in an image to be enhanced according to pixel point information of the image to be enhanced;
performing color cast correction on the image to be enhanced according to the color cast point information;
and carrying out contrast enhancement on the image to be enhanced after the color cast correction so as to obtain an enhanced image.
In a second aspect, an embodiment of the present invention further provides an image contrast enhancement apparatus, including:
the bias point determining module is used for determining bias point information in the image to be enhanced according to pixel point information of the image to be enhanced;
the color cast correction module is used for carrying out color cast correction on the image to be enhanced according to the color cast point information;
and the image enhancement module is used for carrying out contrast enhancement on the image to be enhanced after the color cast correction so as to obtain an enhanced image.
In a third aspect, an embodiment of the present invention further provides an electronic device, including:
one or more processors;
storage means for storing one or more programs,
the one or more programs, when executed by the one or more processors, cause the one or more processors to implement the image contrast enhancement method according to any of the embodiments of the present invention.
In a fourth aspect, embodiments of the present invention further provide a computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements an image contrast enhancement method according to any of the embodiments of the present invention.
The embodiment of the invention carries out color cast correction on the color cast point in the image to be enhanced based on the determination of the color cast point information in the image to be enhanced, and carries out image contrast enhancement on the basis of the color cast correction so as to solve the problem that color distortion occurs when the color image is subjected to contrast enhancement, thereby realizing the enhancement of the contrast of the image to be enhanced while maintaining the color of the image, improving the quality of the image after the contrast enhancement and the scene adaptability of the image contrast enhancement.
Drawings
FIG. 1 is a flow chart of an image contrast enhancement method according to a first embodiment of the present invention;
FIG. 2 is a flow chart of an image contrast enhancement method in a second embodiment of the invention;
FIG. 3 is a schematic view of an image contrast enhancement device according to a third embodiment of the present invention;
fig. 4 is a schematic structural diagram of an electronic device in a fourth embodiment of the present invention.
Detailed Description
The invention is described in further detail below with reference to the drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting thereof. It should be further noted that, for convenience of description, only some, but not all of the structures related to the present invention are shown in the drawings.
Example 1
Fig. 1 is a flowchart of an image contrast enhancement method according to a first embodiment of the present invention, which is applicable to a case of contrast enhancement of a color image while maintaining the color of the color image. The method may be performed by an image contrast enhancement device, which may be implemented in software and/or hardware, and may be configured in an electronic device, e.g. a background server or the like having communication and computing capabilities. As shown in fig. 1, the method specifically includes:
and step 101, determining bias point information in the image to be enhanced according to the pixel point information of the image to be enhanced.
Because of the influence of factors such as poor illumination conditions of shooting surrounding environment, limitation of image acquisition equipment and the like, the problems of low integral gray value and non-ideal contrast of an actually acquired image generally exist, and the visual effect of the image is influenced. While contrast may describe the amount of contrast between different brightness layers between bright and dark regions in an image, a larger range of differences represents a higher contrast and a smaller range of differences represents a lower contrast. The contrast enhancement technology is utilized to improve the contrast of the image, improve the quality of the image, enable the target object in the original darker image to be distinguished obviously, enable details to be distinguished clearly, enable the region of interest to be identified easily, and facilitate the observation and judgment of human eyes to acquire the required information.
For an image to be enhanced, namely an image to be enhanced, when the image to be enhanced is a color image and the acquisition scene is a low-illumination scene, a part of areas possibly exist in the image due to insufficient illumination or shadow areas, and certain pixel points of the areas often lose information along with difficult information acquisition, for example, the value of one or two channels of the pixel points losing information is 0. After contrast enhancement is performed on the color images, color distortion problems can occur in the images, particularly in the pixel points where information is lost, and the visual effect of the images is affected. The point of losing information in the image to be enhanced is the bias point.
Specifically, the pixel point information of the image to be enhanced can represent the loss condition of the pixel point channel value, whether the pixel point is a bias point can be determined according to the loss condition of the pixel point channel value, if any pixel point has the loss condition of the channel value, the pixel point is the bias point, and the information of the pixel point, such as the position information or the channel value information, is determined.
In one possible embodiment, the pixel point information includes component values of three channels of the pixel point;
accordingly, step 101 includes:
determining the minimum value in three channel component values of a target pixel point in an image to be enhanced;
if the minimum value is smaller than the preset threshold value, determining the target pixel point as a bias point, and determining the position information of the bias point.
And determining the loss condition of the channel value of the pixel point according to the size of the component values of the three channels of the pixel point in the pixel point information. Specifically, the minimum value in the component values of three channels of each pixel point in the image to be enhanced is determined, and because the minimum value can reflect the color condition of the pixel point, whether the corresponding pixel point is a bias point or not can be determined according to the comparison result of the minimum value and the preset threshold value. The size of the preset threshold may be determined according to the actual scene of the image, which is not limited herein. As can be seen from the foregoing description, if the value of one or both channels of the pixel point of the missing information is 0, the preset threshold is set to 1, and if the minimum value of the component values of the three channels in the image to be enhanced is smaller than 1, the value of at least one channel representing the pixel point is 0, the pixel point is determined to be a bias point, and the coordinate information of the pixel point is marked.
In a possible embodiment, if the minimum value is smaller than the preset threshold value, determining the target pixel point as the bias point includes:
if the minimum value is smaller than the preset threshold value and at least one of the three-channel component values of the target pixel point is not equal to 0, determining the target pixel point as a bias point.
Since there are three pixel points with the channel values of 0 in the image to be enhanced, the pixel points belong to normal points in the image to be enhanced. For example, a black region in the acquisition scene corresponds to a pixel point region with three channel values of 0 in the image to be enhanced. Therefore, a pixel point with three channel values of 0 in the image to be enhanced cannot be regarded as a bias point. When judging according to the comparison result of the minimum value and the preset threshold value, the pixel point with the three channels of 0 is certainly regarded as the bias point by mistake, so that whether the three channel value of the pixel point is equal to 0 or not is determined, and if the three channel value is equal to 0, the pixel point is not the bias point.
And through the comparison result of the component values of the three channels and the preset threshold value and the combination of the overall judgment of the component values of the three channels, the accuracy of determining the bias points is improved, and the influence on the bias correction of the image due to the fact that the normal pixel points in the image to be enhanced are misjudged as the bias points is avoided.
For example, the pixel points of the image to be enhanced are subjected to a row-by-row traversal operation, the minimum value of the R, G, B three-channel color component gray scale is calculated for each pixel point, and the pixel points with the minimum value of three channels smaller than a preset threshold and three channel values not being 0 are detected, so that the pixel point coordinates which can cause color cast are marked and used for guiding the subsequent color cast correction processing.
And 102, performing color cast correction on the image to be enhanced according to the color cast point information.
And marking and positioning pixel points which can cause color bias in the image to be enhanced according to the color bias point information, adjusting according to the pixel information of the color bias point, and estimating the lost information of a certain channel of the color bias point.
In one possible embodiment, the bias point information includes bias point coordinates;
accordingly, step 102 includes:
determining a reference neighborhood of the target bias point according to the coordinates of the target bias point;
and correcting the target bias point according to the pixel point information of the reference neighborhood to obtain corrected pixel point information of the target bias point.
Specifically, the lost information of the target bias point is estimated and adjusted according to the pixel information of the pixel points around the target bias point. The pixel points in a certain size around the target bias point are used as a reference neighborhood of the target bias point, and the gray values of all channels of the current target bias point are adjusted according to the sizes of the pixel gray values in the reference neighborhood, so that the lost information of a certain channel is estimated. Illustratively, the size of the reference neighborhood may be determined according to the actual color cast condition of the image, for example, by adjusting the size of the range of the color cast region in the image acquisition scene, which is not limited herein.
In a possible embodiment, correcting the target bias point according to the pixel point information of the reference neighborhood to obtain corrected pixel point information of the target bias point includes:
a linear smoothing algorithm is adopted on the component values of the target channels of all pixel points in the reference neighborhood to obtain corrected component values of the target channels of the target bias points; the target channel is any one of the three channels.
Since the number of channels whose information is lost is not determined for the target bias point, a correction process needs to be performed for each channel of the target bias point. Specifically, a linear smoothing algorithm is adopted for the component values of the R channel of each pixel point in the reference neighborhood to obtain a corrected component value of the R channel of the target bias point, and the G channel and the B channel are corrected in the same manner. Illustratively, the linear smoothing algorithm may take mean filtering as an example, and calculate by the following formula:
wherein I is C (x ', y') is pixel point information in the image to be enhanced, D C (x ', y') is the corrected color image, L is the set of pixels of the target bias point reference neighborhood, and T is the total number of pixels in the reference neighborhood (3*3 neighborhood, 9). And determining the correction value of the three channels of the target bias point sequentially through the formula.
And 103, carrying out contrast enhancement on the image to be enhanced after the color cast correction so as to obtain an enhanced image.
And on the basis of the image to be enhanced after the color cast correction, contrast enhancement is performed by adopting a contrast enhancement algorithm, so that the enhanced image meets the requirement of contrast enhancement, and meanwhile, the color of the image can be maintained. Exemplary contrast enhancement algorithms include histogram equalization and its modification algorithms, linear stretching transforms, exponential transforms, and the like.
The embodiment of the invention determines the bias point information in the image to be enhanced based on the dark channel priori thought, so as to carry out bias correction on the bias point in the image to be enhanced, and carry out image contrast enhancement on the basis of the bias correction, thereby solving the problem of color distortion caused by contrast enhancement of a color image, realizing the enhancement of the contrast of the image to be enhanced, simultaneously maintaining the image color, improving the quality of the image after the contrast enhancement and the scene adaptability of the image contrast enhancement.
Example two
Fig. 2 is a flowchart of an image contrast enhancement method according to a second embodiment of the present invention, which is further optimized based on the first embodiment. As shown in fig. 2, the method includes:
step 201, determining bias point information in the image to be enhanced according to pixel point information of the image to be enhanced.
And 202, performing color cast correction on the image to be enhanced according to the color cast point information.
And 203, converting the image to be enhanced after the color cast correction into a gray level image.
If the contrast enhancement processing is directly performed on the three RGB channels of the color image, because there is a correlation between the three RGB channels of the image (that is, the RGB values together determine the color of a certain point of the image), if the contrast enhancement is performed on the three channels, the enhancement degree of the three channels is not well controlled, so that the color distortion phenomenon occurs in the enhanced color image.
Therefore, the color image after color cast correction is converted into a gray image, the contrast of the gray image is enhanced, and finally the gray image is restored into the color image, so that the problem that the enhancement degree of three channels of the color image is not well controlled can be solved, and the color distortion phenomenon of the image is avoided.
The color image may be converted into a gray image using an average value of RGB three channels or using a color space conversion method. Illustratively, the gray image conversion is performed using the following formula:
G in (x′,y′)=0.299×I R (x′,y′)+0.587×I G (x′,y′)+0.114×I B (x′,y′);
wherein I is R (x′,y′)、I G (x′,y′)、I B (x ', y') are R, G, B three-channel color components, G, of the image to be enhanced after the color cast correction is performed respectively in (x ', y') is the converted gray scale image.
Step 204, contrast enhancement is performed on the gray level image.
And stretching the brightness level in the gray level image by using a contrast enhancement algorithm, widening the gray level distribution range of the input gray level image, and improving the overall contrast of the image. Common contrast enhancement methods are histogram equalization and its improved algorithms, linear stretching transforms, exponential transforms, etc.
In one possible embodiment, contrast enhancement of a gray scale image includes:
determining a contrast interval of the gray level image as an interval to be stretched;
determining reinforcing parameters according to the section to be stretched and the target stretching section;
and carrying out contrast enhancement on the gray level image according to the image information and the enhancement parameters of the gray level image.
The interval to be stretched refers to a contrast range determined according to a brightness level in the gray level image; the target stretching interval refers to the contrast range in the final enhanced image; the enhancement parameter is a parameter that needs to stretch the contrast in the grayscale image, such as a stretch ratio.
Illustratively, the input gray scale image is contrast enhanced using a linear stretching function. Contrast enhancement is performed using the following formula:
wherein [ Ti L ,Ti R ]G as a section to be stretched out (x ', y') is an output gray scale image, G in (x ', y') is an input gray image, a is a stretch factor, b is a brightness gain, and a and b can be calculated by the following formula:
wherein [ To ] R ,To L ]For the target stretching interval, if the input gray image is 8 bits, the value range is [0, 255]。
Step 205, converting the gray-scale image after contrast enhancement into a color image to obtain an enhanced image.
And converting the gray level image subjected to the contrast enhancement processing into a color image, and recovering the image color information.
The image conversion is illustratively performed using the following formula:
wherein Out C The restored color image (x ', y'), i.e. enhanced image, C e { R, G, B), S is a saturation parameter taken to be 0.8, and can be set according to the actual scene, without limitation. I C (x ', y') is the image to be enhanced, G in (x ', y') is the input gray scale image contrast enhanced in step 204, G out (x ', y') is an output gray scale image for contrast enhancement. Finally, the color image Out with enhanced contrast is output C (x′,y′)。
The embodiment of the invention carries out image contrast enhancement on the basis of carrying out color cast correction, when carrying out contrast enhancement, firstly converts a color image subjected to color cast correction into a gray level image, carries out contrast enhancement on the gray level image, and finally converts the gray level image subjected to contrast enhancement into the color image, thereby completing contrast enhancement of the color image to be enhanced. The method can improve the contrast of the color images in different scenes, avoid the problem of color distortion after the contrast of the images of certain scenes is enhanced, improve the overall visual effect of the images and promote the scene adaptability of the contrast enhancement algorithm of the color images.
Example III
Fig. 3 is a schematic diagram of an image contrast enhancement device according to a third embodiment of the present invention, which is applicable to a case of contrast enhancement of a color image while maintaining the color of the color image. As shown in fig. 3, the apparatus includes:
a bias point determining module 310, configured to determine bias point information in an image to be enhanced according to pixel point information of the image to be enhanced;
the color cast correction module 320 is configured to perform color cast correction on the image to be enhanced according to the color cast point information;
the image enhancement module 330 is configured to perform contrast enhancement on the image to be enhanced after the color cast correction, so as to obtain an enhanced image.
The embodiment of the invention carries out color cast correction on the color cast point in the image to be enhanced based on the determination of the color cast point information in the image to be enhanced, and carries out image contrast enhancement on the basis of the color cast correction so as to solve the problem that color distortion occurs when the color image is subjected to contrast enhancement, thereby realizing the enhancement of the contrast of the image to be enhanced while maintaining the color of the image, improving the quality of the image after the contrast enhancement and the scene adaptability of the image contrast enhancement.
Optionally, the pixel point information includes component values of three channels of the pixel point;
accordingly, the bias point determination module 310 includes:
a component value determining unit, configured to determine a minimum value of component values of three channels of a target pixel point in the image to be enhanced;
and the component value judging unit is used for determining the target pixel point as a bias point and determining the position information of the bias point if the minimum value is smaller than a preset threshold value.
The feasible component value judging unit is specifically configured to:
and if the minimum value is smaller than a preset threshold value and at least one component value of the three channels of the target pixel point is not equal to 0, determining the target pixel point as a bias point.
Optionally, the bias point information includes bias point coordinates;
accordingly, the color cast correction module 320 includes:
the reference neighborhood determining unit is used for determining a reference neighborhood of the target bias point according to the coordinates of the target bias point;
and the bias point correction unit is used for correcting the target bias point according to the pixel point information of the reference neighborhood to obtain corrected pixel point information of the target bias point.
Optionally, the bias point correction unit is specifically configured to:
a linear smoothing algorithm is adopted for the component values of the target channels of all pixel points in the reference neighborhood, so that corrected component values of the target channels of the target bias points are obtained; the target channel is any one of three channels.
Optionally, the image enhancement module 330 includes:
the first image conversion unit is used for converting the image to be enhanced after the color cast correction into a gray image;
a contrast enhancement unit for contrast enhancing the gray image;
and the second image conversion unit is used for converting the gray level image subjected to contrast enhancement into a color image so as to obtain an enhanced image.
Optionally, the contrast enhancement unit is specifically configured to:
determining a contrast interval of the gray level image as an interval to be stretched;
determining reinforcing parameters according to the section to be stretched and the target stretching section;
and carrying out contrast enhancement on the gray level image according to the image information of the gray level image and the enhancement parameters.
The image contrast enhancement device provided by the embodiment of the invention can execute the image contrast enhancement method provided by any embodiment of the invention, and has the corresponding functional modules and beneficial effects of executing the image contrast enhancement method.
Example IV
Fig. 4 is a schematic structural diagram of an electronic device according to a fourth embodiment of the present invention. Fig. 4 illustrates a block diagram of an exemplary electronic device 12 suitable for use in implementing embodiments of the present invention. The electronic device 12 shown in fig. 4 is merely an example and should not be construed as limiting the functionality and scope of use of embodiments of the present invention.
As shown in fig. 4, the electronic device 12 is in the form of a general purpose computing device. Components of the electronic device 12 may include, but are not limited to: one or more processors or processing units 16, a system memory device 28, a bus 18 that connects the various system components, including the system memory device 28 and the processing unit 16.
Bus 18 represents one or more of several types of bus structures, including a memory device bus or memory device controller, a peripheral bus, an accelerated graphics port, a processor, or a local bus using any of a variety of bus architectures. By way of example, and not limitation, such architectures include Industry Standard Architecture (ISA) bus, micro channel architecture (MAC) bus, enhanced ISA bus, video Electronics Standards Association (VESA) local bus, and Peripheral Component Interconnect (PCI) bus.
Electronic device 12 typically includes a variety of computer system readable media. Such media can be any available media that is accessible by electronic device 12 and includes both volatile and nonvolatile media, removable and non-removable media.
The system storage 28 may include computer system readable media in the form of volatile memory such as Random Access Memory (RAM) 30 and/or cache memory 32. The electronic device 12 may further include other removable/non-removable, volatile/nonvolatile computer system storage media. By way of example only, storage system 34 may be used to read from or write to non-removable, nonvolatile magnetic media (not shown in FIG. 4, commonly referred to as a "hard disk drive"). Although not shown in fig. 4, a magnetic disk drive for reading from and writing to a removable non-volatile magnetic disk (e.g., a "floppy disk"), and an optical disk drive for reading from or writing to a removable non-volatile optical disk (e.g., a CD-ROM, DVD-ROM, or other optical media) may be provided. In such cases, each drive may be coupled to bus 18 through one or more data medium interfaces. The storage device 28 may include at least one program product having a set (e.g., at least one) of program modules configured to carry out the functions of the embodiments of the invention.
A program/utility 40 having a set (at least one) of program modules 42 may be stored, for example, in storage 28, such program modules 42 including, but not limited to, an operating system, one or more application programs, other program modules, and program data, each or some combination of which may include an implementation of a network environment. Program modules 42 generally perform the functions and/or methods of the embodiments described herein.
The electronic device 12 may also communicate with one or more external devices 14 (e.g., keyboard, pointing device, display 24, etc.), one or more devices that enable a user to interact with the device 12, and/or any devices (e.g., network card, modem, etc.) that enable the device 12 to communicate with one or more other computing devices. Such communication may occur through an input/output (I/O) interface 22. Also, the electronic device 12 may communicate with one or more networks such as a Local Area Network (LAN), a Wide Area Network (WAN) and/or a public network, such as the Internet, through a network adapter 20. As shown in fig. 4, the network adapter 20 communicates with other modules of the electronic device 12 over the bus 18. It should be appreciated that although not shown in fig. 4, other hardware and/or software modules may be used in connection with electronic device 12, including, but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, data backup storage systems, and the like.
The processing unit 16 executes various functional applications and data processing by running a program stored in the system storage 28, for example, to implement an image contrast enhancement method provided by an embodiment of the present invention, including:
determining bias point information in an image to be enhanced according to pixel point information of the image to be enhanced;
performing color cast correction on the image to be enhanced according to the color cast point information;
and carrying out contrast enhancement on the image to be enhanced after the color cast correction so as to obtain an enhanced image.
Example five
The fifth embodiment of the present invention further provides a computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements the image contrast enhancement method as provided by the embodiments of the present invention, including:
determining bias point information in an image to be enhanced according to pixel point information of the image to be enhanced;
performing color cast correction on the image to be enhanced according to the color cast point information;
and carrying out contrast enhancement on the image to be enhanced after the color cast correction so as to obtain an enhanced image.
The computer storage media of embodiments of the invention may take the form of any combination of one or more computer-readable media. The computer readable medium may be a computer readable signal medium or a computer readable storage medium. The computer readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples (a non-exhaustive list) of the computer-readable storage medium would include the following: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
The computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, either in baseband or as part of a carrier wave. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Computer program code for carrying out operations of the present invention may be written in one or more programming languages, including an object oriented programming language such as Java, smalltalk, C ++ and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computer (for example, through the Internet using an Internet service provider).
Note that the above is only a preferred embodiment of the present invention and the technical principle applied. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, while the invention has been described in connection with the above embodiments, the invention is not limited to the embodiments, but may be embodied in many other equivalent forms without departing from the spirit or scope of the invention, which is set forth in the following claims.

Claims (7)

1. A method of image contrast enhancement, comprising:
determining bias point information in an image to be enhanced according to pixel point information of the image to be enhanced; wherein, the bias point is a pixel point with a channel value lost and at least one of the three channel component values is not equal to 0;
performing color cast correction on the image to be enhanced according to the color cast point information;
contrast enhancement is carried out on the image to be enhanced after the color cast correction so as to obtain an enhanced image;
wherein the bias point information includes bias point coordinates;
correspondingly, the performing color cast correction on the image to be enhanced according to the color cast point information includes:
determining a reference neighborhood of a target bias point according to the coordinates of the target bias point;
correcting the target bias point according to the pixel point information of the reference neighborhood to obtain corrected pixel point information of the target bias point;
the correcting the target bias point according to the pixel point information of the reference neighborhood to obtain corrected pixel point information of the target bias point comprises the following steps:
and (3) adopting a linear smoothing algorithm to the component values of the R channels of each pixel point in the reference neighborhood to obtain a corrected component value of the R channel of the target bias point, and correcting the G channel and the B channel in the same way.
2. The method of claim 1, wherein the pixel point information comprises component values of three channels of pixels;
correspondingly, the determining the bias point information in the image to be enhanced according to the pixel point information of the image to be enhanced comprises the following steps:
determining the minimum value in three channel component values of a target pixel point in the image to be enhanced;
if the minimum value is smaller than a preset threshold value, determining the target pixel point as a bias point, and determining the position information of the bias point.
3. The method according to claim 1, wherein the contrast enhancement of the color cast corrected image to be enhanced to obtain an enhanced image comprises:
converting the image to be enhanced after the color cast correction into a gray image;
contrast enhancement is carried out on the gray level image;
and converting the gray level image subjected to contrast enhancement into a color image to obtain an enhanced image.
4. A method according to claim 3, wherein said contrast enhancement of said gray scale image comprises:
determining a contrast interval of the gray level image as an interval to be stretched;
determining reinforcing parameters according to the section to be stretched and the target stretching section;
and carrying out contrast enhancement on the gray level image according to the image information of the gray level image and the enhancement parameters.
5. An image contrast enhancement device, comprising:
the bias point determining module is used for determining bias point information in the image to be enhanced according to pixel point information of the image to be enhanced; wherein, the bias point is a pixel point with a channel value lost and at least one of the three channel component values is not equal to 0;
the color cast correction module is used for carrying out color cast correction on the image to be enhanced according to the color cast point information;
the image enhancement module is used for carrying out contrast enhancement on the image to be enhanced after the color cast correction so as to obtain an enhanced image;
wherein the bias point information includes bias point coordinates;
correspondingly, the color cast correction module is specifically used for:
determining a reference neighborhood of a target bias point according to the coordinates of the target bias point;
correcting the target bias point according to the pixel point information of the reference neighborhood to obtain corrected pixel point information of the target bias point;
the correcting the target bias point according to the pixel point information of the reference neighborhood to obtain corrected pixel point information of the target bias point comprises the following steps:
and (3) adopting a linear smoothing algorithm to the component values of the R channels of each pixel point in the reference neighborhood to obtain a corrected component value of the R channel of the target bias point, and correcting the G channel and the B channel in the same way.
6. An electronic device, comprising:
one or more processors;
storage means for storing one or more programs,
the one or more programs, when executed by the one or more processors, cause the one or more processors to implement the image contrast enhancement method of any of claims 1-4.
7. A computer readable storage medium having stored thereon a computer program, which when executed by a processor implements the image contrast enhancement method according to any of claims 1-4.
CN202011018981.4A 2020-09-24 2020-09-24 Image contrast enhancement method, device, electronic equipment and storage medium Active CN112116542B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011018981.4A CN112116542B (en) 2020-09-24 2020-09-24 Image contrast enhancement method, device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011018981.4A CN112116542B (en) 2020-09-24 2020-09-24 Image contrast enhancement method, device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN112116542A CN112116542A (en) 2020-12-22
CN112116542B true CN112116542B (en) 2024-03-08

Family

ID=73801681

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011018981.4A Active CN112116542B (en) 2020-09-24 2020-09-24 Image contrast enhancement method, device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN112116542B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112967208A (en) * 2021-04-23 2021-06-15 北京恒安嘉新安全技术有限公司 Image processing method and device, electronic equipment and storage medium
CN115249271A (en) * 2021-04-27 2022-10-28 青岛海尔电冰箱有限公司 Method and equipment for detecting and correcting image color cast and refrigerator
CN114298944A (en) * 2021-12-30 2022-04-08 上海闻泰信息技术有限公司 Image enhancement method, device, equipment and storage medium

Citations (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5552825A (en) * 1994-11-08 1996-09-03 Texas Instruments Incorporated Color resolution enhancement by using color camera and methods
WO2013103184A1 (en) * 2012-01-03 2013-07-11 중앙대학교 산학협력단 Apparatus and method for improving image using color channels
EP2809013A1 (en) * 2013-05-31 2014-12-03 ST-Ericsson SA A radio receiver and a method therein
CN104299204A (en) * 2013-07-17 2015-01-21 王垒 Histogram local image contrast enhancing method and histogram local image contrast enhancing device
CN105654438A (en) * 2015-12-27 2016-06-08 西南技术物理研究所 Gray scale image fitting enhancement method based on local histogram equalization
CN106127823A (en) * 2016-06-24 2016-11-16 电子科技大学 A kind of coloured image dynamic range compression method
CN106886985A (en) * 2017-04-25 2017-06-23 哈尔滨工业大学 A kind of self adaptation enhancement method of low-illumination image for reducing colour cast
CN108416742A (en) * 2018-01-23 2018-08-17 浙江工商大学 Sand and dust degraded image Enhancement Method based on colour cast correction and information loss constraint
CN108470327A (en) * 2018-03-27 2018-08-31 成都西纬科技有限公司 Image enchancing method, device, electronic equipment and storage medium
CN108805829A (en) * 2018-05-25 2018-11-13 浙江科澜信息技术有限公司 Video data processing method, device, equipment and computer readable storage medium
CN110458803A (en) * 2019-07-04 2019-11-15 深圳市玩瞳科技有限公司 Frame image color cast and brightness detection method and device based on colored ribbon calibration
WO2019232945A1 (en) * 2018-06-08 2019-12-12 平安科技(深圳)有限公司 Image processing method and apparatus, computer device and storage medium
CN111028186A (en) * 2019-11-25 2020-04-17 泰康保险集团股份有限公司 Image enhancement method and device
CN111127359A (en) * 2019-12-19 2020-05-08 大连海事大学 Underwater image enhancement method based on selective compensation color and three-interval balance
CN111163268A (en) * 2020-01-09 2020-05-15 腾讯科技(深圳)有限公司 Image processing method and device and computer storage medium

Patent Citations (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5552825A (en) * 1994-11-08 1996-09-03 Texas Instruments Incorporated Color resolution enhancement by using color camera and methods
WO2013103184A1 (en) * 2012-01-03 2013-07-11 중앙대학교 산학협력단 Apparatus and method for improving image using color channels
EP2809013A1 (en) * 2013-05-31 2014-12-03 ST-Ericsson SA A radio receiver and a method therein
CN104299204A (en) * 2013-07-17 2015-01-21 王垒 Histogram local image contrast enhancing method and histogram local image contrast enhancing device
CN105654438A (en) * 2015-12-27 2016-06-08 西南技术物理研究所 Gray scale image fitting enhancement method based on local histogram equalization
CN106127823A (en) * 2016-06-24 2016-11-16 电子科技大学 A kind of coloured image dynamic range compression method
CN106886985A (en) * 2017-04-25 2017-06-23 哈尔滨工业大学 A kind of self adaptation enhancement method of low-illumination image for reducing colour cast
CN108416742A (en) * 2018-01-23 2018-08-17 浙江工商大学 Sand and dust degraded image Enhancement Method based on colour cast correction and information loss constraint
CN108470327A (en) * 2018-03-27 2018-08-31 成都西纬科技有限公司 Image enchancing method, device, electronic equipment and storage medium
CN108805829A (en) * 2018-05-25 2018-11-13 浙江科澜信息技术有限公司 Video data processing method, device, equipment and computer readable storage medium
WO2019232945A1 (en) * 2018-06-08 2019-12-12 平安科技(深圳)有限公司 Image processing method and apparatus, computer device and storage medium
CN110458803A (en) * 2019-07-04 2019-11-15 深圳市玩瞳科技有限公司 Frame image color cast and brightness detection method and device based on colored ribbon calibration
CN111028186A (en) * 2019-11-25 2020-04-17 泰康保险集团股份有限公司 Image enhancement method and device
CN111127359A (en) * 2019-12-19 2020-05-08 大连海事大学 Underwater image enhancement method based on selective compensation color and three-interval balance
CN111163268A (en) * 2020-01-09 2020-05-15 腾讯科技(深圳)有限公司 Image processing method and device and computer storage medium

Non-Patent Citations (5)

* Cited by examiner, † Cited by third party
Title
Underwater Image Enhancement by Dehazing With Minimum Information Loss and Histogram Distribution Prior;Chong-Yi Li 等,;《IEEE TRANSACTIONS ON IMAGE PROCESSING》;20161231;第25卷(第12期);全文 *
基于图像处理的混凝土预制构件裂缝检测系统研究;刘鹏,;《中国优秀硕士学位论文全文数据库工程科技Ⅱ辑》;20180215;第2018年卷(第2期);第9页 *
基于暗原色先验的单幅图像快速去雾算法;王雅婷 等,;《计算机应用》;20161210;第36卷(第12期);第3407-3409页 *
王雅婷 等,.基于暗原色先验的单幅图像快速去雾算法.《计算机应用》.2016,第36卷(第12期), *
高动态范围图像的色调映射算法研究;陈云,;《中国优秀硕士学位论文全文数据库信息科技辑》;20160615;第2016年卷(第6期);全文 *

Also Published As

Publication number Publication date
CN112116542A (en) 2020-12-22

Similar Documents

Publication Publication Date Title
CN112116542B (en) Image contrast enhancement method, device, electronic equipment and storage medium
CN109064426B (en) Method and device for suppressing glare in low-illumination image and enhancing image
CN110189336B (en) Image generation method, system, server and storage medium
US10062152B2 (en) System for conversion of low dynamic range images to high dynamic range images
JPWO2012017946A1 (en) Image processing method, image processing apparatus, and image processing program
CN108537758B (en) Image contrast enhancement method based on display and human eye visual characteristics
CN108876742B (en) Image color enhancement method and device
JP2018518735A (en) Color calibration apparatus and method
WO2021114564A1 (en) Enhancement method for low-contrast infrared image
JP5440241B2 (en) Image enhancement device, image enhancement method, and image enhancement program
US10951843B2 (en) Adjusting confidence values for correcting pixel defects
CN107833189A (en) The Underwater Target Detection image enchancing method of the limited self-adapting histogram equilibrium of contrast
CN109214996B (en) Image processing method and device
CN110969046B (en) Face recognition method, face recognition device and computer-readable storage medium
CN112348763A (en) Image enhancement method, device, electronic equipment and medium
JP2020197915A (en) Image processing device, image processing method, and program
CN111563851B (en) Image mapping method based on dynamic Gaussian parameters
CN115660945A (en) Coordinate conversion method and device, electronic equipment and storage medium
CN109844803B (en) Method for detecting saturated pixels in an image
CN114298985B (en) Defect detection method, device, equipment and storage medium
CN112312001A (en) Image detection method, device, equipment and computer storage medium
CN113132639B (en) Image processing method and device, electronic equipment and storage medium
CN107833185B (en) Image defogging method and device, storage medium and electronic equipment
CN111833262A (en) Image noise reduction method and device and electronic equipment
CN108961293B (en) Background subtraction method, device, equipment and 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
GR01 Patent grant
GR01 Patent grant