CN109309826B - Image color balancing method and device, terminal equipment and readable storage medium - Google Patents

Image color balancing method and device, terminal equipment and readable storage medium Download PDF

Info

Publication number
CN109309826B
CN109309826B CN201710627195.6A CN201710627195A CN109309826B CN 109309826 B CN109309826 B CN 109309826B CN 201710627195 A CN201710627195 A CN 201710627195A CN 109309826 B CN109309826 B CN 109309826B
Authority
CN
China
Prior art keywords
image
brightness value
processed
color component
color
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
CN201710627195.6A
Other languages
Chinese (zh)
Other versions
CN109309826A (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.)
TCL Technology Group Co Ltd
Original Assignee
TCL Technology Group Co 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 TCL Technology Group Co Ltd filed Critical TCL Technology Group Co Ltd
Priority to CN201710627195.6A priority Critical patent/CN109309826B/en
Publication of CN109309826A publication Critical patent/CN109309826A/en
Application granted granted Critical
Publication of CN109309826B publication Critical patent/CN109309826B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N9/00Details of colour television systems
    • H04N9/64Circuits for processing colour signals
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N9/00Details of colour television systems
    • H04N9/64Circuits for processing colour signals
    • H04N9/646Circuits for processing colour signals for image enhancement, e.g. vertical detail restoration, cross-colour elimination, contour correction, chrominance trapping filters

Abstract

The invention provides an image color balancing method and a terminal, and relates to the technical field of image processing. The method comprises the following steps: acquiring histograms corresponding to three color components of the image to be processed R, G, B; calculating to obtain the minimum brightness value and the maximum brightness value of the processed image on the three color components according to the corresponding histograms of the three color components and the preset darkest pixel proportion and brightest pixel proportion of the processed image on the three color components; and adjusting the color of the image to be processed according to the minimum brightness value and the maximum brightness value of the processed image on the three color components and the brightness value of each pixel point in the image to be processed on the three color components. The embodiment of the invention can effectively improve the dynamic range of the image color and improve the visual effect of the image.

Description

