CN106846273A - A kind of method and device of Gamma corrections - Google Patents
A kind of method and device of Gamma corrections Download PDFInfo
- Publication number
- CN106846273A CN106846273A CN201710049656.6A CN201710049656A CN106846273A CN 106846273 A CN106846273 A CN 106846273A CN 201710049656 A CN201710049656 A CN 201710049656A CN 106846273 A CN106846273 A CN 106846273A
- Authority
- CN
- China
- Prior art keywords
- gray
- value
- coordinate
- gray value
- correction
- 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
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T5/00—Image enhancement or restoration
- G06T5/80—Geometric correction
Landscapes
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Picture Signal Circuits (AREA)
- Facsimile Image Signal Circuits (AREA)
Abstract
The embodiment of the invention discloses a kind of method and device of Gamma corrections.The method includes:Corresponding coordinate gray value is searched in gamma curve mapping table according to input gray level value;If finding identical coordinate gray value, corresponding correction gray value is obtained from gamma curve mapping table, as output gray level value;If searched less than identical coordinate gray value, corresponding correction gray value is obtained according to the two neighboring coordinate gray value for finding, and interpolation calculation is carried out to two correction gray values, as output gray level value;Wherein, in gamma curve mapping table, the difference between adjacent coordinates gray value is 2 positive integer power, and each coordinate gray value meets gamma curve relation with the corresponding relation of correction gray value.Technical scheme provided in an embodiment of the present invention, makes the overall brightness of image get a promotion, and is strengthened the contrast at low gray scale, and avoids the computing of complexity.
Description
Technical field
The present embodiments relate to image processing techniques, more particularly to the method and device that a kind of Gamma is corrected.
Background technology
Gamma corrections are the nonlinear operations that are carried out to input picture gray value, are at common one kind in image procossing
Reason method.Gamma corrections make the overall brightness of image get a promotion, while the contrast at low gray scale is strengthened, more conducively
Differentiate the image detail of low gray value.
Traditional Gamma corrections implementation method includes:Loop up table and 16 piecewise approximations.Loop up table is to be input into
The gray value mapping relations of output are stored in hardware memory, corresponding to deposit using input gray level value as the address of memory
Output gray level value is deposited in memory address.Preferable Gamma mapping relations are a curves, and 16 piecewise approximations are in curve
16 datum marks of upper selection, the Gamma mapping relations of datum are identical with preferable gamma curve, and the Gamma of other parts reflects
Relation is penetrated using the line between adjacent reference point come approximate.
The advantage of loop up table is high precision, however it is necessary that hardware memory stores Gamma grey scale mapping relations, is taken
Compare multiple resource, it is relatively costly.16 piecewise approximations choose 16 datum marks, the Gamma mapping relations in addition to datum mark
Using the line between adjacent reference point come approximate, there is larger error in approximation and preferable Gamma mapping relations, and due to
The gray value of datum mark is in the absence of substantially certain regularity of distribution, and computing is complicated.
The content of the invention
The embodiment of the present invention provides a kind of Gamma method and device of correction, to save hardware memory, while reduce with
Error between preferable Gamma mapping relations, reduces complicated computing.
In a first aspect, the embodiment of the invention provides a kind of method of Gamma corrections, the method includes:
Obtain the input gray level value of pixel to be corrected;
Corresponding coordinate gray value is searched in gamma curve mapping table according to the input gray level value;
If finding identical coordinate gray value, corresponding correction ash is obtained from the gamma curve mapping table
Angle value, as output gray level value;
If searched less than identical coordinate gray value, correspondence is obtained according to the two neighboring coordinate gray value for finding
Correction gray value, and to two correction gray values carry out interpolation calculation, as output gray level value;
The input gray level value is corrected according to the output gray level value;
Wherein, in gamma curve mapping table, the difference between adjacent coordinates gray value is 2 positive integer power, each described
Coordinate gray value meets gamma curve relation with the corresponding relation of correction gray value.
Further, in the gamma curve mapping table, the difference of the coordinate gray value of low gray scale interval is less than gray area high
Between coordinate gray value difference.
Further, the quantity of the coordinate gray value is 64.
Further, in the 1st coordinate gray value to the 33rd coordinate gray value, the difference of adjacent coordinates gray value is 2
1 power;
In the 33rd coordinate gray value to the 49th coordinate gray value, the difference of adjacent coordinates gray value is 22 power;
In the 49th coordinate gray value to the 64th coordinate gray value, the difference of adjacent coordinates gray value is 23 power.
Further, interpolation calculation is carried out to two correction gray values, as output gray level value, including:
Interpolation calculation is carried out according to equation below, output gray level value is obtained:
Y=Yn+((Yn+1-Yn)*(X-Xn)/(Xn+1-Xn))
Wherein, XnAnd Xn+1Two adjacent coordinate gray values, Y are represented respectivelynAnd Yn+1Two coordinate gray values are represented respectively
XnAnd Xn+1Corresponding correction gray value, X represents input gray level value, and Y represents output gray level value.
Further,
Corresponding coordinate gray value is searched in gamma curve mapping table according to the input gray level value includes:
The input gray level value is converted into binary form;
The coordinate gray value of binary storage in binary input gray level value and gamma curve mapping table is carried out into step-by-step
Compare, to search identical coordinate gray value;
Accordingly, interpolation calculation is carried out to two correction gray values, is included as output gray level value:
Two for binary form correct gray value, obtain two differences of correction gray value;
By and the binary digit of difference of described two correction gray values carry out moving to right bit arithmetic, to obtain interpolation, as institute
State output gray level value.
Second aspect, the embodiment of the present invention additionally provides a kind of device of Gamma corrections, and the device includes:
Input gray level value acquisition module, the input gray level value for obtaining pixel to be corrected;
Coordinate gray value searching modul, for searching correspondence in gamma curve mapping table according to the input gray level value
Coordinate gray value;
Correction gray value acquisition module, if for finding identical coordinate gray value, reflected from the gamma curve
Corresponding correction gray value is obtained in firing table, as output gray level value;
Interpolation calculation module, if for searching less than identical coordinate gray value, it is two neighboring according to what is found
Coordinate gray value obtains corresponding correction gray value, and carries out interpolation calculation to two correction gray values, used as output gray level value;
Input gray level value correction module, for correcting the input gray level value according to the output gray level value;
Wherein, in gamma curve mapping table, the difference between adjacent coordinates gray value is 2 positive integer power, each described
Coordinate gray value meets gamma curve relation with the corresponding relation of correction gray value.
Further,
In the gamma curve mapping table, the coordinate of the difference less than gray scale interval high of the coordinate gray value of low gray scale interval
The difference of gray value.
Further, the quantity of the coordinate gray value is 64.
Further,
In the 1st coordinate gray value to the 33rd coordinate gray value, the difference of adjacent coordinates gray value is 21 power;
In the 33rd coordinate gray value to the 49th coordinate gray value, the difference of adjacent coordinates gray value is 22 power;
In the 49th coordinate gray value to the 64th coordinate gray value, the difference of adjacent coordinates gray value is 23 power.
Further, the interpolation calculation module, specifically for:
Interpolation calculation is carried out according to equation below, output gray level value is obtained:
Y=Yn+((Yn+1-Yn)*(X-Xn)/(Xn+1-Xn))
Wherein, XnAnd Xn+1Two adjacent coordinate gray values, Y are represented respectivelynAnd Yn+1Two coordinate gray values are represented respectively
XnAnd Xn+1Corresponding correction gray value, X represents input gray level value, and Y represents output gray level value.
Further, the coordinate gray value searching modul, including:
Input gray level value conversion unit, for the input gray level value to be converted into binary form;
Step-by-step comparing unit, for by binary storage in binary input gray level value and gamma curve mapping table
Coordinate gray value is carried out by bit comparison, to search identical coordinate gray value;
Accordingly, the interpolation calculation module, including:
The difference acquiring unit of gray value is corrected, for two correction gray values for binary form, two schools is obtained
The difference of positive gray value;
Dextroposition arithmetic element, for the binary digit of the difference of described two correction gray values to be carried out moving to right bit arithmetic,
To obtain interpolation, as the output gray level value.
The method and device of Gamma provided in an embodiment of the present invention correction, by search in gamma curve mapping table with
The corresponding coordinate gray value of input gray level value, if finding identical coordinate gray value, from the gamma curve mapping table
It is middle to obtain corresponding correction gray value, as output gray level value;If searched less than identical coordinate gray value, according to lookup
The two neighboring coordinate gray value for arriving obtains corresponding correction gray value, and carries out interpolation calculation to two correction gray values, makees
It is output gray level value, realizes the nonlinear operation to input picture gray value, the overall brightness of image is got a promotion, makes low
Contrast at gray scale is strengthened.Wherein, the difference between adjacent coordinates gray value is 2 positive integer power, each seat
Mark gray value meets gamma curve relation with the corresponding relation of correction gray value so that carrying out interpolation calculation output gray level value
When, the division arithmetic of complexity can be avoided.
Brief description of the drawings
The present invention is described in further detail with reference to the accompanying drawings and examples.It is understood that this place is retouched
The specific embodiment stated is used only for explaining the present invention, rather than limitation of the invention.It also should be noted that, in order to just
Part rather than entire infrastructure related to the present invention is illustrate only in description, accompanying drawing.
Fig. 1 is a kind of method flow diagram of Gamma corrections that the embodiment of the present invention one is provided;
Fig. 2 is a kind of method flow diagram of Gamma corrections that the embodiment of the present invention three is provided;
Fig. 3 is a kind of structural representation of the device of Gamma corrections that the embodiment of the present invention four is provided.
Specific embodiment
The present invention is described in further detail with reference to the accompanying drawings and examples.It is understood that this place is retouched
The specific embodiment stated is used only for explaining the present invention, rather than limitation of the invention.It also should be noted that, in order to just
Part rather than entire infrastructure related to the present invention is illustrate only in description, accompanying drawing.
Embodiment one
Fig. 1 is a kind of method flow diagram of Gamma corrections that the embodiment of the present invention one is provided, and the present embodiment can be used for
Gamma is corrected, and the method can be performed by Gamma means for correctings, and the device can be realized by the mode of software and/or hardware,
The device can be integrated in any intelligent terminal with image processing function, and in implementing, intelligent terminal may include:It is flat
The mobile terminals such as plate computer, smart mobile phone, above-mentioned terminal is only citing, and non exhaustive, including but not limited to above-mentioned intelligent terminal.
Referring to the method that Fig. 1, the Gamma are corrected, including:
S110, the input gray level value for obtaining pixel to be corrected.
S120, corresponding coordinate gray value is searched in gamma curve mapping table according to the input gray level value.
In the present embodiment, in gamma curve mapping table, comprising multiple datum marks pair, the abscissa of each datum mark
Denotation coordination gray value, ordinate represents correction gray value.Wherein, the difference between adjacent coordinates gray value is 2 positive integer
Power, each coordinate gray value meets gamma curve relation with the corresponding relation of correction gray value.Exemplary, use respectively
XnAnd Xn+1Represent adjacent two coordinates gray value, Xn+1-Xn=2mWherein, m=1,2,3 ....Difference i.e. between adjacent coordinates gray value
Value can be 2, can be 4, can also be 8, and the present embodiment is not limited this.The input of the pixel to be corrected that will be obtained
Gray value is compared with the coordinate gray value in gamma curve mapping table, searches whether there is corresponding coordinate gray value.
If S130, finding identical coordinate gray value, corresponding school is obtained from the gamma curve mapping table
Positive gray value, as output gray level value.
If the gray value of input is equal to the coordinate gray value of certain datum mark in gamma curve mapping table, the seat is obtained
The mark corresponding correction gray value of gray value, and using the correction gray value as the corresponding output gray level value of input gray level value.
If S140, lookup are obtained less than identical coordinate gray value according to the two neighboring coordinate gray value for finding
Corresponding correction gray value is taken, and interpolation calculation is carried out to two correction gray values, as output gray level value.
If in gamma curve mapping table, searched less than the coordinate gray value with input gray level value correspondent equal, then look into
Look for and compare input gray level value between any two adjacent reference points corresponding coordinate gray value, and respectively obtain two adjacent seats
The corresponding correction gray value of mark gray value.According to input gray level value, two neighboring coordinate gray value and corresponding two corrections ash
Angle value carries out interpolation calculation, obtains the corresponding output gray level value of input gray level value.Exemplary, row interpolation is entered according to equation below
Calculate, obtain output gray level value:
Y=Yn+((Yn+1-Yn)*(X-Xn)/(Xn+1-Xn))
Wherein, XnAnd Xn+1Two adjacent coordinate gray values, Y are represented respectivelynAnd Yn+1Two coordinate gray values are represented respectively
XnAnd Xn+1Corresponding correction gray value, X represents input gray level value, and Y represents output gray level value.
S150, the input gray level value is corrected according to the output gray level value.
The output gray level value that obtains or the output gray level value that obtains by interpolation calculation as input gray level value pair will be searched
The corrected value answered, carries out lookup calculating to each input gray level value successively, completes the correction of all input gray level values.
The method of the Gamma corrections that this implementation is provided, searches and input gray level value pair by gamma curve mapping table
The coordinate gray value answered, if finding identical coordinate gray value, obtains corresponding from the gamma curve mapping table
Correction gray value, as output gray level value;It is two neighboring according to what is found if searched less than identical coordinate gray value
Coordinate gray value obtains corresponding correction gray value, and carries out interpolation calculation to two correction gray values, as output gray level value,
The nonlinear operation to input picture gray value is realized, the overall brightness of image is got a promotion, make the contrast at low gray scale
Degree is strengthened.Wherein, the difference between adjacent coordinates gray value is 2 positive integer power, each coordinate gray value and school
The corresponding relation of positive gray value meets gamma curve relation so that when interpolation calculation output gray level value is carried out, and can avoid multiple
Miscellaneous division arithmetic.
As a preferred embodiment of the present embodiment, looked into gamma curve mapping table according to the input gray level value
Looking for corresponding coordinate gray value includes:The input gray level value is converted into binary form;By binary input gray level value
Carried out by bit comparison with the coordinate gray value of binary storage in gamma curve mapping table, to search identical coordinate gray value.
Accordingly, interpolation calculation is carried out to two correction gray values, is included as output gray level value:For two schools of binary form
Positive gray value, obtains two differences of correction gray value;By and the binary digit of difference of described two correction gray values moved to right
Bit arithmetic, to obtain interpolation, as the output gray level value.
In the present embodiment, gamma curve mapping table need to be stored in hardware memory in binary form, that is, is sat
Mark gray value corrects gray value and is stored in hardware memory in binary form correspondingly with coordinate gray value.Will be defeated
Enter gray value and be converted into binary form, and with the coordinate gray value step-by-step of binary storage in gamma curve mapping table one by one
It is compared, until each binary digit all same, then can just find and input gray level value identical coordinate gray value.
When search less than identical coordinate gray value when, by the correction gray value of the two coordinate gray values adjacent with input gray level value with
Binary form is poor.Because in gamma curve mapping table, the difference between adjacent coordinates gray value is 2 positive integer power,
So when storing in binary form, the binary form of the difference of adjacent two coordinates gray value is 10,100,1000 ....Example
Property, according to formula Y=Yn+((Yn+1-Yn)*(X-Xn)/(Xn+1-Xn)) when carrying out interpolation calculation, because divided by Xn+1-Xn, entering
During row division arithmetic, the division arithmetic of complexity can be avoided, only the dividend of binary form need to be carried out simple dextroposition
Computing, it becomes possible to obtain the result of interpolation calculation, and using interpolation result as output gray level value.
Embodiment two
The present embodiment on the basis of above-described embodiment, to gamma curve mapping table in, the difference of adjacent two coordinates gray value
Quantity with coordinate gray value is defined.
Preferably, in the gamma curve mapping table, the difference of the coordinate gray value of low gray scale interval is less than gray scale interval high
Coordinate gray value difference.
In the present embodiment, if searched in gamma curve mapping table less than identical coordinate gray value, according to lookup
The two neighboring coordinate gray value for arriving obtains corresponding correction gray value, and carries out interpolation calculation to two correction gray values, makees
During for output gray level value, the difference of adjacent two coordinates gray value is smaller, and the output gray level value precision of interpolation calculation is higher, closer to
Output gray level value in preferable gamma curve.The brightness sensation characteristic of the visual theory characteristic-human eye according to people, to brightness
Region perceptibility higher is higher than the relatively low perceptibility of brightness, and the difference of the coordinate gray value of low gray scale interval is less than gray area high
Between coordinate gray value difference.It is smaller at the adjacent two coordinates gray value interval of low gray scale interval, so enter in low gray scale interval
After row Gamma corrections, the correction accuracy to input gray level value is higher, and after correction process, dark images part details effect is more preferable.
Preferably, in gamma curve mapping table, the quantity of the coordinate gray value is 64.
The value of the gray value of each pixel is 0-255 in gray level image, totally 256 gray values.Reflected in gamma curve
In firing table, comprising 64 coordinate gray values, i.e., comprising 64 datum marks pair.In this 64 coordinate gray values, adjacent two coordinate
The difference of gray value is 2 positive integer power, and the difference of the coordinate gray value of low gray scale interval is grey less than the coordinate of gray scale interval high
The difference of angle value.Exemplary, in the 1st coordinate gray value to the 33rd coordinate gray value, the difference of adjacent coordinates gray value is 2
1 power;In the 33rd coordinate gray value to the 49th coordinate gray value, the difference of adjacent coordinates gray value is 22 power;
In the 49th coordinate gray value to the 64th coordinate gray value, the difference of adjacent coordinates gray value is 23 power.64 benchmark
The coordinate gray value of point is as shown in the table:
The method of the Gamma corrections that the present embodiment is provided, by setting 64 coordinate gray scales in gamma curve mapping table
Value so that the precision for carrying out Gamma corrections to input gray level value is higher, the output gray level value after correction is closer to preferably
Gamma curve, the error amount with preferable gamma curve is smaller, more preferable to the effect after image procossing.By setting low gray area
Between coordinate gray value difference less than gray scale interval high coordinate gray value difference so that the Gamma that low gray value interval is obtained
Curve precision is higher, more preferable by the image dark portion details effect after Gamma corrections.
Embodiment three
Fig. 2 is a kind of method flow diagram of Gamma corrections provided in an embodiment of the present invention, and the present embodiment is above-described embodiment
Two specific example, specifically includes following steps:
S210, the input gray level value for obtaining pixel to be corrected.
S220,64 coordinate gray values in the input gray level value and gamma curve mapping table are compared.
Input gray level value is compared one by one with 64 coordinate gray values in gamma curve mapping table, is searched 64
Whether there is in input gray level value identical gray value in individual coordinate gray value.
S230, judge whether input gray level value is equal to 64 coordinate gray values, if so, then perform S260, if it is not, then performing
S240。
Judge whether input gray level value is equal to certain coordinate gray value, if input gray level value is equal in 64 coordinate gray values
Certain coordinate gray value, then S260 is performed, if input gray level value is not equal to any coordinate gray scale in 64 coordinate gray values
Value, then perform S240.
S240, find the two coordinate gray values corresponding correction gray value adjacent with input gray level value.
The table search two coordinate gray values corresponding correction gray scale adjacent with input gray level value is mapped according to gamma curve
Value, exemplary, input gray level value is 53, and input gray level value is located at the 27th the coordinate gray value 52 and the 28th base of datum mark
Between coordinate gray value 54 on schedule, then the school corresponding with 53 of table search coordinate gray value 52 is mapped according to gamma curve respectively
Positive gray value.
S250, according to formula Y=Yn+((Yn+1-Yn)*(X-Xn)/(Xn+1-Xn)) carry out interpolation calculation.
S260, obtain output gray level value.
When input gray level value is equal to certain coordinate gray value, using the corresponding correction gray value of the coordinate gray value as output
Gray value, completes the correction to input gray level value;When input gray level value is not equal to certain coordinate gray value, i.e., input gray level value is situated between
When between certain adjacent two coordinates gray value, will be according to formula Y=Yn+((Yn+1-Yn)*(X-Xn)/(Xn+1-Xn)) enter row interpolation
The gray value of calculating completes the correction to input gray level value as output gray level value.
The method of the Gamma corrections that the present embodiment is provided, by setting 64 coordinate gray scales in gamma curve mapping table
Value, only needs 64 hardware store units, hardware resource is greatlyd save, while compared to 16 piecewise approximations so as to defeated
Enter gray value carry out Gamma corrections precision it is higher, the output gray level value after correction closer to preferable gamma curve, with reason
Think that the error amount of gamma curve is smaller, it is more preferable to the effect after image procossing.By the coordinate gray value for setting low gray scale interval
Difference less than gray scale interval high coordinate gray value difference so that the gamma curve precision that low gray value interval is obtained is higher, warp
The image dark portion details effect crossed after Gamma corrections is more preferable.
Example IV
Fig. 3 is a kind of structural representation of the device of Gamma corrections provided in an embodiment of the present invention, and shown device includes:
Input gray level value acquisition module 310, coordinate gray value searching modul 320, correction gray value acquisition module 330, interpolation calculation mould
Block 340 and input gray level value correction module 350, are specifically described to each module below.
Input gray level value acquisition module 310, the input gray level value for obtaining pixel to be corrected;
Coordinate gray value searching modul 320 is right for being searched in gamma curve mapping table according to the input gray level value
The coordinate gray value answered;
Correction gray value acquisition module 330, if for finding identical coordinate gray value, it is bent from the Gamma
Corresponding correction gray value is obtained in line mapping table, as output gray level value;
Interpolation calculation module 340, if for searching less than identical coordinate gray value, according to adjacent two for finding
Individual coordinate gray value obtains corresponding correction gray value, and carries out interpolation calculation to two correction gray values, used as output gray level
Value;
Input gray level value correction module 350, for correcting the input gray level value according to the output gray level value;
Wherein, in gamma curve mapping table, the difference between adjacent coordinates gray value is 2 positive integer power, each described
Coordinate gray value meets gamma curve relation with the corresponding relation of correction gray value.
Preferably, in the gamma curve mapping table, the difference of the coordinate gray value of low gray scale interval is less than gray scale interval high
Coordinate gray value difference.
Preferably, the quantity of the coordinate gray value is 64.
Preferably, in the 1st coordinate gray value to the 33rd coordinate gray value, the difference of adjacent coordinates gray value is the 1 of 2
Power;
In the 33rd coordinate gray value to the 49th coordinate gray value, the difference of adjacent coordinates gray value is 22 power;
In the 49th coordinate gray value to the 64th coordinate gray value, the difference of adjacent coordinates gray value is 23 power.
Preferably, the interpolation calculation module 340, specifically for:
Interpolation calculation is carried out according to equation below, output gray level value is obtained:
Y=Yn+((Yn+1-Yn)*(X-Xn)/(Xn+1-Xn))
Wherein, XnAnd Xn+1Two adjacent coordinate gray values, Y are represented respectivelynAnd Yn+1Two coordinate gray values are represented respectively
XnAnd Xn+1Corresponding correction gray value, X represents input gray level value, and Y represents output gray level value.
Preferably, the coordinate gray value searching modul 320, including:
Input gray level value conversion unit, for the input gray level value to be converted into binary form;
Step-by-step comparing unit, for by binary storage in binary input gray level value and gamma curve mapping table
Coordinate gray value is carried out by bit comparison, to search identical coordinate gray value;
Accordingly, the interpolation calculation module 340, including:
The difference acquiring unit of gray value is corrected, for two correction gray values for binary form, two schools is obtained
The difference of positive gray value;
Dextroposition arithmetic element, for the binary digit of the difference of described two correction gray values to be carried out moving to right bit arithmetic,
To obtain interpolation, as the output gray level value.
The device of the Gamma corrections that this implementation is provided, searches and input gray level value pair by gamma curve mapping table
The coordinate gray value answered, if finding identical coordinate gray value, obtains corresponding from the gamma curve mapping table
Correction gray value, as output gray level value;It is two neighboring according to what is found if searched less than identical coordinate gray value
Coordinate gray value obtains corresponding correction gray value, and carries out interpolation calculation to two correction gray values, as output gray level value,
The nonlinear operation to input picture gray value is realized, the overall brightness of image is got a promotion, make the contrast at low gray scale
Degree is strengthened.Wherein, the difference between adjacent coordinates gray value is 2 positive integer power, each coordinate gray value and school
The corresponding relation of positive gray value meets gamma curve relation so that when interpolation calculation output gray level value is carried out, and can avoid multiple
Miscellaneous division arithmetic.
The device of the Gamma corrections that the embodiment of the present invention is provided can perform what any embodiment of the present invention was provided
The method of Gamma corrections, possesses the corresponding functional module of execution method and beneficial effect.
Note, above are only presently preferred embodiments of the present invention and institute's application technology principle.It will be appreciated by those skilled in the art that
The invention is not restricted to specific embodiment described here, can carry out for a person skilled in the art various obvious changes,
Readjust and substitute without departing from protection scope of the present invention.Therefore, although the present invention is carried out by above example
It is described in further detail, but the present invention is not limited only to above example, without departing from the inventive concept, also
More other Equivalent embodiments can be included, and the scope of the present invention is determined by scope of the appended claims.
Claims (12)
1. a kind of method that Gamma is corrected, it is characterised in that including:
Obtain the input gray level value of pixel to be corrected;
Corresponding coordinate gray value is searched in gamma curve mapping table according to the input gray level value;
If finding identical coordinate gray value, corresponding correction gray value is obtained from the gamma curve mapping table,
As output gray level value;
If searched less than identical coordinate gray value, corresponding school is obtained according to the two neighboring coordinate gray value for finding
Positive gray value, and interpolation calculation is carried out to two correction gray values, as output gray level value;
The input gray level value is corrected according to the output gray level value;
Wherein, in gamma curve mapping table, the difference between adjacent coordinates gray value is 2 positive integer power, each coordinate
Gray value meets gamma curve relation with the corresponding relation of correction gray value.
2. method according to claim 1, it is characterised in that:
In the gamma curve mapping table, the coordinate gray scale of the difference less than gray scale interval high of the coordinate gray value of low gray scale interval
The difference of value.
3. method according to claim 1, it is characterised in that the quantity of the coordinate gray value is 64.
4. method according to claim 3, it is characterised in that:
In the 1st coordinate gray value to the 33rd coordinate gray value, the difference of adjacent coordinates gray value is 21 power;
In the 33rd coordinate gray value to the 49th coordinate gray value, the difference of adjacent coordinates gray value is 22 power;
In the 49th coordinate gray value to the 64th coordinate gray value, the difference of adjacent coordinates gray value is 23 power.
5. method according to claim 1, it is characterised in that interpolation calculation is carried out to two correction gray values, as defeated
Go out gray value, including:
Interpolation calculation is carried out according to equation below, output gray level value is obtained:
Y=Yn+((Yn+1-Yn)*(X-Xn)/(Xn+1-Xn))
Wherein, XnAnd Xn+1Two adjacent coordinate gray values, Y are represented respectivelynAnd Yn+1Two coordinate gray value X are represented respectivelynWith
Xn+1Corresponding correction gray value, X represents input gray level value, and Y represents output gray level value.
6. method according to claim 1, it is characterised in that:
Corresponding coordinate gray value is searched in gamma curve mapping table according to the input gray level value includes:
The input gray level value is converted into binary form;
The coordinate gray value of binary storage in binary input gray level value and gamma curve mapping table is carried out into step-by-step ratio
Compared with to search identical coordinate gray value;
Accordingly, interpolation calculation is carried out to two correction gray values, is included as output gray level value:
Two for binary form correct gray value, obtain two differences of correction gray value;
The binary digit of the difference of described two correction gray values is carried out moving to right bit arithmetic, to obtain interpolation, as the output
Gray value.
7. the device that a kind of Gamma is corrected, it is characterised in that including:
Input gray level value acquisition module, the input gray level value for obtaining pixel to be corrected;
Coordinate gray value searching modul, for searching corresponding seat in gamma curve mapping table according to the input gray level value
Mark gray value;
Correction gray value acquisition module, if for finding identical coordinate gray value, from the gamma curve mapping table
It is middle to obtain corresponding correction gray value, as output gray level value;
Interpolation calculation module, if for searching less than identical coordinate gray value, according to the two neighboring coordinate for finding
Gray value obtains corresponding correction gray value, and carries out interpolation calculation to two correction gray values, used as output gray level value;
Input gray level value correction module, for correcting the input gray level value according to the output gray level value;
Wherein, in gamma curve mapping table, the difference between adjacent coordinates gray value is 2 positive integer power, each coordinate
Gray value meets gamma curve relation with the corresponding relation of correction gray value.
8. device according to claim 7, it is characterised in that:
In the gamma curve mapping table, the coordinate gray scale of the difference less than gray scale interval high of the coordinate gray value of low gray scale interval
The difference of value.
9. device according to claim 7, it is characterised in that the quantity of the coordinate gray value is 64.
10. device according to claim 9, it is characterised in that:
In the 1st coordinate gray value to the 33rd coordinate gray value, the difference of adjacent coordinates gray value is 21 power;
In the 33rd coordinate gray value to the 49th coordinate gray value, the difference of adjacent coordinates gray value is 22 power;
In the 49th coordinate gray value to the 64th coordinate gray value, the difference of adjacent coordinates gray value is 23 power.
11. devices according to claim 7, it is characterised in that the interpolation calculation module, specifically for:
Interpolation calculation is carried out according to equation below, output gray level value is obtained:
Y=Yn+((Yn+1-Yn)*(X-Xn)/(Xn+1-Xn))
Wherein, XnAnd Xn+1Two adjacent coordinate gray values, Y are represented respectivelynAnd Yn+1Two coordinate gray value X are represented respectivelynWith
Xn+1Corresponding correction gray value, X represents input gray level value, and Y represents output gray level value.
12. devices according to claim 7, it is characterised in that:
The coordinate gray value searching modul, including:
Input gray level value conversion unit, for the input gray level value to be converted into binary form;
Step-by-step comparing unit, for by the coordinate of binary storage in binary input gray level value and gamma curve mapping table
Gray value is carried out by bit comparison, to search identical coordinate gray value;
Accordingly, the interpolation calculation module, including:
The difference acquiring unit of gray value is corrected, for two correction gray values for binary form, two correction ashes is obtained
The difference of angle value;
Dextroposition arithmetic element, for the binary digit of the difference of described two correction gray values to be carried out moving to right bit arithmetic, with
To interpolation, as the output gray level value.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201710049656.6A CN106846273A (en) | 2017-01-23 | 2017-01-23 | A kind of method and device of Gamma corrections |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201710049656.6A CN106846273A (en) | 2017-01-23 | 2017-01-23 | A kind of method and device of Gamma corrections |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| CN106846273A true CN106846273A (en) | 2017-06-13 |
Family
ID=59120156
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201710049656.6A Pending CN106846273A (en) | 2017-01-23 | 2017-01-23 | A kind of method and device of Gamma corrections |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN106846273A (en) |
Cited By (8)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN108628715A (en) * | 2018-03-20 | 2018-10-09 | 青岛海信电器股份有限公司 | It is a kind of display equipment display effect bearing calibration and device |
| CN109994084A (en) * | 2018-12-30 | 2019-07-09 | 东莞市爱协生智能科技有限公司 | Computer-readable storage medium and digital gamma correction device using the same |
| CN111477170A (en) * | 2020-04-02 | 2020-07-31 | 广东晟合技术有限公司 | Method for reducing gamma line in O L ED product by using multi-stage interpolation |
| CN111862887A (en) * | 2020-08-13 | 2020-10-30 | 深圳市奥拓电子股份有限公司 | Correction data control method and device for self-adaptive gray scale and LED display screen |
| CN113543405A (en) * | 2021-09-15 | 2021-10-22 | 广州中大中鸣科技有限公司 | A method and device for displaying dynamic grayscale reconstruction between frames based on LED lamps |
| CN114783367A (en) * | 2022-04-29 | 2022-07-22 | 卡莱特云科技股份有限公司 | Box linearity correction method and device, display screen and display control method |
| CN116091358A (en) * | 2023-02-21 | 2023-05-09 | 瑞芯微电子股份有限公司 | Data mapping transformation method and device, electronic equipment and storage medium |
| CN116091358B (en) * | 2023-02-21 | 2026-05-01 | 瑞芯微电子股份有限公司 | Data mapping and transformation methods and apparatuses, electronic devices and storage media |
Citations (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN1743932A (en) * | 2004-08-30 | 2006-03-08 | 三星电子株式会社 | Liquid crystal display, determination method of gray level, gamma value correction method of LCD |
| KR20060104234A (en) * | 2005-03-29 | 2006-10-09 | 엘지전자 주식회사 | Image processing apparatus and image processing method of plasma display panel |
| CN101409781A (en) * | 2007-10-11 | 2009-04-15 | 三洋电机株式会社 | Correction arithmetic circuit |
| CN101546548A (en) * | 2009-04-23 | 2009-09-30 | 北京德为视讯科技股份有限公司 | Composite lookup table method for synchronous correction of Gamma and chrominance of display |
| CN102726036A (en) * | 2010-02-02 | 2012-10-10 | 微软公司 | Enhancement of images for display on liquid crystal displays |
| CN103440656A (en) * | 2013-08-27 | 2013-12-11 | 华南理工大学 | Image Gamma correction method for creating lookup table based on Taylor series fitting |
-
2017
- 2017-01-23 CN CN201710049656.6A patent/CN106846273A/en active Pending
Patent Citations (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN1743932A (en) * | 2004-08-30 | 2006-03-08 | 三星电子株式会社 | Liquid crystal display, determination method of gray level, gamma value correction method of LCD |
| KR20060104234A (en) * | 2005-03-29 | 2006-10-09 | 엘지전자 주식회사 | Image processing apparatus and image processing method of plasma display panel |
| CN101409781A (en) * | 2007-10-11 | 2009-04-15 | 三洋电机株式会社 | Correction arithmetic circuit |
| CN101546548A (en) * | 2009-04-23 | 2009-09-30 | 北京德为视讯科技股份有限公司 | Composite lookup table method for synchronous correction of Gamma and chrominance of display |
| CN102726036A (en) * | 2010-02-02 | 2012-10-10 | 微软公司 | Enhancement of images for display on liquid crystal displays |
| CN103440656A (en) * | 2013-08-27 | 2013-12-11 | 华南理工大学 | Image Gamma correction method for creating lookup table based on Taylor series fitting |
Non-Patent Citations (2)
| Title |
|---|
| 曾嘉亮: "Gamma校正的快速算法及其C语言实现", 《信息技术》 * |
| 黄珺珺, 郭炜: "电视显示系统中Gamma校正电路的改进", 《电视技术》 * |
Cited By (11)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN108628715A (en) * | 2018-03-20 | 2018-10-09 | 青岛海信电器股份有限公司 | It is a kind of display equipment display effect bearing calibration and device |
| CN108628715B (en) * | 2018-03-20 | 2022-01-28 | 海信视像科技股份有限公司 | Display effect correction method and device of display equipment |
| CN109994084A (en) * | 2018-12-30 | 2019-07-09 | 东莞市爱协生智能科技有限公司 | Computer-readable storage medium and digital gamma correction device using the same |
| CN111477170A (en) * | 2020-04-02 | 2020-07-31 | 广东晟合技术有限公司 | Method for reducing gamma line in O L ED product by using multi-stage interpolation |
| CN111477170B (en) * | 2020-04-02 | 2021-08-10 | 广东晟合微电子有限公司 | Method for reducing gamma lines in OLED product by using multi-stage interpolation |
| CN111862887A (en) * | 2020-08-13 | 2020-10-30 | 深圳市奥拓电子股份有限公司 | Correction data control method and device for self-adaptive gray scale and LED display screen |
| CN113543405A (en) * | 2021-09-15 | 2021-10-22 | 广州中大中鸣科技有限公司 | A method and device for displaying dynamic grayscale reconstruction between frames based on LED lamps |
| CN113543405B (en) * | 2021-09-15 | 2021-12-24 | 广州中大中鸣科技有限公司 | A method and device for displaying dynamic grayscale reconstruction between frames based on LED lamps |
| CN114783367A (en) * | 2022-04-29 | 2022-07-22 | 卡莱特云科技股份有限公司 | Box linearity correction method and device, display screen and display control method |
| CN116091358A (en) * | 2023-02-21 | 2023-05-09 | 瑞芯微电子股份有限公司 | Data mapping transformation method and device, electronic equipment and storage medium |
| CN116091358B (en) * | 2023-02-21 | 2026-05-01 | 瑞芯微电子股份有限公司 | Data mapping and transformation methods and apparatuses, electronic devices and storage media |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN106846273A (en) | A kind of method and device of Gamma corrections | |
| CN111695554B (en) | Text correction method and device, electronic equipment and storage medium | |
| US7957589B2 (en) | Arbitrary power function using logarithm lookup table | |
| WO2019100418A1 (en) | Brightness compensation device and method, and memory | |
| CN109036333B (en) | Display parameter correction method, device, terminal device and storage medium of display | |
| CN1531331A (en) | Image processing device, image processing method, and image processing program | |
| CN106297644A (en) | The drive circuit of a kind of display floater, its driving method and display device | |
| CN111210389B (en) | Image scaling processing method and device | |
| CN101917633A (en) | Image white balance processing method, device and camera thereof | |
| CN113676713B (en) | Image processing method, device, equipment and medium | |
| CN110021271B (en) | Optical compensation method, optical compensation system, display method and display device | |
| CN109599054A (en) | The control method and device of display panel brightness | |
| CN110648284B (en) | Image processing method and device with uneven illumination | |
| TW201822530A (en) | Image dead point compensation method, device and electronic device | |
| CN105959511B (en) | Lens shading correction method and system | |
| JPH0693246B2 (en) | Dither image enlargement / reduction method | |
| CN114549351A (en) | Color correction method, apparatus, computer device and storage medium | |
| JPH08137908A (en) | Image retrieval method and device | |
| CN111784590B (en) | Image processing method, device, system and computer storable medium | |
| CN115908191B (en) | Method and apparatus for obtaining filter parameters | |
| CN107451505A (en) | The angle correction method of express delivery single bar code | |
| CN102306380B (en) | Histogram debugging method of colored image and debugging system thereof | |
| CN108735140B (en) | Compensation table storage method of display panel | |
| CN103886550B (en) | Sketch texture method of adjustment and system | |
| US11269473B2 (en) | Touch panel control apparatus correcting touch position based on number of touch points |
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: 20170613 |