[go: up one dir, main page]

CN106960419A - A kind of image gamma correction method and device - Google Patents

A kind of image gamma correction method and device Download PDF

Info

Publication number
CN106960419A
CN106960419A CN201610595942.8A CN201610595942A CN106960419A CN 106960419 A CN106960419 A CN 106960419A CN 201610595942 A CN201610595942 A CN 201610595942A CN 106960419 A CN106960419 A CN 106960419A
Authority
CN
China
Prior art keywords
value
gamma
characteristic function
gamma characteristic
initial
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201610595942.8A
Other languages
Chinese (zh)
Inventor
王廷鸟
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhejiang Dahua Technology Co Ltd
Original Assignee
Zhejiang Dahua Technology 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 Zhejiang Dahua Technology Co Ltd filed Critical Zhejiang Dahua Technology Co Ltd
Priority to CN201610595942.8A priority Critical patent/CN106960419A/en
Publication of CN106960419A publication Critical patent/CN106960419A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/90Dynamic range modification of images or parts thereof
    • G06T5/92Dynamic range modification of images or parts thereof based on global image properties
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T1/00General purpose image data processing
    • G06T1/60Memory management

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Picture Signal Circuits (AREA)
  • Liquid Crystal Display Device Control (AREA)
  • Control Of Indicators Other Than Cathode Ray Tubes (AREA)

Abstract

The present invention provides a kind of image gamma correction method and device, and this method includes:Obtain the corresponding gamma characteristic function of display device built according to the gamma value and bit wide of display device;The derivative of initial output value and gamma characteristic function when input value is initial luma values when the input value for obtaining the gamma characteristic function prestored is initial luma values;According to initial output value, derivative and the recurrence formula prestored, the output valve when input value that recursion obtains gamma characteristic function is each brightness value;Output valve during according to the input value of initial luma values and initial output value, each brightness value and gamma characteristic function for corresponding brightness value, builds gamma corresponding table;According to the gamma corresponding table of structure, gamma correction is carried out to the image for inputting display device.Present invention saves ROM memory spaces and improve to image carry out gamma correction accuracy.

Description