Image color balancing method and device, terminal equipment and readable storage medium
Technical Field
The invention belongs to the technical field of image processing, and particularly relates to an image color balancing method, an image color balancing device, terminal equipment and a computer readable storage medium.
Background
When the dynamic range of the colors of an image is too small, it is often necessary to adjust them to improve the visual perception of the viewer. The dynamic range of the color indicates the range from "darkest" to "brightest" of the color contained in the image, and the larger the dynamic range is, the richer the layers can be represented, and the wider the color space contained.
At present, the basic method of color equalization is to directly adopt linear transformation form affine to the input image, and this way is directed to the situation that if the brightness values of a very small number of pixels in the input image are respectively in the vicinity of "darkest" and "brightest", the dynamic range of image colors cannot be effectively improved.
Disclosure of Invention
In view of the above, the present invention provides an image color equalization method, apparatus, terminal device and computer readable storage medium to solve the above-mentioned problem that the dynamic range of image colors cannot be effectively improved if the brightness values of a very small number of pixels in an input image are respectively in the vicinity of "darkest" and "brightest".
In a first aspect, the present invention provides an image color equalization method, including:
acquiring histograms corresponding to three color components of the image to be processed R, G, B;
calculating to obtain the minimum brightness value and the maximum brightness value of the processed image on the three color components according to the corresponding histograms of the three color components and the preset darkest pixel proportion and brightest pixel proportion of the processed image on the three color components;
and adjusting the color of the image to be processed according to the minimum brightness value and the maximum brightness value of the processed image on the three color components and the brightness value of each pixel point in the image to be processed on the three color components.
In a second aspect, the present invention further provides a terminal, including:
a histogram acquiring unit, configured to acquire histograms corresponding to the three color components of the image to be processed R, G, B;
a brightness threshold obtaining unit, configured to calculate a minimum brightness value and a maximum brightness value of the processed image on the three color components according to histograms corresponding to the three color components, and a darkest pixel ratio and a brightest pixel ratio of the processed image on the three color components, which are set in advance, respectively;
and the color adjusting unit is used for adjusting the color of the image to be processed according to the minimum brightness value and the maximum brightness value of the processed image on the three color components and the brightness value of each pixel point in the image to be processed on the three color components.
In a third aspect, the present invention also provides a terminal device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the method according to the first aspect when executing the computer program.
In a fourth aspect, the present invention also provides a computer-readable storage medium, in which a computer program is stored, wherein the computer program, when executed by a processor, implements the steps of the method according to the first aspect.
The invention has the beneficial effects that:
according to the invention, the histograms corresponding to the three color components of the image to be processed R, G, B are obtained firstly; then according to the histogram and the preset darkest pixel proportion and brightest pixel proportion of the processed image on the three color components, calculating to obtain the minimum brightness value and the maximum brightness value of the processed image on the three color components; and finally, adjusting the color of the image to be processed according to the minimum brightness value and the maximum brightness value of the processed image on the three color components and the brightness value of each pixel point in the image to be processed on the three color components, thereby effectively improving the dynamic range of the image color, improving the visual effect of the image, and overcoming the problem that the dynamic range of the image color cannot be effectively improved in the prior art under the condition that the brightness values of a very small number of pixels in the input image are respectively near the darkest and the brightest.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the embodiments or the prior art descriptions will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without inventive exercise.
FIG. 1 is a schematic flow chart of a method for color equalization of an image according to a first embodiment of the present invention;
fig. 2 is a flowchart illustrating a specific implementation of step S102 in an image color equalization method according to a first embodiment of the present invention;
fig. 3 is a flowchart illustrating a specific implementation of step S103 in an image color equalization method according to a first embodiment of the present invention;
fig. 4 is a schematic block diagram of a terminal according to a second embodiment of the present invention;
fig. 5 is a schematic block diagram of a terminal device according to a third embodiment of the present invention.
Detailed Description
In the following description, for purposes of explanation and not limitation, specific details are set forth, such as particular system structures, techniques, etc. in order to provide a thorough understanding of the embodiments of the invention. It will be apparent, however, to one skilled in the art that the present invention may be practiced in other embodiments that depart from these specific details. In other instances, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the present invention with unnecessary detail.
In order to explain the technical means of the present invention, the following description will be given by way of specific examples.
Fig. 1 is a schematic flowchart of an image color equalization method according to a first embodiment of the present invention. Referring to fig. 1, the image color equalization method provided in this embodiment includes:
step S101, a histogram corresponding to each of the three color components of the image to be processed R, G, B is obtained.
In this embodiment, each pixel in the image to be processed has R, G, B three color components, and a histogram corresponding to each of the R, G, B three color components can be obtained by performing classification statistics on R, G, B values of each pixel point on the image to be processed, where an abscissa of the histogram is a brightness level and an ordinate of the histogram is the number of the pixel points.
And step S102, calculating to obtain the minimum brightness value and the maximum brightness value of the processed image on the three color components according to the histograms corresponding to the three color components and the darkest pixel proportion and the brightest pixel proportion of the processed image on the three color components which are preset respectively.
Fig. 2 is a flowchart illustrating a specific implementation of step S102 in the first embodiment of the present invention. Referring to fig. 2, step S102 specifically includes:
step S201, counting the histogram corresponding to the color component in the image to be processed to obtain a cumulative histogram distribution function h (N) |1 ≦ x ≦ N | Ii≤n|。
Where N denotes the number of pixels in the image to be processed, IiAnd H (n) represents the number of pixel points of the ith pixel point of the image to be processed on the color component, wherein the number of the pixel points of the ith pixel point of the image to be processed on the color component is less than the number n.
For example, in a specific application, if the number of pixels corresponding to the luminance levels 1, 2, and 3 in the histogram is 5, 10, and 15, respectively, then the number of pixels corresponding to the luminance levels 1, 2, and 3 in the cumulative histogram corresponding to the histogram is 5, 15, and 30, respectively.
Step S202, calculating the darkest pixel quantity A and the brightest pixel quantity B corresponding to the color component in the image according to the darkest pixel proportion, the brightest pixel proportion and the pixel quantity in the image corresponding to the color component.
Step S203, according to the equation: vmin=H-1(A),Vmax=H-1And (N-B), calculating to obtain the corresponding minimum brightness value and the maximum brightness value of the image on the color component.
Wherein, VminRepresents the minimum brightness value, VmaxRepresents the maximum luminance value, H-1Is the inverse of H.
It should be noted that, in this embodiment, the three color components of the image to be processed are respectively and independently processed, and the corresponding algorithms are the same, as in the above steps S201 to S203, where each color component corresponds to a respective darkest pixel ratio, a respective brightest pixel ratio, and a respective minimum luminance value and a respective maximum luminance value. The darkest pixel proportion or the brightest pixel proportion corresponding to each color component may be the same or different.
Step S103, adjusting the color of the image to be processed according to the minimum brightness value and the maximum brightness value of the processed image on the three color components and the brightness value of each pixel point in the image to be processed on the three color components.
Fig. 3 is a flowchart illustrating a specific implementation of step S103 according to an embodiment of the present invention. As shown in fig. 3, step S103 specifically includes:
step S301, if the brightness value of a certain pixel point in the image to be processed on the color component is smaller than the minimum brightness value corresponding to the color component, adjusting the brightness value of the pixel point on the color component to the minimum brightness value.
Step S302, if the brightness value of a certain pixel point in the image to be processed on the color component is greater than the maximum brightness value corresponding to the color component, adjusting the brightness value of the pixel point on the color component to the maximum brightness value.
In this embodiment, since the minimum brightness value and the maximum brightness value of the processed image on each color component are obtained in advance, and then when the image to be processed is processed, if the brightness value of the pixel on the color component of the image to be processed is outside the minimum brightness value and the maximum brightness value, the brightness value of the pixel on the color component is adjusted to the minimum brightness value or the maximum brightness value, so that even if the pixel points of the image to be processed, of which the color is located in the vicinity of the darkest or the brightest, are very few, the color balance of the processed image can be ensured, and the visual effect of the image is improved.
Step S303, if the brightness value of a certain pixel point in the image to be processed on the color component is between the minimum brightness value and the maximum brightness value corresponding to the color component, adjusting the brightness value of the pixel point on the color component according to a preset output equation.
Further, in this embodiment, the preset output equation is:
Figure GDA0002674100740000051
wherein Q isiAnd m is the brightness value of the pixel point on the color component in the processed image, and m is the binary digit number of the brightness value of the pixel point on the color component in the image to be processed.
In this embodiment, when the brightness value of a pixel point in a to-be-processed image on a color component is between the minimum brightness value and the maximum brightness value, the color of the pixel point is adjusted according to the preset output equation, and after the three color components of the pixel point are adjusted, the color of the pixel point is synthesized, so that the color of the pixel point after being output can be obtained, and after the color adjustment of all the pixel points in the to-be-processed image is completed, the processed image can be output, so that an image with balanced color can be obtained.
The image equalization method provided by this embodiment presets the darkest pixel proportion and the brightest pixel proportion on the processed image, then determines the minimum brightness value and the maximum brightness value of the processed image on each color component according to the preset proportion and the histogram of each color component on the image to be processed, and finally performs independent processing on the three color components of the image to be processed according to the minimum brightness value and the maximum brightness value of each color component on the processed image and the brightness values of each pixel point on the three color components on the image to be processed, and then outputs the image after color equalization by integrating the processing results on the three color components to display to the user, thereby effectively improving the dynamic range of image colors, improving the visual effect of the image, and overcoming the situation that in the prior art, if the brightness values of a very small number of pixels in the input image are respectively in the vicinity of "darkest" and "brightest", the dynamic range of image colors cannot be effectively improved.
Fig. 4 is a schematic block diagram of a terminal according to a second embodiment of the present invention. Only the portions related to the present embodiment are shown for convenience of explanation.
Referring to fig. 4, a second embodiment of the present invention provides a terminal 4, including:
a histogram obtaining unit 41, configured to obtain histograms corresponding to three color components of the image to be processed R, G, B;
a brightness threshold obtaining unit 42, configured to calculate a minimum brightness value and a maximum brightness value of the processed image on the three color components according to the histograms corresponding to the three color components, and a darkest pixel ratio and a brightest pixel ratio of the processed image on the three color components, which are set in advance, respectively;
and a color adjusting unit 43, configured to adjust a color of the image to be processed according to the minimum brightness value and the maximum brightness value of the processed image on the three color components and the brightness values of the pixel points in the image to be processed on the three color components.
Optionally, the brightness threshold obtaining unit 42 is specifically configured to:
for the color in the image to be processedCounting the histogram corresponding to the color component to obtain a cumulative histogram distribution function H (N) |1 ≦ x ≦ N | IiN ≦ N |, where N represents the number of pixels in the image to be processed, IiH (n) represents the number of pixel points of the ith pixel point of the image to be processed on the color component, wherein the number of the pixel points of the ith pixel point of the image to be processed on the color component is less than the number n;
calculating the darkest pixel quantity A and the brightest pixel quantity B corresponding to the color component in the image according to the darkest pixel proportion, the brightest pixel proportion and the pixel quantity in the image corresponding to the color component respectively;
according to the equation: vmin=H-1(A),Vmax=H-1(N-B) calculating a minimum brightness value and a maximum brightness value corresponding to the image on the color component, wherein VminRepresents the minimum brightness value, VmaxRepresents the maximum luminance value, H-1Is the inverse of H.
Optionally, the color adjusting unit 43 is specifically configured to:
if the brightness value of a certain pixel point in the image to be processed on the color component is smaller than the minimum brightness value corresponding to the color component, adjusting the brightness value of the pixel point on the color component to be the minimum brightness value;
if the brightness value of a certain pixel point in the image to be processed on the color component is larger than the maximum brightness value corresponding to the color component, adjusting the brightness value of the pixel point on the color component to be the maximum brightness value;
and if the brightness value of a certain pixel point in the image to be processed on the color component is between the minimum brightness value and the maximum brightness value corresponding to the color component, adjusting the brightness value of the pixel point on the color component according to a preset output equation.
Optionally, the preset output equation is:
Figure GDA0002674100740000071
wherein Q isiIs a processed pictureThe brightness value of the pixel point in the image on the color component, and m is the binary digit number of the brightness value of the pixel point in the image to be processed on the color component.
It should be noted that, since each unit in the terminal provided in the embodiment of the present invention is based on the same concept as that of the embodiment of the method of the present invention, the technical effect brought by the unit is the same as that of the embodiment of the method of the present invention, and specific contents may refer to descriptions in the embodiment of the method of the present invention, and are not described herein again.
It can be seen from the above that, the terminal provided in the embodiment of the present invention can also effectively improve the dynamic range of image colors, improve the visual effect of an image, and overcome the problem that the dynamic range of image colors cannot be effectively improved in the prior art for the case that the brightness values of a very small number of pixels in an input image are respectively in the vicinity of "darkest" and "brightest".
Fig. 5 is a schematic diagram of a terminal device according to a third embodiment of the present invention. As shown in fig. 5, the terminal device 5 of this embodiment includes: a processor 50, a memory 51 and a computer program 52 stored in said memory 51 and executable on said processor 50. The processor 50, when executing the computer program 52, implements the steps in the various method embodiments described above, such as the steps 101 to 103 shown in fig. 1. Alternatively, the processor 50, when executing the computer program 52, implements the functions of the modules/units in the above-mentioned device embodiments, such as the functions of the modules 41 to 43 shown in fig. 4.
Illustratively, the computer program 52 may be partitioned into one or more modules/units that are stored in the memory 51 and executed by the processor 50 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 of the computer program 52 in the terminal 5. For example, the computer program 52 may be divided into a histogram acquisition unit, a brightness threshold acquisition unit, and a color adjustment unit, and each unit specifically functions as follows:
a histogram acquiring unit, configured to acquire histograms corresponding to the three color components of the image to be processed R, G, B;
a brightness threshold obtaining unit, configured to calculate a minimum brightness value and a maximum brightness value of the processed image on the three color components according to histograms corresponding to the three color components, and a darkest pixel ratio and a brightest pixel ratio of the processed image on the three color components, which are set in advance, respectively;
and the color adjusting unit is used for adjusting the color of the image to be processed according to the minimum brightness value and the maximum brightness value of the processed image on the three color components and the brightness value of each pixel point in the image to be processed on the three color components.
The terminal device 5 may be a desktop computer, a notebook, a palm computer, a cloud server, or other computing devices. The terminal may include, but is not limited to, a processor 50, a memory 51. It will be appreciated by those skilled in the art that fig. 5 is only an example of a terminal 5 and does not constitute a limitation of the terminal device 5 and may comprise more or less components than shown or some components may be combined or different components, e.g. the terminal may further comprise input output devices, network access devices, buses etc.
The Processor 50 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, discrete hardware components, etc. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The memory 51 may be an internal storage unit of the terminal 5, such as a hard disk or a memory of the terminal 5. The memory 51 may also be an external storage device of the terminal 5, 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 provided on the terminal 5. Further, the memory 51 may also include both an internal storage unit and an external storage device of the terminal 5. The memory 51 is used for storing the computer program and other programs and data required by the terminal. The memory 51 may also be used to temporarily store data that has been output or is to be output.
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-mentioned division of the functional units and modules is illustrated, and in practical applications, the above-mentioned function distribution may be performed by different functional units and modules according to needs, that is, the internal structure of the apparatus is divided into different functional units or modules to perform all or part of the above-mentioned functions. Each functional unit and module in the embodiments may be integrated in one processing unit, or each unit may exist alone physically, or two or more units are integrated in one unit, and the integrated unit may be implemented in a form of hardware, or in a form of software functional unit. In addition, specific names of the functional units and modules are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present application. The specific working processes of the units and modules in the system 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 will appreciate that the various illustrative elements and algorithm steps 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 embodiments provided in the present invention, it should be understood that the disclosed terminal and method can be implemented in other manners. For example, the above-described embodiments of the apparatus/terminal device are merely illustrative, and for example, the division of the modules or units is only one logical division, and there may be other divisions when actually implemented, 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 modules/units, if implemented in the form of software functional units and sold or used as separate products, 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, and the like. It should be noted that the computer readable medium may contain other components which may be suitably increased or decreased as required by legislation and patent practice in jurisdictions, for example, in some jurisdictions, computer readable media which may not include electrical carrier signals and telecommunications signals in accordance with legislation and patent practice.
It should be understood that, the sequence numbers of the steps in the foregoing embodiments do not imply an execution sequence, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation to the implementation process of the embodiments of the present invention.
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; such modifications and substitutions do not substantially depart from the spirit and scope of the embodiments of the present invention, and are intended to be included within the scope of the present invention.

