A color brightness correction method for LED display screen and a correction coefficient encoding and decoding method

By adjusting the number of coded bits of the correction coefficient, the encoding compression error is reduced, and the problem of large compression error of the correction coefficient in the prior art is solved, and the color uniformity and fidelity of the LED display screen are improved.

CN119229801BActive Publication Date: 2025-02-07HANGZHOU HIKVISION DIGITAL TECHNOLOGY CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411757132.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-03
Publication Date
2025-02-07
Estimated Expiration
2044-12-03

AI Technical Summary

Technical Problem

When the prior art performs color brightness correction on the LED display screen, the compression error of the correction coefficient is large, which affects the correction effect.

Method used

By a correction coefficient encoding method, multiple sets of original correction coefficients are obtained, and the encoding compression error is reduced by adjusting the number of coded bits. The specific steps include calculating the median and difference values ​​of each set of original correction coefficients, adjusting the number of coded bits to reduce the difference value, and finally encoding the difference value into coded data.

Benefits of technology

The encoding compression error of the correction coefficient is reduced, the correction effect is improved, and the color uniformity and fidelity of the LED display screen are improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119229801B_ABST
    Figure CN119229801B_ABST
Patent Text Reader

Abstract

The embodiment of the present application provides a method for color brightness correction of an LED display screen and a correction coefficient encoding and decoding method, the method comprising: obtaining multiple groups of original correction coefficients and the number of coded bits of each group of original correction coefficients; respectively calculating the median of each group of original correction coefficients and the difference between each original correction coefficient and the corresponding median to obtain each first difference; then respectively determining the effective number of the maximum value of each first difference and the difference between the number of coded bits and the effective number of bits corresponding to each group of original correction coefficients to obtain each second difference; then adjusting the number of coded bits corresponding to each group of original correction coefficients in the direction of making each second difference become 0 to obtain the third number of bits corresponding to each group of original correction coefficients; encoding the first difference of each original correction coefficient into coded data with a length of the corresponding third number of bits as the coded data of each original correction coefficient. By adopting the embodiment of the present application, the coding compression error of each correction coefficient can be reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of image processing, and in particular to a method for color brightness correction of an LED display screen and a method for encoding and decoding correction coefficients. Background Art

[0002] As an important carrier of information dissemination and visual art display, the display effect of electronic display screens is related to the accuracy of information transmission and the user experience. However, due to the limitations of the lamp bead manufacturing process and spectral differences, the display screens often encounter problems such as uneven color and significant brightness differences. In order to maintain a good display effect on the display screen and avoid the above problems, the display screen needs to be calibrated point by point regularly. Point-by-point correction is a technology used to improve the brightness uniformity and color fidelity of the display screen. By collecting the brightness data of each pixel area on the display screen and obtaining the correction coefficient matrix of each pixel, each pixel is corrected using the correction coefficient matrix so that the color of each pixel on the display screen is truly restored.

[0003] In the process of color brightness correction of the display screen, the host computer usually sends the bright color correction coefficient of the display screen (hereinafter referred to as the correction coefficient) to the receiving card and stores it. There is a correction coefficient matrix for each pixel on the display. The correction coefficient matrix of each pixel is composed of 9 coefficients. The quantization range of each coefficient is 15bit or 16bit. The correction coefficient for one pixel can reach 144bit. Taking the 640x360 cabinet display screen as an example, there are 640x360 pixels on the display screen, and the correction coefficient that needs to be stored requires at least 4050KB, which has high storage requirements and bandwidth requirements.

[0004] In the related art, a method of encoding and compressing the correction coefficient to a target bit is adopted to reduce the data volume of the correction coefficient, but this may cause a large compression error during decoding, thereby affecting the correction effect. Summary of the invention

[0005] The purpose of the embodiment of the present application is to provide a method for color brightness correction of an LED display screen and a correction coefficient encoding and decoding method to reduce the compression error of the correction coefficient. The specific technical solution is as follows:

[0006] In a first aspect of an embodiment of the present application, a correction coefficient encoding method is provided, the method comprising:

[0007] Acquire multiple groups of original correction coefficients, and acquire the number of encoding bits configured for each group of original correction coefficients as the first digit corresponding to each group of original correction coefficients;

[0008] Calculate the median of each group of original correction coefficients respectively as the standard value corresponding to each group of original correction coefficients;

[0009] Calculating the difference between each original correction coefficient and the corresponding standard value respectively as the first difference of each original correction coefficient;

[0010] Determine respectively the number of significant digits of the maximum value of the first difference value of each group of original correction coefficients as the second digit corresponding to each group of original correction coefficients;

[0011] Calculate the difference between the first digit and the second digit corresponding to each group of original correction coefficients to obtain the second difference corresponding to each group of original correction coefficients;

[0012] Under the condition that the sum of the number of coded bits configured for each group of original correction coefficients remains unchanged, the number of coded bits configured for each group of original correction coefficients is adjusted in a direction that makes the second difference value corresponding to each group of the original correction coefficients become 0, so as to obtain a third digit corresponding to each group of original correction coefficients;

[0013] The first difference value of each original correction coefficient is encoded into encoded data having a length equal to the corresponding third bit number as the encoded data of each original correction coefficient.

[0014] In a possible implementation, the method further includes:

[0015] Obtain the total number of digits of the maximum value of the first difference value of each group of original correction coefficients as the fourth number corresponding to each group of original correction coefficients;

[0016] Calculate the difference between the fourth digit and the second digit corresponding to each group of original correction coefficients to obtain the initial exponent bit width corresponding to each group of original correction coefficients;

[0017] The coded data includes exponential coded sub-data and mantissa coded sub-data, wherein the exponential coded sub-data is used to represent z- in , the mantissa encoding sub-data is used to represent the mantissa of the original correction coefficient when it is represented in the form of exponential notation; wherein z is the difference between the total number of digits of the original correction coefficient and the corresponding second number of digits, E in is the initial exponent bit width corresponding to the original correction coefficient.

[0018] In a possible implementation, each original correction coefficient is integer data with a signed bit, and the encoded data includes exponent encoding sub-data with a length of a fifth digit and mantissa encoding sub-data with a length of a sixth digit; wherein the sum of the fifth digit and the sixth digit is equal to the third digit or the third digit minus one, and the fifth digit is the number of digits of the target n-ary number obtained by writing the second difference as an n-ary number.

[0019] In a possible implementation, the method further includes:

[0020] For each of the original correction coefficients, calculate the difference between the total number of digits f of the original correction coefficient and the corresponding second number of digits to obtain a seventh number z corresponding to the original correction coefficient;

[0021] If z is less than (E in +n x ), the mantissa encoding sub-data is obtained by removing the z zeros on the highest bit of the original correction coefficient and removing the (fyz) values ​​on the lowest bit of the original correction coefficient, and the exponent encoding sub-data is zE in ;

[0022] If z is greater than or equal to (E in +n x ), the mantissa coded sub-data is the (E) of the original correction coefficient minus the highest bit. in +n x -1) 0, and remove the [fy-(E in +n x -1)] values, the exponential encoding sub-data is n x -1.

[0023] In a possible implementation manner, obtaining multiple groups of original correction coefficients includes:

[0024] Obtaining correction coefficients corresponding to respective pixels on the LED display screen, wherein the correction coefficients include an Rr correction coefficient, an Rg correction coefficient, an Rb correction coefficient, a Gr correction coefficient, a Gg correction coefficient, a Gb correction coefficient, a Br correction coefficient, a Bg correction coefficient, and a Bb correction coefficient;

[0025] Divide the Rr correction coefficients corresponding to the respective pixel points into a group of original correction coefficients, divide the Rg correction coefficients corresponding to the respective pixel points into a group of original correction coefficients, divide the Rb correction coefficients corresponding to the respective pixel points into a group of original correction coefficients, divide the Gr correction coefficients corresponding to the respective pixel points into a group of original correction coefficients, divide the Gg correction coefficients corresponding to the respective pixel points into a group of original correction coefficients, divide the Gb correction coefficients corresponding to the respective pixel points into a group of original correction coefficients, divide the Br correction coefficients corresponding to the respective pixel points into a group of original correction coefficients, divide the Bg correction coefficients corresponding to the respective pixel points into a group of original correction coefficients, and divide the Bb correction coefficients corresponding to the respective pixel points into a group of original correction coefficients;

[0026] Among them, the Rr correction coefficient is the correction coefficient of the red light point under the red channel, the Rg correction coefficient is the correction coefficient of the green light point under the red channel, and the Rb correction coefficient is the correction coefficient of the blue light point under the red channel; the Gr correction coefficient is the correction coefficient of the red light point under the green channel, the Gg correction coefficient is the correction coefficient of the green light point under the green channel, and the Gb correction coefficient is the correction coefficient of the blue light point under the green channel; the Br correction coefficient is the correction coefficient of the red light point under the blue channel, the Bg correction coefficient is the correction coefficient of the green light point under the blue channel, and the Bb correction coefficient is the correction coefficient of the blue light point under the blue channel.

[0027] A second aspect of the embodiments of the present application provides a correction coefficient decoding method, the method comprising:

[0028] Obtain the standard value corresponding to each group of original correction coefficients;

[0029] Decoding the encoded data of each original correction coefficient to obtain each decoded data; wherein the encoded data of each original correction coefficient is encoded according to any one of the correction coefficient encoding methods described in the first aspect;

[0030] The sum of each decoded data and the corresponding standard value is calculated to obtain each correction coefficient after decoding.

[0031] In a possible implementation manner, the decoded data are obtained by decoding in the following manner:

[0032]

[0033] in, To decode the data, S is the value of the sign bit, is the index encoding subdata, Encodes the sub-data for the mantissa.

[0034] In a possible implementation manner, decoding the encoded data of each original correction coefficient to obtain each decoded data includes:

[0035] For each original correction coefficient encoding data, the encoding data of the original correction coefficient is decoded to obtain mantissa encoding sub-data corresponding to the original correction coefficient;

[0036] The most significant bit of the mantissa-encoded sub-data is supplemented 0, p 0s are added to the end of the mantissa coded sub-data to obtain the decoded data corresponding to the original correction coefficient, wherein the total number of bits of the decoded data corresponding to the original correction coefficient minus the number of bits of the mantissa coded sub-data is equal to or .

[0037] In a third aspect of an embodiment of the present application, a method for color brightness correction of an LED display screen is provided, the method being applied to a receiving card in an LED display system, the LED display system also comprising an LED display screen, the receiving card pre-storing a file header and encoding data corresponding to each pixel point in the LED display screen, the encoding data being obtained by encoding the original correction coefficient of the pixel point according to the correction coefficient encoding method described in the first aspect, the file header recording the standard values ​​corresponding to each group of original correction coefficients in the correction coefficient encoding method;

[0038] The method comprises:

[0039] In response to the LED display screen enabling a color brightness correction function, determining standard values ​​corresponding to respective groups of original correction coefficients from the file header;

[0040] Decoding the coded data corresponding to each pixel in the LED display screen respectively to obtain decoded data corresponding to each pixel;

