CN119229801B - LED display screen color brightness correction method and correction coefficient encoding and decoding method - Google Patents
LED display screen color brightness correction method and correction coefficient encoding and decoding method Download PDFInfo
- Publication number
- CN119229801B CN119229801B CN202411757132.9A CN202411757132A CN119229801B CN 119229801 B CN119229801 B CN 119229801B CN 202411757132 A CN202411757132 A CN 202411757132A CN 119229801 B CN119229801 B CN 119229801B
- Authority
- CN
- China
- Prior art keywords
- correction coefficient
- data
- original
- original correction
- encoding
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Classifications
-
- G—PHYSICS
- G09—EDUCATION; CRYPTOGRAPHY; DISPLAY; ADVERTISING; SEALS
- G09G—ARRANGEMENTS OR CIRCUITS FOR CONTROL OF INDICATING DEVICES USING STATIC MEANS TO PRESENT VARIABLE INFORMATION
- G09G3/00—Control arrangements or circuits, of interest only in connection with visual indicators other than cathode-ray tubes
- G09G3/20—Control arrangements or circuits, of interest only in connection with visual indicators other than cathode-ray tubes for presentation of an assembly of a number of characters, e.g. a page, by composing the assembly by combination of individual elements arranged in a matrix no fixed position being assigned to or needed to be assigned to the individual characters or partial characters
- G09G3/22—Control arrangements or circuits, of interest only in connection with visual indicators other than cathode-ray tubes for presentation of an assembly of a number of characters, e.g. a page, by composing the assembly by combination of individual elements arranged in a matrix no fixed position being assigned to or needed to be assigned to the individual characters or partial characters using controlled light sources
- G09G3/30—Control arrangements or circuits, of interest only in connection with visual indicators other than cathode-ray tubes for presentation of an assembly of a number of characters, e.g. a page, by composing the assembly by combination of individual elements arranged in a matrix no fixed position being assigned to or needed to be assigned to the individual characters or partial characters using controlled light sources using electroluminescent panels
- G09G3/32—Control arrangements or circuits, of interest only in connection with visual indicators other than cathode-ray tubes for presentation of an assembly of a number of characters, e.g. a page, by composing the assembly by combination of individual elements arranged in a matrix no fixed position being assigned to or needed to be assigned to the individual characters or partial characters using controlled light sources using electroluminescent panels semiconductive, e.g. using light-emitting diodes [LED]
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- Computer Hardware Design (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Compression, Expansion, Code Conversion, And Decoders (AREA)
Abstract
Description
技术领域Technical Field
本申请涉及图像处理领域,特别是涉及一种LED显示屏色亮度校正方法和校正系数编、解码方法。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
作为信息传播与视觉艺术展现的重要载体,电子显示屏的显示效果关乎信息传递的准确性和用户的体验,但由于灯珠制造工艺的限制以及光谱差异,显示屏往往会遭遇色彩不均、亮度差异显著的问题。为了使得显示屏保持良好的显示效果,避免出现上述问题,需要定期对显示屏进行逐点校正。逐点校正是一项用于提升显示屏亮色均匀度和色彩保真度的技术,通过对显示屏上的每个像素区域的亮度数据进行采集,并获取每个像素的校正系数矩阵,利用校正系数矩阵对每个像素进行校正,使得显示屏的每个像素的色彩得到真实还原。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.
在对显示屏进行色亮度校正处理过程中,通常是上位机将显示屏的亮色校正系数(下文称为校正系数)发送至接收卡,并进行存储。而针对上的每个像素点均存在一个校正系数矩阵,每个像素点的校正系数矩阵由9个系数组成,每个系数量化范围15bit或16bit,则针对一个像素点的校正系数可达到144bit,以640x360箱体显示屏为例,显示屏上有640x360个像素点,则需要存储的校正系数至少需要4050KB,对存储要求和带宽要求较高。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.
相关技术中采用将校正系数编码压缩至目标bit的方式来降低校正系数的数据量,但这样在解码时可能会导致压缩误差较大,进而影响校正效果。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
本申请实施例的目的在于提供一种LED显示屏色亮度校正方法和校正系数编、解码方法,以减小校正系数的压缩误差。具体技术方案如下: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:
本申请实施例的第一方面,提供了一种校正系数编码方法,所述方法包括:In a first aspect of an embodiment of the present application, a correction coefficient encoding method is provided, the method comprising:
获取多组原始校正系数,并获取针对各组原始校正系数配置的编码位数,作为各组原始校正系数各自对应的第一位数;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;
在保持各组原始校正系数配置的编码位数的总和不变的情况下,向着使各组所述原始校正系数对应的所述第二差值变为0的方向,对针对各组原始校正系数配置的编码位数进行调整,得到各组原始校正系数各自对应的第三位数;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 the 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.
在一种可能的实施方式中,所述方法还包括:In a possible implementation, the method further includes:
获取各组原始校正系数的所述第一差值的最大值的总位数,作为各组原始校正系数对应的第四位数;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;
所述编码数据包括指数编码子数据与尾数编码子数据,所述指数编码子数据用于表示z- Ein,尾数编码子数据用于表示所述原始校正系数以指数计数法形式表示的情况下的尾数;其中,z为所述原始校正系数的总位数与对应的所述第二位数之间的差值,Ein为所述原始校正系数对应的初始指数位宽。The encoded data includes exponent encoding sub-data and mantissa encoding sub-data, the exponent encoding sub-data is used to represent z- Ein , and 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 counting; wherein z is the difference between the total number of bits of the original correction coefficient and the corresponding second number of bits, and Ein is the initial exponent bit width corresponding to the original correction coefficient.
在一种可能的实施方式中,所述各原始校正系数为带符号位的整型数据,所述编码数据包括长度为第五位数的指数编码子数据与长度为第六位数的尾数编码子数据;其中,所述第五位数与所述第六位数之和等于所述第三位数或所述第三位数减一,所述第五位数为将所述第二差值写为n进制数后得到的目标n进制数的位数。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.
在一种可能的实施方式中,所述方法还包括:In a possible implementation, the method further includes:
针对各所述原始校正系数,计算所述原始校正系数的总位数f与对应的所述第二位数之间的差值,得到所述原始校正系数对应的第七位数z;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;
若z小于(Ein+nx),所述尾数编码子数据为去除所述原始校正系数的最高位上的z个0,且去除所述原始校正系数的最低位上的(f-y-z)个数值后得到的,所述指数编码子数据为z-Ein;If z is less than (E in +n x ), the mantissa coded sub-data is obtained by removing z zeros from the highest bit of the original correction coefficient and removing (fyz) values from the lowest bit of the original correction coefficient, and the exponent coded sub-data is zE in ;
若z大于等于(Ein+nx),所述尾数编码子数据为去除所述原始校正系数的最高位上的(Ein+nx-1)个0,且去除所述原始校正系数的最低位上的[f-y-(Ein+nx-1)]个数值后得到的,所述指数编码子数据为nx-1。If z is greater than or equal to ( Ein + nx ), the mantissa coded sub-data is obtained by removing ( Ein + nx -1) zeros at the highest bit of the original correction coefficient and removing [fy-( Ein +nx - 1)] values at the lowest bit of the original correction coefficient, and the exponent coded sub-data is nx - 1.
在一种可能的实施方式中,所述获取多组原始校正系数,包括:In a possible implementation manner, obtaining multiple groups of original correction coefficients includes:
获取LED显示屏上各像素点各自对应的各校正系数,所述各校正系数包括Rr校正系数、Rg校正系数、Rb校正系数、Gr校正系数、Gg校正系数、Gb校正系数、Br校正系数、Bg校正系数以及Bb校正系数;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;
将各所述像素点各自对应的Rr校正系数划分为一组原始校正系数、各自对应的Rg校正系数划分为一组原始校正系数、各自对应的Rb校正系数划分为一组原始校正系数、各自对应的Gr校正系数划分为一组原始校正系数、各自对应的Gg校正系数划分为一组原始校正系数、各自对应的Gb校正系数划分为一组原始校正系数、各自对应的Br校正系数划分为一组原始校正系数、各自对应的Bg校正系数划分为一组原始校正系数、各自对应的Bb校正系数划分为一组原始校正系数;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;
其中,所述Rr校正系数为红色通道下红色灯点的校正系数,所述Rg校正系数为红色通道下绿色灯点的校正系数,所述Rb校正系数为红色通道下蓝色灯点的校正系数;所述Gr校正系数为绿色通道下红色灯点的校正系数,所述Gg校正系数为绿色通道下绿色灯点的校正系数,所述Gb校正系数为绿色通道下蓝色灯点的校正系数;所述Br校正系数为蓝色通道下红色灯点的校正系数,所述Bg校正系数为蓝色通道下绿色灯点的校正系数,所述Bb校正系数为蓝色通道下蓝色灯点的校正系数。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.
本申请实施例的第二方面,提供了一种校正系数解码方法,所述方法包括:According to a second aspect of the embodiments of the present application, a correction coefficient decoding method is provided, the method comprising:
获取各组原始校正系数各自对应的标准值;Obtain the standard value corresponding to each group of original correction coefficients;
对各原始校正系数的编码数据进行解码,得到各解码数据;其中,所述各原始校正系数的编码数据为根据前述第一方面任一所述的校正系数编码方法编码得到的;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;
计算各所述解码数据与对应的标准值的和,得到解码后的各校正系数。The sum of each decoded data and the corresponding standard value is calculated to obtain each correction coefficient after decoding.
在一种可能的实施方式中,所述各解码数据是按照以下方式解码得到的:In a possible implementation manner, the decoded data are obtained by decoding in the following manner:
其中,为解码数据,S为符号位的值,为指数编码子数据,为尾数编码子数据。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.
在一种可能的实施方式中,所述对各原始校正系数的编码数据进行解码,得到各解码数据,包括:In a possible implementation manner, decoding 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;
在所述尾数编码子数据的最高位补充个0,在所述尾数编码子数据的末尾补充p个0,得到所述原始校正系数对应的解码数据,其中,所述原始校正系数对应的解码数据的总位数减去所述尾数编码子数据的位数等于或。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 .
本申请实施例的第三方面,提供了一种LED显示屏色亮度校正方法,所述方法应用于LED显示系统中的接收卡,所述LED显示系统还包括LED显示屏,所述接收卡中预先存储有文件头和所述LED显示屏中各像素点对应的编码数据,所述编码数据为将所述像素点的原始校正系数按照前述第一方面所述的校正系数编码方法编码得到的,所述文件头中记录有所述校正系数编码方法中各组原始校正系数各自对应的标准值;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;
所述方法包括:The method comprises:
响应于所述LED显示屏使能色亮度校正功能,从所述文件头中确定各组原始校正系数各自对应的标准值;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;
分别对所述LED显示屏中各像素点对应的编码数据进行解码,得到各像素点对应的解码数据;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;
按照各像素点对应的解码后校正系数对所述LED显示屏中各像素点进行色亮度校正。Color brightness correction is performed on each pixel in the LED display screen according to the decoded correction coefficient corresponding to each pixel.
本申请实施例还提供了一种电子设备,包括:The present application also provides an electronic device, including:
存储器,用于存放计算机程序;Memory, used to store computer programs;
处理器,用于执行存储器上所存放的程序时,实现上述任一所述的校正系数编码方法或校正系数解码方法或LED显示屏色亮度校正方法。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.
本申请实施例还提供了一种计算机可读存储介质,所述计算机可读存储介质内存储有计算机程序,所述计算机程序被处理器执行时实现上述任一所述的校正系数编码方法或校正系数解码方法或LED显示屏色亮度校正方法。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 correction coefficient encoding method or correction coefficient decoding method or LED display color brightness correction method described above is implemented.
本申请实施例还提供了一种包含指令的计算机程序产品,当其在计算机上运行时,使得计算机执行上述任一所述的校正系数编码方法或校正系数解码方法或LED显示屏色亮度校正方法。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.
本申请实施例有益效果:Beneficial effects of the embodiments of the present application:
本申请实施例提供的一种LED显示屏色亮度校正方法和校正系数编、解码方法,获取多组原始校正系数,并获取针对各组原始校正系数配置的编码位数,作为各组原始校正系数各自对应的第一位数;分别计算各组原始校正系数的中值,并计算各原始校正系数与对应的中值之间的差值,作为各原始校正系数各自的第一差值;然后分别确定各组原始校正系数的第一差值的最大值的有效位数,并分别计算各组原始校正系数对应的第一位数与有效位数之间的差值,得到各组原始校正系数各自对应的第二差值;然后向着使各组原始校正系数对应的第二差值变为0的方向,对针对各组原始校正系数配置的编码位数进行调整,得到各组原始校正系数各自对应的第三位数;将各原始校正系数的第一差值编码为长度为对应的第三位数的编码数据,作为各原始校正系数的编码数据。采用本申请实施例的方法,由于在调整各组原始校正系数配置的编码位置的过程中保持编码位数总和不变,并向着使各组原始校正系数的编码位数与原始校正系数的有效位数的差值变为0的方向,对针对各组原始校正系数配置的编码位数进行调整,也即将针对第二差值大于0的原始校正系数配置的编码位数减少,同时将针对第二差值小于0的原始校正系数配置的编码位数增加,又由于调整过程中编码位数总和保持不变,因此减少的编码位数与增加的编码位数相同,故该调整过程可以视为:将针对第二差值大于0的原始校正系数配置的编码位数让渡与针对第二差值小于0的原始校正系数配置的编码位数,而本申请中的第二差值为第一位数与第二位数之间的差值,第一位数可以视为初始时针对原始校正系数分配的编码位宽,第二位数可以视为实现对原始校正系数进行无损编码所需要的编码位宽,因此第二差值大于0时可以认为针对原始校正系数分配的编码位宽已经足以用于实现对该原始校正系数进行无损编码,也即针对该原始校正系数分配的编码位宽存在冗余,反之,第二差值小于0时可以认为针对原始校正系数分配的编码位宽尚不足以实现对该原始校正系数进行无损编码,也即为该原始校正系数分配的编码位宽不够。综上可见,将针对第二差值大于0的原始校正系数配置的编码位数让渡与针对第二差值小于0的原始校正系数配置的编码位数这一过程可以视为:将编码位宽存在冗余的校正系数的编码位宽让渡给编码位宽不够的校正系数,从而降低因编码位宽不够导致的编码压缩损失,因此本申请能够减小各校正系数的编码压缩误差。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 to achieve 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 achieve 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 achieve 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.
当然,实施本申请的任一产品或方法并不一定需要同时达到以上所述的所有优点。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
为了更清楚地说明本申请实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,还可以根据这些附图获得其他的实施例。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.
图1为同一组校正系数的概率分布示意图;FIG1 is a schematic diagram of the probability distribution of the same set of correction coefficients;
图2为本申请实施例提供的校正系数编码方法的流程示意图;FIG2 is a schematic diagram of a flow chart of a correction coefficient encoding method provided in an embodiment of the present application;
图3为本申请实施例提供的对最大有效位数与编码位数的差值进行排序的示意图;FIG3 is a schematic diagram of sorting the difference between the maximum number of effective bits and the number of coded bits provided in an embodiment of the present application;
图4为本申请实施例提供的校正系数编解码方法中对校正系数的处理架构示意图;FIG4 is 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;
图5为本申请实施例提供的校正系数编解码方法的处理流程图;FIG5 is a processing flow chart of a correction coefficient encoding and decoding method provided in an embodiment of the present application;
图6为本申请实施例提供的校正系数编解码方法中的压缩文件的示意图;FIG6 is a schematic diagram of a compressed file in the correction coefficient encoding and decoding method provided in an embodiment of the present application;
图7为本申请实施例提供的校正系数解码方法的示意图;FIG7 is a schematic diagram of a correction coefficient decoding method provided in an embodiment of the present application;
图8a为本申请提供的LED显示系统的一种结构示意图;FIG8a is a schematic structural diagram of an LED display system provided by the present application;
图8b为本申请提供的LED显示屏色亮度校正方法的一种流程示意图;FIG8b is a schematic diagram of a flow chart of a method for color brightness correction of an LED display screen provided in the present application;
图9为本申请实施例提供的校正系数编码装置的结构示意图;FIG9 is a schematic diagram of the structure of a correction coefficient encoding device provided in an embodiment of the present application;
图10为本申请实施例提供的校正系数解码装置的结构示意图;FIG10 is a schematic diagram of the structure of a correction coefficient decoding device provided in an embodiment of the present application;
图11 为本申请实施例提供的电子设备的结构示意图。FIG. 11 is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application.
具体实施方式DETAILED DESCRIPTION
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员基于本申请所获得的所有其他实施例,都属于本申请保护的范围。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.
相关技术中采用将校正系数编码压缩至目标bit的方式来降低校正系数的数据量,但由于校正系数包括主系数和从系数,在对校正系数进行压缩时,不同的系数的压缩范围不同,并且,同一组校正系数的概率分布呈高斯分布或钟摆分布,如图1所示为同一组校正系数的概率分布示意图,校正系数的概率分布呈现两头小中间大的特征。而相关技术中在对校正系数进行压缩时,对主系数或从系数都设定了固定的目标压缩位宽,例如,校正系数包括三个主系数和六个从系数,为三个主系数设置的编码位宽为12bit,为六个从系数的设置的编码位宽为10bit,若主系数1和主系数2压缩编码时需要11bit,主系数3压缩编码时需要14bit,则将主系数进行压缩编码时,主系数3会存在比较大的误差,也即,若将所有主系数或从系数往相同的压缩位宽进行压缩,则各系数的压缩误差的比例不统一,解码后的校正系数的误差可能比较大,进而影响校正效果。In the related art, the correction coefficient is compressed to the target bit to reduce the amount of data of the correction coefficient. However, since the correction coefficient includes the main coefficient and the slave coefficient, when compressing the correction coefficient, the compression range of different coefficients is different, and the probability distribution of the same group of correction coefficients is Gaussian distribution or pendulum distribution. As shown in FIG1, a schematic diagram of the probability distribution of the same group of correction coefficients, the probability distribution of the correction coefficient presents the characteristics of small at both ends and large in the middle. In the related art, when compressing the correction coefficient, a fixed target compression bit width is set for the main coefficient or the slave coefficient. For example, the correction coefficient includes 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 the main coefficients 1 and 2 require 11 bits for compression encoding, and the main coefficient 3 requires 14 bits for compression encoding, when the main coefficients are compressed, the main coefficient 3 will have a relatively large error. That is, if all the 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.
为了减小校正系数的压缩误差,本申请实施例提供了一种校正系数编码方法和校正系数解码方法,可以应用于显示屏箱体中的接收卡或上位机,本申请实施例不对进行限定。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.
在本申请实施例的第一方面,提供了一种校正系数编码方法,如图2所示为本申请实施例提供的校正系数编码方法的流程示意图,方法包括如下步骤:In a first aspect of an embodiment of the present application, a correction coefficient encoding method is provided. FIG. 2 is a flow chart of the correction coefficient encoding method provided in an embodiment of the present application. The method comprises the following steps:
步骤S10,获取多组原始校正系数,并获取针对各组原始校正系数配置的编码位数,作为各组原始校正系数各自对应的第一位数;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;
步骤S20,分别计算各组原始校正系数的中值,作为各组原始校正系数各自对应的标准值;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;
步骤S30,分别计算各原始校正系数与对应的标准值之间的差值,作为各原始校正系数各自的第一差值;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;
步骤S40,分别确定各组原始校正系数的第一差值的最大值的有效位数,作为各组原始校正系数对应的第二位数;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;
步骤S50,分别计算各组原始校正系数对应的第一位数与第二位数之间的差值,得到各组原始校正系数各自对应的第二差值;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;
步骤S60,在保持各组原始校正系数配置的编码位数的总和不变的情况下,向着使各组原始校正系数对应的第二差值变为0的方向,对针对各组原始校正系数配置的编码位数进行调整,得到各组原始校正系数各自对应的第三位数;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;
步骤S70,将各原始校正系数的第一差值编码为长度为对应的第三位数的编码数据,作为各原始校正系数的编码数据。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.
采用本申请实施例的方法,由于在调整各组原始校正系数配置的编码位置的过程中保持编码位数总和不变,并向着使各组原始校正系数的编码位数与原始校正系数的有效位数的差值变为0的方向,对针对各组原始校正系数配置的编码位数进行调整,也即将针对第二差值大于0的原始校正系数配置的编码位数减少,同时将针对第二差值小于0的原始校正系数配置的编码位数增加,又由于调整过程中编码位数总和保持不变,因此减少的编码位数与增加的编码位数相同,故该调整过程可以视为:将针对第二差值大于0的原始校正系数配置的编码位数让渡与针对第二差值小于0的原始校正系数配置的编码位数,而本申请中的第二差值为第一位数与第二位数之间的差值,第一位数可以视为初始时针对原始校正系数分配的编码位宽,第二位数可以视为实现对原始校正系数进行无损编码所需要的编码位宽,因此第二差值大于0时可以认为针对原始校正系数分配的编码位宽已经足以用于实现对该原始校正系数进行无损编码,也即针对该原始校正系数分配的编码位宽存在冗余,反之,第二差值小于0时可以认为针对原始校正系数分配的编码位宽尚不足以实现对该原始校正系数进行无损编码,也即为该原始校正系数分配的编码位宽不够。综上可见,将针对第二差值大于0的原始校正系数配置的编码位数让渡与针对第二差值小于0的原始校正系数配置的编码位数这一过程可以视为:将编码位宽存在冗余的校正系数的编码位宽让渡给编码位宽不够的校正系数,从而降低因编码位宽不够导致的编码压缩损失,因此本申请能够减小各校正系数的编码压缩误差。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.
下面以二进制编码为例,对上述步骤S10~步骤S70进行详细说明,可以理解的是,本申请实施例中原始校正系数的值均为将原始校正系数转换为二进制后的二进制数,在其他可能的实施例中,也可以用其他进制的形式表示。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.
其中,多组原始校正系数对显示屏上各像素点的校正系数矩阵统计得到的,针对每个像素点对应多个原始校正系数,具体可以分为多个原始校正主系数和多个原始校正从系数,示例性的,针对一个像素点,其对应的多个原始校正系数可以用校正系数矩阵来表示,其中,、、为主系数,、、、、、为从系数,为红色通道下红色灯点的亮度校正系数,为绿色通道下绿色灯点的亮度校正系数,为蓝色通道下蓝色灯点的亮度校正系数,为红色通道下绿色灯点的亮度校正系数,为红色通道下蓝色灯点的亮度校正系数,为绿色通道下红色灯点的亮度校正系数,为绿色通道下蓝色灯点的亮度校正系数,为蓝色通道下红色灯点的亮度校正系数,为蓝色通道下绿色灯点的亮度校正系数。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.
基于上述,由于显示屏上每个像素点均对应不同色亮度多个原始校正系数,因此,在一种可能的实施方式中,以显示屏为LED(Light-emitting diode,发光二极管)显示屏为例,在获取LED显示屏上各像素点对应的各原始校正系数后,可以根据色亮度将各原始校正系数进行划分,得到多组原始校正系数,具体的,可以将各像素点对应的原始校正主系数划分为一组,将各像素点对应的原始校正主系数划分为一组,将各像素点对应的原始校正主系数划分为一组,以此类推,得到九组原始校正系数。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.
在一个可能的实施例中,获取多组原始校正系数分别为:原始校正主系数{、、、……},原始校正主系数{、、、……},原始校正主系数{、、、……},原始校正从系数{、、、……},原始校正从系数{、、、……},原始校正从系数{、、、……},原始校正从系数{、、、……},原始校正从系数{、、、……},原始校正从系数{、、、……}。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 { , , ,…… }.
针对各组原始校正系数配置的编码位数,是指将原始校正系数进行压缩编码后得到的编码数据的位宽。例如原始校正主系数的总位数为14bit,需要将其压缩为12bit,则针对原始校正主系数配置的编码位宽为12bit,也即编码位数为12位。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.
在对各原始校正系数进行压缩编码时,各原始校正系数的编码位宽是预先配置得到的,编码位宽的具体数值应当是大于0的整数,编码位宽的具体数值可以根据实际需求进行设置,本申请实施例不对此进行限定。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.
可以理解的是,为了实现压缩编码,针对各原始校正系数配置的编码位宽应小于该原始校正系数的总位宽。示例性的,原始校正从系数的总位数为Q bit,针对该系数配置的编码位宽为W bit,则W应小于Q。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.
计算各组原始校正系数的中值,可以是统计各组原始校正系数的平均值,也可以是计算各组原始校正系数的最大值与最小值的平均值,也可以是计算各组原始校正系数的加权平均值,这都是可以的,本申请不对此进行限定。The median of each group of original correction coefficients can be calculated by statistically averaging the original correction coefficients of each group, or by calculating the average of the maximum and minimum values of the original correction coefficients of each group, or by calculating the weighted average of the original correction coefficients of each group. All of these are possible and are not limited to this in the present application.
示例性的,假设存在N个像素点,以原始校正主系数为例,该组原始校正系数中包括、、、……,该组原始校正系数的中值MID可以采用下面任意一种方法计算得到:For example, assuming that there are N pixels, the original correction main coefficients For example, the original correction coefficients include , , ,…… , the median MID of the group of original correction coefficients can be calculated using any of the following methods:
方法1: Method 1:
方法2: Method 2:
方法3: Method 3:
其中,表示对、、、……进行求平均值的运算,分别表示、、、……中的最大值和最小值,表示对、、、……进行加权平均的运算。为了方面描述,下文中以各组原始校正系数的最大值与最小值的平均值的方式计算各组原始校正系数的中值。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.
可以理解的是,针对同一显示屏可以分别计算得到9组标准值,分别为、、、、、、、、。It can be understood that for the same display screen, 9 groups of standard values can be calculated respectively, namely , , , , , , , , .
各组原始校正系数的第一差值的最大值,是指第一差值的绝对值为最大值的值,例如假设某一组原始校正系数的数目为5个,且计算出来某一组原始校正系数的第一差值分别为{-600,400,200,300,-150},那么第一差值的最大值为-600。可以理解的是,该示例中仅是为方便描述假设某一组原始校正系数的数目为5个,并不限定实际方案中某一组原始校正系数的数目只有5个。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.
在一种可能的实施方式中,该最大值也可以是根据实际经验设置的一个最大值,该设置得到的最大值的绝对值应满足大于该组原始校正系数的所有第一差值的绝对值。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.
以原始校正主系数为例,计算该组原始校正系数{、、、……}与中值的差值{、、、……},然后确定差值的绝对值最大的差值。为了减少计算量,也可以先统计该组原始校正系数的最大值与最小值,然后分别计算和,然后确定和的最大值。其他原始校正系数的最大值DIFF的计算方法类似,本申请不对此进行赘述。Original calibration coefficients 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, the maximum value of the original correction coefficients of this group can also be counted first. 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.
然后确定最大值DIFF的有效位数,有效位数是指一个数从左边第一个非零数字开始到最右边的数字为止的所有数字,示例性的,0.000123的有效数字为123,有效位数为3位,000101110000的有效数字为101110000,有效位数为9位。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.
由于本申请实施例中进行二进制编码,因此,每组原始校正系数对应的最大值DIFF在二进制编码时的最大有效位数可以通过如下公式(1)计算: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):
基于上文可知,各组原始校正系数的压缩范围可能不同,因此,若原始校正系数的编码位数大于原始校正系数的有效位数,即第二差值大于0,则说明为该组原始校正系数配置的编码位数有冗余,在编码时可以保留原始校正系数的精度,避免了丢失部分信息带来的误差;而若原始校正系数的编码位数小于原始校正系数的有效位数,即第二差值小于0,则说明该组原始校正系数在编码时有效数字的精度会有损失,在编码时会通过截断、舍入的方舍弃编码精度。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.
可以理解的是,若第二差值等于0,则说明在编码时编码尾数不存在冗余且不会对原始校正系数的精度造成损失,因此,在上述步骤S50中计算得到各组原始校正系数对应的第二差值后,可以如步骤S60向着使各组原始校正系数对应的第二差值变为0的方向,对针对各组原始校正系数配置的编码位数进行调整。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.
示例性的,假设各原始校正系数的总位数均为16bit,为原始校正主系数设置的编码位数为14bit,为原始校正主系数设置的编码位数为11bit,为原始校正主系数设置的编码位数为11bit,针对各原始校正从系数设置的编码位宽均为10bit,原始校正主系数的有效位数为10,原始校正主系数的有效位数为13,原始校正主系数的有效位数为11,各原始校正从系数的有效位数均为9,若直接进行编码,则原始校正主系数的编码位数有冗余,且原始校正主系数编码时精度有损失,则可以将为原始校正主系数设置的编码位数让渡2位给原始校正主系数,让渡后原始校正主系数的编码位数为12bit,原始校正主系数的编码位数为13bit,这时进行编码,减小了原始校正主系数的编码位数的冗余,且避免了原始校正主系数编码时精度损失。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 slave coefficient is 9. If the encoding is performed directly, the original correction master coefficient The number of coded bits is redundant, and the original correction main coefficient If there is a loss of accuracy during encoding, the original correction 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.
为了准确对各组原始校正系数对应的编码位数进行让渡,在一种可能的实施方式中,在确定得到各组原始校正系数对应的最大有效位数后,可以根据各组原始校正系数的最大有效位数与各组原始校正系数对应的编码位数dst bit的差值按照从大到小或从小到大进行排序,示例性的,如图3所示为本申请实施例提供的对最大有效位数与编码位数的差值进行排序的示意图,各组原始校正系数、、、、、、、、对应的最大有效位数与各组原始校正系数对应的编码位数dst bit的差值按照从小到大的顺序排列,为了尽可能减小精度损失,可以按照差值从大到小的方式进行让渡,也即,在让渡时,优先将最大有效位数与编码位数dst bit的差值小于0的原始校正系数的编码位数让渡给最大有效位数与编码位数dst bit的差值最大的原始校正系数,例如,如图3所示,原始校正系数、对应的最大有效位数与对应的编码位数dst bit的差值均为-2,原始校正系数对应的最大有效位数与对应的编码位数dst bit的差值为3,原始校正系数对应的最大有效位数与对应的编码位数dst bit的差值为1,在让渡时,优先将原始校正系数、冗余的编码位数让渡给原始校正系数。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 between 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, as shown in FIG3, a schematic diagram of sorting the difference between the maximum number of effective bits and the number of coded bits provided in an embodiment of the present application is shown. , , , , , , , , 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, as shown in FIG3, the original correction coefficient , 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 .
由于各原始校正系数可能存在正负,因此,在对各原始校正系数进行编码时,需要对原始校正系数的正负进行标识,在一种可能的实施方式中,在对原始校正系数进行编码时,可以采用符号位来标识进行编码的数据的正负,在该情况下,编码数据包括指数编码子数据、尾数编码子数据和固定的一位符号位数据。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.
在另一种可能的实施方式中,也可以采用其他除符号位之外的方式来标识要编码的数据的正负,例如采用偏移编码的方式。在该情况下,编码数据中不包括固定的符号位,编码数据只包括编码数据包括指数编码子数据和尾数编码子数据。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.
可以理解的是,为了便于解码,在对各原始校正系数进行编码时,会将各组原始校正系数各自对应的标准值、总位数、初始指数位宽进行存储。在一种可能的实施方式中,可以将各组原始校正系数各自对应的标准值、总位数、初始指数位宽、写入各原始校正系数的编码数据所在压缩文件的文件头中。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.
为了更清楚的本申请提供的校正系数编码方法和校正系数解码方法,下面将分别以编码数据中包括符号位和不包括符号位两种情况,结合具体实施例对本申请实施例提供的校正系数编码方法和校正系数解码方法进行详细说明。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.
1、编码数据中不包括固定符号位。1. The encoded data does not include a fixed sign bit.
在该情况下,为了便于计算机计算,编码数据由尾数编码子数据组成或由指数编码子数据和尾数编码子数据组成,在编码数据由尾数编码子数据组成的情况下,编码数据的编码位数与尾数编码子数据的编码位数相等,在编码数据由指数编码子数据和尾数编码子数据组成的情况下,指数编码子数据的编码位数与尾数编码子数据的编码位数的和与编码位数相等,其中指数编码子数据用于表示浮点数的数量级,尾数编码子数据用于表示浮点数的有效数字。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.
而基于上文可以,在对原始校正系数进行编码时,各组原始校正系数调整后的编码位数与各组原始校正系数的有效位数的差值的正负会影响原始校正系数的编码精度,下面以原始校正主系数为例,对原始校正主系数的的有效位数与原始校正主系数对应的调整后的编码位数的差值的结果分情况进行说明: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:
1.1、原始校正主系数的的有效位数不大于原始校正主系数对应的调整后的编码位数。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.
原始校正主系数Rr的DIFF_Rr的有效位数不大于原始校正主系数Rr对应的调整后的编码位数,说明所有的原始校正主系数的有效数字在编码时均可以无损表达。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.
示例性的,假设原始校正系数的总位数f为16,原始校正主系数的的有效位数为9,原始校正主系数对应的调整后的编码位数为10,原始校正主系数对应的初始指数位宽为16-9=7,像素点A的原始校正系数与中值的差值为“11111111”,记为“0000000011111111”。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".
在对进行编码时,首先去除最高位的个0,即去除7个0,得到尾数编码子数据M为“011111111”,此时尾数编码子数据的编码位数为9位,而原始校正主系数对应的调整后的编码位数为10,因此无需指数编码子数据就可以实现对的编码,得到编码数据即为尾数编码子数据为“011111111”。In the right When encoding, first remove The highest 0, that is, removing 7 0s, the mantissa encoding sub-data M is obtained as "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".
在进行解码时,先获取原始校正主系数的总位数、初始指数位宽、原始校正主系数的标准值,然后解码得到尾数编码子数据“011111111”后,根据如下公式(2)计算得到解码数据: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): :
可以理解的是,由于在该实施例中没有指数编码子数据,因此上述公式(2)中的指数编码子数据E等于0。为了优化计算过程,本申请实施例中的公式中的“”可以通过将向右移位位。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.
例如,解码得到尾数为“011111111”,由于原始校正主系数的总位数f为16,则在“011111111”的最右边补0,直至补齐到16bit,得到“0111111110000000”,然后开始向右移位,移位规则为将有效数字先移初始位宽,即7位,再移E位,即0位,也即一共移动7位,移动后得到解码数据为“0000000011111111”,最后计算解码数据与中值的和即为解码后的校正系数。解码数据的有效数字“11111111”,与编码前的有效数字“11111111”相比,无精度损失。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.
1.2、原始校正主系数的的有效位数大于原始校正主系数对应的调整后的编码位数。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.
基于上述可知,编码数据由指数编码子数据与尾数编码子数据组成,因此,在对某一原始校正系数进行编码时,指数编码子数据的编码位数与尾数编码子数据的编码位数的和与原始校正主系数对应的调整后的编码位数相等。但由于原始校正主系数Rr对应的DIFF_Rr的有效位数大于原始校正主系数Rr对应的调整后的编码位数,说明所有的原始校正主系数的有效数字在编码时均会存在精度损失,需要通过截断、舍入的方式降低编码精度。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.
由于在编码时,去除最高位的0并不会损失精度,因此在编码过程中损失的精度取决于最低位丢弃的位数。并且,由于原始校正系数Rr对应的初始指数编码位宽可以表示该组原始校正系数的最高位至少有个0,若原始校正系数的有效数字的位数小于DIFF_Rr的有效位数,则原始校正系数的最高位的0的数量一定大于,因此,可以将原始校正主系数Rr对应的DIFF_Rr的最高位的0的数量记作该组原始校正系数的初始指数位宽,原始校正系数的最高位的0的数量大于的数目记作E,此时指数编码子数据E的最大值为2x-1。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 is recorded as E, and the maximum value of the exponential coding sub-data E is 2 x -1.
将的值的最高位的0的数量记为z,在进行编码时,根据z与()大小,其编码方式也不同,并且,指数编码子数据的编码位数x可以是预先设定的,也可以是通过如下公式(3)计算得到的: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):
下面将分别针对指数编码子数据的编码位数x为通过上述公式计算得到、预先设定得到的为例,对z>()和z≤()的情况下的编码过程和解码过程进行说明: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 an example, for z>( ) and z≤( ) is used to illustrate the encoding and decoding process:
在一个具体实施例中,假设原始校正主系数的总位数f为16,原始校正主系数对应的初始指数位宽为4,原始校正主系数对应的最大有效位数为11,调整后的原始校正主系数的编码位数为9。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.
(1),且z≤+2x-1(1) , and z≤ +2 x -1
根据公式(3)计算得到指数编码子数据的编码位数x=1,尾数编码子数据的编码位数y=9-x=8,+2x-1=5。假设的值为“11111111111”,根据原始校正主系数的总位数为16可以将的值写为“0000011111111111”形式的数据,也即原始校正系数的z为5,满足z≤+2x-1。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.
此时指数编码子数据E=z-=1,在对原始校正系数编码时,首先去除最高位的所有0,即去除最高位的z个0,得到“11111111111”,位数为11,大于尾数编码子数据的编码位数y,可以采用截断的方式取“11111111111”的前y位作为尾数编码子数据,也即去除“11111111111”最低位的(16-y-z)位,即去除最低位的3位,即可得到尾数编码子数据M为“11111111”,进而得到编码数据为指数编码子数据E为1、尾数编码子数据M为“11111111”。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".
基于上述可知,在对原始校正系数进行编码时,会将原始校正主系数的总位数f、初始指数位宽、原始校正主系数的标准值进行存储。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.
因此,在对原始校正系数对应的编码数据进行解码时,先获取原始校正主系数的总位数、初始指数位宽、原始校正主系数的标准值,然后解码得到尾数编码子数据“11111111”后,在尾数编码子数据的后面添0将尾数编码子数据补齐至16位,得到“1111111100000000”,然后将有效数字往右移动位,得到解码数据为“0000011111111000”,最后计算解码数据与中值的和即为解码后的校正系数。解码数据的有效数字为11111111000,与编码前的有效数字“11111111111”相比,精度损失为:16-y-z=4。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.
(2),且z>+2x-1(2) , and z> +2 x -1
根据公式(3)计算得到指数编码子数据的编码位数x=1,尾数编码子数据的编码位数y=8,+2x-1=5。假设的值为1111111111,根据原始校正主系数的总位数为16可以将的值写为“0000001111111111” 形式的数据,也即原始校正系数的z为6,满足z>+2x-1。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.
此时指数编码子数据E=2x-1=1,在对原始校正系数编码时,首先去除最高位的()个0,即去除原始校正系数最高位的5个0,得到“01111111111”,位数为11,大于尾数编码子数据的编码位数y,可以采用截断的方式取“01111111111”的前y位作为尾数编码子数据,也即去除“11111111111”最低位的(16-y-())位,即去除最低位的2位,即可得到尾数编码子数据M为“01111111”,进而得到指数编码子数据E为1、尾数编码子数据M为“01111111”的编码数据。At this time, the exponential coding sub-data E=2 x -1=1, and the original correction coefficient 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".
在对原始校正系数对应的编码数据进行解码时,先获取原始校正主系数的总位数、初始指数位宽、原始校正主系数的标准值,然后解码得到尾数编码子数据“01111111”后,在尾数编码子数据的后面添0将尾数编码子数据补齐至16位,得到0111111100000000,然后将有效数字往右移动位,得到解码数据为0000001111111100,最后计算解码数据与中值的和即为解码后的校正系数。解码数据的有效数字为1111111100,与编码前的有效数字“11111111111”相比,精度损失为:16-y-()=3。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.
(3)为预先设定的值,且z≤+2x-1(3) is a preset value, and z≤ +2 x -1
预先设定指数编码子数据的编码位数x=2,尾数编码子数据的编码位数y=9-1=7,+2x-1=7。假设的值为“111111111”,根据原始校正主系数的总位数f为16可以将的值写为“0000000111111111” 形式的数据,也即原始校正系数的z为7,满足z≤+2x-1。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.
此时指数编码子数据E=z-=3,在对原始校正系数编码时,首先去除最高位的所有0,即去除最高位的z个0,得到“111111111”,位数为9,大于尾数编码子数据的编码位数y,可以采用截断的方式取“111111111”的前y位作为尾数编码子数据,也即去除“111111111”最低位的(16-y-z)位,即去除最低位的2位,即可得到尾数编码子数据M为“1111111”,进而得到编码数据为指数编码子数据E为3、尾数编码子数据M为“1111111”的编码数据。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".
在对原始校正系数对应的编码数据进行解码时,先获取原始校正主系数的总位数、初始指数位宽、原始校正主系数的标准值,然后解码得到尾数编码子数据“1111111”后,在尾数编码子数据的后面添0将尾数编码子数据补齐至16位,得到“1111111000000000”,然后将有效数字往右移动位,得到解码数据为“0000000111111100”,最后计算解码数据与中值的和即为解码后的校正系数。解码数据的有效数字为“11111110”,与编码前的有效数字“11111111”相比,精度损失为:16-y-z=2。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.
(4)为预先设定的值,且z>+2x-1(4) is a preset value, and z> +2 x -1
预先设定指数编码子数据的编码位数x=2,尾数编码子数据的编码位数y=9-1=7,+2x-1=7。假设的值为“11111111”,根据原始校正主系数的总位数f为16可以将的值写为“0000000011111111” 形式的数据,也即原始校正系数的8为6,满足z>+2x-1。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.
此时指数编码子数据E=2x-1=3,在对原始校正系数编码时,首先去除最高位的()个0,即去除最高位的7个0,得到“011111111”,位数为9,大于尾数编码子数据的编码位数y,可以采用截断的方式取“011111111”的前y位作为尾数编码子数据,也即去除“011111111”最低位的(16-y-())位,即去除最低位的2位,即可得到尾数编码子数据M为“0111111”,进而得到指数编码子数据E为3、尾数编码子数据M为“0111111”的编码数据。At this time, the exponential coding sub-data E=2 x -1=3, and the original correction coefficient 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".
在对原始校正系数对应的编码数据进行解码时,先获取原始校正主系数的总位数、初始指数位宽、原始校正主系数的标准值,然后解码得到尾数编码子数据“0111111”后,在尾数编码子数据的后面添0将尾数编码子数据补齐至16位,得到“0111111000000000”,然后将有效数字往右移动位,得到解码数据为“0000000011111100”,最后计算解码数据与中值的和即为解码后的校正系数。解码数据的有效数字为“1111110”,与编码前的有效数字“1111111”相比,精度损失为:16-y-()=2。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.
2、编码数据中包括固定符号位。2. The encoded data includes a fixed sign bit.
在该情况下,编码数据不仅包括指数编码子数据和位数编码子数据,还包括一位固定的符号位,符号位通常在编码数据的首位,指数编码子数据的编码位数与尾数编码子数据的编码位数的和等于编码位数减一。在该情况下,编码数据的首位表示被编码数据所表示的数的正负,通常符号位为0表示正数,符号位为1表示负数。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.
示例性的,若原始校正系数编码为一个8位的二进制数“00001111”,则这个二进制数表示的十进制数是15,若原始校正系数编码为一个8位的二进制数“10001111”,则这个二进制数表示的十进制数是-133。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.
与前述同理,在对原始校正系数进行编码时,各组原始校正系数调整后的编码位数与各组原始校正系数的有效位数的差值的结果会影响原始校正系数的编码精度,下面仍以原始校正主系数为例,根据原始校正主系数的的有效位数与原始校正主系数对应的调整后的编码位数的差值的结果分情况进行说明。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.
2.1、原始校正主系数的的有效位数与原始校正主系数对应的调整后的编码位数的差值不大于-1。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.
原始校正主系数Rr的DIFF_Rr的有效位数与原始校正主系数Rr对应的调整后的编码位数的差值不大于-1,说明所有的原始校正主系数的有效数字在编码时均可以无损表达。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.
示例性的,假设原始校正系数的总位数为16,总位数包括1位符号位,原始校正主系数的的有效位数为9,原始校正主系数对应的调整后的编码位数为11,由于原始校正系数的总位数包括1位符号位,因此原始校正主系数对应的初始指数位宽为16-9-1=6,像素点A的的值为“11111111”,去除1位符号位记为“000000011111111”。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".
在对进行编码时,首先去除最高位的个0,即去除6个0,得到尾数编码子数据M为“011111111”,此时尾数编码子数据的编码位数为9位,而原始校正主系数对应的调整后的编码位数为10,因此无需指数编码子数据就可以实现对的编码,并且由于原始校正系数的值为正数,因此编码数据中符号位的值为0,最后得到的编码数据为:符号位为0,尾数编码子数据为“011111111”。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".
在进行解码时,先获取原始校正主系数的总位数、初始指数位宽、原始校正主系数的标准值,然后解码得到尾数编码子数据“011111111”后,根据如下公式(4)计算得到解码后的原始校正主系数: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): :
其中,S符号位的值,S的取值为0或1,在S取值为0时,解码后的数为正值,在S取值为-1时,解码后的数为负值。由于在该实施例中没有指数编码子数据,因此上述公式(2)中的指数编码子数据E等于0。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.
由于原始校正主系数的总位数去除符号位后为15,则在解码得到的尾数“011111111”的最右边补0,直至补齐到15bit,得到“011111111000000”,然后开始向右移位,移位规则为将有效数字先移初始位宽,即6位,再移E位,即0位,也即一共移动6位,移动后得到“000000011111111”,然后在解码后的数字的最前面加上符号位得到解码数据,最后计算解码数据与中值的和即为解码后的校正系数。解码数据的校正系数的有效数字“11111111”,与编码前的有效数字“11111111”相比,无精度损失。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.
2.2、原始校正主系数的的有效位数与原始校正主系数对应的调整后的编码位数的差值大于-1。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.
与前述1.2所述实施例同理,由于编码数据由符号位、指数编码子数据与尾数编码子数据组成,因此,若原始校正主系数Rr对应的DIFF_Rr的有效位数与原始校正主系数Rr对应的调整后的编码位数的差值大于-1,说明所有的原始校正主系数的有效数字在编码时均会存在精度损失,需要通过截断、舍入的方式降低编码精度。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.
与前述1.2所述实施例同理,在编码过程中损失的精度取决于最低位丢弃的位数,并且,基于上述2.1所述实施例,由于原始校正系数的总位数包括1位符号位,因此原始校正主系数对应的初始指数位宽为原始校正主系数对应总位数与有效位数的差值再减一,原始校正系数去除符号位后最高位的0的数量大于的数目记作E,此时指数编码子数据E的最大值为2x-1。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 is recorded as E, and the maximum value of the exponential coding sub-data E is 2 x -1.
与前述1.2所述实施例同理,在进行编码时,根据z与()大小,其编码方式也不同,并且,指数编码子数据的编码位数x可以是预先设定的,也可以是通过如下公式(5)计算得到的: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):
下面将分别针对指数编码子数据的编码位数x为通过上述公式计算得到、预先设定得到的为例,对z>()和z≤()的情况下的编码过程和解码过程进行说明: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 an example, for z>( ) and z≤( ) is used to illustrate the encoding and decoding process:
在一个具体实施例中,假设原始校正主系数去除符号位后的总位数f为15,原始校正主系数对应的初始指数位宽为4,原始校正主系数对应的最大有效位数为11,调整后的原始校正主系数的编码位数为10。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.
(1),且z≤+2x-1(1) , and z≤ +2 x -1
根据公式(3)计算得到指数编码子数据的编码位数x=1,且由于编码位数中包括1bit符号位,因此在计算尾数编码子数据时的编码位数y时需要再减去1,也即尾数编码子数据的编码位数y=10-x-1=8,+2x-1=5。假设的值为1111111111,根据原始校正主系数去除符号位后的总位数f为15可以将的值写为“000001111111111” 形式的数据,也即原始校正系数的z为5,满足z≤+2x-1。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.
此时指数编码子数据E=z-=1,在对原始校正系数编码时,首先去除最高位的所有0,即去除最高位的z个0,得到“1111111111”,位数为10,大于尾数编码子数据的编码位数y,可以采用截断的方式取“1111111111”的前y位作为尾数编码子数据,也即去除“1111111111”最低位的(15-y-z)位,即去除最低位的2位,即可得到尾数编码子数据M为“11111111”,而由于原始校正系数的值为正数,因此编码数据中符号位的值为0,最后得到的编码数据为:符号位为0,编码数据为指数编码子数据E为1、尾数编码子数据M为“11111111”。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".
在对原始校正系数对应的编码数据进行解码时,先获取原始校正主系数的总位数、初始指数位宽、原始校正主系数的标准值,然后解码得到尾数编码子数据“11111111”后,在尾数编码子数据的后面添0将尾数编码子数据补齐至15位,得到“111111110000000”,然后将有效数字往右移动位,得到“000001111111100”,最后在解码后的数字的最前面加上符号位得到解码数据,最后计算解码数据与中值的和即为解码后的校正系数。解码数据的校正系数的有效数字为1111111100,与编码前的有效数字“1111111111”相比,精度损失为:15-y-z=3。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.
(2),且z>+2x-1(2) , and z> +2 x -1
根据公式(4)计算得到指数编码子数据的编码位数x=1,尾数编码子数据的编码位数y=10-x-1=8,+2x-1=5。假设的值为111111111,根据原始校正主系数去除符号位后的总位数f为15可以将的值写为“000000111111111” 形式的数据,也即原始校正系数的z为6,满足z>+2x-1。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.
此时指数编码子数据E=2x-1=1,在对原始校正系数编码时,首先去除最高位的()个0,即去除最高位的5个0,得到“0111111111”,位数为10,大于尾数编码子数据的编码位数y,可以采用截断的方式取“0111111111”的前y位作为尾数编码子数据,也即去除“0111111111”最低位的(15-y-())位,即去除最低位的2位,即可得到尾数编码子数据M为“01111111”,而由于原始校正系数的值为正数,因此编码数据中符号位的值为0,最后得到的编码数据为:符号位为0,指数编码子数据E为1、尾数编码子数据M为“01111111”。At this time, the exponential coding sub-data E=2 x -1=1, and the original correction coefficient 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".
在对原始校正系数对应的编码数据进行解码时,先获取原始校正主系数的总位数、初始指数位宽、原始校正主系数的标准值,然后解码得到尾数编码子数据“01111111”后,在尾数编码子数据的后面添0将尾数编码子数据补齐至15位,得到“011111110000000”,然后将有效数字往右移动位,得到“000000111111110”,然后在解码后的数字的最前面加上符号位得到解码数据,最后计算解码数据与中值的和即为解码后的校正系数。解码数据的有效数字为“111111110”,与编码前的有效数字“1111111111”相比,精度损失为:15-y-()=2。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.
(3)为预先设定的值,且z≤+2x-1(3) is a preset value, and z≤ +2 x -1
预先设定指数编码子数据的编码位数x=2,尾数编码子数据的编码位数y=10-x-1=7,+2x-1=7。假设的值为“11111111”,根据原始校正主系数去除符号位后的总位数f为15可以将的值写为“000000011111111”形式的数据,也即原始校正系数的z为7,满足z≤+2x-1。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.
此时指数编码子数据E=z-=3,在对原始校正系数编码时,首先去除最高位的所有0,即去除最高位的z个0,得到“11111111”,位数为8,大于尾数编码子数据的编码位数y,可以采用截断的方式取“11111111111”的前y位作为尾数编码子数据,也即去除“11111111111”最低位的(15-y-z)位,即去除最低位的1位,即可得到尾数编码子数据M为“1111111”,而由于原始校正系数的值为正数,因此编码数据中符号位的值为0,最后得到的编码数据为:符号位为0,指数编码子数据E为3、尾数编码子数据M为“1111111”。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".
在对原始校正系数对应的编码数据进行解码时,先获取原始校正主系数的总位数、初始指数位宽、原始校正主系数的标准值,然后解码得到尾数编码子数据“1111111”后,在尾数编码子数据的后面添0将尾数编码子数据补齐至15位,得到“111111100000000”,然后将有效数字往右移动位,得到“000000011111110”,最后在解码后的数字的最前面加上符号位得到解码数据,最后计算解码数据与中值的和即为解码后的校正系数。解码数据的有效数字为“11111110”,与编码前的有效数字“11111111”相比,精度损失为:15-y-z=1。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.
(4)为预先设定的值,且z>+2x-1(4) is a preset value, and z> +2 x -1
预先设定指数编码子数据的编码位数x=2,尾数编码子数据的编码位数y=10-x-1=7,+2x-1=7。假设的值为“1111111”,根据原始校正主系数去除符号位后的总位数f为15可以将的值写为“000000001111111”形式的数据,也即原始校正系数的8为6,满足z>+2x-1。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.
此时指数编码子数据E=2x-1=3,在对原始校正系数编码时,首先去除最高位的()个0,即去除最高位的7个0,得到“01111111”,位数为8,大于尾数编码子数据的编码位数y,可以采用截断的方式取“01111111”的前y位作为尾数编码子数据,也即去除“01111111”最低位的(15-y-())位,即去除最低位的1位,即可得到尾数编码子数据M为“0111111”,而由于原始校正系数的值为正数,因此编码数据中符号位的值为0,最后得到的编码数据为:符号位为0,指数编码子数据E为3、尾数编码子数据M为“0111111”。At this time, the exponential coding sub-data E=2 x -1=3, and the original correction coefficient 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".
在对原始校正系数对应的编码数据进行解码时,先获取原始校正主系数的总位数、初始指数位宽、原始校正主系数的标准值,然后解码得到尾数编码子数据“0111111”后,在尾数编码子数据的后面添0将尾数编码子数据补齐至15位,得到“011111100000000”,然后将有效数字往右移动位,得到“000000001111110”,最后在解码后的数字的最前面加上符号位,得到解码数据,最后计算解码数据与中值的和即为解码后的校正系数。解码数据的有效数字为“1111110”,与编码前的有效数字“1111111”相比,精度损失为:15-y-()=1。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. The decoded data is obtained by adding the sign bit to the front of the decoded number to obtain the decoded data. Finally, 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: 15-y-( )=1.
基于前述实施例,在编码过程中损失的精度取决于丢弃的最低位的位数,并且,基于上述实施例可知,在z≤+2x-1的情况下,编码时损失的精度为:f-y-z,记为精度损失1;在z>+2x-1的情况下,编码时损失的精度为:f- y-(),记为精度损失2。由于指数编码子数据的编码位数x+尾数编码子数据的编码位数y= 编码数据的编码位数dst_bit,因此,精度损失1可以写为:f-(dst_bit-x)-z= x+ f -z-dst_bit,精度损失2可以写为:f-(dst_bit-x)-()= x-+ f- dst_bit-+1。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≤ In the case of +2 x -1, the precision lost during encoding is: fyz, recorded as precision loss 1; In the case of +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.
基于上述1中的各实施例可知,在指数编码字数据x的编码位数固定的情况下,精度损失1的最大值为在z取最小值时,而z的最小值为,又由于,且,因此,,进一步的,精度损失1的最大值为:x+ f-()-dst_bit= x+ -dst_bit;在指数编码字数据x的编码位数固定的情况下,精度损失2可以改写为: x-+ f- dst_bit-()+1= x-+1+- dst_bit。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.
由于不大于 dst_bit时可以实现无损编码,因此,下面只针对大于 dst_bit的情况进行讨论。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.
在大于 dst_bit的情况下,对于精度损失1至少包含- dst_bit的精度损失,无法通过设置指数编码子数据的编码位数x避免精度损失,因此由于x设置不合理引入的精度损失为:x+ -dst_bit-(- dst_bit)=x;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;
对于精度损失2是可以通过合理设置x避免的,也即存在x-+1+- dst_bit=0,因此,由于x设置不合理引入的精度损失为x-+1+- dst_bit。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.
由于x-+1小于0且随着x的增大而减小,也就是说,随着x的增大,精度损失1将越发不合理,而精度损失2将越发合理,因此,处于平衡损失考虑,应当使得精度损失1和精度损失2中因x设置不合理引入的精度损失相当,也即x=x-+1+- dst_bit,近似地可以写为:x=x-+- dst_bit,进而可以改写为:=- dst_bit,计算得到,也就是说,在时取值最合理。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.
上述实施例中的原始校正系数为长度为16bit的整型数据,例如C语言中的短整型数据,且上述实施例仅为原始校正系数为整型数据的编码方式,在其他可能的实施例中,原始校正系数也可以是除整型数据外的其他类型的数据,不失一般性的,若原始校正系数是除整型数据外的其他类型的数据,其编码方式与上述编码方式类似,本申请实施例不再进行赘述。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.
基于上述实施例,本申请实施例提供的校正系数编解码方法中对校正系数的处理架构如图4所示,包括编码和解码两个过程,编码过程中包括各组原始校正系数统计过程和原始校正系数编码压缩过程,解码过程中包括文件头信息解压过程和校正系数解压得到解压后校正系数的过程,在编码过程结束后,会将编码数据缓存在存储器中。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 shown in Figure 4, including two processes, encoding and decoding. The encoding process includes a statistical process of each group of original correction coefficients and an encoding and compression process of the original correction coefficients. The decoding process includes a file header information decompression process and a correction coefficient decompression process to obtain a decompressed correction coefficient. After the encoding process is completed, the encoded data will be cached in the memory.
具体的,本申请实施例提供的校正系数编解码方法的处理流程如图5所示,在编码过程中,首先统计各组原始校正系数(对应前述步骤S10),然后计算各组原始校正系数的中值并计算各组原始校正系数对应的最大有效位数与对应的编码位数的差值(对应前述步骤S20~步骤S50),然后基于各组原始校正系数的中值并计算各组原始校正系数对应的最大有效位数与对应的编码位数的差值对各组原始校正系数进行排序,并对各组原始校正系数的编码位宽进行调整(对应前述步骤S60)得到各组原始校正系数调整后的编码位宽,然后将各组原始校正系数各自对应的标准值、总位数、初始指数位宽、编码位宽等基本信息写入压缩文件的文件头中,最后基于各组原始校正系数各自对应的标准值、总位数、初始指数位宽、编码位宽逐点对各原始校正系数进行编码(对应前述步骤S70),得到各编码数据,写入压缩文件中。Specifically, the processing flow of the correction coefficient encoding and decoding method provided by the embodiment of the present application is shown in Figure 5. During the encoding process, the original correction coefficients of each group are first counted (corresponding to the aforementioned step S10), and then the median of each group of original correction coefficients is calculated and the difference between the maximum effective number of bits corresponding to each group of original correction coefficients and the corresponding number of coding bits is calculated (corresponding to the aforementioned step S20~step S50), and then the original correction coefficients of each group are sorted based on the median of each group of original correction coefficients and the difference between the maximum effective number of bits corresponding to each group of original correction coefficients and the corresponding number of coding bits, 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, and coding bit width corresponding to 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.
压缩文件如图6所示,以编码数据中包括符号位为例,压缩文件由压缩头文件区和压缩后的逐点校正系数构成,压缩文件的压缩头文件区中包括9组原始校正系数(即Rr、、、、、、、、)的中值、E指位宽(即指数编码子数据的编码位数)、初始指数位宽、总位宽,在编码压缩的过程中,各原始校正系数的编码数据包括1比特符号位S,编码位数为x 比特的指数位E以及编码位数为y 比特的尾数M,指数位E的长度不定,但x的取值范围为0~3,原始校正系数的编码数据的总位宽保持为(x+y+1)比特。The compressed file is shown in FIG6. Taking the case where the coded data includes a sign bit, 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.
在解码过程中,在获取到压缩文件后,先解析压缩文件的文件头,并从压缩文件的文件头中读取各组原始校正系数各自对应的标准值、总位数、初始指数位宽、编码位宽等信息,然后基于上述基本信息逐点进行解码,得到各解码后校正系数。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.
基于上述实施例,在一种可能的实施方式中,本申请实施例的校正系数编码方法还包括:Based on the above embodiment, in a possible implementation manner, the correction coefficient encoding method in the embodiment of the present application further includes:
获取各组原始校正系数的第一差值的最大值的总位数,作为各组原始校正系数对应的第四位数;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;
分别计算各组原始校正系数对应的第四位数与第二位数之间的差值,得到各组原始校正系数各自对应的初始指数位宽;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;
编码数据包括指数编码子数据与尾数编码子数据,指数编码子数据用于表示z-Ein,尾数编码子数据用于表示原始校正系数以指数计数法形式表示的情况下的尾数;其中,z为原始校正系数的总位数与对应的第二位数之间的差值,Ein为原始校正系数对应的初始指数位宽。The encoded data includes exponent encoding sub-data and mantissa encoding sub-data, the exponent encoding sub-data is used to represent zE in , and 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 counting; wherein z is the difference between the total number of digits of the original correction coefficient and the corresponding second digit, and E in is the initial exponent bit width corresponding to the original correction coefficient.
采用本申请实施例,计算各组原始校正系数对应的第一差值的最大值的最高位的0的数量作为该组原始校正系数对应的初始指数位宽,在对原始校正系数进行编码的过程中可以减小编码过程中的计算量,从而提高编码效率。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.
基于上述实施例,在一种可能的实施方式中,各原始校正系数为带符号位的整型数据,编码数据包括长度为第五位数的指数编码子数据与长度为第六位数的尾数编码子数据;其中,第五位数与第六位数之和等于第三位数或第三位数减一,第五位数为将第二差值写为n进制数后得到的目标n进制数的位数。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.
采用本申请实施例,确定了指数编码子数据的长度和尾数编码子数据的长度,便于在后续解码过程中快速、准确的解析还原原始校正系数。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.
基于上述实施例,在一种可能的实施方式中,本申请实施例的校正系数编码方法还包括:Based on the above embodiment, in a possible implementation manner, the correction coefficient encoding method in the embodiment of the present application further includes:
针对各原始校正系数,计算原始校正系数的总位数f与对应的第二位数之间的差值,得到原始校正系数对应的第七位数z;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;
若z小于(Ein+nx),尾数编码子数据为去除原始校正系数的最高位上的z个0,且去除原始校正系数的最低位上的(f-y-z)个数值后得到的,指数编码子数据为z-Ein;If z is less than (E in +n x ), the mantissa coded sub-data is obtained by removing z zeros from the highest bit of the original correction coefficient and removing (fyz) values from the lowest bit of the original correction coefficient, and the exponent coded sub-data is zE in ;
若z大于等于(Ein+nx),尾数编码子数据为去除原始校正系数的最高位上的(Ein+nx-1)个0,且去除原始校正系数的最低位上的[f-y-(Ein+nx-1)]个数值后得到的,指数编码子数据为nx-1。If z is greater than or equal to ( Ein + nx ), the mantissa coded sub-data is obtained by removing ( Ein + nx -1) zeros from the highest bit of the original correction coefficient and removing [fy-( Ein +nx - 1)] values from the lowest bit of the original correction coefficient, and the exponent coded sub-data is nx - 1.
采用本申请实施例,根据原始校正系数的总位数与对应的第二位数之间的差值,来确定原始校正系数的编码方式,可以快速、准确的对原始校正系数进行编码,提高了编码效率。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.
对应于前述第一方面,本申请实施例的第二方面,提供了一种校正系数解码方法,如图7所示为本申请实施例提供的校正系数解码方法的示意图,方法包括如下步骤:Corresponding to the first aspect, the second aspect of the embodiment of the present application provides a correction coefficient decoding method. FIG7 is a schematic diagram of the correction coefficient decoding method provided by the embodiment of the present application. The method includes the following steps:
步骤S100,获取各组原始校正系数各自对应的标准值;Step S100, obtaining the standard value corresponding to each group of original correction coefficients;
步骤S200,对各原始校正系数的编码数据进行解码,得到各解码数据;Step S200, decoding the coded data of each original correction coefficient to obtain each decoded data;
其中,各原始校正系数的编码数据为根据前述第一方面提供的校正系数的编码方法编码得到的;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;
步骤S300,计算各解码数据与对应的标准值的和,得到解码后的各校正系数。Step S300, calculating the sum of each decoded data and the corresponding standard value to obtain each decoded correction coefficient.
采用本申请实施例,由于在对各原始校正系数进行编码的过程中通过向着使各组原始校正系数的编码位数与原始校正系数的有效位数的差值变为0的方向,对针对各组原始校正系数配置的编码位数进行了调整,将编码位宽存在冗余的校正系数的编码精度让渡给编码位宽不够的校正系数,减小了各校正系数的编码压缩误差,因此,对编码数据进行解码后的解码后校正系数与原始校正系数的误差较小,提高了解码后校正系数的校正效果。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.
基于前述实施例,在一种可能的实施方式中,各解码数据是按照以下方式解码得到的:Based on the foregoing embodiment, in a possible implementation manner, each decoded data is decoded in the following manner:
其中,为解码数据,S为符号位的值,为指数编码子数据,为尾数编码 子数据。 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.
在一种可能的实施方式中,各解码数据也可以是根据以下方式得到的:In a possible implementation manner, each decoded data may also be obtained according to the following method:
针对各原始校正系数的编码数据,对原始校正系数的编码数据进行解码,得到原始校正系数对应的尾数编码子数据;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;
在尾数编码子数据的最高位补充个0,在尾数编码子数据的末尾补充p个 0,得到原始校正系数对应的解码数据,其中,原始校正系数对应的解码数据的总位数减去 尾数编码子数据的位数等于或。 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 .
采用本申请实施例,可以快速准确地得到各解码后的校正系数,提高了解码效率。By adopting the embodiments of the present application, each decoded correction coefficient can be obtained quickly and accurately, thereby improving decoding efficiency.
对应于前述第一方面和第二方面,本申请实施例的第三方面,提供了一种LED显示屏色亮度校正方法,该方法应用于LED显示系统中的接收卡,LED显示系统如图8a所示包括接收卡810和发光二极管显示屏820。Corresponding to the aforementioned 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, which is applied to a receiving card in an LED display system. The LED display system includes a receiving card 810 and a light-emitting diode display screen 820 as shown in Figure 8a.
接收卡810中预先存储有文件头和LED显示屏820中各像素点对应的编码数据,编码数据为将像素点的原始校正系数按照前述任一所述的校正系数编码方法编码得到的,文件头中记录有校正系数编码方法中各组原始校正系数各自对应的标准值。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.
本申请提供的LED显示屏色亮度校正方法,如图8b所示,包括:The LED display screen color brightness correction method provided in the present application, as shown in FIG8b, includes:
步骤S81,响应于发光二极管显示屏使能色亮度校正功能,从文件头中确定各组原始校正系数各自对应的标准值;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;
即在色亮度校正功能开启的情况下,从文件头中确定各组原始校正系数各自对应的标准值;关于各组原始校正系数各自对应的标准值可以参见前述关于校正系数编码方法的相关说明,在此不再赘述。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.
步骤S82,分别对发光二极管显示屏中各像素点对应的编码数据进行解码,得到各像素点对应的解码数据。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.
解码的方式可以参见前述关于校正系数解码方法的相关说明。本文中一个像素点对应的解码数据是指:对该像素点对应的编码数据进行解码得到的数据。例如像素点(1,1)对应的解码数据为:对像素点(1,1)对应的编码数据进行解码得到的数据。并且由于每个像素点存在多个校正系数,因此每个像素点对应有多个编码数据,也同时对应有多个解码数据。示例性的,像素点(1,1)可以对应有9个编码数据,这9个编码数据是分别基于像素点(1,1)的Rr、Rg、Rb、Gr、Gg、Gb、Br、Bg、Bb编码得到的,分别对这9个编码数据进行编码,将得到9个解码数据,这9个解码数据均为像素点(1,1)对应的解码数据。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).
步骤S83,计算各像素点对应的解码数据与对应的标准值的和,得到各像素点对应的解码后校正系数。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.
本文中一个解码数据对应的标准值是指:该解码数据所属校正系数对应的标准值,解码数据所属校正系数是指:解码得到该解码数据的编码数据在编码时所基于的校正系数。示例性的,若解码数据A是对编码数据B进行解码得到的数据,而编码数据B是对Rr的第一差值编码得到的,则解码数据A所属校正系数为Rr,且解码数据A对应的标准值为Rr对应的标准值,如前述关于标准值的相关说明,在该示例中,解码数据A对应的标准值可以是LED显示屏中所有像素点的Rr的中值。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.
可以理解的是,由于编码过程中可能存在损失,因此像素点对应的解码后校正系数可能与像素点的原始校正系数存在一定差异。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.
步骤S84,按照各像素点对应的解码后校正系数对LED显示屏中各像素点进行色亮度校正。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.
得到各像素点的解码后校正系数后,接收卡可以针对LED显示屏上的每个像素点执行以下步骤:获取该像素点的原始色亮度,根据该像素点的解码后校正系数对原始色亮度进行调整得到目标色亮度,并将该像素点的色亮度调整为目标色亮度。以校正系数由前述Rr、Rg、Rb、Gr、Gg、Gb、Br、Bg、Bb组成的情况为例,并且以像素点的R、G、B三个通道的分量来表示色亮度,则前述对原始色亮度进行调整的方式如下: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:
首先根据解码后校正系数中的Rr、Rg、Rb、Gr、Gg、Gb、Br、Bg、Bb构建得到如下矩阵:First, the following matrix is constructed based on Rr, Rg, Rb, Gr, Gg, Gb, Br, Bg, and Bb in the decoded correction coefficients:
按照下式计算得到目标色亮度:The target color brightness is calculated according to the following formula:
其中,(R,G,B)为原始色亮度,R为该像素点在进行色亮度校正前红色通道的分量,G为该像素点在进行色亮度校正前绿色通道的分量,B为该像素点在进行色亮度校正前蓝色通道的分量,(R’,G’,B’)为目标色亮度。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.
然后,接收卡将该像素点的红色通道的分量调整为R’,并将该像素点的绿色通道的分量调整为G’,并将该像素点的蓝色通道的分量调整为B’,从而将该像素点的色亮度调整为目标色亮度。通过对所有像素点进行上述调整,即可实现对LED显示屏的色亮度校正。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.
选用本申请提供的LED显示屏色亮度校正方法能够通过前述本申请提供的校正系数编码方法,能够在不额外占用接收卡内存空间的情况下,减小了各校正系数的编码压缩误差,从而使得在需要进行色亮度校正时接收卡能够解码得到更为准确的校正系数,从而准确地对LED显示屏进行色亮度校正,进而提高LED显示屏的显示质量。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.
对应于前述第一方面,本申请实施例的第四方面,提供了一种校正系数编码装置,如图9所示为本申请实施例提供的校正系数编码装置的结构示意图,装置包括:Corresponding to the first aspect, a fourth aspect of the embodiments of the present application provides a correction coefficient encoding device. FIG9 is a schematic diagram of the structure of the correction coefficient encoding device provided in the embodiments of the present application. The device includes:
系数获取模块901,用于获取多组原始校正系数,并获取针对各组原始校正系数配置的编码位数,作为各组原始校正系数各自对应的第一位数;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;
中值计算模块902,用于分别计算各组原始校正系数的中值,作为各组原始校正系数各自对应的标准值;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;
第一差值计算模块903,用于分别计算各原始校正系数与对应的标准值之间的差值,作为各原始校正系数各自的第一差值;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;
有效位数确定模块904,用于分别确定各组原始校正系数的第一差值的最大值的有效位数,作为各组原始校正系数对应的第二位数;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;
第二差值计算模块905,用于分别计算各组原始校正系数对应的第一位数与第二位数之间的差值,得到各组原始校正系数各自对应的第二差值;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;
位数调整模块906,用于在保持各组原始校正系数配置的编码位置的总和不变的情况下,向着使各组所述原始校正系数对应的所述第二差值变为0的方向,对针对各组原始校正系数配置的编码位数进行调整,得到各组原始校正系数各自对应的第三位数;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;
第一编码模块907,用于将各原始校正系数的第一差值编码为长度为对应的第三位数的编码数据,作为各原始校正系数的编码数据。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.
采用本申请实施例,由于在对各原始校正系数进行编码的过程中通过向着使各组原始校正系数的编码位数与原始校正系数的有效位数的差值变为0的方向,对针对各组原始校正系数配置的编码位数进行了调整,将编码位宽存在冗余的校正系数的编码精度让渡给编码位宽不够的校正系数,减小了各校正系数的编码压缩误差。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.
对应于前述第二方面,本申请实施例的第五方面,提供了一种校正系数解码装置,如图10所示为本申请实施例提供的校正系数解码装置的结构示意图,装置包括:Corresponding to the aforementioned second aspect, a fifth aspect of the embodiment of the present application provides a correction coefficient decoding device. FIG10 is a schematic diagram of the structure of the correction coefficient decoding device provided in the embodiment of the present application, and the device includes:
标准值获取模块1001,用于获取各组原始校正系数各自对应的标准值;The standard value acquisition module 1001 is used to obtain the standard value corresponding to each group of original correction coefficients;
第一解码模块1002,用于对各原始校正系数的编码数据进行解码,得到各解码数据;其中,各原始校正系数的编码数据为根据前述第一方面任一所述的校正系数编码方法编码得到的;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;
校正系数计算模块1003,用于计算各解码数据与对应的标准值的和,得到解码后的各校正系数。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.
采用本申请实施例,由于在对各原始校正系数进行编码的过程中通过向着使各组原始校正系数的编码位数与原始校正系数的有效位数的差值变为0的方向,对针对各组原始校正系数配置的编码位数进行了调整,将编码位宽存在冗余的校正系数的编码精度让渡给编码位宽不够的校正系数,减小了各校正系数的编码压缩误差,因此,对编码数据进行解码后的解码后校正系数与原始校正系数的误差较小,提高了解码后校正系数的色亮度校正效果。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.
对应于前述第三方面,本申请实施例的第六方面,提供了一种LED显示屏色亮度校正装置,该装置应用于LED显示系统中的接收卡,所述LED显示系统还包括LED显示屏,所述接收卡中预先存储有文件头和所述LED显示屏中各像素点对应的编码数据,所述编码数据为将所述像素点的原始校正系数按照前述第一方面所述的校正系数编码方法编码得到的,所述文件头中记录有所述校正系数编码方法中各组原始校正系数各自对应的标准值,装置包括: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:
读取模块,用于响应于所述LED显示屏使能色亮度校正功能,从所述文件头中确定各组原始校正系数各自对应的标准值;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;
第二解码模块,用于分别对所述LED显示屏中各像素点对应的编码数据进行解码,得到各像素点对应的解码数据;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;
系数计算模块,用于计算各像素点对应的解码数据与对应的标准值的和,得到各像素点对应的解码后校正系数;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;
校正模块,用于按照各像素点对应的解码后校正系数对所述LED显示屏中各像素点进行色亮度校正。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.
采用本申请实施例,由于在对各原始校正系数进行编码的过程中通过向着使各组原始校正系数的编码位数与原始校正系数的有效位数的差值变为0的方向,对针对各组原始校正系数配置的编码位数进行了调整,将编码位宽存在冗余的校正系数的编码精度让渡给编码位宽不够的校正系数,减小了各校正系数的编码压缩误差,因此,对编码数据进行解码后的解码后校正系数与原始校正系数的误差较小,提高了解码后校正系数的校正效果。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.
本申请实施例还提供了一种电子设备,如图11所示,包括:The present application also provides an electronic device, as shown in FIG11 , including:
存储器1101,用于存放计算机程序;Memory 1101, used for storing computer programs;
处理器1102,用于执行存储器1101上所存放的程序时,实现前述校正系数编码方法或校正系数解码方法或LED显示屏色亮度校正方法。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.
存储器可以包括随机存取存储器(Random Access Memory,RAM),也可以包括非易失性存储器(Non-Volatile Memory,NVM),例如至少一个磁盘存储器。可选的,存储器还可以是至少一个位于远离前述处理器的存储装置。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.
上述的处理器可以是通用处理器,包括中央处理器(Central Processing Unit,CPU)、网络处理器(Network Processor,NP)等;还可以是数字信号处理器(Digital SignalProcessor,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现场可编程门阵列(Field-Programmable Gate Array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件。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.
在本申请提供的又一实施例中,还提供了一种计算机可读存储介质,该计算机可读存储介质内存储有计算机程序,所述计算机程序被处理器执行时实现上述任一校正系数编码方法或校正系数解码方法或LED显示屏色亮度校正方法的步骤。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.
在本申请提供的又一实施例中,还提供了一种包含指令的计算机程序产品,当其在计算机上运行时,使得计算机执行上述实施例中任一校正系数编码方法或校正系数解码方法或LED显示屏色亮度校正方法。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.
在上述实施例中,可以全部或部分地通过软件、硬件、固件或者其任意组合来实现。当使用软件实现时,可以全部或部分地以计算机程序产品的形式实现。所述计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行所述计算机程序指令时,全部或部分地产生按照本申请实施例所述的流程或功能。所述计算机可以是通用计算机、专用计算机、计算机网络、或者其他可编程装置。所述计算机指令可以存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一个计算机可读存储介质传输,例如,所述计算机指令可以从一个网站站点、计算机、服务器或数据中心通过有线(例如同轴电缆、光纤、数字用户线(DSL))或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心进行传输。所述计算机可读存储介质可以是计算机能够存取的任何可用介质或者是包含一个或多个可用介质集成的服务器、数据中心等数据存储设备。所述可用介质可以是磁性介质,(例如,软盘、硬盘、磁带)、光介质(例如,DVD)、或者固态硬盘(Solid StateDisk,SSD)等。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.
需要说明的是,在本文中,诸如第一和第二等之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。而且,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、物品或者设备中还存在另外的相同要素。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.
本说明书中的各个实施例均采用相关的方式描述,各个实施例之间相同相似的部分互相参见即可,每个实施例重点说明的都是与其他实施例的不同之处。尤其,对于装置实施例而言,由于其基本相似于方法实施例,所以描述的比较简单,相关之处参见方法实施例的部分说明即可。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.
以上所述仅为本申请的较佳实施例,并非用于限定本申请的保护范围。凡在本申请的精神和原则之内所作的任何修改、等同替换、改进等,均包含在本申请的保护范围内。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 (11)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202411757132.9A CN119229801B (en) | 2024-12-03 | 2024-12-03 | LED display screen color brightness correction method and correction coefficient encoding and decoding method |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202411757132.9A CN119229801B (en) | 2024-12-03 | 2024-12-03 | LED display screen color brightness correction method and correction coefficient encoding and decoding method |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN119229801A CN119229801A (en) | 2024-12-31 |
| CN119229801B true CN119229801B (en) | 2025-02-07 |
Family
ID=93945434
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202411757132.9A Active CN119229801B (en) | 2024-12-03 | 2024-12-03 | LED display screen color brightness correction method and correction coefficient encoding and decoding method |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN119229801B (en) |
Citations (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN102202349A (en) * | 2011-05-18 | 2011-09-28 | 杭州电子科技大学 | Wireless sensor networks data compression method based on self-adaptive optimal zero suppression |
| CN109660809A (en) * | 2018-09-19 | 2019-04-19 | 福州瑞芯微电子股份有限公司 | Based on the decoded colmv data lossless compression method of inter and system |
Family Cites Families (10)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2003264705A (en) * | 2002-03-11 | 2003-09-19 | Panasonic Communications Co Ltd | Image encoder and image encoding method |
| JP4427003B2 (en) * | 2005-05-23 | 2010-03-03 | オリンパスイメージング株式会社 | Data encoding apparatus, data decoding apparatus, data encoding method, data decoding method, and program |
| CN103748881A (en) * | 2011-08-31 | 2014-04-23 | 索尼公司 | Image processing device and image processing method |
| CN110739974B (en) * | 2018-07-19 | 2023-11-10 | 嘉楠明芯(北京)科技有限公司 | Data compression method and device and computer readable storage medium |
| GB2586516B (en) * | 2019-08-23 | 2022-07-06 | Imagination Tech Ltd | Random accessible image data compression |
| CN113644986B (en) * | 2021-08-25 | 2023-07-11 | 上海幻电信息科技有限公司 | Encoding method, encoding device, computing device, and computer-readable storage medium |
| CN113741843B (en) * | 2021-08-30 | 2024-08-27 | 浙江大华技术股份有限公司 | Correction coefficient processing method, device, system, electronic device and storage medium |
| CN116647673B (en) * | 2021-11-11 | 2024-10-29 | 杭州海康威视数字技术股份有限公司 | Video encoding and decoding method and device |
| CN114528943B (en) * | 2022-02-23 | 2025-01-14 | 卡莱特云科技股份有限公司 | A correction coefficient compression method, device, system and brightness correction method |
| CN117095685B (en) * | 2023-10-19 | 2023-12-19 | 深圳市新移科技有限公司 | Concurrent department platform terminal equipment and control method thereof |
-
2024
- 2024-12-03 CN CN202411757132.9A patent/CN119229801B/en active Active
Patent Citations (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN102202349A (en) * | 2011-05-18 | 2011-09-28 | 杭州电子科技大学 | Wireless sensor networks data compression method based on self-adaptive optimal zero suppression |
| CN109660809A (en) * | 2018-09-19 | 2019-04-19 | 福州瑞芯微电子股份有限公司 | Based on the decoded colmv data lossless compression method of inter and system |
Also Published As
| Publication number | Publication date |
|---|---|
| CN119229801A (en) | 2024-12-31 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US7990289B2 (en) | Combinatorial coding/decoding for electrical computers and digital data processing systems | |
| US7907069B2 (en) | Fast compression method for scientific data | |
| US12010352B2 (en) | Coding method and related device | |
| US8144037B2 (en) | Blocking for combinatorial coding/decoding for electrical computers and digital data processing systems | |
| US20070050436A1 (en) | Order-preserving encoding formats of floating-point decimal numbers for efficient value comparison | |
| US7864086B2 (en) | Mode switched adaptive combinatorial coding/decoding for electrical computers and digital data processing systems | |
| US8055085B2 (en) | Blocking for combinatorial coding/decoding for electrical computers and digital data processing systems | |
| US7545291B2 (en) | FIFO radix coder for electrical computers and digital data processing systems | |
| KR19990078037A (en) | Adaptive probability estimation method and adaptive coding method and adaptive decoding method | |
| US20090019128A1 (en) | Lifo radix coder for electrical computers and digital data processing systems | |
| JP5619326B2 (en) | Encoding device, decoding device, encoding method, encoding program, decoding method, and decoding program | |
| CN114866091A (en) | Differential coding compression and decompression method based on grouping reference numbers | |
| CN114020510A (en) | Correction coefficient compression method, device and storage method | |
| US8754792B2 (en) | System and method for fixed rate entropy coded scalar quantization | |
| CN119229801B (en) | LED display screen color brightness correction method and correction coefficient encoding and decoding method | |
| US10075183B2 (en) | Compression and encryption of a file | |
| CN111405294B (en) | Storage and transmission method of image raster data | |
| CN114584773A (en) | Image compression device, method, electronic device, and computer-readable storage medium | |
| CN116325741A (en) | Point cloud encoding method, point cloud decoding method and related devices | |
| CN101657973B (en) | Recorded medium having program for coding and decoding using bit-precision, and apparatus thereof | |
| TWI785546B (en) | Method and apparatus for encoding and decoding of floating-point number | |
| US8175403B1 (en) | Iterative backward reference selection with reduced entropy for image compression | |
| CN118381512A (en) | Data compression method and device, electronic device, and computer-readable storage medium | |
| WO2024193243A1 (en) | Numeric data compression method and computing device | |
| CN118713678A (en) | A data compression method, a decompression method, a bit width determination method and a system |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| PB01 | Publication | ||
| PB01 | Publication | ||
| SE01 | Entry into force of request for substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| GR01 | Patent grant | ||
| GR01 | Patent grant |