Claims (6)

1. An image color equalization method, comprising:
acquiring histograms corresponding to three color components of the image to be processed R, G, B;
calculating to obtain the minimum brightness value and the maximum brightness value of the processed image on the three color components according to the corresponding histograms of the three color components and the preset darkest pixel proportion and brightest pixel proportion of the processed image on the three color components;
if the brightness value of a certain pixel point in the image to be processed on the color component is smaller than the minimum brightness value corresponding to the color component, adjusting the brightness value of the pixel point on the color component to be the minimum brightness value;
if the brightness value of a certain pixel point in the image to be processed on the color component is larger than the maximum brightness value corresponding to the color component, adjusting the brightness value of the pixel point on the color component to be the maximum brightness value;
if the brightness value of a certain pixel point in the image to be processed on the color component is between the minimum brightness value and the maximum brightness value corresponding to the color component, adjusting the brightness value of the pixel point on the color component according to a preset output equation, wherein the preset output equation is as follows:
Figure FDA0002674100730000011
wherein Q isiThe brightness value of the pixel point on the color component in the processed image is obtained, m is the binary digit number of the brightness value of the pixel point on the color component in the image to be processed, IiThe brightness value V of the ith pixel point of the image to be processed on the color componentminRepresents the minimum brightness value, VmaxRepresenting the maximum luminance value.
2. The image color equalization method according to claim 1, wherein said calculating the minimum luminance value and the maximum luminance value of the processed image on the three color components according to the histogram corresponding to each of the three color components and the pre-set ratio of the darkest pixels and the ratio of the brightest pixels of the processed image on the three color components comprises:
counting the histogram corresponding to the color component in the image to be processed to obtain a cumulative histogram distribution function H (N) |1 ≦ x ≦ N | IiN ≦ N |, where N represents the number of pixels in the image to be processed, IiThe brightness value of the ith pixel point of the image to be processed on the color component is represented, H (n) represents the image in the image to be processedThe number of pixel points of which the brightness value of the pixel on the color component is less than the value n;
calculating the darkest pixel quantity A and the brightest pixel quantity B corresponding to the color component in the image according to the darkest pixel proportion, the brightest pixel proportion and the pixel quantity in the image corresponding to the color component respectively;
according to the equation: vmin=H-1(A),Vmax=H-1(N-B) calculating the minimum brightness value V corresponding to the color component of the imageminAnd a maximum brightness value VmaxIn which V isminRepresents the minimum brightness value, VmaxRepresents the maximum luminance value, H-1Is the inverse of H.
3. An image color equalizing apparatus, comprising:
a histogram acquiring unit, configured to acquire histograms corresponding to the three color components of the image to be processed R, G, B;
a brightness threshold obtaining unit, configured to calculate a minimum brightness value and a maximum brightness value of the processed image on the three color components according to histograms corresponding to the three color components, and a darkest pixel ratio and a brightest pixel ratio of the processed image on the three color components, which are set in advance, respectively;
the color adjusting unit is used for adjusting the brightness value of a certain pixel point on the color component to be processed into the minimum brightness value if the brightness value of the pixel point on the color component in the image to be processed is smaller than the minimum brightness value corresponding to the color component; if the brightness value of a certain pixel point in the image to be processed on the color component is larger than the maximum brightness value corresponding to the color component, adjusting the brightness value of the pixel point on the color component to be the maximum brightness value; if the brightness value of a certain pixel point in the image to be processed on the color component is between the minimum brightness value and the maximum brightness value corresponding to the color component, adjusting the brightness value of the pixel point on the color component according to a preset output equation; the preset output equation is:
Figure FDA0002674100730000021
Wherein Q isiThe brightness value of the pixel point on the color component in the processed image is obtained, m is the binary digit number of the brightness value of the pixel point on the color component in the image to be processed, IiThe brightness value V of the ith pixel point of the image to be processed on the color componentminRepresents the minimum brightness value, VmaxRepresenting the maximum luminance value.
4. The apparatus of claim 3, wherein the luminance threshold acquisition unit is specifically configured to:
counting the histogram corresponding to the color component in the image to be processed to obtain a cumulative histogram distribution function H (N) |1 ≦ x ≦ N | IiN ≦ N |, where N represents the number of pixels in the image to be processed, IiH (n) represents the number of pixel points of the ith pixel point of the image to be processed on the color component, wherein the number of the pixel points of the ith pixel point of the image to be processed on the color component is less than the number n;
calculating the darkest pixel quantity A and the brightest pixel quantity B corresponding to the color component in the image according to the darkest pixel proportion, the brightest pixel proportion and the pixel quantity in the image corresponding to the color component respectively;
according to the equation: vmin=H-1(A),Vmax=H-1(N-B) calculating the minimum brightness value V corresponding to the color component of the imageminAnd a maximum brightness value VmaxIn which V isminRepresents the minimum brightness value, VmaxRepresents the maximum luminance value, H-1Is the inverse of H.
5. 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 2 when executing the computer program.
6. 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 2.
CN201710627195.6A 2017-07-27 2017-07-27 Image color balancing method and device, terminal equipment and readable storage medium Active CN109309826B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710627195.6A CN109309826B (en) 2017-07-27 2017-07-27 Image color balancing method and device, terminal equipment and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710627195.6A CN109309826B (en) 2017-07-27 2017-07-27 Image color balancing method and device, terminal equipment and readable storage medium