[0041] Calculate the sum of the decoded data corresponding to each pixel and the corresponding standard value to obtain the decoded correction coefficient corresponding to each pixel;

[0042] Color brightness correction is performed on each pixel in the LED display screen according to the decoded correction coefficient corresponding to each pixel.

[0043] The present application also provides an electronic device, including:

[0044] Memory, used to store computer programs;

[0045] The processor is used to implement any of the correction coefficient encoding methods or correction coefficient decoding methods or LED display screen color brightness correction methods described above when executing the program stored in the memory.

[0046] An embodiment of the present application also provides a computer-readable storage medium, in which a computer program is stored. When the computer program is executed by a processor, any of the above-mentioned correction coefficient encoding methods or correction coefficient decoding methods or LED display color brightness correction methods is implemented.

[0047] The embodiment of the present application also provides a computer program product including instructions, which, when executed on a computer, enables the computer to execute any of the correction coefficient encoding method or correction coefficient decoding method or LED display screen color brightness correction method described above.

[0048] Beneficial effects of the embodiments of the present application:

[0049] The embodiment of the present application provides a method for color brightness correction of an LED display screen and a method for encoding and decoding correction coefficients, which obtains multiple groups of original correction coefficients, and obtains the number of coding bits configured for each group of original correction coefficients as the first digit corresponding to each group of original correction coefficients; respectively calculates the median of each group of original correction coefficients, and calculates the difference between each original correction coefficient and the corresponding median as the first difference of each original correction coefficient; then respectively determines the number of effective bits of the maximum value of the first difference of each group of original correction coefficients, and respectively calculates the difference between the first digit and the effective bit corresponding to each group of original correction coefficients, to obtain the second difference corresponding to each group of original correction coefficients; then adjusts the number of coding bits configured for each group of original correction coefficients in the direction of making the second difference corresponding to each group of original correction coefficients become 0, to obtain the third digit corresponding to each group of original correction coefficients; encodes the first difference of each original correction coefficient into coded data with a length of the corresponding third digit as the coded data of each original correction coefficient. By adopting the method of the embodiment of the present application, since the total number of coding bits is kept unchanged in the process of adjusting the coding positions of each group of original correction coefficient configurations, and the number of coding bits configured for each group of original correction coefficients is adjusted in the direction of making the difference between the number of coding bits of each group of original correction coefficients and the number of effective bits of the original correction coefficients become 0, that is, the number of coding bits configured for the original correction coefficients with a second difference greater than 0 is reduced, and the number of coding bits configured for the original correction coefficients with a second difference less than 0 is increased. Since the total number of coding bits remains unchanged during the adjustment process, the number of coding bits reduced is the same as the number of coding bits increased. Therefore, the adjustment process can be regarded as: the number of coding bits configured for the original correction coefficients with a second difference greater than 0 is transferred to the number of coding bits configured for the second difference greater than 0. The number of coding bits configured for the original correction coefficient whose value is less than 0, and the second difference in the present application is the difference between the first digit and the second digit, the first digit can be regarded as the coding bit width initially allocated to the original correction coefficient, and the second digit can be regarded as the coding bit width required for lossless encoding of the original correction coefficient. Therefore, when the second difference is greater than 0, it can be considered that the coding bit width allocated to the original correction coefficient is sufficient to realize lossless encoding of the original correction coefficient, that is, there is redundancy in the coding bit width allocated to the original correction coefficient. Conversely, when the second difference is less than 0, it can be considered that the coding bit width allocated to the original correction coefficient is not sufficient to realize lossless encoding of the original correction coefficient, that is, the coding bit width allocated to the original correction coefficient is insufficient. In summary, it can be seen that the process of transferring the number of coding bits configured for the original correction coefficient with a second difference greater than 0 and the number of coding bits configured for the original correction coefficient with a second difference less than 0 can be regarded as: transferring the coding bit width of the correction coefficient with redundant coding bit width to the correction coefficient with insufficient coding bit width, thereby reducing the coding compression loss caused by insufficient coding bit width. Therefore, the present application can reduce the coding compression error of each correction coefficient.

[0050] Of course, implementing any product or method of the present application does not necessarily require achieving all of the advantages described above at the same time. BRIEF DESCRIPTION OF THE DRAWINGS

[0051] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application, and for ordinary technicians in this field, other embodiments can also be obtained based on these drawings.

[0052] Figure 1 Schematic diagram of probability distribution of the same set of correction coefficients;

[0053] Figure 2 A schematic diagram of a flow chart of a correction coefficient encoding method provided in an embodiment of the present application;

[0054] Figure 3 A schematic diagram of sorting the difference between the maximum number of significant digits and the number of coded digits provided in an embodiment of the present application;

[0055] Figure 4 A schematic diagram of a processing architecture for correction coefficients in a correction coefficient encoding and decoding method provided in an embodiment of the present application;

[0056] Figure 5 A processing flow chart of the correction coefficient encoding and decoding method provided in an embodiment of the present application;

[0057] Figure 6 A schematic diagram of a compressed file in the correction coefficient encoding and decoding method provided in an embodiment of the present application;

[0058] Figure 7 A schematic diagram of a correction coefficient decoding method provided in an embodiment of the present application;

[0059] Figure 8a A schematic diagram of the structure of the LED display system provided in this application;

[0060] Figure 8b A schematic diagram of a flow chart of a method for color brightness correction of an LED display screen provided in this application;

[0061] Fig. 9 A schematic diagram of the structure of a correction coefficient encoding device provided in an embodiment of the present application;

[0062] Fig.10 A schematic diagram of the structure of a correction coefficient decoding device provided in an embodiment of the present application;

[0063] Fig.11 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0064] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field based on the present application belong to the scope of protection of the present application.

[0065] In the related art, the correction coefficients are encoded and compressed to the target bit to reduce the amount of correction coefficient data. However, since the correction coefficients include the main coefficients and the slave coefficients, when compressing the correction coefficients, the compression ranges of different coefficients are different, and the probability distribution of the same set of correction coefficients is Gaussian distribution or pendulum distribution, such as Figure 1 The figure shows a probability distribution diagram of the same group of correction coefficients, and the probability distribution of the correction coefficients shows the characteristics of being small at both ends and large in the middle. In the related art, when compressing the correction coefficients, a fixed target compression bit width is set for the main coefficients or the slave coefficients. For example, the correction coefficients include three main coefficients and six slave coefficients. The encoding bit width set for the three main coefficients is 12 bits, and the encoding bit width set for the six slave coefficients is 10 bits. If 11 bits are required for compression encoding of main coefficients 1 and 2, and 14 bits are required for compression encoding of main coefficient 3, when the main coefficients are compressed and encoded, there will be a relatively large error in main coefficient 3. That is, if all main coefficients or slave coefficients are compressed to the same compression bit width, the ratio of the compression error of each coefficient is not uniform, and the error of the correction coefficient after decoding may be relatively large, thereby affecting the correction effect.

[0066] In order to reduce the compression error of the correction coefficient, the embodiment of the present application provides a correction coefficient encoding method and a correction coefficient decoding method, which can be applied to a receiving card or a host computer in a display screen cabinet, and the embodiment of the present application is not limited thereto.

[0067] In a first aspect of the embodiments of the present application, a correction coefficient encoding method is provided, such as Figure 2 The figure is a flow chart of a correction coefficient encoding method provided in an embodiment of the present application, and the method comprises the following steps:

[0068] Step S10, obtaining multiple groups of original correction coefficients, and obtaining the number of encoding bits configured for each group of original correction coefficients as the first digit corresponding to each group of original correction coefficients;

[0069] Step S20, respectively calculating the median of each group of original correction coefficients as the standard value corresponding to each group of original correction coefficients;

[0070] Step S30, respectively calculating the difference between each original correction coefficient and the corresponding standard value as the first difference of each original correction coefficient;

[0071] Step S40, respectively determining the number of significant digits of the maximum value of the first difference value of each group of original correction coefficients as the second digit corresponding to each group of original correction coefficients;

[0072] Step S50, respectively calculating the difference between the first digit and the second digit corresponding to each group of original correction coefficients to obtain the second difference corresponding to each group of original correction coefficients;

[0073] Step S60, while keeping the sum of the number of coded bits configured for each group of original correction coefficients unchanged, adjust the number of coded bits configured for each group of original correction coefficients in a direction that makes the second difference corresponding to each group of original correction coefficients become 0, so as to obtain the third number corresponding to each group of original correction coefficients;

[0074] Step S70: Encode the first difference of each original correction coefficient into encoded data with a length equal to the corresponding third digit as the encoded data of each original correction coefficient.

[0075] By adopting the method of the embodiment of the present application, since the total number of coding bits is kept unchanged in the process of adjusting the coding positions of each group of original correction coefficient configurations, and the number of coding bits configured for each group of original correction coefficients is adjusted in the direction of making the difference between the number of coding bits of each group of original correction coefficients and the number of effective bits of the original correction coefficients become 0, that is, the number of coding bits configured for the original correction coefficients with a second difference greater than 0 is reduced, and the number of coding bits configured for the original correction coefficients with a second difference less than 0 is increased. Since the total number of coding bits remains unchanged during the adjustment process, the number of coding bits reduced is the same as the number of coding bits increased. Therefore, the adjustment process can be regarded as: the number of coding bits configured for the original correction coefficients with a second difference greater than 0 is transferred to the number of coding bits configured for the second difference greater than 0. The number of coding bits configured for the original correction coefficient whose value is less than 0, and the second difference in the present application is the difference between the first digit and the second digit, the first digit can be regarded as the coding bit width initially allocated to the original correction coefficient, and the second digit can be regarded as the coding bit width required for lossless encoding of the original correction coefficient. Therefore, when the second difference is greater than 0, it can be considered that the coding bit width allocated to the original correction coefficient is sufficient to realize lossless encoding of the original correction coefficient, that is, there is redundancy in the coding bit width allocated to the original correction coefficient. Conversely, when the second difference is less than 0, it can be considered that the coding bit width allocated to the original correction coefficient is not sufficient to realize lossless encoding of the original correction coefficient, that is, the coding bit width allocated to the original correction coefficient is insufficient. In summary, it can be seen that the process of transferring the number of coding bits configured for the original correction coefficient with a second difference greater than 0 and the number of coding bits configured for the original correction coefficient with a second difference less than 0 can be regarded as: transferring the coding bit width of the correction coefficient with redundant coding bit width to the correction coefficient with insufficient coding bit width, thereby reducing the coding compression loss caused by insufficient coding bit width. Therefore, the present application can reduce the coding compression error of each correction coefficient.

[0076] The following uses binary coding as an example to explain in detail the above steps S10 to S70. It can be understood that the values ​​of the original correction coefficients in the embodiments of the present application are all binary numbers obtained by converting the original correction coefficients into binary. In other possible embodiments, they can also be expressed in other bases.