Image gamma correction method and device
Technical Field
The present invention relates to the field of image processing technologies, and in particular, to a method and an apparatus for gamma correction of an image.
Background
Before an image is displayed on a display device, gamma correction is required to be performed on the image to cooperate with the display device to produce an image that appears to be normally bright to the human eye, wherein each display device has its corresponding gamma value.
In the CRT display imaging, due to the imaging principle, the output brightness value of each pixel point in the image has an exponential relation with the input brightness value, namely Y ═ Ygamma. In the most common way among the existing implementations of gamma conversion, a gamma mapping table is obtained through experiments, and the gamma mapping table (complete gamma mapping table) is stored in advance in a ROM memory of a display device, and when an image is displayed on the display device, an output luminance value corresponding to an input luminance value is searched in the gamma mapping table according to the input luminance value of the image, so that the image is displayed on the display device according to the output luminance value. However, this advanceThe way of storing the gamma mapping table in the ROM memory of the display device occupies a large amount of storage space of the ROM (read-only memory), thereby causing waste of storage space of the ROM memory.
In order to reduce the memory space consumption of the ROM, sampling of a complete gamma table interval is currently used, for example, a gamma table of 4096 luminance values is stored, and only 512 luminance values are stored. When looking up the table, for the brightness values not in the table, the data interpolation of the brightness values adjacent to the two sides of the point is generated. Although the method reduces the occupation amount of the storage space of the ROM, the method causes the problem that the result of gamma correction according to the sampled gamma corresponding table is inaccurate to a certain extent.
Disclosure of Invention
The invention provides an image gamma correction method and device, which are used for solving the problems of large occupied ROM space and inaccurate correction result in the prior art.
An image gamma correction method, comprising:
acquiring a gamma characteristic function corresponding to display equipment, which is constructed according to a gamma value and bit width of the display equipment, wherein a brightness value before correction is used as an input value of the gamma characteristic function, and a brightness value after correction is used as an output value of the gamma characteristic function;
acquiring a pre-stored initial output value when the input value of the gamma characteristic function is an initial brightness value and a derivative of the gamma characteristic function when the input value is the initial brightness value;
according to the initial output value, the derivative and a prestored recursion formula, recursion is carried out to obtain an output value when the input value of the gamma characteristic function is each brightness value, wherein each brightness value is a brightness value except the initial brightness value;
constructing a gamma corresponding table according to the initial brightness value and the initial output value, each brightness value and the output value when the input value of the gamma characteristic function is the corresponding brightness value;
and performing gamma correction on the image input into the display equipment according to the constructed gamma corresponding table.
In the method, according to the gamma value and the bit width of the display device, the constructed gamma characteristic function corresponding to the display device is as follows:
wherein γ represents a gamma value of the display device, n represents a bit width of the display device, x represents a pre-correction brightness value of the display device, and 1 ≦ x ≦ 2n-1, x is an integer.
In the method, when the gamma value of the display device is less than 1, the initial brightness value is 1, the pre-stored initial output value of the gamma characteristic function is g (1) when the input value is the initial brightness value, and the derivative of the gamma characteristic function is g' (1) when the input value is the initial brightness value.
In the method, the recurrence formula is as follows:
wherein,g (x +1) represents an output value when the input value of the gamma characteristic function is x +1, g (x) represents an output value when the input value of the gamma characteristic function is x, g '(x +1) represents a derivative of the gamma characteristic function when the input value is x +1, and g' (x) represents a derivative of the gamma characteristic function when the input value is x.
In the method, the display deviceIs greater than 1, the initial brightness value is 2n-1, the initial output value of the pre-stored gamma characteristic function is g (2) when the input value is the initial brightness valuen-1), the derivative of the gamma characteristic function at the input value of the initial brightness value is g' (2)n-1)。
In the method, the recurrence formula is as follows:
wherein,g (x-1) represents an output value when an input value of the gamma characteristic function is x-1, g (x) represents an output value when the input value of the gamma characteristic function is x, g '(x-1) represents a derivative of the gamma characteristic function when the input value is x-1, and g' (x) represents a derivative of the gamma characteristic function when the input value is x.
The present invention also provides an image gamma correction apparatus, comprising:
the display device comprises a first obtaining module, a second obtaining module and a control module, wherein the first obtaining module is used for obtaining a gamma characteristic function corresponding to the display device, which is constructed according to a gamma value and a bit width of the display device, wherein a brightness value before correction is used as an input value of the gamma characteristic function, and a brightness value after correction is used as an output value of the gamma characteristic function;
the second acquisition module is used for acquiring an initial output value when the input value of the gamma characteristic function is an initial brightness value and a derivative of the gamma characteristic function when the input value is the initial brightness value, wherein the initial output value is stored in advance;
a recursion module, configured to recur to obtain an output value when the input value of the gamma characteristic function is each brightness value according to the initial output value, the derivative, and a prestored recursion formula, where each brightness value is a brightness value other than the initial brightness value;
the construction module is used for constructing a gamma corresponding table according to the initial brightness value and the initial output value, each brightness value and the output value when the input value of the gamma characteristic function is the corresponding brightness value;
and the correction module is used for carrying out gamma correction on the image input into the display equipment according to the constructed gamma corresponding table.
In the apparatus, the gamma characteristic function corresponding to the display device, which is constructed according to the gamma value and the bit width of the display device, is as follows:
wherein γ represents a gamma value of the display device, n represents a bit width of the display device, x represents a pre-correction brightness value of the display device, and 1 ≦ x ≦ 2n-1, x is an integer.
In the apparatus, when the gamma value of the display device is less than 1, the initial brightness value is 1, the initial output value when the input value of the gamma characteristic function stored in advance is the initial brightness value is g (1), and the derivative of the gamma characteristic function when the input value is the initial brightness value is g' (1).
In the device, the recurrence formula is as follows:
wherein,g (x +1) represents an output value when the input value of the gamma characteristic function is x +1, g (x) represents an output value when the input value of the gamma characteristic function is x, and g' (x +1) represents an output value when the input value of the gamma characteristic function is x +1The derivative, g' (x), represents the derivative of the gamma characteristic function at an input value of x.
In the device, when the gamma value of the display equipment is more than 1, the initial brightness value is 2n-1, the initial output value of the pre-stored gamma characteristic function is g (2) when the input value is the initial brightness valuen-1), the derivative of the gamma characteristic function at the input value of the initial brightness value is g' (2)n-1)。
In the device, the recurrence formula is as follows:
wherein,g (x-1) represents an output value when an input value of the gamma characteristic function is x-1, g (x) represents an output value when the input value of the gamma characteristic function is x, g '(x-1) represents a derivative of the gamma characteristic function when the input value is x-1, and g' (x) represents a derivative of the gamma characteristic function when the input value is x.
The image gamma correction method and the image gamma correction device provided by the embodiment of the invention have the following beneficial effects:
the gamma characteristic function, the initial output value of the gamma characteristic function, the derivative of the gamma characteristic function when the input value is the initial brightness value and the recursion formula are only stored in the ROM in advance, when the display device operates (starts), the gamma corresponding table is constructed according to the information stored in the ROM, so that the ROM storage space is saved, in addition, the gamma corresponding table in the embodiment of the invention saves the corrected brightness values corresponding to all the brightness values before correction, and the data difference calculation is not needed, so that the accuracy of gamma correction on the image is improved to a certain extent.
Drawings
FIG. 1 is a flowchart of an image gamma correction method according to an embodiment of the present invention;
FIG. 2 is a flowchart illustrating a first embodiment of the present invention;
FIG. 3 is a flowchart illustrating a second embodiment of the present invention;
FIG. 4 is a schematic diagram of an image gamma correction apparatus according to an embodiment of the present invention.
Detailed Description
The image gamma correction method and apparatus provided by the present invention will be described in more detail with reference to the accompanying drawings and embodiments.
An embodiment of the present invention provides an image gamma correction method, as shown in fig. 1, including:
step 101, obtaining a gamma characteristic function corresponding to a display device constructed according to a gamma value and a bit width of the display device, wherein a brightness value before correction is used as an input value of the gamma characteristic function, and a brightness value after correction is used as an output value of the gamma characteristic function.
Specifically, each display device has its corresponding gamma value γ and bit width n, and the maximum brightness value before correction of an image input to the display device is calculated to be 2 according to the bit widthn-1, after determining the maximum brightness value before correction, determining the value range of the brightness value before correction of the image input into the display device to be 0-2n-1, the pre-correction luminance value being an integer.
And taking the brightness value before correction of the image as the input value of the gamma characteristic function corresponding to the display device, wherein the output value of the gamma characteristic function is the brightness value after correction of the image.
Step 102, obtaining a pre-stored initial output value when the input value of the gamma characteristic function is an initial brightness value and a derivative of the gamma characteristic function when the input value is the initial brightness value.
Specifically, the ratio is from 0 to 2n-1, determining a brightness value as an initial brightness value, and calculating an initial output value of the gamma characteristic function when the input value is the initial brightness value and a derivative of the gamma characteristic function when the input value is the initial brightness value in advance according to the gamma characteristic function.
Step 103, obtaining an output value when the input value of the gamma characteristic function is each brightness value by recursion according to the gamma characteristic function, the initial output value, the derivative and a prestored recursion formula, wherein each brightness value is a brightness value other than the initial brightness value.
Specifically, the initial output value and the derivative of the gamma characteristic function are used as starting points according to the gamma characteristic function, the initial output value, the derivative and a prestored recurrence formula, and the derivative of the initial output value and the gamma characteristic function when the input value is an initial brightness value is used as the starting point, and the gamma characteristic function is sequentially recurred according to the prestored recurrence formula to be an output value of each brightness value, wherein each brightness value is 0-2n-1 luminance values other than the initial luminance value.
And 104, constructing a gamma corresponding table according to the initial brightness value and the initial output value, each brightness value and the output value of the gamma characteristic function when the input value is the corresponding brightness value.
Specifically, after the initial brightness value, the initial output value, and each brightness value and each output value corresponding to the brightness value are determined, the brightness value and the corresponding output value are correspondingly stored in a gamma corresponding table, so that a gamma corresponding table corresponding to the display device is constructed, that is, a corresponding relation table between the brightness value before correction and the brightness value after correction is constructed. Preferably, the constructed gamma correspondence table is stored in a memory, the gamma correspondence table is constructed and stored in the memory when the display device is operated, and the gamma correspondence table is cleared from the memory when the display device is stopped, thereby saving a ROM storage space.
And 105, performing gamma correction on the image input into the display equipment according to the constructed gamma corresponding table.
Specifically, after the gamma mapping table is constructed, after the image to be corrected is input to the display device, a corrected brightness value corresponding to a pre-correction brightness value of each pixel in the image to be corrected is searched in the gamma mapping table, and when the image to be corrected is displayed on the display device, each pixel of the image is displayed according to the corrected brightness value.
According to the embodiment of the invention, only the gamma characteristic function, the initial output value of the gamma characteristic function, the derivative of the gamma characteristic function when the input value is the initial brightness value and the recursion formula are stored in the ROM in advance, when the display device runs (starts), the gamma corresponding table is constructed according to the information stored in the ROM, so that the storage space of the ROM is saved, and in addition, the gamma corresponding table in the embodiment of the invention stores all the corrected brightness values corresponding to the brightness values before correction, and the data difference calculation is not needed, so that the accuracy of gamma correction on the image is improved to a certain extent.
Preferably, according to the gamma value and the bit width of the display device, the constructed gamma characteristic function corresponding to the display device is as follows:
wherein γ represents a gamma value of the display device, n represents a bit width of the display device, x represents a pre-correction brightness value of the display device, and 1 ≦ x ≦ 2n-1, x is an integer.
It should be noted that, in the following description,is shown by (2)n-1) withThe product of (a).
Preferably, when the gamma value of the display device is less than 1, the initial brightness value is defined as 1, and then the pre-stored initial output value of the gamma characteristic function when the input value is the initial brightness value is g (1), and the derivative of the gamma characteristic function when the input value is the initial brightness value is g' (1). Wherein,
when the gamma value of the display device is less than 1, the recurrence formula is:
(hereinafter referred to as recurrence formula 1)
Wherein,(hereinafter, referred to as formula 2), g (x +1) represents an output value when the input value of the gamma characteristic function is x +1, g (x) represents an output value when the input value of the gamma characteristic function is x, g '(x +1) represents a derivative of the gamma characteristic function when the input value is x +1, and g' (x) represents a derivative of the gamma characteristic function when the input value is x.
It should be noted that, in the following description,denotes g' (x) andthe product of (a).
In specific implementation, the input value x of the gamma characteristic function is sequentially 1-2n-1, an output value according to a previous input value, andthe derivative of the horse-character function at the previous input value determines the output value of the current input value. For example, according to the recurrence formula, the initial output value, g (1), and g' (1), the output value g (2) when the input value of the gamma characteristic function is 2 is recurred, and thenWherein,according to the recurrence formula, the input values 2, g (2) and g' (2), the output value g (3) when the input value of the gamma characteristic function is 3 is recurred, thenWherein,the recursion mode of the output value when the residual brightness value is used as the input value of the gamma characteristic function is similar to the recursion mode of g (2) and g (3), and the details are not repeated here.
The above-mentioned recursion formula 1 and formula 2 are only one preferred embodiment, and the recursion formula 1 may also be g (x +1) ═ g (x) + g' (x), and the corresponding formula 2 may also beOr the recursive formula 1 and the corresponding formula 2 may also be in other forms, which are not limited herein.
Preferably, when the gamma value of the display device is greater than 1, the initial brightness value is defined to be 2n-1, the initial output value of the pre-stored gamma characteristic function is g (2) when the input value is the initial brightness valuen-1), the derivative of the gamma characteristic function at the input value of the initial brightness value is g' (2)n-1). Wherein, g (2)n-1)=(2n-1),g'(2n-1)=0
When the gamma value of the display device is greater than 1, the recurrence formula is:
(hereinafter referred to as recurrence formula 3)
Wherein,(hereinafter, referred to as formula 4), g (x-1) represents an output value when the input value of the gamma characteristic function is x-1, g (x) represents an output value when the input value of the gamma characteristic function is x, g '(x-1) represents a derivative of the gamma characteristic function when the input value is x-1, and g' (x) represents a derivative of the gamma characteristic function when the input value is x.
In specific implementation, the input value x of the gamma characteristic function is sequentially set to 2n1-1, determining the output value of the current input value based on the output value of the previous input value and the derivative of the gamma characteristic function at the previous input value. For example, according to a recurrence formula, an initial output value, g (2)n-1) and g' (2)n-1) input value of the recursive gamma characteristic function is 2nOutput value g (2) at-2n-2) thenWherein,according to a recurrence formula, input value 2n-2、g(2n-2) and g' (2)n-2) input value of the recursive gamma characteristic function is 2nOutput value g (2) at-3n-3),Wherein,recursion mode of output value when residual brightness value is used as input value of gamma characteristic functionAnd g (2)n-2) and g (2)nThe recursion mode of-3) is similar and is not described in detail here.
The above recursion formulas 3 and 4 are only one preferred embodiment, and the recursion formula 3 may also be g (x-1) ═ g (x) -g' (x-1), and the corresponding formula 4 may also be g (x-1)Or the recursive formula 3 and the corresponding formula 4 may also be in other forms, which are not limited herein.
Preferably, when the gamma value of the display device is equal to 1, the gamma characteristic function is g (x) x, and in this case, the corrected brightness value corresponding to each pre-correction brightness value can be obtained by recursion directly according to the gamma characteristic function and the brightness value, and the range of the brightness value is: 1 to 2n-1。
Specifically, the recurrence formula 1 is derived in the following manner:
let the Taylor series expansion formula of the gamma characteristic function at point a be:
taking the first three terms of the Taylor series expansion formula, namely:
let x be x +1, and a be x, substitute into the formulaThe following formula is obtained:
wherein the higher order derivatives are approximated by the lower order inverse,then
Will be provided withSubstitution formulaThe following recursion equation 1 is obtained:
equation 2 is derived in the following manner:
1. after finishing the gamma characteristic function, obtainingWherein the former factor is a constant and for the latter factor, let
2. To findA derivative of, andthe following equation is obtained:
3. the formula obtained in 2 is used for finishing to obtain:
4. substituting the formula in 3 into the recursive formula 1 can obtain:
after the formula is finished, the compound can be obtained:
5. let f (x) g (x) in 4 be given by equation 2:
specifically, the recursion equations 3 and 4 can be derived from the recursion equations 1 and 2, and are not described in detail herein.
The following sets of specific embodiments, which will explain in detail the implementation process of constructing the gamma mapping table according to the embodiment of the present invention,
example 1
Assuming that the gamma value of the display device is less than 1 and the bit width is 12, the gamma characteristic function corresponding to the display device is:then a gamma is constructed using an embodiment of the inventionThe implementation process of the horse correspondence table, as shown in fig. 2, includes:
in step 201, a gamma characteristic function corresponding to a display device, an initial output value when an input value of the gamma characteristic function stored in advance is 1, and a derivative of the gamma characteristic function when the input value is 1 are obtained.
And 202, respectively enabling the value of x to be 1-4095 according to a recursion formula 1, namely enabling an initial output value when the input value of the gamma characteristic function is 1 and a derivative of the gamma characteristic function when the input value is 1, and obtaining an output value when the input value of the gamma characteristic function is 2-4095.
And step 203, storing the corresponding relation of the output values of the gamma functions corresponding to 1-4095 into a gamma corresponding table.
Example 2
Assuming that the gamma value of the display device is greater than 1 and the bit width is 12, the gamma characteristic function corresponding to the display device is:the implementation process of constructing the gamma mapping table by using the embodiment of the present invention, as shown in fig. 3, includes:
step 301, acquiring a gamma characteristic function corresponding to the display device, an initial output value when the input value of the gamma characteristic function is 4095 and a derivative of the gamma characteristic function when the input value is 4095, which are stored in advance.
And 302, respectively enabling the value of x to be 4095-1 according to a recursion formula 3 and an initial output value when the input value of the gamma characteristic function is 4095 and a derivative of the gamma characteristic function when the input value is 4095, so as to obtain an output value when the input value of the gamma characteristic function is 4095-2.
And 303, storing the corresponding relation of the output values of the gamma functions corresponding to 4095-1 in a gamma corresponding table.
Example 3
Assuming that the gamma value of the display device is equal to 1 and the bit width is 12, the gamma characteristic function corresponding to the display device is: if g (x) x, the implementation process of constructing the gamma mapping table by using the embodiment of the present invention includes: enabling x to sequentially take values of 1-4095, and calculating to obtain g (1) -g (4095); and storing g (1) -g (4095) correspondences corresponding to 1-4095 in a gamma correspondence table.
Based on the same inventive concept as the image gamma correction method provided in the above embodiment, an embodiment of the present invention further provides an image gamma correction apparatus, as shown in fig. 4, including:
a first obtaining module 401, configured to obtain a gamma characteristic function corresponding to a display device, where a gamma value of the display device and a bit width of the display device are constructed, a pre-correction brightness value is used as an input value of the gamma characteristic function, and a post-correction brightness value is used as an output value of the gamma characteristic function;
a second obtaining module 402, configured to obtain an initial output value when an input value of the gamma characteristic function is an initial brightness value and a derivative of the gamma characteristic function when the input value is the initial brightness value, which are stored in advance;
a recursion module 403, configured to recur to obtain output values when the input value of the gamma characteristic function is each brightness value according to the initial output value, the derivative, and a prestored recursion formula, where each brightness value is a brightness value other than the initial brightness value;
a constructing module 404, configured to construct a gamma mapping table according to the initial brightness value and the initial output value, each brightness value, and the output value when the input value of the gamma characteristic function is the corresponding brightness value;
and a correction module 405, configured to perform gamma correction on the image input to the display device according to the constructed gamma correspondence table.
Preferably, the gamma characteristic function corresponding to the display device constructed according to the gamma value and the bit width of the display device is as follows:
wherein γ represents a gamma value of the display device, n represents a bit width of the display device, x represents a pre-correction brightness value of the display device, and 1 ≦ x ≦ 2n-1, x is an integer.
Preferably, when the gamma value of the display device is less than 1, the initial brightness value is 1, the pre-stored initial output value of the gamma characteristic function is g (1) when the input value is the initial brightness value, and the derivative of the gamma characteristic function is g' (1) when the input value is the initial brightness value.
Preferably, the recurrence formula is:
wherein,g (x +1) represents an output value when the input value of the gamma characteristic function is x +1, g (x) represents an output value when the input value of the gamma characteristic function is x, g '(x +1) represents a derivative of the gamma characteristic function when the input value is x +1, and g' (x) represents a derivative of the gamma characteristic function when the input value is x.
Preferably, when the gamma value of the display device is greater than 1, the initial brightness value is 2n-1, the initial output value of the pre-stored gamma characteristic function is g (2) when the input value is the initial brightness valuen-1), the derivative of the gamma characteristic function at the input value of the initial brightness value is g' (2)n-1)。
Preferably, the recurrence formula is:
wherein,g (x-1) represents an output value when an input value of the gamma characteristic function is x-1, g (x) represents an output value when the input value of the gamma characteristic function is x, g '(x-1) represents a derivative of the gamma characteristic function when the input value is x-1, and g' (x) represents a derivative of the gamma characteristic function when the input value is x.
The image gamma correction method and the image gamma correction device provided by the embodiment of the invention have the following beneficial effects:
the gamma characteristic function, the initial output value of the gamma characteristic function, the derivative of the gamma characteristic function when the input value is the initial brightness value and the recursion formula are only stored in the ROM in advance, when the display device operates (starts), the gamma corresponding table is constructed according to the information stored in the ROM, so that the ROM storage space is saved, in addition, the gamma corresponding table in the embodiment of the invention saves the corrected brightness values corresponding to all the brightness values before correction, and the data difference calculation is not needed, so that the accuracy of gamma correction on the image is improved to a certain extent.
The present invention has been described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While preferred embodiments of the present invention have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including preferred embodiments and all such alterations and modifications as fall within the scope of the invention.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present invention without departing from the spirit and scope of the invention. Thus, if such modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is intended to include such modifications and variations.

