LED display screen decimal gray scale implementation method based on lookup table
By generating a lookup table based on hierarchical division and coordinate mapping, the problem of high computational complexity in the prior art is solved, efficient fractional grayscale display of the LED display is achieved, and the consumption of memory and computing resources is reduced.
Patent Information
- Application Number
- CN202510721144.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-30
- Publication Date
- 2025-09-19
AI Technical Summary
The existing method for implementing fractional grayscale on LED displays has a complex calculation process, consumes a lot of computing resources and memory resources, and is difficult to implement in an engineering manner.
A lookup table-based method is adopted to generate the initial position, rotation mode and time offset lookup tables through hierarchical division and coordinate mapping. The segmented timing signal and grayscale value are combined to dynamically control the pixel display state of the LED display to reduce the real-time computing load.
Under the premise of ensuring image details and eliminating artificial textures, efficient fractional grayscale display on LED display screen is achieved by using very little memory and computing resources.
Smart Images

Figure CN120673698A_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of display screen control, and in particular relates to a method and system for realizing fractional grayscale of an LED display screen based on a lookup table. Background Art
[0002] Existing technology: AM-OLED image digital half-tone algorithm, discloses the method of realizing fractional grayscale: 1. Dithering method: The dithering method is to compare the value of each pixel of the output image with the corresponding value in the template. The template is usually an N*N square matrix, which can output fractional grayscale. It is a point dithering method. According to the change of template, it can be further divided into ordered dithering and random dithering. In random dithering, the threshold of template is randomly arranged, and adjacent templates are different. In ordered dithering, the threshold of template is arranged according to a certain pattern, and the template does not change.
[0003] 2. Error Diffusion Method: Its basic principle is to compare the current pixel of the input image with a fixed threshold to obtain a binary grayscale, output this grayscale value, and then diffuse the difference between the current pixel and the current output pixel to the unprocessed pixels in a certain way. This method is equivalent to providing a filter. Commonly used filters include Floyd-Steinberg filter, Judice-Ninke filter, Stucki filter, Stenenson filter, etc.
[0004] 3. Point Diffusion Method: This method is a further optimization of the error diffusion method. While retaining the advantages of the error diffusion method in eliminating artificial textures, it is also suitable for parallel processing.
[0005] The error diffusion method has a fatal flaw, which is that it cannot be processed in parallel. Although the point diffusion method can be processed in parallel, it uses more computing resources.
[0006] Prior art: An LED display image enhancement processing algorithm using a dither matrix discloses the use of a random dithering method, and the dithering template is not only different in space, but also in time. At the same time, the dithering template of each RGB component is also different;
[0007] In order to ensure image details and eliminate artificial textures, the random dithering algorithm needs to use different templates in space, time, and RGB components, which leads to large computational complexity, computing resources, and memory resources.
[0008] The existing methods are not conducive to engineering implementation. Summary of the Invention
[0009] In order to solve the above-mentioned problems in the prior art, namely, the current problems faced by the prior art in terms of high computational complexity, large computational resource occupation, and large memory resource consumption while ensuring image details and eliminating artificial textures, the first aspect of the present invention proposes a method for implementing fractional grayscale of an LED display screen based on a lookup table, the method comprising the following steps:
[0010] Obtaining image information of an image to be displayed, dividing the image information into levels to obtain a number corresponding to the level, mapping the number into an index number through coordinate mapping, defining a rotation mode and an initial position mode based on the number and generating a lookup table; the lookup table includes an initial position lookup table, a rotation mode lookup table, and a time offset lookup table;
[0011] Calculating the level index of each level corresponding to each pixel according to the coordinates of each pixel in the image to be displayed; determining the time offset based on the level index of the highest level corresponding to each pixel in combination with the time offset lookup table and performing a modulo operation correction to generate a segmented timing signal;
[0012] In the rotation mode lookup table, searching for the rotation mode of the next highest level index corresponding to each pixel; modifying the rotation mode based on the segmented timing signal to obtain a dynamic rotation mode;
[0013] Using the second-high-level index and the dynamic rotation mode as indexes, obtaining an updated index of the second-high-level index in the rotation mode lookup table as a first index;
[0014] In the initial position lookup table, searching for a second-high-level index corresponding to the first index as a second index; and determining the second-high-level index ultimately corresponding to each pixel through the initial position lookup table in combination with the second index and the time offset;
[0015] Based on the secondary high-level index finally corresponding to each pixel, the spatial index number corresponding to each pixel is calculated, and then combined with the grayscale value, the LED display screen is dynamically controlled to display each pixel in the image to be displayed.
[0016] In some preferred embodiments, the index number is obtained by: Obtaining image information of the image to be displayed, including size information, template specifications, and two-dimensional coordinates of each pixel of the image to be displayed;
[0017] Divide the image to be displayed into layers according to the template specification to obtain a number Mk corresponding to the layer;
[0018] The corresponding number M for the lower level i , based on the parent level M of the current level i+1, according to the two-dimensional coordinates, calculate the index number MI of Mi in its parent level through formula operation index ; For the highest level, based on the number of the highest level, combined with the two-dimensional coordinates of each pixel and the size information of the image to be displayed, calculate the index number of the number of the highest level in the image to be displayed; i and k are 0 and positive integers, i is less than k, and K represents the level.
[0019] In some preferred implementations, the index number of the current level in its parent level is calculated as follows:
[0020] The index number of each pixel's current level in its parent level is obtained by performing logical AND and shift operations on the two-dimensional coordinates of each pixel and a specific value, where the index number range of each level is a fixed value.
[0021] In some preferred embodiments, the index number of the highest level number in the image to be displayed is calculated as follows:
[0022] Adding the width and height of the size information of the image to be displayed to the set value and then performing a shift operation to obtain a row value and a column value;
[0023] Perform shift operations on the two-dimensional coordinates of each pixel to obtain row index and column index;
[0024] The row index and the column value are logically ANDed, and then the column index is ANDed to obtain the index number Mk of the highest level of each pixel in the image to be displayed. index ;The index number range is 0-(row value * column value-1).
[0025] In some preferred embodiments, the rotation mode and the initial position mode are defined according to the number and a lookup table is generated, and the process is as follows:
[0026] The rotation mode of the number of the current level in the corresponding number of its parent level is defined layer by layer, the position relationship of the number of the current level in the number of its parent level under different rotation modes is determined, and the initial position mode is defined;
[0027] According to the initial position pattern, an initial position lookup table is constructed and mapped to a position pattern mapping table;
[0028] Constructing a rotation mode lookup table according to the rotation mode and the position relationship under different rotation modes, and mapping the table to a rotation mode mapping table;
[0029] According to the initial position mode and the rotation mode, a time offset lookup table of corresponding numbers at the highest level is obtained by mapping the highest level elements to time offsets.
[0030] In some preferred embodiments, the segmented timing signal is generated by:
[0031] Get the index number of each level corresponding to each pixel;
[0032] Determining a time offset based on the highest-level index number corresponding to each pixel and combining the pixels, and performing a modulo operation on the current time based on the time offset;
[0033] The corrected time is divided into multiple time segments to obtain a segmented time series signal.
[0034] In some preferred embodiments, the rotation mode is modified based on the segmented timing signal by:
[0035] The rotation mode is modified based on the time segments corresponding to the segmented timing signal.
[0036] In some preferred embodiments, based on the sub-high-level index finally corresponding to each pixel, the spatial index number corresponding to each pixel is calculated, and then combined with the grayscale value, the LED display screen is dynamically controlled to display each pixel in the image to be displayed, and the method is as follows:
[0037] Substitute the next highest level index corresponding to each pixel into the pre-built relationship between time, space, set grayscale value and corresponding pixel output to generate a spatial index number;
[0038] Map time and space to one dimension through functions respectively, calculate the time-space difference, and when the difference is less than the set grayscale value gray, control the pixel point corresponding to the pixel coordinate (x, y) to light up and display; otherwise, keep it off.
[0039] In some preferred embodiments, the relationship is:
[0040] Among them, x, y are pixel coordinates, gray is the set grayscale value, N is the template size, and the s axis is the mapping coordinate of the two-dimensional pixel coordinate (x, y) in the N*N pixel block, that is: s = map(x, y).
[0041] In some preferred embodiments, the spatial index number S is the sum of the next highest level index ultimately corresponding to each pixel and its shift addition.
[0042] The second invention of the present invention proposes a system for realizing fractional grayscale of an LED display screen based on a lookup table. Based on the above method for realizing fractional grayscale of an LED display screen based on a lookup table, the system includes: generating a lookup table and a fractional grayscale processing module. The generating lookup table is configured as follows:
[0043] Obtaining image information of an image to be displayed, dividing the image information into levels to obtain a number corresponding to the level, mapping the number into an index number through coordinate mapping, defining a rotation mode and an initial position mode based on the number and generating a lookup table; the lookup table includes an initial position lookup table, a rotation mode lookup table, and a time offset lookup table;
[0044] The decimal grayscale processing module is configured as follows:
[0045] Calculating the level index of each level corresponding to each pixel according to the coordinates of each pixel in the image to be displayed; determining the time offset based on the level index of the highest level corresponding to each pixel in combination with the time offset lookup table and performing a modulo operation correction to generate a segmented timing signal;
[0046] In the rotation mode lookup table, searching for the rotation mode of the next highest level index corresponding to each pixel; modifying the rotation mode based on the segmented timing signal to obtain a dynamic rotation mode;
[0047] Using the second-high-level index and the dynamic rotation mode as indexes, obtaining an updated index of the second-high-level index in the rotation mode lookup table as a first index;
[0048] In the initial position lookup table, searching for a second-high-level index corresponding to the first index as a second index; and determining the second-high-level index ultimately corresponding to each pixel through the initial position lookup table in combination with the second index and the time offset;
[0049] Based on the secondary high-level index finally corresponding to each pixel, the spatial index number corresponding to each pixel is calculated, and then combined with the grayscale value, the LED display screen is dynamically controlled to display each pixel in the image to be displayed.
[0050] Beneficial effects of the present invention:
[0051] 1. The image information is mapped to an index number through coordinate mapping. The initial position lookup table, rotation mode lookup table, and time offset lookup table are generated based on the number definition. By generating segmented timing signals for the image, updating the index parameters layer by layer in the multi-level lookup table, and inputting the final level index into the spatiotemporal mapping function, a one-dimensional difference condition is generated. The LED pixel display state is dynamically controlled according to the grayscale value. This uses very little memory resources (only 158 bits are needed in the case of 8*8) and computing resources to meet the requirements of maintaining image details while eliminating artificial textures.
[0052] 2. Reduce real-time computational load by pre-defining lookup tables (initial position, rotation mode) and segmented timing signal generation;
[0053] 3. By adjusting the lookup table parameters and the hierarchical division rules, it can be easily extended to other decimal grayscale ranges. BRIEF DESCRIPTION OF THE DRAWINGS
[0054] Other features, objects and advantages of the present application will become more apparent upon reading the detailed description of non-limiting embodiments made with reference to the following drawings:
[0055] Figure 1 This is a multivariable relationship mapping diagram of a method for realizing fractional grayscale of an LED display screen based on a lookup table of the present invention;
[0056] Figure 2 This is a step diagram of a method for realizing fractional grayscale of an LED display screen based on a lookup table according to the present invention;
[0057] Figure 3 This is a mode 0 diagram of a rotation mode of a method for realizing fractional grayscale of an LED display screen based on a lookup table according to the present invention;
[0058] Figure 4 This is a diagram of mode 1 of a rotation mode of a method for implementing fractional grayscale of an LED display screen based on a lookup table of the present invention;
[0059] Figure 5 This is a diagram of mode 2 of a rotation mode of a method for implementing fractional grayscale of an LED display screen based on a lookup table of the present invention;
[0060] Figure 6 This is Mode 3 of the rotation mode of a method for realizing fractional grayscale of an LED display screen based on a lookup table of the present invention. DETAILED DESCRIPTION
[0061] The present application will be further described in detail below with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are intended only to illustrate the relevant invention and are not intended to limit the invention. It should also be noted that, for ease of description, only portions relevant to the relevant invention are shown in the accompanying drawings.
[0062] It should be noted that, in the absence of conflict, the embodiments and features of the embodiments in this application can be combined with each other. The present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
[0063] In order to more clearly illustrate the implementation method of the distributed seat free layout of the present invention, the following is combined with Figures 1 to 6 Each step in the embodiment of the present invention is described in detail.
[0064] A method for realizing fractional grayscale of LED display screen based on lookup table in the first embodiment of the present invention is shown in FIG. Figure 1 , the method comprises the following steps:
[0065] Obtaining image information of an image to be displayed, dividing the image information into levels to obtain a number corresponding to the level, mapping the number into an index number through coordinate mapping, defining a rotation mode and an initial position mode based on the number and generating a lookup table; the lookup table includes an initial position lookup table, a rotation mode lookup table, and a time offset lookup table;
[0066] Calculating the level index of each level corresponding to each pixel according to the coordinates of each pixel in the image to be displayed; determining the time offset based on the level index of the highest level corresponding to each pixel in combination with the time offset lookup table and performing a modulo operation correction to generate a segmented timing signal;
[0067] In the rotation mode lookup table, searching for the rotation mode of the next highest level index corresponding to each pixel; modifying the rotation mode based on the segmented timing signal to obtain a dynamic rotation mode;
[0068] Using the second-high-level index and the dynamic rotation mode as indexes, obtaining an updated index of the second-high-level index in the rotation mode lookup table as a first index;
[0069] In the initial position lookup table, searching for a second-high-level index corresponding to the first index as a second index; and determining the second-high-level index ultimately corresponding to each pixel through the initial position lookup table in combination with the second index and the time offset;
[0070] Based on the next-highest level index finally corresponding to each pixel, the spatial index number corresponding to each pixel is calculated, and then combined with the grayscale value, the LED display screen is dynamically controlled to display each pixel in the image to be displayed;
[0071] In this embodiment, the method can be implemented in a chip, including an FPGA chip;
[0072] The index number is obtained by:
[0073] Obtain image information of the image to be displayed, including size information (width and height are W and H respectively), template specifications (N*N), and two-dimensional coordinates (x, y) of each pixel of the image to be displayed;
[0074] Divide the image to be displayed into layers according to the template specification to obtain a number Mk corresponding to the layer;
[0075] The corresponding number M for the lower level i , based on the parent level M of the current level i+1 , according to the two-dimensional coordinates, calculate the index number Mi of Mi in its parent level through formula operation indexFor the highest level, based on the number of the highest level, combined with the two-dimensional coordinates of each pixel and the size information of the image to be displayed, calculate the index number Mmk of the number of the highest level in the image to be displayed index ; i and k are 0 and positive integers, i is less than k, and k represents the level;
[0076] Calculate the index number of the current level in its parent level as follows:
[0077] The index number of each pixel's current level in its parent level is obtained by performing a logical AND operation and a shift operation on the two-dimensional coordinates of each pixel and a specific value, where the index number range of each level is a fixed value;
[0078] The index number of the highest level number in the image to be displayed is calculated as follows:
[0079] Adding the width and height of the size information of the image to be displayed to the set value and then performing a shift operation to obtain a row value and a column value;
[0080] Perform shift operations on the two-dimensional coordinates of each pixel to obtain row index and column index;
[0081] The row index and the column value are logically ANDed, and then the column index is ANDed to obtain the index number Mk of the highest level of each pixel in the image to be displayed. index ;The index number range is 0-(row value * column value-1);
[0082] Taking the image template specification (N*N) of 8*8 as an example, it is divided into 4 levels, that is, K is 4, and the corresponding level number Mk is: M3: 8*8 pixel block, one M3 contains 4 M2; M2: 4*4 pixel block, one M2 contains 4 M1; M1: 2*2 pixel block, one M1 contains 4 M0; M0: single pixel block;
[0083] Based on the corresponding numbers M0-M3 of the above levels, calculate the index number M3 in the image respectively index Index number of M2 in M3: M2 index 、M1 index number in M2 index 、M0 index number in M1 M0 index ;
[0084] M3 is the index number of the image. index In the following operations: ROWS is the row value, COLS is the column value, row is the row index, and col is the column index
[0085] ROWS=(H+7)>>3, COLS=(W+7)>>3;
[0086] row=y>>3,col=x>>3;
[0087] M3 index =row*COLS+col;
[0088] The number range is 0-ROWS*COLS-1;
[0089] Index number of M2 in M3: M2 index
[0090] M2 index =((y&7)>>2)<<1)+((x&7)>>2);
[0091] The number range is 0-3;
[0092] Index number M1 in M2 index :
[0093] M1 index =(((y&3)>>1)<<1)+((x&3)>>1);
[0094] The number range is 0-3;
[0095] Index number M0 in M1 index :
[0096] M0 index =((y&1)<<1)+(x&1);
[0097] The number range is 0-3;
[0098] The rotation mode and initial position mode are defined according to the number and a lookup table is generated. The process is as follows:
[0099] The rotation mode of the number of the current level in the corresponding number of its parent level is defined layer by layer, the position relationship of the number of the current level in the number of its parent level under different rotation modes is determined, and the initial position mode is defined;
[0100] According to the initial position pattern, an initial position lookup table is constructed and mapped to a position pattern mapping table;
[0101] Constructing a rotation mode lookup table according to the rotation mode and the position relationship under different rotation modes, and mapping the table to a rotation mode mapping table;
[0102] According to the initial position mode and the rotation mode, by mapping the highest level elements to the time offsets, a time offset lookup table with corresponding numbers at the highest level is obtained;
[0103] In this embodiment, based on the corresponding numbers M0-M3 of the above-mentioned levels, four rotation modes are defined to represent the rotation of M0 in M1, the rotation of M1 in M2, and the rotation of M2 in M3;
[0104] See also Figure 3 , mode 0, upper left -> upper right -> lower left -> lower right;
[0105] See also Figure 4 , Mode 1, upper left -> lower left -> upper right -> lower right;
[0106] See also Figure 5 , Mode 2, upper left -> lower right -> lower left -> upper right;
[0107] See also Figure 6 , Mode 3, upper left -> lower right -> upper right -> lower left;
[0108] As can be seen from the above, in every 4 frames, the positional relationship between the corresponding numbers of the lower layer and the corresponding numbers of the higher layer under different rotation modes is defined as a rotation mode mapping table, as shown in Table 1 below: Table 1
[0109] There are 24 different initial position relationships between the corresponding numbers of the lower level and the corresponding numbers of the higher level under different rotation modes, which are defined as the position mode mapping table, as shown in Table 2 below: Table 2
[0110] Generating a lookup table includes generating an initial position lookup table and generating a rotation mode lookup table:
[0111] The initial position lookup table is shown in Table 3 below: Table 3
[0112] The mode number is stored in the initial position lookup table. Experiments show that only 16 of the 24 position modes need to be taken, which can be represented by 4 bits. Each position requires 2 bits. Therefore, the memory size used by the position mode mapping table is 32 bits, and the memory size used by the initial position lookup table is 84 bits.
[0113] The rotation mode lookup table is shown in Table 4 below: Table 4
[0114] The rotation mode number is stored in the rotation mode lookup table, which occupies 42 bits of memory. The rotation mode mapping table has a fixed memory size of 32 bits.
[0115] The time offset lookup table, specifically the M3 time offset lookup table, ensures that different spatial M3s have different rotation modes and initial positions. Each M3 index number is uniformly randomly mapped to a time offset in the range of 0-63. For a given M3 index number, a pseudo-random number generator function is used to generate a random number between 0 and 63 using the index number as a seed. This random number is the corresponding time offset. This table is calculated in real time and does not need to be saved. The result of each calculation must be the same.
[0116] Based on the segmented timing signal, the rotation mode is corrected by:
[0117] modifying the rotation mode based on the time segments corresponding to the segmented timing signal;
[0118] Based on the secondary high-level index finally corresponding to each pixel, the spatial index number corresponding to each pixel is calculated, and then combined with the grayscale value, the LED display screen is dynamically controlled to display each pixel in the image to be displayed. The method is as follows:
[0119] Substitute the next highest level index corresponding to each pixel into the pre-built relationship between time, space, set grayscale value and corresponding pixel output to generate a spatial index number;
[0120] Map time and space to one dimension through functions respectively, calculate the time-space difference, and when the difference is less than the set gray value gray, control the pixel point corresponding to the pixel coordinate (x, y) to light up and display; otherwise, keep it off;
[0121] See also Figure 1 , is the relationship between time, space, input grayscale and a pixel output f(x,y,gray,t,N) is:
[0122]
[0123] Where x, y are pixel coordinates, gray is the set grayscale value, N is the template size, and the s-axis is the mapping coordinate of the two-dimensional pixel coordinates (x, y) in the N*N pixel block, that is: s = map(x, y). The above formula shows that under the condition of a given grayscale gray, at a certain time t, gray pixels are lit in the N*N pixel block, and gray pixels in different positions are lit at different times. The horizontal direction between Line_1 and Line_2 represents the coordinate range of the pixels that need to be lit;
[0124] If the original time t is mapped through a function with a uniform probability distribution, that is, through uniform sampling, we get T = uniform(t), and similarly, the spatial coordinate s is mapped through a function with a uniform probability distribution, that is, through uniform sampling, we get S = uniform(s), and then combined with the rotation method of M1, M2, and M3, the order 0-63 is mapped to the random order 0-63. Assuming the grayscale accuracy is 1 / 64, it is possible to effectively eliminate artificial textures while ensuring the details of the image.
[0125] The spatial index number S is the sum of the level index number and its shift;
[0126] The following takes the template size (N*N) of 8*8 as an example, combined with the above generated lookup table, to describe in detail the case when the fractional grayscale accuracy is When the pixel gray value at coordinate (x, y) is gray, and the decimal gray range is 0-63 / 64, should the pixel be lit? The algorithm steps are as follows
[0127] Step 1: Calculate the level index of each level corresponding to each pixel according to the index number calculation method in the lookup table generation method based on the two-dimensional coordinates (x, y) of each pixel of the image to be displayed: M3 index ,M2 index , M1 index ;
[0128] Step 2: Based on the level index of the highest level corresponding to each pixel, combined with the time offset lookup table, determine the time offset and perform a modulo operation correction, that is, calculate M3 index The corresponding time offset t offset ;
[0129] Step 3: Divide the corrected time into multiple time segments, generate segmented timing signals, and correct the current time t to (t+t offset )&63; Expand t by bit and divide it into 3 segments: t 0-1 ,t 2-3 ,t 4-5 ;
[0130] Step 4, obtaining the rotation mode in the lookup table based on the index of the next highest level;
[0131] Step 5: Modify the rotation mode based on the time segment corresponding to the segmented timing signal, that is, indes To get the rotation mode rotateMode in the rotation lookup table, modify rotateMode to (rotateMode+t 4-5 )&3;
[0132] Step 6: Using the sub - higher - level index and the dynamic rotation mode as indexes, obtain the updated index of the sub - higher - level index in the rotation mode lookup table as the first index, that is, using M2 index , with rotateMode as the index, obtain a new M2 in the rotation mapping table index index number as the first index;
[0133] Step 7: In the initial position lookup table, look up the sub - higher - level index corresponding to the first index as the second index; that is, using the M2 obtained in the previous step index as the index, obtain the corrected M2 in the initial position lookup table index as the second index;
[0134] Step 8: Combining the second index and the time offset, determine the sub - higher - level index finally corresponding to each pixel through the initial position lookup table; that is, using t offset , M2 index as the index, obtain the final M2 in the position mapping table index ;
[0135] Step 9: Execute level by level in the way of obtaining the index number of the final sub - higher - level until reaching the M0 level to obtain the indexes of all levels finally; that is, in the same way, starting from the initial M1 index [[ID=2�]], M0 index obtain the final M1 index , MO index .
[0136] Step 10: Substitute the sub - higher - level index finally corresponding to each pixel into the pre - constructed relationship between time, space, set gray value and the output of the corresponding pixel to generate a spatial index number; calculate the spatial index number s=(M2 index <<4)+(M2 index <<2)+M2 index ;
[0137] Step 11: Map time and space to one - dimension respectively through functions, calculate the time - space difference, and when the difference is less than the set gray value gray, control the pixel point at the corresponding pixel coordinate (x, y) to be lit; otherwise keep it off; specifically, if (s - t + 63)&63 < gray, light up the pixel.
[0138] In the above - mentioned embodiments, although each step is described in the above - mentioned order, those skilled in the art can understand that in order to achieve the effects of this embodiment, different steps do not have to be executed in such an order, and they can be executed simultaneously (in parallel) or in a reversed order, and these simple changes are all within the protection scope of the present invention.
[0139] A second embodiment of the present invention provides a system for implementing fractional grayscale on an LED display screen based on a lookup table. Based on the aforementioned method for implementing fractional grayscale on an LED display screen based on a lookup table, the system comprises: generating a lookup table and a fractional grayscale processing module. The generating lookup table is configured as follows:
[0140] Obtaining image information of an image to be displayed, dividing the image information into levels to obtain a number corresponding to the level, mapping the number into an index number through coordinate mapping, defining a rotation mode and an initial position mode based on the number and generating a lookup table; the lookup table includes an initial position lookup table, a rotation mode lookup table, and a time offset lookup table;
[0141] The decimal grayscale processing module is configured as follows:
[0142] Calculating the level index of each level corresponding to each pixel according to the coordinates of each pixel in the image to be displayed; determining the time offset based on the level index of the highest level corresponding to each pixel in combination with the time offset lookup table and performing a modulo operation correction to generate a segmented timing signal;
[0143] In the rotation mode lookup table, searching for the rotation mode of the next highest level index corresponding to each pixel; modifying the rotation mode based on the segmented timing signal to obtain a dynamic rotation mode;
[0144] Using the second-high-level index and the dynamic rotation mode as indexes, obtaining an updated index of the second-high-level index in the rotation mode lookup table as a first index;
[0145] In the initial position lookup table, searching for a second-high-level index corresponding to the first index as a second index; and determining the second-high-level index ultimately corresponding to each pixel through the initial position lookup table in combination with the second index and the time offset;
[0146] Based on the secondary high-level index finally corresponding to each pixel, the spatial index number corresponding to each pixel is calculated, and then combined with the grayscale value, the LED display screen is dynamically controlled to display each pixel in the image to be displayed.
[0147] It should be noted that the above embodiment provides a lookup table-based LED display screen fractional grayscale implementation system, which is only illustrated by the division of the above functional modules. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the modules or steps in the embodiments of the present invention can be further decomposed or combined. For example, the modules in the above embodiments can be combined into one module, or further divided into multiple sub-modules to complete all or part of the functions described above. The names of the modules and steps involved in the embodiments of the present invention are only for distinguishing the modules or steps and are not to be regarded as improper limitations of the present invention.
[0148] The terms "first", "second", etc. are used to distinguish similar objects, rather than to describe or indicate a particular order or sequence.
[0149] The term "comprise" or any other similar term is intended to cover non-exclusive inclusion such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed or inherent to such process, method, article, or apparatus.
[0150] Thus far, the technical solutions of the present invention have been described in conjunction with the preferred embodiments shown in the accompanying drawings. However, it will be readily understood by those skilled in the art that the scope of protection of the present invention is obviously not limited to these specific embodiments. Without departing from the principles of the present invention, those skilled in the art may make equivalent changes or substitutions to the relevant technical features, and the technical solutions after such changes or substitutions will fall within the scope of protection of the present invention.
Claims
1. A method for realizing fractional grayscale of LED display screen based on lookup table, characterized in that: The method comprises the following steps: Obtaining image information of an image to be displayed, dividing the image information into levels to obtain a number corresponding to the level, mapping the number into an index number through coordinate mapping, defining a rotation mode and an initial position mode based on the number and generating a lookup table; the lookup table includes an initial position lookup table, a rotation mode lookup table, and a time offset lookup table; Calculating the level index of each level corresponding to each pixel according to the coordinates of each pixel in the image to be displayed; determining the time offset based on the level index of the highest level corresponding to each pixel in combination with the time offset lookup table and performing a modulo operation correction to generate a segmented timing signal; In the rotation mode lookup table, searching for the rotation mode of the next highest level index corresponding to each pixel; modifying the rotation mode based on the segmented timing signal to obtain a dynamic rotation mode; Using the second-high-level index and the dynamic rotation mode as indexes, obtaining an updated index of the second-high-level index in the rotation mode lookup table as a first index; In the initial position lookup table, searching for a second-high-level index corresponding to the first index as a second index; and determining the second-high-level index ultimately corresponding to each pixel through the initial position lookup table in combination with the second index and the time offset; Based on the secondary high-level index finally corresponding to each pixel, the spatial index number corresponding to each pixel is calculated, and then combined with the grayscale value, the LED display screen is dynamically controlled to display each pixel in the image to be displayed.
2. The method for realizing fractional grayscale of LED display screen based on lookup table according to claim 1, characterized in that: The index number is obtained by: Obtaining image information of the image to be displayed, including size information, template specifications, and two-dimensional coordinates of each pixel of the image to be displayed; Divide the image to be displayed into layers according to the template specification to obtain a number Mk corresponding to the layer; The corresponding number M for the lower level i , based on the parent level M of the current level i+1, According to the two-dimensional coordinates, the index number Mi of Mi in its parent level is calculated by formula operation. index ; For the highest level, based on the number of the highest level, combined with the two-dimensional coordinates of each pixel and the size information of the image to be displayed, the index number Mk of the number of the highest level in the image to be displayed is calculated. index ; i and k are 0 and positive integers, i is less than k, and K represents the level.
3. The method for realizing fractional grayscale of LED display screen based on lookup table according to claim 2, characterized in that: Calculate the index number of the current level in its parent level as follows: The index number of each pixel's current level in its parent level is obtained by performing a logical AND operation and a shift operation on the two-dimensional coordinates of each pixel and a specific value, where the index number range of each level is a fixed value; The index number of the highest level number in the image to be displayed is calculated as follows: Adding the width and height of the size information of the image to be displayed to the set value and then performing a shift operation to obtain a row value and a column value; Perform shift operations on the two-dimensional coordinates of each pixel to obtain row index and column index; The row index and the column value are logically ANDed, and then the column index is ANDed to obtain the index number Mk of the highest level of each pixel in the image to be displayed. index ;The index number range is 0-(row value * column value-1).
4. The method for realizing fractional grayscale of LED display screen based on lookup table according to claim 1, characterized in that: The rotation mode and initial position mode are defined according to the number and a lookup table is generated. The process is as follows: The rotation mode of the number of the current level in the corresponding number of its parent level is defined layer by layer, the position relationship of the number of the current level in the number of its parent level under different rotation modes is determined, and the initial position mode is defined; According to the initial position pattern, an initial position lookup table is constructed and mapped to a position pattern mapping table; Constructing a rotation mode lookup table according to the rotation mode and the position relationship under different rotation modes, and mapping the table to a rotation mode mapping table; According to the initial position mode and the rotation mode, by mapping the highest level elements to the time offsets, a time offset lookup table of corresponding numbers at the highest level is obtained.
5. The method for realizing fractional grayscale of LED display screen based on lookup table according to claim 1, characterized in that: Generate a segmented timing signal as follows: Get the index number of each level corresponding to each pixel; Determining a time offset based on the highest-level index number corresponding to each pixel and combining the pixels, and performing a modulo operation on the current time based on the time offset; The corrected time is divided into multiple time segments to obtain a segmented time series signal.
6. The method for realizing fractional grayscale of LED display screen based on lookup table according to claim 5, characterized in that: Based on the segmented timing signal, the rotation mode is corrected by: The rotation mode is modified based on the time segments corresponding to the segmented timing signal.
7. The method for realizing fractional grayscale of LED display screen based on lookup table according to claim 1, characterized in that: Based on the secondary high-level index finally corresponding to each pixel, the spatial index number corresponding to each pixel is calculated, and then combined with the grayscale value, the LED display screen is dynamically controlled to display each pixel in the image to be displayed. The method is as follows: Substitute the next highest level index corresponding to each pixel into the pre-built relationship between time, space, set grayscale value and corresponding pixel output to generate a spatial index number; Map time and space to one dimension through functions respectively, calculate the time-space difference, and when the difference is less than the set grayscale value gray, control the pixel point corresponding to the pixel coordinate (x, y) to light up and display; otherwise, keep it off.
8. The method for realizing fractional grayscale of LED display screen based on lookup table according to claim 7, characterized in that: The relationship is: Among them, x, y are pixel coordinates, gray is the set grayscale value, N is the template size, and the s axis is the mapping coordinate of the two-dimensional pixel coordinate (x, y) in the N*N pixel block, that is: s=map(x, y).
9. The method for realizing fractional grayscale of LED display screen based on lookup table according to claim 1, characterized in that: The spatial index number S is the sum of the next highest level index and its shift corresponding to each pixel.
10. A system for realizing fractional grayscale of an LED display screen based on a lookup table, based on a method for realizing fractional grayscale of an LED display screen based on a lookup table according to any one of claims 1 to 9, characterized in that: The system includes: generating a lookup table and a fractional grayscale processing module, wherein the generating lookup table is configured as follows: Obtaining image information of an image to be displayed, dividing the image information into levels to obtain a number corresponding to the level, mapping the number into an index number through coordinate mapping, defining a rotation mode and an initial position mode based on the number and generating a lookup table; the lookup table includes an initial position lookup table, a rotation mode lookup table, and a time offset lookup table; The decimal grayscale processing module is configured as follows: Calculating the level index of each level corresponding to each pixel according to the coordinates of each pixel in the image to be displayed; determining the time offset based on the level index of the highest level corresponding to each pixel in combination with the time offset lookup table and performing a modulo operation correction to generate a segmented timing signal; In the rotation mode lookup table, searching for the rotation mode of the next highest level index corresponding to each pixel; modifying the rotation mode based on the segmented timing signal to obtain a dynamic rotation mode; Using the second-high-level index and the dynamic rotation mode as indexes, obtaining an updated index of the second-high-level index in the rotation mode lookup table as a first index; In the initial position lookup table, searching for a second-high-level index corresponding to the first index as a second index; and determining the second-high-level index ultimately corresponding to each pixel through the initial position lookup table in combination with the second index and the time offset; Based on the secondary high-level index finally corresponding to each pixel, the spatial index number corresponding to each pixel is calculated, and then combined with the grayscale value, the LED display screen is dynamically controlled to display each pixel in the image to be displayed.