[0077] Among them, multiple groups of original correction coefficients are obtained by statistically analyzing the correction coefficient matrix of each pixel on the display screen. For each pixel, multiple original correction coefficients correspond to each other, which can be specifically divided into multiple original correction master coefficients and multiple original correction slave coefficients. For example, for a pixel, the multiple original correction coefficients corresponding to it can be represented by the correction coefficient matrix To indicate that, , , is the main coefficient, , , , , , is the coefficient, is the brightness correction coefficient of the red light point under the red channel, is the brightness correction coefficient of the green light point in the green channel, is the brightness correction coefficient of the blue light point in the blue channel, is the brightness correction coefficient of the green light point under the red channel, is the brightness correction coefficient of the blue light point under the red channel, is the brightness correction coefficient of the red light point in the green channel, is the brightness correction coefficient of the blue light point under the green channel, is the brightness correction coefficient of the red light point in the blue channel, It is the brightness correction coefficient of the green light point in the blue channel.

[0078] Based on the above, since each pixel on the display screen corresponds to multiple original correction coefficients of different color brightness, therefore, in a possible implementation, taking the display screen as an LED (Light-emitting diode) display screen as an example, after obtaining the original correction coefficients corresponding to each pixel on the LED display screen, the original correction coefficients can be divided according to the color brightness to obtain multiple groups of original correction coefficients. Specifically, the original correction main coefficients corresponding to each pixel can be Divide into a group, and the original correction main coefficients corresponding to each pixel point Divide into a group, and the original correction main coefficients corresponding to each pixel point Divide into one group, and so on, to obtain nine groups of original correction coefficients.

[0079] In a possible embodiment, multiple groups of original correction coefficients are obtained, namely: original correction main coefficients { , , ,…… }, original correction main coefficients { , , ,…… }, original correction main coefficients { , , ,…… }, the original correction coefficients are { , , ,…… }, the original correction coefficients are { , , ,…… }, the original correction coefficients are { , , ,…… }, the original correction coefficients are { , , ,…… }, the original correction coefficients are { , , ,…… }, the original correction coefficients are { , , ,…… }.

[0080] The number of bits of coding configured for each group of original correction coefficients refers to the bit width of the coded data obtained after the original correction coefficients are compressed and coded. The total number of bits is 14 bits, and it needs to be compressed to 12 bits. Then for the original correction main coefficients The configured encoding bit width is 12 bits, that is, the number of encoding bits is 12 bits.

[0081] When compressing and encoding each original correction coefficient, the encoding bit width of each original correction coefficient is pre-configured, and the specific value of the encoding bit width should be an integer greater than 0. The specific value of the encoding bit width can be set according to actual needs, and the embodiment of the present application is not limited to this.

[0082] It is understandable that, in order to achieve compression coding, the coding bit width configured for each original correction coefficient should be smaller than the total bit width of the original correction coefficient. The total number of bits is Q bits, and the coding bit width configured for this coefficient is W bits, then W should be less than Q.

[0083] To calculate the median of each group of original correction coefficients, the average value of each group of original correction coefficients can be calculated, the average value of the maximum and minimum values ​​of each group of original correction coefficients can be calculated, or the weighted average value of each group of original correction coefficients can be calculated. All of these are possible and are not limited to this in the present application.

[0084] For example, assuming that there are N pixels, the original correction main coefficients For example, the original correction coefficients in this group include , , ,…… , the median MID of the group of original correction coefficients can be calculated using any of the following methods:

[0085] Method 1:

[0086] Method 2:

[0087] Method 3:

[0088] in, Express , , ,…… To calculate the average value, Respectively , , ,…… The maximum and minimum values ​​in Express , , ,…… For the sake of convenience, the median of each group of original correction coefficients is calculated as the average of the maximum and minimum values ​​of each group of original correction coefficients.

[0089] It can be understood that for the same display screen, 9 groups of standard values ​​can be calculated respectively, namely , , , , , , , , .

[0090] The maximum value of the first difference of each group of original correction coefficients refers to the value of the maximum absolute value of the first difference. For example, assuming that the number of a group of original correction coefficients is 5, and the first difference values ​​of a group of original correction coefficients are calculated to be {-600, 400, 200, 300, -150}, the maximum value of the first difference is -600. It can be understood that in this example, it is only for the convenience of description to assume that the number of a group of original correction coefficients is 5, and it is not limited to only 5 in the actual solution.

[0091] In a possible implementation manner, the maximum value may also be a maximum value set according to actual experience, and the absolute value of the maximum value obtained by the setting should satisfy the requirement of being greater than the absolute values ​​of all first differences of the group of original correction coefficients.

[0092] Original calibration main coefficient For example, calculate the original correction coefficients of this group { , , ,…… } and median The difference { , , ,…… }, and then determine the difference with the largest absolute value of the difference In order to reduce the amount of calculation, we can also first count the maximum value of the original correction coefficients of this group. With minimum , and then calculate and , then confirm and The maximum value of The calculation method of the maximum value DIFF of other original correction coefficients is similar, and this application will not elaborate on it.

[0093] Then determine the significant digits of the maximum value DIFF. The significant digits refer to all digits of a number from the first non-zero digit on the left to the rightmost digit. For example, the significant digits of 0.000123 are 123, and the significant digits are 3 digits. The significant digits of 000101110000 are 101110000, and the significant digits are 9 digits.

[0094] Since binary coding is performed in the embodiment of the present application, the maximum number of significant digits of the maximum value DIFF corresponding to each set of original correction coefficients in binary coding is It can be calculated by the following formula (1):

[0095]

[0096] Based on the above, it can be seen that the compression range of each group of original correction coefficients may be different. Therefore, if the number of coding bits of the original correction coefficients is greater than the number of effective bits of the original correction coefficients, that is, the second difference is greater than 0, it means that the number of coding bits configured for the group of original correction coefficients is redundant, and the accuracy of the original correction coefficients can be retained during encoding, avoiding errors caused by the loss of part of the information; if the number of coding bits of the original correction coefficients is less than the number of effective bits of the original correction coefficients, that is, the second difference is less than 0, it means that the accuracy of the effective digits of the group of original correction coefficients will be lost during encoding, and the encoding accuracy will be discarded through truncation and rounding during encoding.

[0097] It can be understood that if the second difference is equal to 0, it means that there is no redundancy in the encoded mantissa during encoding and there will be no loss in the accuracy of the original correction coefficient. Therefore, after calculating the second difference corresponding to each group of original correction coefficients in the above step S50, the number of encoding bits configured for each group of original correction coefficients can be adjusted in the direction of making the second difference corresponding to each group of original correction coefficients become 0 as in step S60.

[0098] For example, it is assumed that the total number of bits of each original correction coefficient is 16 bits, which is the original correction main coefficient The set encoding bit is 14 bits, which is the original correction main coefficient The set encoding bit is 11 bits, which is the original correction main coefficient The set encoding bit width is 11 bits, and the encoding bit width set for each original correction slave coefficient is 10 bits. The number of significant digits is 10, and the original correction main coefficient The number of significant digits is 13, and the original correction main coefficient The effective number of digits is 11, and the effective number of each original correction coefficient is 9. If the encoding is performed directly, the original correction master coefficient The number of coding bits is redundant, and the original correction main coefficient If there is a loss of accuracy during encoding, the original correction main coefficients can be The number of bits set to encode gives up 2 bits to the original correction main coefficient , the original correction main coefficient after transfer The encoding bit is 12 bits, the original correction main coefficient The number of bits of coding is 13 bits. At this time, coding is performed to reduce the original correction main coefficient The redundancy of the number of coding bits and the avoidance of the original correction main coefficients Loss of precision when encoding.

[0099] In order to accurately transfer the number of coded bits corresponding to each group of original correction coefficients, in a possible implementation manner, after determining the maximum number of effective bits corresponding to each group of original correction coefficients, After that, the maximum number of significant digits of each group of original correction coefficients can be The difference in the number of coded bits dst bit corresponding to each group of original correction coefficients is sorted from large to small or from small to large. For example, Figure 3 The figure shows a schematic diagram of sorting the difference between the maximum number of effective bits and the number of coded bits provided in the embodiment of the present application, and each group of original correction coefficients , , , , , , , , The corresponding maximum number of significant digits The difference of the coded bit number dst bit corresponding to each group of original correction coefficients is arranged in order from small to large. In order to minimize the loss of accuracy, the transfer can be carried out in a descending order of the difference value. That is, when transferring, the maximum effective bit is given priority. The number of bits of the original correction coefficient whose difference with the number of bits of the coded bit dst bit is less than 0 is transferred to the maximum number of valid bits. The original correction coefficient with the largest difference from the number of coded bits dst bit, for example Figure 3 As shown, the original correction factor , The corresponding maximum number of significant digits The difference between the corresponding number of coded bits dst bit is -2, the original correction coefficient The corresponding maximum number of significant digits The difference between the corresponding number of coded bits dst bit is 3, the original correction coefficient The corresponding maximum number of significant digits The difference between the corresponding code bit dst bit is 1. When transferring, the original correction coefficient is given priority. , Redundant coding bits are transferred to the original correction coefficients .

[0100] Since each original correction coefficient may be positive or negative, it is necessary to identify the positive and negative values ​​of the original correction coefficient when encoding the original correction coefficient. In one possible implementation, when encoding the original correction coefficient, a sign bit may be used to identify the positive and negative values ​​of the encoded data. In this case, the encoded data includes exponent encoding sub-data, mantissa encoding sub-data and a fixed one-bit sign bit data.

[0101] In another possible implementation, other methods other than the sign bit may be used to identify the positive and negative of the data to be encoded, such as using an offset encoding method. In this case, the encoded data does not include a fixed sign bit, and the encoded data only includes the exponent encoding sub-data and the mantissa encoding sub-data.

[0102] It is understandable that, in order to facilitate decoding, when encoding each original correction coefficient, the standard value, total number of bits, and initial exponent bit width corresponding to each group of original correction coefficients will be stored. In a possible implementation, the standard value, total number of bits, and initial exponent bit width corresponding to each group of original correction coefficients can be written into the file header of the compressed file where the encoding data of each original correction coefficient is located.

[0103] In order to make the correction coefficient encoding method and the correction coefficient decoding method provided by the present application more clear, the correction coefficient encoding method and the correction coefficient decoding method provided by the embodiments of the present application will be described in detail below in combination with specific embodiments, taking the two cases where the encoded data includes a sign bit and does not include a sign bit as examples.

[0104] 1. The encoded data does not include a fixed sign bit.

[0105] In this case, in order to facilitate computer calculation, the encoded data consists of mantissa encoding sub-data or consists of exponent encoding sub-data and mantissa encoding sub-data. When the encoded data consists of mantissa encoding sub-data, the number of encoding bits of the encoded data is equal to the number of encoding bits of the mantissa encoding sub-data. When the encoded data consists of exponent encoding sub-data and mantissa encoding sub-data, the sum of the number of encoding bits of the exponent encoding sub-data and the number of encoding bits of the mantissa encoding sub-data is equal to the number of encoding bits, wherein the exponent encoding sub-data is used to represent the order of magnitude of the floating-point number, and the mantissa encoding sub-data is used to represent the significant digits of the floating-point number.