Claims (12)

1. An image gamma correction method, comprising:
acquiring a gamma characteristic function corresponding to display equipment, which is constructed according to a gamma value and bit width of the display equipment, wherein a brightness value before correction is used as an input value of the gamma characteristic function, and a brightness value after correction is used as an output value of the gamma characteristic function;
acquiring a pre-stored initial output value when the input value of the gamma characteristic function is an initial brightness value and a derivative of the gamma characteristic function when the input value is the initial brightness value;
according to the initial output value, the derivative and a prestored recursion formula, recursion is carried out to obtain an output value when the input value of the gamma characteristic function is each brightness value, wherein each brightness value is a brightness value except the initial brightness value;
constructing a gamma corresponding table according to the initial brightness value and the initial output value, each brightness value and the output value when the input value of the gamma characteristic function is the corresponding brightness value;
and performing gamma correction on the image input into the display equipment according to the constructed gamma corresponding table.
2. The method of claim 1, wherein the gamma characteristic function corresponding to the display device is constructed according to the gamma value and the bit width of the display device as follows:
wherein γ represents a gamma value of the display device, n represents a bit width of the display device, x represents a pre-correction brightness value of the display device, and 1 ≦ x ≦ 2n-1, x is an integer.
3. The method of claim 2, wherein the initial brightness value is 1 when the gamma value of the display device is less than 1, the initial output value of the gamma characteristic function stored in advance is g (1) when the input value is the initial brightness value, and the derivative of the gamma characteristic function is g' (1) when the input value is the initial brightness value.
4. The method of claim 3, wherein the recurrence formula is:
g ( x + 1 ) = g ( x ) + g ′ ( x ) + g ′ ( x + 1 ) 2
wherein,g (x +1) represents an output value when an input value of the gamma characteristic function is x +1, g (x) represents an output value when the input value of the gamma characteristic function is x, g '(x +1) represents a derivative of the gamma characteristic function when the input value is x +1, and g' (x) represents a derivative of the gamma characteristic function when the input value is x.
5. The method of claim 2, wherein the initial brightness value is 2 when the gamma value of the display device is greater than 1n-1, the initial output value of the pre-stored gamma characteristic function is g (2) when the input value is the initial brightness valuen-1), the derivative of the gamma characteristic function at the input value of the initial brightness value is g' (2)n-1)。
6. The method of claim 5, wherein the recurrence formula is:
g ( x - 1 ) = g ( x ) - g ′ ( x - 1 ) + g ′ ( x ) 2
wherein,g (x-1) represents an output value when an input value of the gamma characteristic function is x-1, g (x) represents an output value when the input value of the gamma characteristic function is x, g '(x-1) represents a derivative of the gamma characteristic function when the input value is x-1, and g' (x) represents a derivative of the gamma characteristic function when the input value is x.
7. An image gamma correction apparatus, comprising:
the display device comprises a first obtaining module, a second obtaining module and a control module, wherein the first obtaining module is used for obtaining a gamma characteristic function corresponding to the display device, which is constructed according to a gamma value and a bit width of the display device, wherein a brightness value before correction is used as an input value of the gamma characteristic function, and a brightness value after correction is used as an output value of the gamma characteristic function;
the second acquisition module is used for acquiring an initial output value when the input value of the gamma characteristic function is an initial brightness value and a derivative of the gamma characteristic function when the input value is the initial brightness value, wherein the initial output value is stored in advance;
a recursion module, configured to recur to obtain an output value when the input value of the gamma characteristic function is each brightness value according to the initial output value, the derivative, and a prestored recursion formula, where each brightness value is a brightness value other than the initial brightness value;
the construction module is used for constructing a gamma corresponding table according to the initial brightness value and the initial output value, each brightness value and the output value when the input value of the gamma characteristic function is the corresponding brightness value;
and the correction module is used for carrying out gamma correction on the image input into the display equipment according to the constructed gamma corresponding table.
8. The apparatus as claimed in claim 7, wherein the gamma characteristic function corresponding to the display device constructed according to the gamma value and bit width of the display device is:
wherein γ represents a gamma value of the display device, n represents a bit width of the display device, x represents a pre-correction brightness value of the display device, and 1 ≦ x ≦ 2n-1, x is an integer.
9. The apparatus of claim 8, wherein the initial brightness value is 1 when the gamma value of the display device is less than 1, the initial output value of the gamma characteristic function stored in advance is g (1) when the input value is the initial brightness value, and the derivative of the gamma characteristic function is g' (1) when the input value is the initial brightness value.
10. The apparatus of claim 9, wherein the recurrence formula is:
g ( x + 1 ) = g ( x ) + g ′ ( x ) + g ′ ( x + 1 ) 2
wherein,g (x +1) represents an output value when an input value of the gamma characteristic function is x +1, g (x) represents an output value when the input value of the gamma characteristic function is x, g '(x +1) represents a derivative of the gamma characteristic function when the input value is x +1, and g' (x) represents a derivative of the gamma characteristic function when the input value is x.
11. The apparatus of claim 8, wherein the initial brightness value is 2 when the gamma value of the display device is greater than 1n-1, the initial output value of the pre-stored gamma characteristic function is g (2) when the input value is the initial brightness valuen-1), the derivative of the gamma characteristic function at the input value of the initial brightness value is g' (2)n-1)。
12. The apparatus of claim 11, wherein the recurrence formula is:
g ( x - 1 ) = g ( x ) - g ′ ( x - 1 ) + g ′ ( x ) 2
wherein,g (x-1) represents an output value when an input value of the gamma characteristic function is x-1, g (x) represents an output value when the input value of the gamma characteristic function is x, g '(x-1) represents a derivative of the gamma characteristic function when the input value is x-1, and g' (x) represents a derivative of the gamma characteristic function when the input value is x.
CN201610595942.8A 2016-07-25 2016-07-25 A kind of image gamma correction method and device Pending CN106960419A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610595942.8A CN106960419A (en) 2016-07-25 2016-07-25 A kind of image gamma correction method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610595942.8A CN106960419A (en) 2016-07-25 2016-07-25 A kind of image gamma correction method and device