Publications (2)

Publication Number Publication Date
CN109309826A CN109309826A (en) 2019-02-05
CN109309826B true CN109309826B (en) 2020-11-13

Family

ID=65202639

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710627195.6A Active CN109309826B (en) 2017-07-27 2017-07-27 Image color balancing method and device, terminal equipment and readable storage medium

Country Status (1)

Country Link
CN (1) CN109309826B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111784590A (en) * 2019-04-29 2020-10-16 北京京东尚科信息技术有限公司 Image processing method, device and system and computer storage medium
CN110223217A (en) * 2019-06-11 2019-09-10 长春工程学院 A kind of planar design automatic addition decorative element information processing system and method
CN110796628B (en) * 2019-10-17 2022-06-07 浙江大华技术股份有限公司 Image fusion method and device, shooting device and storage medium
CN111738950B (en) * 2020-06-22 2023-06-13 北京字节跳动网络技术有限公司 Image processing method and device
CN113965663A (en) * 2020-07-21 2022-01-21 深圳Tcl新技术有限公司 Image quality optimization method, intelligent terminal and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0665696A2 (en) * 1994-01-31 1995-08-02 Hitachi Denshi Kabushiki Kaisha Digital video signal processing device and tv camera device arranged to use it
CN101742285A (en) * 2008-11-11 2010-06-16 北京中星微电子有限公司 Video encoding system and method, and control method and device for regulating code bit width
CN102420997A (en) * 2010-09-28 2012-04-18 承景科技股份有限公司 Image processing method

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102903086B (en) * 2012-10-17 2015-05-20 北京经纬恒润科技有限公司 Brightness adjustment method and device of image to be spliced
CN105957037B (en) * 2016-05-09 2018-11-06 北京小米移动软件有限公司 Image enchancing method and device

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0665696A2 (en) * 1994-01-31 1995-08-02 Hitachi Denshi Kabushiki Kaisha Digital video signal processing device and tv camera device arranged to use it
CN101742285A (en) * 2008-11-11 2010-06-16 北京中星微电子有限公司 Video encoding system and method, and control method and device for regulating code bit width
CN102420997A (en) * 2010-09-28 2012-04-18 承景科技股份有限公司 Image processing method