[0106] Based on the above, when encoding the original correction coefficients, the positive or negative difference between the number of bits of the adjusted encoding of each group of original correction coefficients and the number of effective bits of each group of original correction coefficients will affect the encoding accuracy of the original correction coefficients. For example, the original correction main coefficients of The effective number of digits and the original correction main coefficient The corresponding adjusted difference in the number of coded digits is described in detail below:

[0107] 1.1. Original correction main coefficients of The number of significant digits is no greater than the original correction main coefficient The corresponding adjusted number of encoding bits.

[0108] The effective number of DIFF_Rr of the original correction main coefficient Rr is not greater than the adjusted number of bits corresponding to the original correction main coefficient Rr, indicating that all the original correction main coefficients The effective numbers of can be expressed losslessly during encoding.

[0109] For example, assuming that the total number of bits f of the original correction coefficient is 16, the original correction main coefficient of The number of significant digits is 9, and the original correction main coefficient The corresponding adjusted code bit is 10, and the original correction main coefficient The corresponding initial exponent width 16-9=7, the original correction coefficient of pixel A With median The difference is "11111111", recorded as "0000000011111111".

[0110] In the right When encoding, first remove The highest 0, that is, removing 7 0s, the mantissa encoding sub-data M is "011111111". At this time, the number of bits of the mantissa encoding sub-data is 9 bits, and the original correction main coefficient is The corresponding adjusted number of bits is 10, so the exponential encoding of the sub-data can be achieved without exponential encoding of the sub-data. The encoding data obtained is the mantissa encoding sub-data is "011111111".

[0111] When decoding, first obtain the original correction main coefficients The total number of bits, initial exponent width, original correction main coefficients The standard value is then decoded to obtain the mantissa encoded sub-data "011111111", and the decoded data is calculated according to the following formula (2): :

[0112]

[0113] It can be understood that since there is no exponential coding sub-data in this embodiment, the exponential coding sub-data E in the above formula (2) is equal to 0. In order to optimize the calculation process, the “ "You can do this by Shift right Bit.

[0114] For example, the decoded mantissa is "011111111", because the original correction main coefficient The total number of bits f is 16, so add 0 to the rightmost side of "011111111" until it reaches 16 bits, and get "01111111110000000", and then start shifting right. The shift rule is to shift the valid digits by the initial bit width first. , that is, 7 bits, and then shift E bits, that is, 0 bits, that is, a total of 7 bits are moved. After the movement, the decoded data is "0000000011111111", and finally the decoded data and the median are calculated. The sum of the decoded correction coefficients is the effective number "111111111" of the decoded data, which has no loss of precision compared to the effective number "111111111" before encoding.

[0115] 1.2. Original correction main coefficients of The number of significant digits is greater than the original correction main coefficient The corresponding adjusted number of encoding bits.

[0116] Based on the above, it can be known that the coded data is composed of the exponential coded sub-data and the mantissa coded sub-data. Therefore, when encoding a certain original correction coefficient, the sum of the number of coded bits of the exponential coded sub-data and the number of coded bits of the mantissa coded sub-data is equal to the adjusted number of coded bits corresponding to the original correction main coefficient. However, since the effective number of DIFF_Rr corresponding to the original correction main coefficient Rr is greater than the adjusted number of coded bits corresponding to the original correction main coefficient Rr, , indicating all the original correction principal coefficients There will be a loss of precision when encoding the valid digits, and the encoding precision needs to be reduced through truncation and rounding.

[0117] Since there is no loss of precision when removing the highest bit 0 during encoding, the precision lost during encoding depends on the number of bits of the lowest bit discarded. In addition, since the initial exponent encoding bit width corresponding to the original correction coefficient Rr can indicate that the highest bit of the group of original correction coefficients has at least 0, if the original correction coefficient If the number of significant digits of is less than that of DIFF_Rr, the original correction coefficient The number of 0s in the highest bit must be greater than Therefore, the number of 0s in the highest bit of DIFF_Rr corresponding to the original correction main coefficient Rr can be recorded as the initial exponent bit width of the group of original correction coefficients , the original correction factor The number of 0s in the highest bit is greater than The number of exponentially encoded sub-data E is recorded as E, and the maximum value of the exponentially encoded sub-data E is 2 x -1.

[0118] Will The number of 0s in the highest bit of the value is recorded as z. When encoding, according to z and ( ) size, and its encoding method is also different, and the number of encoding bits x of the exponential encoding sub-data can be pre-set or calculated by the following formula (3):

[0119]

[0120] The following takes the exponential coding sub-data encoding bit x as an example, which is calculated by the above formula and pre-set, as z>( ) and z≤( ) is used to illustrate the encoding and decoding process:

[0121] In one specific embodiment, assuming that the original calibration principal coefficients The total number of digits f is 16, the original correction main coefficient The corresponding initial exponent width is 4, the original correction main coefficient The corresponding maximum number of significant digits =11, the adjusted original correction main coefficient The number of digits for encoding is 9.

[0122] (1) , and z≤ +2 x -1

[0123] According to formula (3), the number of bits of the exponential coding sub-data is x=1, and the number of bits of the mantissa coding sub-data is y=9-x=8. +2 x -1=5. Assume The value of is "111111111111", according to the original correction main coefficient The total number of digits is 16. The value is written as data in the form of "0000011111111111", which is the original correction coefficient The z is 5, satisfying z≤ +2 x -1.

[0124] At this time, the exponential encoding sub-data E = z- =1, in the original correction factor When encoding, first remove All the 0s in the highest bit are removed. The z highest-order zeros result in "111111111111", with a bit number of 11, which is greater than the number of coding bit numbers y of the mantissa coding sub-data. We can use truncation to take the first y bits of "11111111111" as the mantissa coding sub-data, that is, remove the (16-yz) lowest-order bits of "11111111111", that is, remove the 3 lowest-order bits, and we can get the mantissa coding sub-data M as "111111111", and then get the coding data as the exponent coding sub-data E is 1 and the mantissa coding sub-data M is "111111111".

[0125] Based on the above, we can know that in the original correction coefficient When encoding, the original correction main coefficients The total number of bits f, the initial exponent width , original correction main coefficients Standard value for storage.

[0126] Therefore, in the original correction factor When decoding the corresponding coded data, first obtain the original correction main coefficients The total number of bits, initial exponent width, original correction main coefficients The standard value is obtained, and then the mantissa encoded sub-data "11111111" is decoded, and 0 is added after the mantissa encoded sub-data to pad the mantissa encoded sub-data to 16 bits, and "1111111100000000" is obtained, and then the valid digits are moved to the right. The decoded data is "0000011111111000", and the decoded data and the median are calculated. The sum is the correction coefficient after decoding. The effective digit of the decoded data is 11111111000. Compared with the effective digit "111111111111" before encoding, the precision loss is: 16-yz=4.

[0127] (2) , and z> +2 x -1

[0128] According to formula (3), the number of bits of the exponential coding sub-data is x=1, and the number of bits of the mantissa coding sub-data is y=8. +2 x -1=5. Assume The value is 11111111111, according to the original correction main coefficient The total number of digits is 16. The value is written as data in the form of "0000001111111111", which is the original correction coefficient The z is 6, satisfying z> +2 x -1.

[0129] At this time, the exponential encoding sub-data E=2 x -1=1, in the original correction factor When encoding, first remove The highest position ( ) 0, that is, remove the original correction coefficient The five highest bits are 0, and we get "011111111111", which has 11 bits, which is greater than the number of bits y of the mantissa encoding sub-data. We can use truncation to take the first y bits of "01111111111" as the mantissa encoding sub-data, that is, remove the lowest bit of "11111111111" (16-y-( )) bits, that is, removing the lowest 2 bits, we can obtain the mantissa coding sub-data M as "011111111", and then obtain the coded data with the exponent coding sub-data E as 1 and the mantissa coding sub-data M as "011111111".

[0130] In the original correction factor When decoding the corresponding coded data, first obtain the original correction main coefficients The total number of bits, initial exponent width, original correction main coefficients The standard value is obtained, and then the mantissa encoded sub-data "01111111" is decoded, and 0 is added after the mantissa encoded sub-data to fill the mantissa encoded sub-data to 16 bits, and 0111111100000000 is obtained, and then the valid digits are moved to the right. The decoded data is 0000001111111100, and the decoded data and the median are calculated. The sum is the correction coefficient after decoding. The effective digit of the decoded data is 1111111100. Compared with the effective digit "11111111111" before encoding, the precision loss is: 16-y-( ) = 3.

[0131] (3) is a preset value, and z≤ +2 x -1

[0132] The number of bits of the exponential coding sub-data is set in advance to be x=2, and the number of bits of the mantissa coding sub-data is set to be y=9-1=7. +2 x -1=7. Assume The value is "111111111", according to the original correction main coefficient The total number of bits f is 16, which can be The value is written as data in the form of "0000000111111111", which is the original correction coefficient The z is 7, satisfying z≤ +2 x -1.

[0133] At this time, the exponential encoding sub-data E = z- =3, in the original correction factor When encoding, first remove All the 0s in the highest bit are removed. The z highest-order zeros result in "1111111111", with a bit number of 9, which is greater than the number of coding bit numbers y of the mantissa coding sub-data. We can use truncation to take the first y bits of "111111111" as the mantissa coding sub-data, that is, remove the (16-yz) lowest-order bits of "111111111", that is, remove the 2 lowest-order bits, and we can get the mantissa coding sub-data M of "11111111", and then get the coding data with the exponent coding sub-data E being 3 and the mantissa coding sub-data M being "11111111".

[0134] In the original correction factor When decoding the corresponding coded data, first obtain the original correction main coefficients The total number of bits, initial exponent width, original correction main coefficients The standard value is obtained, and then the mantissa encoded sub-data "1111111" is decoded, and 0 is added after the mantissa encoded sub-data to fill the mantissa encoded sub-data to 16 bits, and "1111111000000000" is obtained, and then the valid digits are moved to the right. The decoded data is "0000000111111100", and the decoded data and the median are calculated. The sum of the decoded correction coefficients is 16-yz=2. The effective digits of the decoded data are "11111110". Compared with the effective digits before encoding "11111111", the precision loss is 16-yz=2.

[0135] (4) is a preset value, and z> +2 x -1

[0136] The number of bits of the exponential coding sub-data is set in advance to be x=2, and the number of bits of the mantissa coding sub-data is set to be y=9-1=7. +2 x -1=7. Assume The value is "11111111", according to the original correction main coefficient The total number of bits f is 16, which can be The value is written as data in the form of "0000000011111111", which is the original correction coefficient 8 is 6, satisfying z> +2 x -1.

[0137] At this time, the exponential encoding sub-data E=2 x -1=3, in the original correction factor When encoding, first remove The highest position ( ) 0, that is, remove The 7 most significant 0s give "0111111111", which has 9 bits, which is greater than the number of bits y of the mantissa encoding sub-data. We can use truncation to take the first y bits of "011111111" as the mantissa encoding sub-data, that is, remove the lowest bit of "011111111" (16-y-( )) bits, that is, removing the 2 lowest bits, we can get the mantissa coding sub-data M as "0111111", and then get the coded data with the exponent coding sub-data E as 3 and the mantissa coding sub-data M as "0111111".