Publications (1)

Publication Number Publication Date
CN106960419A true CN106960419A (en) 2017-07-18

Family

ID=59481679

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610595942.8A Pending CN106960419A (en) 2016-07-25 2016-07-25 A kind of image gamma correction method and device

Country Status (1)

Country Link
CN (1) CN106960419A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109448644A (en) * 2018-10-11 2019-03-08 广州视源电子科技股份有限公司 Method for correcting gray scale display curve of display device, electronic device and computer readable storage medium
CN115731139A (en) * 2022-12-08 2023-03-03 深圳明锐理想科技有限公司 Image correction method and electronic equipment

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101556759A (en) * 2008-04-02 2009-10-14 英属开曼群岛商恒景科技股份有限公司 Apparatus and method for gamma correction
CN102376082A (en) * 2010-08-06 2012-03-14 株式会社理光 Image processing method and device based on gamma correction
CN102761749A (en) * 2012-07-25 2012-10-31 四川虹微技术有限公司 Device for generating gamma correction data table of plasma TV video image
CN103440656A (en) * 2013-08-27 2013-12-11 华南理工大学 Image Gamma correction method for creating lookup table based on Taylor series fitting
CN103700335A (en) * 2013-12-26 2014-04-02 Tcl新技术(惠州)有限公司 Method and device for adjusting target Gamma curve
CN104954771A (en) * 2014-03-31 2015-09-30 佳能株式会社 Image processing apparatus that performs tone correction, image processing method, and storage medium
CN105575326A (en) * 2016-02-16 2016-05-11 深圳市华星光电技术有限公司 Method for calibrating brightness unevenness of OLED (Organic Light Emitting Diode) display panel

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101556759A (en) * 2008-04-02 2009-10-14 英属开曼群岛商恒景科技股份有限公司 Apparatus and method for gamma correction
CN102376082A (en) * 2010-08-06 2012-03-14 株式会社理光 Image processing method and device based on gamma correction
CN102761749A (en) * 2012-07-25 2012-10-31 四川虹微技术有限公司 Device for generating gamma correction data table of plasma TV video image
CN103440656A (en) * 2013-08-27 2013-12-11 华南理工大学 Image Gamma correction method for creating lookup table based on Taylor series fitting
CN103700335A (en) * 2013-12-26 2014-04-02 Tcl新技术(惠州)有限公司 Method and device for adjusting target Gamma curve
CN104954771A (en) * 2014-03-31 2015-09-30 佳能株式会社 Image processing apparatus that performs tone correction, image processing method, and storage medium
CN105575326A (en) * 2016-02-16 2016-05-11 深圳市华星光电技术有限公司 Method for calibrating brightness unevenness of OLED (Organic Light Emitting Diode) display panel

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109448644A (en) * 2018-10-11 2019-03-08 广州视源电子科技股份有限公司 Method for correcting gray scale display curve of display device, electronic device and computer readable storage medium
CN109448644B (en) * 2018-10-11 2021-07-16 广州视源电子科技股份有限公司 Method for correcting gray scale display curve of display device, electronic device and computer readable storage medium
CN115731139A (en) * 2022-12-08 2023-03-03 深圳明锐理想科技有限公司 Image correction method and electronic equipment
CN115731139B (en) * 2022-12-08 2023-09-01 深圳明锐理想科技有限公司 Image correction method and electronic device