Also Published As

Publication number Publication date
CN109309826A (en) 2019-02-05

Similar Documents

Publication Publication Date Title
CN109309826B (en) Image color balancing method and device, terminal equipment and readable storage medium
CN107403421B (en) Image defogging method, storage medium and terminal equipment
US11210765B2 (en) Image processing method and device, storage medium and computer device
CN109036333B (en) Display parameter correction method and device of display, terminal equipment and storage medium
CN108600783B (en) Frame rate adjusting method and device and terminal equipment
CN110648284B (en) Image processing method and device with uneven illumination
CN109214996B (en) Image processing method and device
CN107993189B (en) Image tone dynamic adjustment method and device based on local blocking
CN113096035A (en) High dynamic range image generation method and device, intelligent terminal and storage medium
CN107239518A (en) A kind of image comparison method, contrast device, electronic equipment and storage medium
CN111312141A (en) Color gamut adjusting method and device
CN111292269A (en) Image tone mapping method, computer device and computer readable storage medium
CN107862671A (en) A kind of processing method of image, device and television set
WO2019091196A1 (en) Image processing method and apparatus
CN110445977B (en) Parameter setting method of image signal processor and terminal equipment
CN111383178A (en) Image enhancement method and device and terminal equipment
CN111311481A (en) Background blurring method and device, terminal equipment and storage medium
CN108922478B (en) Backlight brightness adjusting method and system and display device
CN108377372B (en) A kind of white balancing treatment method, device, terminal device and storage medium
CN109308690B (en) Image brightness balancing method and terminal
CN109118436A (en) Picture tone adaptation method and corresponding electronic equipment and storage medium
CN111340722B (en) Image processing method, processing device, terminal equipment and readable storage medium
CN108717687B (en) Image enhancement method based on conversion compression and terminal equipment
CN110910439B (en) Image resolution estimation method and device and terminal
CN111784590A (en) Image processing method, device and system and computer 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
CB02 Change of applicant information

Address after: 516006 TCL technology building, No.17, Huifeng Third Road, Zhongkai high tech Zone, Huizhou City, Guangdong Province

Applicant after: TCL Technology Group Co.,Ltd.

Address before: 516006 Guangdong province Huizhou Zhongkai hi tech Development Zone No. nineteen District

Applicant before: TCL RESEARCH AMERICA Inc.

CB02 Change of applicant information
GR01 Patent grant
GR01 Patent grant