[0138] In the original correction factor When decoding the corresponding coded data, first obtain the original correction main coefficients The total number of bits, initial exponent width, original correction main coefficients The standard value is obtained, and then the mantissa encoded sub-data "0111111" is decoded, and 0 is added after the mantissa encoded sub-data to fill the mantissa encoded sub-data to 16 bits, and "0111111000000000" is obtained, and then the valid digits are moved to the right. The decoded data is "0000000011111100", and the decoded data and the median are calculated. The sum is the correction coefficient after decoding. The effective digit of the decoded data is "1111110". Compared with the effective digit "1111111" before encoding, the precision loss is: 16-y-( )=2.

[0139] 2. The encoded data includes a fixed sign bit.

[0140] In this case, the coded data includes not only the exponent coded sub-data and the bit coded sub-data, but also a fixed sign bit, which is usually at the first position of the coded data, and the sum of the number of coded bits of the exponent coded sub-data and the number of coded bits of the mantissa coded sub-data is equal to the number of coded bits minus 1. In this case, the first position of the coded data indicates whether the number represented by the coded data is positive or negative, and usually a sign bit of 0 indicates a positive number, and a sign bit of 1 indicates a negative number.

[0141] For example, if the original correction coefficient is encoded as an 8-bit binary number "00001111", the decimal number represented by this binary number is 15; if the original correction coefficient is encoded as an 8-bit binary number "10001111", the decimal number represented by this binary number is -133.

[0142] As mentioned above, when encoding the original correction coefficients, the difference between the number of bits of the adjusted encoding of each group of original correction coefficients and the number of effective bits of each group of original correction coefficients will affect the encoding accuracy of the original correction coefficients. For example, according to the original correction main coefficient of The effective number of digits and the original correction main coefficient The results of the corresponding adjusted difference in the number of coded bits are explained in different cases.

[0143] 2.1. Original correction main coefficients of The effective number of digits and the original correction main coefficient The corresponding difference in the adjusted number of coding bits is not greater than -1.

[0144] The difference between the number of effective digits of DIFF_Rr of the original correction main coefficient Rr and the number of adjusted coded digits corresponding to the original correction main coefficient Rr is not greater than -1, indicating that all the original correction main coefficients The effective numbers of can be expressed losslessly during encoding.

[0145] For example, assuming that the total number of bits of the original correction coefficient is 16, the total number of bits includes 1 sign bit, and the original correction main coefficient of The number of significant digits is 9, and the original correction main coefficient The corresponding adjusted coding bit number is 11. Since the total number of bits of the original correction coefficient includes 1 sign bit, the original correction main coefficient The corresponding initial exponent width is 16-9-1=6, pixel A The value of is "111111111", and after removing the 1-bit sign bit, it becomes "000000011111111".

[0146] In the right When encoding, first remove The highest 0, that is, remove 6 0, and the mantissa encoding sub-data M is "011111111". At this time, the number of bits of the mantissa encoding sub-data is 9 bits, and the original correction main coefficient The corresponding adjusted number of bits is 10, so the exponential encoding of the sub-data can be achieved without exponential encoding of the sub-data. The encoding, and due to the original correction factor The value of is a positive number, so the value of the sign bit in the encoded data is 0, and the final encoded data is: the sign bit is 0, the mantissa encoding sub-data is "011111111".

[0147] When decoding, first obtain the original correction main coefficients The total number of bits, initial exponent width, original correction main coefficients The standard value of , and then decoded to obtain the mantissa encoded sub-data "011111111", the decoded original correction main coefficient is calculated according to the following formula (4): :

[0148]

[0149] Wherein, the value of the sign bit S is 0 or 1. When S is 0, the decoded number is a positive value, and when S is -1, the decoded number is a negative value. Since there is no exponential coding sub-data in this embodiment, the exponential coding sub-data E in the above formula (2) is equal to 0.

[0150] Since the original correction main coefficient The total number of digits after removing the sign bit is 15, so add 0 to the rightmost side of the decoded mantissa "011111111" until it reaches 15 bits, and get "011111111000000", and then start shifting right. The shift rule is to shift the valid digits by the initial bit width first. , that is, 6 bits, and then shift E bits, that is, 0 bits, that is, a total of 6 bits are shifted, and after the shift, "0000000111111111" is obtained. Then, the sign bit is added to the front of the decoded number to obtain the decoded data, and finally the decoded data and the median are calculated. The sum is the correction coefficient after decoding. The effective digit "11111111" of the correction coefficient of the decoded data has no loss of precision compared with the effective digit "11111111" before encoding.

[0151] 2.2. Original Correction Main Coefficients of The effective number of digits and the original correction main coefficient The corresponding adjusted difference in the number of coded bits is greater than -1.

[0152] Similar to the embodiment described in 1.2 above, since the coded data is composed of the sign bit, the exponent coded sub-data and the mantissa coded sub-data, if the number of effective bits of DIFF_Rr corresponding to the original corrected main coefficient Rr is the same as the number of adjusted coded bits corresponding to the original corrected main coefficient Rr The difference is greater than -1, indicating that all the original correction main coefficients There will be a loss of precision when encoding the valid digits, and the encoding precision needs to be reduced through truncation and rounding.

[0153] Similar to the embodiment described in 1.2 above, the precision lost in the encoding process depends on the number of bits of the lowest bit discarded, and based on the embodiment described in 2.1 above, since the total number of bits of the original correction coefficient includes 1 sign bit, the original correction main coefficient The corresponding initial exponent width is the original correction main coefficient The original correction coefficient is the difference between the total number of digits and the effective number of digits minus one. The number of highest-order 0s after removing the sign bit is greater than The number of exponentially encoded sub-data E is recorded as E, and the maximum value of the exponentially encoded sub-data E is 2 x -1.

[0154] Similar to the embodiment described in 1.2 above, when encoding, according to z and ( ) size, and its encoding method is also different, and the number of encoding bits x of the exponential encoding sub-data can be pre-set or calculated by the following formula (5):

[0155]

[0156] The following takes the exponential coding sub-data encoding bit x as an example, which is calculated by the above formula and pre-set, as z>( ) and z≤( ) is used to illustrate the encoding and decoding process:

[0157] In one specific embodiment, assuming that the original calibration principal coefficients The total number of bits f after removing the sign bit is 15, the original correction main coefficient The corresponding initial exponent width is 4, the original correction main coefficient The corresponding maximum number of significant digits =11, the adjusted original correction main coefficient The number of bits for encoding is 10.

[0158] (1) , and z≤ +2 x -1

[0159] According to formula (3), the number of bits of the exponential coding sub-data is calculated to be x=1. Since the number of bits of the coding sub-data includes a 1-bit sign bit, 1 needs to be subtracted when calculating the number of bits of the mantissa coding sub-data y, that is, the number of bits of the mantissa coding sub-data y=10-x-1=8. +2 x -1=5. Assume The value is 11111111111, according to the original correction main coefficient The total number of bits f after removing the sign bit is 15, which can be The value is written as data in the form of "000001111111111", which is the original correction coefficient The z is 5, satisfying z≤ +2 x -1.

[0160] At this time, the exponential encoding sub-data E = z- =1, in the original correction factor When encoding, first remove All the 0s in the highest bit are removed. The z highest 0s get "11111111111", the number of bits is 10, which is greater than the number of bits y of the mantissa code sub-data. We can use truncation to take the first y bits of "1111111111" as the mantissa code sub-data, that is, remove the (15-yz) bits of the lowest bit of "1111111111", that is, remove the 2 lowest bits, and we can get the mantissa code sub-data M as "111111111". However, due to the original correction coefficient The value of is a positive number, so the value of the sign bit in the encoded data is 0. The final encoded data is: the sign bit is 0, the encoded data is the exponent encoding sub-data E is 1, and the mantissa encoding sub-data M is "11111111".

[0161] In the original correction factor When decoding the corresponding coded data, first obtain the original correction main coefficients The total number of bits, initial exponent width, original correction main coefficients The standard value is obtained, and then the mantissa encoded sub-data "11111111" is decoded, and 0 is added after the mantissa encoded sub-data to fill the mantissa encoded sub-data to 15 bits, and "111111110000000" is obtained, and then the valid digits are moved to the right. The decoded data is then calculated by adding the sign bit to the front of the decoded number to get the decoded data. The sum is the correction coefficient after decoding. The effective digit of the correction coefficient of the decoded data is 1111111100. Compared with the effective digit "1111111111" before encoding, the precision loss is: 15-yz=3.

[0162] (2) , and z> +2 x -1

[0163] According to formula (4), the number of bits of the exponential coding sub-data is x=1, and the number of bits of the mantissa coding sub-data is y=10-x-1=8. +2 x -1=5. Assume The value is 111111111, according to the original correction main coefficient The total number of bits f after removing the sign bit is 15, which can be The value is written as data in the form of "000000111111111", which is the original correction coefficient The z is 6, satisfying z> +2 x -1.

[0164] At this time, the exponential encoding sub-data E=2 x -1=1, in the original correction factor When encoding, first remove The highest position ( ) 0, that is, remove The five highest bits are 0, and we get "01111111111", which has a digit of 10, which is greater than the number of digits y of the mantissa encoding sub-data. We can use truncation to take the first y bits of "0111111111" as the mantissa encoding sub-data, that is, remove the lowest bit of "0111111111" (15-y-( )) bits, that is, removing the lowest 2 bits, the mantissa encoded sub-data M can be obtained as "01111111", and due to the original correction coefficient The value of is a positive number, so the value of the sign bit in the encoded data is 0. The final encoded data is: the sign bit is 0, the exponent encoding sub-data E is 1, and the mantissa encoding sub-data M is "01111111".

[0165] In the original correction factor When decoding the corresponding coded data, first obtain the original correction main coefficients The total number of bits, initial exponent width, original correction main coefficients The standard value is obtained, and then the mantissa encoded sub-data "01111111" is decoded, and 0 is added after the mantissa encoded sub-data to fill the mantissa encoded sub-data to 15 bits, and "011111110000000" is obtained, and then the valid digits are moved to the right. Then add the sign bit to the front of the decoded number to get the decoded data, and finally calculate the decoded data and the median. The sum is the correction coefficient after decoding. The effective digits of the decoded data are "111111110". Compared with the effective digits before encoding "1111111111", the precision loss is: 15-y-( )=2.

[0166] (3) is a preset value, and z≤ +2 x -1

[0167] The number of bits of the exponential coding sub-data is set in advance to be x=2, and the number of bits of the mantissa coding sub-data is set to be y=10-x-1=7. +2 x -1=7. Assume The value is "11111111", according to the original correction main coefficient The total number of bits f after removing the sign bit is 15, which can be The value is written as data in the form of "000000011111111", which is the original correction coefficient The z is 7, satisfying z≤ +2 x -1.