Similar Documents

Publication Publication Date Title
CN108039143B (en) Gamma circuit adjusting method and device
CN107799081B (en) Gamma corrects system and its bearing calibration
US20220020309A1 (en) Control Method and Control Apparatus for Brightness of Display Panel, Storage Medium and Processor
EP3131084A1 (en) Image processing device with image compensation function and image processing method thereof
CN109036333B (en) Display parameter correction method and device of display, terminal equipment and storage medium
US20100225663A1 (en) Method for creating gamma look-up table and display device
US10580122B2 (en) Method and system for image enhancement
CN107644607A (en) The color temperature adjusting method and display device of display panel
CN109616080B (en) Special-shaped screen contour compensation method and terminal
RU2017104887A (en) METHOD AND SYSTEM OF IMAGE IMAGE
CN106409212B (en) Gamma curve adjusting method and device
CN105702219A (en) Image display device, correction data generation method, and image correction device and method, as well as image correction system
CN114005404B (en) Segmented correction method and device for processing seam repair hidden line and computer equipment
JP2023519275A (en) Display effect enhancement method, device, facility
CN114882843A (en) Method and device for compensating brightness of display panel and computer readable storage medium
CN109754372B (en) Image defogging method and device
CN106960419A (en) A kind of image gamma correction method and device
CN108055486A (en) A kind of brightness correcting method and device
US20110228168A1 (en) Real-Time image processing circuit capable of enhancing brightness contrast and color saturation
CN103413337A (en) Color fog generation method based on human-machine interaction
CN108600724B (en) Method and equipment for adjusting gamma curve
CN117896508A (en) Standard light source-based image white balance processing method and device
CN108170391B (en) Page display method and device and electronic equipment
CN102903091A (en) Method for stitching image in digital image processing apparatus
CN111462278A (en) Depth-based material sorting rendering method, medium, equipment and device

Legal Events

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

Application publication date: 20170718