[0168] At this time, the exponential encoding sub-data E = z- =3, in the original correction factor When encoding, first remove All the 0s in the highest bit are removed. The z highest 0s get "111111111", which has 8 bits, which is greater than the number of bits y of the mantissa code sub-data. We can use truncation to take the first y bits of "111111111111" as the mantissa code sub-data, that is, remove the (15-yz) bits of the lowest bit of "11111111111", that is, remove the lowest bit, and we can get the mantissa code sub-data M as "1111111". However, due to the original correction coefficient The value of is a positive number, so the value of the sign bit in the encoded data is 0. The final encoded data is: the sign bit is 0, the exponent encoding sub-data E is 3, and the mantissa encoding sub-data M is "1111111".

[0169] In the original correction factor When decoding the corresponding coded data, first obtain the original correction main coefficients The total number of bits, initial exponent width, original correction main coefficients The standard value is obtained, and then the mantissa encoded sub-data "1111111" is decoded, and 0 is added after the mantissa encoded sub-data to fill the mantissa encoded sub-data to 15 bits, and "111111100000000" is obtained, and then the valid digits are moved to the right. The decoded data is then calculated by adding the sign bit to the front of the decoded number to get the decoded data. The sum of the decoded correction coefficients is 15-yz=1. The effective digits of the decoded data are "11111110". Compared with the effective digits before encoding "11111111", the precision loss is: 15-yz=1.

[0170] (4) is a preset value, and z> +2 x -1

[0171] The number of bits of the exponential coding sub-data is set in advance to be x=2, and the number of bits of the mantissa coding sub-data is set to be y=10-x-1=7. +2 x -1=7. Assume The value is "1111111", according to the original correction main coefficient The total number of bits f after removing the sign bit is 15, which can be The value is written as data in the form of "000000001111111", which is the original correction coefficient 8 is 6, satisfying z> +2 x -1.

[0172] At this time, the exponential encoding sub-data E=2 x -1=3, in the original correction factor When encoding, first remove The highest position ( ) 0, that is, remove The 7 most significant 0s give "01111111", which has 8 bits, which is greater than the number of bits y of the mantissa encoding sub-data. We can use truncation to take the first y bits of "01111111" as the mantissa encoding sub-data, that is, remove the lowest bit of "01111111" (15-y-( )) bits, that is, removing the lowest bit, the mantissa encoded sub-data M can be obtained as "0111111", and due to the original correction coefficient The value of is a positive number, so the value of the sign bit in the encoded data is 0. The final encoded data is: the sign bit is 0, the exponent encoding sub-data E is 3, and the mantissa encoding sub-data M is "0111111".

[0173] In the original correction factor When decoding the corresponding coded data, first obtain the original correction main coefficients The total number of bits, initial exponent width, original correction main coefficients The standard value is obtained, and then the mantissa encoded sub-data "0111111" is decoded, and 0 is added after the mantissa encoded sub-data to fill the mantissa encoded sub-data to 15 bits, and "011111100000000" is obtained, and then the valid digits are moved to the right. Then, we get "000000001111110", and finally add the sign bit to the front of the decoded number to get the decoded data. Finally, we calculate the decoded data and the median. The sum is the correction coefficient after decoding. The effective digit of the decoded data is "1111110". Compared with the effective digit "1111111" before encoding, the precision loss is: 15-y-( )=1.

[0174] Based on the above embodiment, the precision lost in the encoding process depends on the number of the lowest bits discarded, and based on the above embodiment, it can be seen that when z≤ +2 x -1, the precision lost during encoding is: fyz, recorded as precision loss 1; +2 x -1, the precision lost during encoding is: f- y-( ), recorded as precision loss 2. Since the number of bits of the exponential coding sub-data x + the number of bits of the mantissa coding sub-data y = the number of bits of the coded data dst_bit, the precision loss 1 can be written as: f-(dst_bit-x)-z = x+ f -z-dst_bit, and the precision loss 2 can be written as: f-(dst_bit-x)-( ) = x- +f-dst_bit- +1.

[0175] Based on the above embodiments 1, it can be seen that when the number of encoding bits of the exponential encoding word data x is fixed, the maximum value of the precision loss 1 is when z takes the minimum value, and the minimum value of z is , and because ,and ,therefore, , further, the maximum value of precision loss 1 is: x + f-( )-dst_bit= x+ -dst_bit; When the number of bits of the exponential coding word data x is fixed, the precision loss of 2 can be rewritten as: x- +f-dst_bit-( ) + 1 = x- +1+ -dst_bit.

[0176] because Lossless encoding can be achieved when it is not greater than dst_bit. Therefore, the following only applies to The case where the bit is greater than dst_bit is discussed below.

[0177] exist If it is greater than dst_bit, the precision loss is at least 1. - The precision loss of dst_bit cannot be avoided by setting the number of bits x of the exponential encoding sub-data. Therefore, the precision loss introduced by the unreasonable setting of x is: x+ -dst_bit- -dst_bit) = x;

[0178] The precision loss of 2 can be avoided by setting x appropriately, that is, there exists x- +1+ - dst_bit=0, so the precision loss introduced by the unreasonable setting of x is x- +1+ -dst_bit.

[0179] Due to x- +1 is less than 0 and decreases as x increases. That is, as x increases, the precision loss 1 will become more unreasonable, while the precision loss 2 will become more reasonable. Therefore, in order to balance the loss, the precision loss 1 and the precision loss 2 caused by the unreasonable setting of x should be equal, that is, x=x- +1+ - dst_bit, which can be roughly written as: x=x- + - dst_bit, which can be rewritten as: = - dst_bit, calculated , that is to say, in The most reasonable value is when.

[0180] The original correction coefficient in the above embodiment is integer data with a length of 16 bits, such as short integer data in C language, and the above embodiment is only an encoding method for the original correction coefficient as integer data. In other possible embodiments, the original correction coefficient may also be other types of data besides integer data. Without loss of generality, if the original correction coefficient is other types of data besides integer data, its encoding method is similar to the above encoding method, and the embodiments of the present application will not be repeated.

[0181] Based on the above embodiments, the processing architecture of the correction coefficient in the correction coefficient encoding and decoding method provided in the embodiment of the present application is as follows: Figure 4 As shown, it includes two processes, encoding and decoding. The encoding process includes the statistical process of each group of original correction coefficients and the encoding and compression process of the original correction coefficients. The decoding process includes the file header information decompression process and the correction coefficient decompression process to obtain the decompressed correction coefficient. After the encoding process is completed, the encoded data will be cached in the memory.

[0182] Specifically, the processing flow of the correction coefficient encoding and decoding method provided in the embodiment of the present application is as follows: Figure 5 As shown, in the encoding process, firstly, each group of original correction coefficients is counted (corresponding to the aforementioned step S10), then the median of each group of original correction coefficients is calculated and the difference between the maximum effective digit and the corresponding coding digit corresponding to each group of original correction coefficients is calculated (corresponding to the aforementioned step S20 to step S50), then the groups of original correction coefficients are sorted based on the median of each group of original correction coefficients and the difference between the maximum effective digit and the corresponding coding digit corresponding to each group of original correction coefficients, and the coding bit width of each group of original correction coefficients is adjusted (corresponding to the aforementioned step S60) to obtain the adjusted coding bit width of each group of original correction coefficients, and then the basic information such as the standard value, total number of bits, initial exponent bit width, coding bit width and the corresponding standard value of each group of original correction coefficients is written into the file header of the compressed file, and finally, based on the standard value, total number of bits, initial exponent bit width and coding bit width corresponding to each group of original correction coefficients, each original correction coefficient is encoded point by point (corresponding to the aforementioned step S70), and each encoded data is obtained and written into the compressed file.

[0183] Compressed files such as Figure 6 As shown, taking the encoding data including the sign bit as an example, the compressed file is composed of a compressed header file area and compressed point-by-point correction coefficients. The compressed header file area of ​​the compressed file includes 9 groups of original correction coefficients (i.e., Rr, , , , , , , , ), E refers to the bit width (i.e., the number of encoding bits of the exponential encoding sub-data), the initial exponent bit width, and the total bit width. During the encoding compression process, the encoded data of each original correction coefficient includes a 1-bit sign bit S, an exponent bit E with an encoding bit of x bits, and a mantissa M with an encoding bit of y bits. The length of the exponent bit E is uncertain, but the value range of x is 0~3. The total bit width of the encoded data of the original correction coefficient remains at (x+y+1) bits.

[0184] During the decoding process, after obtaining the compressed file, the file header of the compressed file is parsed first, and the standard value, total number of bits, initial exponent bit width, encoding bit width and other information corresponding to each group of original correction coefficients are read from the file header of the compressed file. Then, based on the above basic information, decoding is performed point by point to obtain the decoded correction coefficients.

[0185] Based on the above embodiment, in a possible implementation manner, the correction coefficient encoding method in the embodiment of the present application further includes:

[0186] Obtain the total number of digits of the maximum value of the first difference value of each group of original correction coefficients as the fourth digit corresponding to each group of original correction coefficients;

[0187] Calculate the difference between the fourth digit and the second digit corresponding to each group of original correction coefficients to obtain the initial exponent bit width corresponding to each group of original correction coefficients;

[0188] The coded data includes exponential coded sub-data and mantissa coded sub-data. The exponential coded sub-data is used to represent zE in , the mantissa encoding sub-data is used to represent the mantissa of the original correction coefficient in the form of exponential notation; where z is the difference between the total number of digits of the original correction coefficient and the corresponding second digit, E in is the initial exponent bit width corresponding to the original correction coefficient.

[0189] By using an embodiment of the present application, the number of 0s in the highest bit of the maximum value of the first difference corresponding to each group of original correction coefficients is calculated as the initial exponent bit width corresponding to the group of original correction coefficients. In the process of encoding the original correction coefficients, the amount of calculation in the encoding process can be reduced, thereby improving the encoding efficiency.

[0190] Based on the above embodiments, in a possible implementation manner, each original correction coefficient is integer data with a signed bit, and the encoded data includes exponent encoding sub-data with a length of a fifth digit and mantissa encoding sub-data with a length of a sixth digit; wherein the sum of the fifth digit and the sixth digit is equal to the third digit or the third digit minus one, and the fifth digit is the number of digits of the target n-ary number obtained by writing the second difference as an n-ary number.

[0191] By adopting the embodiment of the present application, the length of the exponent coding sub-data and the length of the mantissa coding sub-data are determined, so as to facilitate the rapid and accurate analysis and restoration of the original correction coefficients in the subsequent decoding process.

[0192] Based on the above embodiment, in a possible implementation manner, the correction coefficient encoding method in the embodiment of the present application further includes:

[0193] For each original correction coefficient, calculate the difference between the total number of digits f of the original correction coefficient and the corresponding second digit, and obtain the seventh digit z corresponding to the original correction coefficient;

[0194] If z is less than (E in +n x ), the mantissa coded sub-data is obtained by removing the z zeros on the highest bit of the original correction coefficient and the (fyz) values ​​on the lowest bit of the original correction coefficient, and the exponent coded sub-data is zE in ;

[0195] If z is greater than or equal to (E in +n x ), the mantissa coded sub-data is the highest bit of the original correction coefficient (E in +n x -1) 0, and remove the lowest bit of the original correction coefficient [fy-(E in +n x -1)] values, the exponential encoding sub-data is n x -1.

[0196] By adopting the embodiment of the present application, the encoding method of the original correction coefficient is determined according to the difference between the total number of bits of the original correction coefficient and the corresponding second number of bits, so that the original correction coefficient can be encoded quickly and accurately, thereby improving the encoding efficiency.

[0197] Corresponding to the first aspect, the second aspect of the embodiment of the present application provides a correction coefficient decoding method, such as Figure 7 FIG. 1 is a schematic diagram of a correction coefficient decoding method provided in an embodiment of the present application, and the method comprises the following steps:

[0198] Step S100, obtaining the standard value corresponding to each group of original correction coefficients;

[0199] Step S200, decoding the coded data of each original correction coefficient to obtain each decoded data;

[0200] The encoded data of each original correction coefficient is obtained by encoding according to the correction coefficient encoding method provided in the first aspect above;

[0201] Step S300, calculating the sum of each decoded data and the corresponding standard value to obtain each decoded correction coefficient.

[0202] By adopting the embodiment of the present application, in the process of encoding each original correction coefficient, the number of coding bits configured for each group of original correction coefficients is adjusted in the direction of making the difference between the number of coding bits of each group of original correction coefficients and the number of effective bits of the original correction coefficients become 0, and the encoding accuracy of the correction coefficients with redundant coding bit widths is transferred to the correction coefficients with insufficient coding bit widths, thereby reducing the encoding compression error of each correction coefficient. Therefore, the error between the decoded correction coefficient after decoding the encoded data and the original correction coefficient is smaller, thereby improving the correction effect of the decoded correction coefficient.

[0203] Based on the foregoing embodiment, in a possible implementation manner, each decoded data is decoded in the following manner:

[0204]

[0205] in, To decode the data, S is the value of the sign bit, is the index encoding subdata, Encodes the sub-data for the mantissa.

[0206] In a possible implementation manner, each decoded data may also be obtained according to the following method:

[0207] For the coded data of each original correction coefficient, the coded data of the original correction coefficient is decoded to obtain the mantissa coded sub-data corresponding to the original correction coefficient;

[0208] Add the highest bit of the mantissa encoding sub-data 0, add p 0s at the end of the mantissa coded sub-data to obtain the decoded data corresponding to the original correction coefficient, where the total number of bits of the decoded data corresponding to the original correction coefficient minus the number of bits of the mantissa coded sub-data equals or .

[0209] By adopting the embodiments of the present application, each decoded correction coefficient can be obtained quickly and accurately, thereby improving decoding efficiency.

[0210] Corresponding to the first and second aspects, the third aspect of the embodiment of the present application provides a method for color brightness correction of an LED display screen, the method being applied to a receiving card in an LED display system, the LED display system being as follows: Figure 8a The system shown includes a receiving card 810 and a light emitting diode display screen 820 .

[0211] The receiving card 810 pre-stores the file header and the coded data corresponding to each pixel in the LED display screen 820. The coded data is obtained by encoding the original correction coefficient of the pixel according to any of the correction coefficient encoding methods described above. The file header records the standard values ​​corresponding to each group of original correction coefficients in the correction coefficient encoding method.

[0212] The LED display screen color brightness correction method provided by this application is as follows: Figure 8b As shown, including:

[0213] Step S81, in response to the light emitting diode display screen enabling the color brightness correction function, determining the standard value corresponding to each group of original correction coefficients from the file header;

[0214] That is, when the color brightness correction function is turned on, the standard values ​​corresponding to each group of original correction coefficients are determined from the file header; for the standard values ​​corresponding to each group of original correction coefficients, please refer to the aforementioned description of the correction coefficient encoding method, which will not be repeated here.

[0215] Step S82, respectively decode the coded data corresponding to each pixel in the light emitting diode display screen to obtain decoded data corresponding to each pixel.

[0216] For the decoding method, please refer to the above description of the correction coefficient decoding method. In this article, the decoded data corresponding to a pixel point refers to: the data obtained by decoding the encoded data corresponding to the pixel point. For example, the decoded data corresponding to the pixel point (1,1) is: the data obtained by decoding the encoded data corresponding to the pixel point (1,1). And because there are multiple correction coefficients for each pixel point, each pixel point corresponds to multiple encoded data and also corresponds to multiple decoded data. Exemplarily, the pixel point (1,1) can correspond to 9 encoded data, and these 9 encoded data are respectively obtained based on the Rr, Rg, Rb, Gr, Gg, Gb, Br, Bg, Bb encoding of the pixel point (1,1). Encoding these 9 encoded data will obtain 9 decoded data, and these 9 decoded data are all decoded data corresponding to the pixel point (1,1).

[0217] Step S83, calculating the sum of the decoded data corresponding to each pixel point and the corresponding standard value, and obtaining the decoded correction coefficient corresponding to each pixel point.

[0218] In this article, a standard value corresponding to a decoded data refers to: the standard value corresponding to the correction coefficient to which the decoded data belongs, and the correction coefficient to which the decoded data belongs refers to: the correction coefficient based on which the encoded data obtained by decoding the decoded data is encoded. Exemplarily, if the decoded data A is the data obtained by decoding the encoded data B, and the encoded data B is obtained by encoding the first difference of Rr, then the correction coefficient to which the decoded data A belongs is Rr, and the standard value corresponding to the decoded data A is the standard value corresponding to Rr. As described above with respect to the standard value, in this example, the standard value corresponding to the decoded data A can be the median value of Rr of all pixels in the LED display.

[0219] It is understandable that, due to possible losses in the encoding process, the decoded correction coefficient corresponding to the pixel point may differ from the original correction coefficient of the pixel point to a certain extent.

[0220] Step S84, performing color and brightness correction on each pixel in the LED display screen according to the decoded correction coefficient corresponding to each pixel.

[0221] After obtaining the decoded correction coefficient of each pixel, the receiving card can perform the following steps for each pixel on the LED display: obtain the original color brightness of the pixel, adjust the original color brightness according to the decoded correction coefficient of the pixel to obtain the target color brightness, and adjust the color brightness of the pixel to the target color brightness. Take the case where the correction coefficient is composed of the aforementioned Rr, Rg, Rb, Gr, Gg, Gb, Br, Bg, Bb as an example, and the color brightness is represented by the components of the three channels of R, G, and B of the pixel, then the aforementioned method of adjusting the original color brightness is as follows:

[0222] First, the following matrix is ​​constructed based on Rr, Rg, Rb, Gr, Gg, Gb, Br, Bg, and Bb in the decoded correction coefficients:

[0223]

[0224] The target color brightness is calculated according to the following formula:

[0225]

[0226] Among them, (R, G, B) is the original color brightness, R is the component of the red channel of the pixel before color brightness correction, G is the component of the green channel of the pixel before color brightness correction, B is the component of the blue channel of the pixel before color brightness correction, and (R', G', B') is the target color brightness.

[0227] Then, the receiving card adjusts the red channel component of the pixel to R', the green channel component of the pixel to G', and the blue channel component of the pixel to B', thereby adjusting the color brightness of the pixel to the target color brightness. By making the above adjustments to all pixels, the color brightness correction of the LED display can be achieved.

[0228] The color brightness correction method for an LED display screen provided by the present application can reduce the encoding compression error of each correction coefficient without occupying additional memory space of the receiving card through the correction coefficient encoding method provided by the present application, so that when color brightness correction is required, the receiving card can decode to obtain a more accurate correction coefficient, thereby accurately correcting the color brightness of the LED display screen, thereby improving the display quality of the LED display screen.

[0229] Corresponding to the first aspect, a fourth aspect of the embodiments of the present application provides a correction coefficient encoding device, such as Fig. 9 The figure is a schematic diagram of the structure of the correction coefficient encoding device provided in an embodiment of the present application, the device comprising:

[0230] The coefficient acquisition module 901 is used to acquire multiple groups of original correction coefficients and acquire the number of coding bits configured for each group of original correction coefficients as the first digit corresponding to each group of original correction coefficients;

[0231] A median calculation module 902 is used to calculate the median of each group of original correction coefficients as the standard value corresponding to each group of original correction coefficients;

[0232] A first difference calculation module 903, used to calculate the difference between each original correction coefficient and the corresponding standard value as the first difference of each original correction coefficient;

[0233] The effective digit determination module 904 is used to determine the effective digits of the maximum value of the first difference of each group of original correction coefficients as the second digits corresponding to each group of original correction coefficients;

[0234] The second difference calculation module 905 is used to calculate the difference between the first digit and the second digit corresponding to each group of original correction coefficients, and obtain the second difference corresponding to each group of original correction coefficients;

[0235] A bit number adjustment module 906 is used to adjust the number of coded bits configured for each group of original correction coefficients in a direction such that the second difference value corresponding to each group of the original correction coefficients becomes 0, while keeping the sum of the coded positions configured for each group of original correction coefficients unchanged, so as to obtain a third digit corresponding to each group of original correction coefficients;

[0236] The first encoding module 907 is used to encode the first difference of each original correction coefficient into encoding data with a length of the corresponding third bit as the encoding data of each original correction coefficient.

[0237] By using the embodiment of the present application, in the process of encoding each original correction coefficient, the number of coding bits configured for each group of original correction coefficients is adjusted in the direction of making the difference between the number of coding bits of each group of original correction coefficients and the number of effective bits of the original correction coefficients become 0, and the coding accuracy of the correction coefficients with redundant coding bit widths is transferred to the correction coefficients with insufficient coding bit widths, thereby reducing the coding compression error of each correction coefficient.

[0238] Corresponding to the aforementioned second aspect, a fifth aspect of the embodiments of the present application provides a correction coefficient decoding device, such as Fig.10 The figure is a schematic diagram of the structure of a correction coefficient decoding device provided in an embodiment of the present application, the device comprising:

[0239] The standard value acquisition module 1001 is used to obtain the standard value corresponding to each group of original correction coefficients;

[0240] A first decoding module 1002 is used to decode the coded data of each original correction coefficient to obtain each decoded data; wherein the coded data of each original correction coefficient is obtained by encoding according to any one of the correction coefficient encoding methods described in the first aspect;

[0241] The correction coefficient calculation module 1003 is used to calculate the sum of each decoded data and the corresponding standard value to obtain each decoded correction coefficient.

[0242] By adopting the embodiment of the present application, in the process of encoding each original correction coefficient, the number of coding bits configured for each group of original correction coefficients is adjusted in the direction of making the difference between the number of coding bits of each group of original correction coefficients and the number of effective bits of the original correction coefficients become 0, the encoding accuracy of the correction coefficients with redundant coding bit widths is transferred to the correction coefficients with insufficient coding bit widths, thereby reducing the encoding compression error of each correction coefficient. Therefore, the error between the decoded correction coefficient after decoding the encoded data and the original correction coefficient is smaller, thereby improving the color brightness correction effect of the decoded correction coefficient.

[0243] Corresponding to the third aspect, a sixth aspect of the embodiment of the present application provides a color brightness correction device for an LED display screen, which is applied to a receiving card in an LED display system, wherein the LED display system also includes an LED display screen, and the receiving card pre-stores a file header and encoding data corresponding to each pixel in the LED display screen, wherein the encoding data is obtained by encoding the original correction coefficient of the pixel point according to the correction coefficient encoding method described in the first aspect, and the file header records the standard values ​​corresponding to each group of original correction coefficients in the correction coefficient encoding method, and the device includes:

[0244] A reading module, configured to determine the standard values ​​corresponding to the respective groups of original correction coefficients from the file header in response to the LED display screen enabling the color brightness correction function;

[0245] A second decoding module is used to decode the coded data corresponding to each pixel in the LED display screen to obtain decoded data corresponding to each pixel;

[0246] A coefficient calculation module is used to calculate the sum of the decoded data corresponding to each pixel point and the corresponding standard value to obtain the decoded correction coefficient corresponding to each pixel point;

[0247] The correction module is used to perform color brightness correction on each pixel in the LED display screen according to the decoded correction coefficient corresponding to each pixel.

[0248] By adopting the embodiment of the present application, in the process of encoding each original correction coefficient, the number of coding bits configured for each group of original correction coefficients is adjusted in the direction of making the difference between the number of coding bits of each group of original correction coefficients and the number of effective bits of the original correction coefficients become 0, and the encoding accuracy of the correction coefficients with redundant coding bit widths is transferred to the correction coefficients with insufficient coding bit widths, thereby reducing the encoding compression error of each correction coefficient. Therefore, the error between the decoded correction coefficient after decoding the encoded data and the original correction coefficient is smaller, thereby improving the correction effect of the decoded correction coefficient.

[0249] The present application also provides an electronic device, such as Fig.11 As shown, including:

[0250] Memory 1101, used for storing computer programs;

[0251] The processor 1102 is used to implement the aforementioned correction coefficient encoding method or correction coefficient decoding method or LED display screen color brightness correction method when executing the program stored in the memory 1101.

[0252] The memory may include a random access memory (RAM) or a non-volatile memory (NVM), such as at least one disk memory. Optionally, the memory may also be at least one storage device located away from the aforementioned processor.

[0253] The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.

[0254] In another embodiment provided in the present application, a computer-readable storage medium is also provided, which stores a computer program. When the computer program is executed by a processor, the steps of any of the above-mentioned correction coefficient encoding methods or correction coefficient decoding methods or LED display color brightness correction methods are implemented.

[0255] In another embodiment provided in the present application, a computer program product comprising instructions is also provided, which, when executed on a computer, enables the computer to execute any correction coefficient encoding method or correction coefficient decoding method or LED display screen color brightness correction method in the above-mentioned embodiments.

[0256] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions may be transmitted from a website site, computer, server or data center to another website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium may be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrated. The available medium may be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a solid-state hard disk (SSD), etc.

[0257] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.

[0258] Each embodiment in this specification is described in a related manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0259] The above description is only a preferred embodiment of the present application and is not intended to limit the protection scope of the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application are included in the protection scope of the present application.

Claims

1. A correction coefficient encoding method, characterized in that: The method comprises: Acquire multiple groups of original correction coefficients, and acquire the number of encoding bits configured for each group of original correction coefficients as the first digit corresponding to each group of original correction coefficients; Calculate the median of each group of original correction coefficients respectively as the standard value corresponding to each group of original correction coefficients; Calculating the difference between each original correction coefficient and the corresponding standard value respectively as the first difference of each original correction coefficient; Determine respectively the number of significant digits of the maximum value of the first difference value of each group of original correction coefficients as the second digit corresponding to each group of original correction coefficients; Calculate the difference between the first digit and the second digit corresponding to each group of original correction coefficients to obtain the second difference corresponding to each group of original correction coefficients; Under the condition that the sum of the number of coded bits configured for each group of original correction coefficients remains unchanged, the number of coded bits configured for each group of original correction coefficients is adjusted in a direction that makes the second difference value corresponding to each group of the original correction coefficients become 0, so as to obtain a third digit corresponding to each group of original correction coefficients; The first difference value of each original correction coefficient is encoded into encoded data having a length equal to the corresponding third bit number as the encoded data of each original correction coefficient.

2. The method according to claim 1, characterized in that: The method further comprises: Obtain the total number of digits of the maximum value of the first difference value of each group of original correction coefficients as the fourth number corresponding to each group of original correction coefficients; Calculate the difference between the fourth digit and the second digit corresponding to each group of original correction coefficients to obtain the initial exponent bit width corresponding to each group of original correction coefficients; The coded data includes exponential coded sub-data and mantissa coded sub-data, wherein the exponential coded sub-data is used to represent z- in , the mantissa encoding sub-data is used to represent the mantissa of the original correction coefficient when it is represented in the form of exponential notation; wherein z is the difference between the total number of digits of the original correction coefficient and the corresponding second number of digits, E in is the initial exponent bit width corresponding to the original correction coefficient.

3. The method according to claim 2, characterized in that Each of the original correction coefficients is integer data with a signed bit, and the encoded data includes exponential encoding sub-data with a length of a fifth digit and mantissa encoding sub-data with a length of a sixth digit; wherein the sum of the fifth digit and the sixth digit is equal to the third digit or the third digit minus one, and the fifth digit is the number of digits of the target n-ary number obtained by writing the second difference as an n-ary number.

4. The method according to claim 3, characterized in that The method further comprises: For each of the original correction coefficients, calculate the difference between the total number of digits f of the original correction coefficient and the corresponding second number of digits to obtain a seventh number z corresponding to the original correction coefficient; If z is less than (E in +n x ), the mantissa encoding sub-data is obtained by removing the z zeros on the highest bit of the original correction coefficient and removing the (fyz) values ​​on the lowest bit of the original correction coefficient, and the exponent encoding sub-data is zE in ; If z is greater than or equal to (E in +n x ), the mantissa coded sub-data is the (E) of the original correction coefficient minus the highest bit. in +n x -1) 0, and remove the [fy-(E in +n x -1)] values, the exponential encoding sub-data is n x -1.

5. The method according to claim 1, characterized in that The obtaining of multiple groups of original correction coefficients includes: Obtaining correction coefficients corresponding to respective pixels on the LED display screen, wherein the correction coefficients include an Rr correction coefficient, an Rg correction coefficient, an Rb correction coefficient, a Gr correction coefficient, a Gg correction coefficient, a Gb correction coefficient, a Br correction coefficient, a Bg correction coefficient, and a Bb correction coefficient; Divide the Rr correction coefficients corresponding to the respective pixel points into a group of original correction coefficients, divide the Rg correction coefficients corresponding to the respective pixel points into a group of original correction coefficients, divide the Rb correction coefficients corresponding to the respective pixel points into a group of original correction coefficients, divide the Gr correction coefficients corresponding to the respective pixel points into a group of original correction coefficients, divide the Gg correction coefficients corresponding to the respective pixel points into a group of original correction coefficients, divide the Gb correction coefficients corresponding to the respective pixel points into a group of original correction coefficients, divide the Br correction coefficients corresponding to the respective pixel points into a group of original correction coefficients, divide the Bg correction coefficients corresponding to the respective pixel points into a group of original correction coefficients, and divide the Bb correction coefficients corresponding to the respective pixel points into a group of original correction coefficients; Among them, the Rr correction coefficient is the correction coefficient of the red light point under the red channel, the Rg correction coefficient is the correction coefficient of the green light point under the red channel, and the Rb correction coefficient is the correction coefficient of the blue light point under the red channel; the Gr correction coefficient is the correction coefficient of the red light point under the green channel, the Gg correction coefficient is the correction coefficient of the green light point under the green channel, and the Gb correction coefficient is the correction coefficient of the blue light point under the green channel; the Br correction coefficient is the correction coefficient of the red light point under the blue channel, the Bg correction coefficient is the correction coefficient of the green light point under the blue channel, and the Bb correction coefficient is the correction coefficient of the blue light point under the blue channel.

6. A correction coefficient decoding method, characterized in that: The method comprises: Obtain the standard value corresponding to each group of original correction coefficients; Decoding the coded data of each original correction coefficient to obtain each decoded data; wherein the coded data of each original correction coefficient is obtained by encoding according to any one of the encoding methods according to claims 1-5; The sum of each decoded data and the corresponding standard value is calculated to obtain each correction coefficient after decoding.

7. The method according to claim 6, characterized in that The decoded data are obtained by decoding in the following manner: ; Among them, dec_data is the decoded data, S is the value of the sign bit, E is the exponent encoding sub-data, and M is the mantissa encoding sub-data.

8. The method according to claim 7, characterized in that The decoding of the encoded data of each original correction coefficient to obtain each decoded data includes: For each original correction coefficient encoding data, the encoding data of the original correction coefficient is decoded to obtain mantissa encoding sub-data corresponding to the original correction coefficient; The most significant bit of the mantissa encoding sub-data is supplemented (E in +E) 0s, p 0s are added to the end of the mantissa coded sub-data to obtain the decoded data corresponding to the original correction coefficient, wherein the total number of bits of the decoded data corresponding to the original correction coefficient minus the number of bits of the mantissa coded sub-data is equal to (E in + E+ p) or (E in + E+ p+1).

9. A method for correcting color brightness of an LED display screen, characterized in that: The method is applied to a receiving card in an LED display system, wherein the LED display system also includes an LED display screen, wherein a file header and coding data corresponding to each pixel in the LED display screen are pre-stored in the receiving card, wherein the coding data is obtained by encoding the original correction coefficient of the pixel according to the correction coefficient coding method described in any one of claims 1 to 5, and the file header records the standard values ​​corresponding to each group of original correction coefficients in the correction coefficient coding method; The method comprises: In response to the LED display screen enabling a color brightness correction function, determining standard values ​​corresponding to respective groups of original correction coefficients from the file header; Decoding the coded data corresponding to each pixel in the LED display screen respectively to obtain decoded data corresponding to each pixel; Calculate the sum of the decoded data corresponding to each pixel and the corresponding standard value to obtain the decoded correction coefficient corresponding to each pixel; Color brightness correction is performed on each pixel in the LED display screen according to the decoded correction coefficient corresponding to each pixel.

10. An electronic device, characterized in that: include: Memory, used to store computer programs; A processor, for implementing any of the methods described in claims 1-9 when executing a program stored in a memory.

11. A computer program product, characterized in that When the computer program product is executed on a computer, the computer is enabled to execute the method according to any one of claims 1 to 9.

Citation Information

Patent Citations

  • Wireless sensor networks data compression method based on self-adaptive optimal zero suppression

    CN102202349A

  • Colmv data lossless compression method and system based on inter decoding

    CN109660809A