Bit plane data compression method and device, equipment, storage medium and product
By distinguishing between solid color and non-solid color pixel blocks, the low encoding efficiency problem caused by a single encoding strategy is solved, more efficient image data compression is achieved, and data transmission and cache requirements of silicon-based OLED microdisplays are reduced.
Patent Information
- Application Number
- CN202510869014.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-26
- Publication Date
- 2025-08-29
AI Technical Summary
The existing image data compression technology adopts a single encoding strategy, resulting in low encoding efficiency and ineffective data redundancy, limiting the large-scale application of silicon-based OLED microdisplays.
By determining the type of pixel blocks in the sequence to be encoded, different encoding methods are adopted for solid and non-pure color pixel blocks, and continuous solid color pixel blocks are encoded according to pixel values and continuous quantities, reducing the encoded data amount and operation times.
It improves encoding efficiency, reduces data redundancy, reduces the transmission and cache requirements of bit plane data in the system, and improves image compression effect.
Smart Images

Figure CN120568064A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data processing technology, and in particular to a bit plane data compression method, device, equipment, storage medium and product. Background Art
[0002] As the resolution and refresh rate of visual devices continue to increase, the amount of data generated is growing exponentially. Using efficient data encoding methods to compress image data and improve image transmission and storage efficiency has become a focus of research and practice. Taking digitally driven silicon-based organic light-emitting diode (OLED) microdisplays as an example, they have become a core technology in the field of near-eye displays due to their advantages such as high brightness, low power consumption, and long service life, and have broad application prospects. However, as resolution and refresh rate continue to increase, the amount of data is growing exponentially. The insufficient device bandwidth and the excessively large frame buffer area in the timing control (TCON) chip further increase design costs, severely limiting the large-scale application of silicon-based OLED microdisplays. Therefore, developing efficient data compression technology to reduce transmission bandwidth and frame buffer requirements has become the key to the development of near-eye display technology.
[0003] Currently, existing image data compression technologies often use fixed-length coding to compress images, thereby reducing data redundancy.
[0004] However, the above solution adopts a single encoding strategy when compressing image data, and the efficiency of image data encoding is low. Summary of the Invention
[0005] The present invention provides a bit plane data compression method, apparatus, device, storage medium and product to solve the problem of low coding efficiency caused by a single coding strategy.
[0006] According to one aspect of the present invention, there is provided a bit-plane data compression method, comprising:
[0007] Determining a sequence to be encoded corresponding to the bit plane image to be processed, wherein the sequence to be encoded includes a plurality of pixel blocks;
[0008] Each pixel block in the sequence to be encoded is encoded according to the pixel block type corresponding to each pixel block in the sequence to be encoded, so as to obtain a compression result corresponding to the bit plane image, wherein the pixel block type includes pure color pixel blocks and non-pure color pixel blocks, the non-pure color pixel blocks are encoded according to the corresponding pixel values, and the continuous pure color pixel blocks are encoded according to the corresponding pixel values and the continuous number.
[0009] According to another aspect of the present invention, there is provided a bit-plane data compression apparatus, comprising:
[0010] A to-be-encoded sequence determination module, configured to determine a to-be-encoded sequence corresponding to a to-be-encoded bit plane image to be processed, wherein the to-be-encoded sequence includes a plurality of pixel blocks;
[0011] A bit plane image encoding module is used to encode each pixel block in the sequence to be encoded according to the pixel block type corresponding to each pixel block in the sequence to be encoded, so as to obtain a compression result corresponding to the bit plane image, wherein the pixel block type includes pure color pixel blocks and non-pure color pixel blocks, the non-pure color pixel blocks are encoded according to the corresponding pixel values, and the continuous pure color pixel blocks are encoded according to the corresponding pixel values and continuous quantities.
[0012] According to another aspect of the present invention, an electronic device is provided, comprising:
[0013] at least one processor; and
[0014] a memory communicatively connected to the at least one processor; wherein,
[0015] The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor to enable the at least one processor to perform the bit-plane data compression method according to any embodiment of the present invention.
[0016] According to another aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the bit-plane data compression method described in any embodiment of the present invention when executed.
[0017] The bit plane data compression scheme of an embodiment of the present invention first determines a sequence to be encoded corresponding to a bit plane image to be processed, wherein the sequence to be encoded includes multiple pixel blocks; then, when encoding the pixel blocks, the encoding method is determined according to the pixel block type corresponding to the pixel blocks, whether it is a non-pure color pixel block or a pure color pixel block, and the non-pure color pixel blocks are encoded according to the corresponding pixel values, and the continuous pure color pixel blocks are encoded according to the corresponding pixel values and continuous numbers. Bit plane images often contain a large number of continuous identical pixels. Encoding the continuous pure color pixel blocks according to the corresponding pixel values and continuous numbers can effectively reduce the amount of encoded data and the number of encoding operations, improve encoding efficiency, solve the problem of low encoding efficiency caused by a single encoding strategy, reduce the redundancy of the encoded data, and thus improve the compression effect of the image.
[0018] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present invention, nor is it intended to limit the scope of the present invention. Other features of the present invention will become readily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0020] Figure 1 This is a flowchart of a bit-plane data compression method provided in Embodiment 1 of the present invention;
[0021] Figure 2 is a flowchart of a bit-plane data compression method provided according to a second embodiment of the present invention;
[0022] Figure 3 is a flowchart of a bit-plane data compression method provided according to a third embodiment of the present invention;
[0023] Figure 4 2 is a schematic structural diagram of a bit-plane data compression device provided according to a fourth embodiment of the present invention;
[0024] Figure 5 1 is a schematic structural diagram of an electronic device for implementing a bit-plane data compression method according to an embodiment of the present invention;
[0025] Figure 6 1 is a graph showing statistical experimental results of compression ratio and pixel block jump rate according to the third embodiment of the present invention;
[0026] Figure 7 1 is a graph showing statistical experimental results of compression ratio, total cache data, and number of pre-selected rows according to the third embodiment of the present invention;
[0027] Figure 8 2 is a schematic diagram of a preset storage structure for storing compression results provided according to embodiment 3 of the present invention. DETAILED DESCRIPTION
[0028] In order to enable those skilled in the art to better understand the solutions of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the embodiments described are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts should fall within the scope of protection of the present invention.
[0029] It should be noted that the terms "first", "second", etc. in the description and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that the numbers used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0030] Example 1
[0031] Figure 1 A flowchart of a bit-plane data compression method is provided for the first embodiment of the present invention. This embodiment is applicable to bit-plane data compression, for example, it is applicable to bit-plane data compression of digitally driven silicon-based OLEDs. The method can be performed by a bit-plane data compression device, which can be implemented in the form of hardware and / or software and can be configured in an electronic device. Figure 1 As shown, the method includes:
[0032] S101: Determine a sequence to be encoded corresponding to a bit plane image to be processed, where the sequence to be encoded includes a plurality of pixel blocks.
[0033] In this embodiment, the bit plane map can be understood as a plane map formed by extracting the values of all pixels at the same binary bit after the grayscale value (or color component value) of each pixel in the image is represented by binary. Taking an 8-bit grayscale image as an example, the pixel value of a certain pixel is 130, and its binary value is 10000010. The plane formed by extracting the first bit (rightmost bit) of the binary representation corresponding to each pixel of the grayscale image is a bit plane map. Similarly, 8 bit plane maps can be obtained, where the pixel values of each bit plane map are only 0 and 1.
[0034] For example, when applied to digitally driven silicon-based OLED microdisplays, the 8-bit grayscale data of the image can be corrected to 14 bits through gamma correction to optimize the display effect, and then the centralized 25 sub-fields (CSF-25) scanning algorithm is used to decompose the 14-bit grayscale data into 25 sub-fields to accurately control the grayscale level, and finally a 25-bit plane image can be obtained.
[0035] The specific number of sequences to be encoded corresponding to the bit plane image to be processed is not limited, and can be one or more. The sequence to be encoded can be a sequence obtained by sorting all or part of the pixels of the bit plane image in a preset order (such as from left to right, from top to bottom), and can be a pixel sequence of a certain length in the bit plane image. Exemplarily, the bit plane image to be processed is divided according to a preset number of rows to obtain multiple sequences to be encoded. For example, the resolution of the bit plane image is 2150*2150, and 2 rows (preset number of rows) are set as a sequence to be encoded, then the sequence to be encoded is a sequence containing 2*2150 pixel values. Each sequence to be encoded includes multiple pixel blocks, and the size of each pixel block can be consistent. The pixel blocks can be divided according to the preset number of pixels for the sequence to be encoded, or the preset number of pixels can be selected as a pixel block each time during the encoding process. If 6 consecutive pixels (preset number of pixels) are selected for processing each time, then these 6 pixels constitute a pixel block.
[0036] S102. Encode each pixel block in the sequence to be encoded according to the pixel block type corresponding to each pixel block in the sequence to be encoded, and obtain a compression result corresponding to the bit plane image, wherein the pixel block type includes pure color pixel blocks and non-pure color pixel blocks, the non-pure color pixel blocks are encoded according to the corresponding pixel values, and the continuous pure color pixel blocks are encoded according to the corresponding pixel values and the continuous number.
[0037] In this embodiment, the pixel block types include pure color pixel blocks and non-pure color pixel blocks. The pure color pixel block can be understood as a pixel block in which all pixel values are the same. For example, if all pixel values in the pixel block are 1, then the pixel block is a pure black pixel block. If all pixel values in the pixel block are 0, then the pixel block is a pure white pixel block. The non-pure color pixel block can be understood as a pixel block in which different pixel values exist, such as a pixel block that contains both pixel value 0 and pixel value 1.
[0038] For example, when encoding each pixel block, if the current pixel block is a non-pure color block, the pixel value of the pixel block can be directly used as the encoding result; if the current pixel block is a pure color block, the encoding result can be determined based on the color type of the pure color block and the number of consecutive appearances of the pure color block, avoiding separate encoding of multiple consecutive pure color pixel blocks. The advantage of this setting is that it reduces the amount of encoded data and the number of encoding operations, thereby improving encoding efficiency.
[0039] An embodiment of the present invention provides a bit plane data compression method that solves the problem of low coding efficiency caused by a single coding strategy. First, a sequence to be encoded corresponding to a bit plane image to be processed is determined, wherein the sequence to be encoded includes multiple pixel blocks. Then, when encoding the pixel blocks, an encoding method is determined based on the pixel block type corresponding to the pixel block, whether it is a non-pure color pixel block or a pure color pixel block. The non-pure color pixel blocks are encoded according to the corresponding pixel values, and the continuous pure color pixel blocks are encoded according to the corresponding pixel values and continuous numbers. Bit plane images often contain a large number of continuous identical pixels. Encoding the continuous pure color pixel blocks according to the corresponding pixel values and continuous numbers can effectively reduce the amount of encoded data and the number of encoding operations, improve coding efficiency, solve the problem of low coding efficiency caused by a single coding strategy, reduce the redundancy of the encoded data, and thus improve the image compression effect. When applied to a digitally driven silicon-based OLED microdisplay system, the method can effectively reduce the transmission and caching requirements of bit plane data in the system.
[0040] Example 2
[0041] Figure 2 This is a flowchart of a bit plane data compression method provided by the second embodiment of the present invention. This embodiment is refined based on the above embodiment. Figure 2 As shown, the method includes:
[0042] S201: Determine a sequence to be encoded corresponding to a bit plane image to be processed, where the sequence to be encoded includes a plurality of pixel blocks.
[0043] S202: Determine a current pixel block to be processed in a sequence to be encoded.
[0044] Specifically, each pixel block in the sequence to be encoded is determined as the current pixel block in sequence according to the arrangement order in the sequence to be encoded.
[0045] S203: Determine the coded data according to the current pixel block type and the previous pixel block type.
[0046] Specifically, according to the current pixel block type and the previous pixel block type, the coded data is determined, including the following A1 to A5:
[0047] A1. When the current pixel block is a pure color pixel block and is the same as the previous pixel block, the count value is accumulated.
[0048] In this embodiment, the count value can be understood as a value recording the number of consecutive appearances of a certain type of pure color pixel block. The initial value of the count value is generally set to 0.
[0049] For example, if the current pixel block is a pure black pixel block and the previous pixel block is also a pure black pixel block, then the accumulated count value represents the number of times the current pure black pixel block appears consecutively. For example, if the pure black pixel block appears twice consecutively, then the current count value is 2.
[0050] A2. When the current pixel block and the previous pixel block are different pure color pixel blocks, the current count value is determined as a continuous number, and corresponding encoding data is generated according to the pixel value and continuous number corresponding to the previous pixel block, and the current count value is reset to 1.
[0051] For example, if the current pixel block is a pure white pixel block, but the previous pixel block is a pure black pixel block, then the count value is no longer accumulated, and the current count value is used as the continuous number of pure black pixel blocks, and the current count value is reset to 1. The count value at this time indicates that the count value of the pure white pixel block is 1.
[0052] When encoding a pure color pixel block, the corresponding encoding data is generated according to the pixel value and continuous number corresponding to the previous pixel block, wherein the pixel value corresponding to the previous pixel block can be understood as the encoding symbol set according to the pure color block type. The advantage of this setting is that a shorter symbol is used instead of the original pixel value, which saves storage space and can still distinguish the type of pure color blocks; for example, according to the pixel value corresponding to the pixel block, it is judged that the previous pixel block is a pure black pixel block. The symbol 0 can be used to represent the pure black pixel block, and the symbol 1 can be used to represent the pure white pixel block. In this case, the encoding data can be generated using the symbol 0 and the continuous number of pure black pixel blocks.
[0053] A3. When the current pixel block is a pure color pixel block and the previous pixel block is a non-pure color pixel block, the current count value is set to 1.
[0054] For example, if the previous pixel block is a non-pure color pixel block and the current pixel block is a pure white pixel block, then the count value at this time represents that the current pure white pixel block appears once continuously. Encoding is not performed for the time being, but the pixel block type of the subsequent pixel block is judged, and then the specific encoding method is determined.
[0055] A4. When the current pixel block is a non-pure color pixel block and the previous pixel block is a non-pure color pixel block, corresponding coded data is generated according to pixel values corresponding to the current pixel block.
[0056] For example, if the current pixel block and the previous pixel block are both non-pure color pixel blocks, the corresponding encoding data can be generated using the pixel values corresponding to the current pixel block. For example, if the pixel block length is 6, the 6-bit pixel value can be directly used as the encoding data.
[0057] A5. When the current pixel block is a non-pure color pixel block and the previous pixel block is a pure color pixel block, the corresponding coded data is generated according to the pixel value and continuous number corresponding to the previous pixel block, the corresponding coded data is generated according to the pixel value corresponding to the current pixel block, and the current count value is reset to 0.
[0058] For example, if the current pixel block is a non-pure color pixel block, but the previous pixel block is a pure color pixel block, the corresponding encoding data is first generated according to the pixel value and continuous number corresponding to the previous pixel block, and then the corresponding encoding data is generated according to the pixel value corresponding to the current pixel block, and then the current count value is reset to 0. The advantage of this setting is that it ensures that the count value starts to accumulate from 0 when a pure color pixel block appears next time.
[0059] Optionally, generating corresponding coded data according to the pixel value and the continuous number corresponding to the previous pixel block includes:
[0060] In response to the continuous number being less than or equal to a preset counting threshold, corresponding coded data is generated based on the pixel value corresponding to the previous pixel block and the continuous number; in response to the continuous number being greater than the preset counting threshold, first coded sub-data is generated based on the pixel value corresponding to the previous pixel block and the preset counting threshold, second coded sub-data is generated based on the difference between the continuous number and the preset counting threshold, and corresponding coded data is determined based on the first coded sub-data and the second coded sub-data.
[0061] In this embodiment, a counting threshold can be pre-set, and the counting threshold can be set according to the characteristics of the sequence to be encoded. The advantage of setting the counting threshold is that when encoding the continuous number, the influence of a small number of outliers can be avoided, thereby improving the applicability of the encoding method. For example, in the sequence to be encoded, the values of the continuous number of pure color pixel blocks are mostly concentrated within 30, but a small number of values exceed 100. After the continuous number is converted into binary, 5 data bits can be used to store values within 30, but 7 or 8 data bits are required to store values exceeding 100. If the counting threshold is not set, then when encoding the continuous number, space needs to be reserved according to 7 or 8 data bits, resulting in a waste of storage space. If the counting threshold is set, when the continuous number does not exceed the counting threshold, 5 data bits are used to store the encoding result of the continuous number. When the continuous number exceeds the counting threshold, encoding is first performed according to the counting threshold, and then encoding is performed according to the difference between the continuous number and the counting threshold. This reduces the data volume of the encoding result, saves storage space, and makes the encoding method more flexible, thereby improving the applicability of the encoding method.
[0062] Exemplarily, the preset counting threshold is 32. If the previous pixel block is a pure white block and the continuous number is 30, and the continuous number is less than the preset counting threshold, then the pixel value corresponding to the previous pixel block (such as symbol 1) and the continuous number of pure white pixel blocks can be directly used to generate the corresponding coded data; if the previous pixel block is a pure white block and the continuous number is 34, then the continuous number exceeds the preset counting threshold. First, the first coded sub-data is generated according to the pixel value corresponding to the previous pixel block (such as symbol 1) and the preset counting threshold (such as 32), and then the second coded sub-data is generated according to the difference between the continuous number and the preset counting threshold. Finally, the corresponding coded data is determined according to the first coded sub-data and the second coded sub-data.
[0063] Preferably, in order to distinguish different encoding results corresponding to non-pure color pixel blocks, the number of continuous pure color pixel blocks not exceeding the preset counting threshold, and the number of continuous pure color pixel blocks exceeding the preset counting threshold, the following three encoding methods can be used for encoding:
[0064] Use 1 flag bit and x data bits to record non-pure color pixel block encoding data;
[0065] A 2-bit flag bit and a y-bit data bit are used to record the coded data when the number of consecutive pure color pixel blocks does not exceed a preset counting threshold;
[0066] A 1-bit flag bit and z-bit data bits are used to record the coded data when the number of consecutive pure color pixel blocks exceeds a preset counting threshold.
[0067] Exemplarily, the flag bit of a non-pure color pixel block is 0, and the x-bit data bit records the specific pixel value corresponding to the non-pure color pixel block; when the number of consecutive pure color pixel blocks does not exceed the preset counting threshold, the first flag bit is 1, the second flag bit is 0, indicating that the pure color pixel block is pure black, the second flag bit is 1, indicating that the pure color pixel block is pure white, and the y-bit data bit records the consecutive number of pure color pixel blocks; when the consecutive number of pure color pixel blocks exceeds the preset counting threshold, the flag bit is still 1, and the second encoding method is first used to record the color information of the current pure color pixel block (pure black or pure white) and the preset counting threshold information, and then the z-bit data bit is used to record the difference information between the consecutive number and the preset counting threshold; wherein the third encoding method needs to rely on the second encoding method to jointly generate the encoded data. The advantage of this setting is that the encoded data can be generated more efficiently according to the characteristics of the sequence to be encoded. For example, for an image with a small number of consecutive pure color pixel blocks, the second encoding method can meet the requirements. For an image with a large number of consecutive pure color pixel blocks, the third encoding method is used on the basis of the second encoding method, thereby improving the applicability of the encoding strategy.
[0068] In addition, the length parameters (x, y, and z) of the above data bits can be optimized by using genetic algorithms, particle swarm optimization, and grid search methods in experiments. Optionally, the values of the three length parameters are all selected within the range of 2 to 15 according to the encoding characteristics.
[0069] S204: Determine whether there are pixel blocks that are not involved in the encoding. If so, execute S202; otherwise, execute S205.
[0070] In this embodiment, each pixel block in the sequence to be encoded is processed in turn. If it is found that there are still unprocessed pixel blocks in the sequence to be encoded, the process returns to S202 and re-determines the current pixel block to be processed according to the arrangement order of the pixel blocks in the sequence to be encoded. If it is found that all pixel blocks in the sequence to be encoded have participated in encoding, the process proceeds to S205.
[0071] S205 . Determine the compressed data corresponding to the to-be-encoded sequence according to the generation order of each coded data.
[0072] In this embodiment, a bit plane image corresponds to a single sequence to be encoded. Each pixel block is processed sequentially, and the encoded data is recorded in the order in which it is generated. Finally, compressed data corresponding to the sequence to be encoded is generated. This compressed data is the compressed data of the bit plane image, or the compression result. If the bit plane image corresponds to multiple sequences to be encoded, the above steps are performed separately for each of the multiple sequences to be encoded to obtain compressed data corresponding to each sequence to be encoded. The compression result corresponding to the bit plane image is determined based on the compressed data corresponding to the multiple sequences to be encoded.
[0073] In an embodiment of the present invention, each pixel block in a sequence to be encoded is determined as a current pixel block in sequence according to the arrangement order in the sequence to be encoded, and encoding data is generated according to the current pixel block type and the previous pixel block type according to established rules, so that different types of pixel blocks are encoded using different encoding methods. When encoding pure color pixel blocks, it is only necessary to generate encoding data based on the pure color pixel block type and the continuous number. When encoding non-pure color pixel blocks, the pixel value is directly used as the encoding data. The encoding process takes into account the type of pixel block and the number of continuous pure color pixel blocks, so that the encoding method has higher applicability to different types of images, thereby improving the efficiency of image data encoding.
[0074] Example 3
[0075] Figure 3 This is a flowchart of a bit plane data compression method provided by the third embodiment of the present invention. Figure 3 As shown, this embodiment is refined based on the above embodiment. Figure 3 As shown, the method includes:
[0076] S301 : Determine a sequence to be encoded corresponding to a to-be-processed bit plane image based on a foveal just noticeable difference (CB-FJND) model threshold of a cross block, wherein the sequence to be encoded includes a plurality of pixel blocks.
[0077] In this embodiment, the Cross Block Fovea Just Noticeable Difference (CB-FJND) model is a model that can quantify the sensitivity of the human eye to changes in the foveal area. The smaller the threshold of the CB-FJND model is set, the lower the image distortion rate is, and the larger the threshold of the CB-FJND model is set, the higher the image distortion rate is. By selecting different CB-FJND model thresholds to process the grayscale image, different sequences to be encoded corresponding to the bit plane images to be processed can be obtained.
[0078] S302: Predicting a compression ratio according to a pixel block jump rate in a to-be-encoded sequence corresponding to the to-be-processed bit plane image.
[0079] The pixel block jump rate is used to represent the frequency of changes between adjacent pixel blocks.
[0080] Specifically, the pixel block transition rate (PBTR) is expressed as follows:
[0081]
[0082] Among them, R PBT Represents the pixel block jump rate, N T Represents the number of pixel block jumps in the sequence to be encoded, N PB represents the total number of pixel blocks in the sequence to be encoded, wherein the total number of pixel blocks in the sequence to be encoded is expressed by the following expression:
[0083] N PB =[w*n / x] (2)
[0084] Wherein, w represents the number of bit plane rows selected when dividing the bit plane image into sequences to be encoded, n represents the number of columns of the bit plane image, w*n represents the length of the sequence to be encoded, and x represents the number of pixels in the pixel block.
[0085] The compression rate (CR) is expressed as follows:
[0086]
[0087] Among them, R C Indicates the compression ratio, S C Indicates the amount of compressed data, SO Indicates the amount of data before compression.
[0088] For example, for the test collection, a PBTR-CR statistical experiment is established. First, the PBTR of each sequence to be encoded is calculated. Then, the above encoding strategy is used to encode the sequence to be encoded to obtain the encoding result. The compression ratio is calculated based on the amount of data after compression (i.e., the amount of data of the encoding result) and the amount of data before compression to obtain the statistical results of PBTR and CR, as shown in the figure. Figure 6 shown.
[0089] According to data analysis, CR and PBTR are generally linearly related. A linear fitting model was established based on the experimental data, and the expression is as follows:
[0090] R C =a×R PBT +b (4)
[0091] Among them, a and b are fitting parameters. In order to evaluate the effect of the linear fitting curve, the determination coefficient and mean square error can be used as the main evaluation indicators.
[0092] The relationship between CR and PBTR is thus obtained. In the experiment, PBTR can be calculated based on the sequence to be encoded corresponding to the bit plane map, and the encoded CR can be further predicted based on PBTR.
[0093] S303: Predict the cache capacity occupied by the compression result according to the compression ratio.
[0094] In this embodiment, according to formula (3), it is found that the higher the CR, the more data is compressed and the higher the cache capacity is. Therefore, a linear expression of cache capacity and CR can be established based on experiments, so that during testing, the cache capacity occupied by the compression result can be predicted based on the CR alone.
[0095] S304: Determine whether the cache capacity exceeds a preset cache capacity threshold. If so, execute S305; otherwise, execute S306.
[0096] In this embodiment, a cache capacity threshold can be set in advance. Exceeding this threshold may cause data loss in the compression result. The preset cache capacity is generally obtained based on experiments. If it is exceeded, it is necessary to execute S305; if it is not exceeded, execute S306, and start encoding the sequence to be encoded to obtain the encoding result.
[0097] S305 : Increase the CB-FJND model threshold, and return to S301 .
[0098] In this embodiment, if the predicted cache capacity exceeds a preset cache capacity threshold, it is necessary to increase the threshold of the CB-FJND model and re-determine the sequence to be encoded corresponding to the bit plane image to be processed.
[0099] For example, the CB-FJND model threshold is originally set to 10. Then, in the grayscale image, pixel values below 10 are all processed as background information (generally corresponding to a pixel value of 0), and only the pixel values above 10 retain the original pixel values. If the CB-FJND model threshold is adjusted to 20, then in the grayscale image, pixel values below 20 are all processed as background information, and only the pixel values above 20 retain the original pixel values. Therefore, the pixel values of the grayscale image after processing with the increased CB-FJND model threshold are different, so the bit plane image extracted from the processed grayscale image will also change (for example, more background information with a pixel value of 0 will appear), further causing the sequence to be encoded to change.
[0100] Specifically, the improved CB-FJND model threshold is determined using the following expression:
[0101]
[0102] Among them, J CB-FJND (l,e,s,c) represents the improved CB-FJND model threshold, l represents brightness, e represents eccentricity angle, s represents pixel block size, c represents contrast, R C represents the predicted CR of the sequence to be encoded, σ represents the cache capacity ratio, μ represents the fitting parameter, and J JND,l,s Represents the original CB-FJND model threshold when the contrast is not 0, J JND,c,s Represents the original CB-FJND model threshold when the contrast is 0.
[0103] S306. Encode each pixel block in the sequence to be encoded according to the pixel block type corresponding to each pixel block in the sequence to be encoded, and obtain a compression result corresponding to the bit plane image, wherein the pixel block type includes pure color pixel blocks and non-pure color pixel blocks, the non-pure color pixel blocks are encoded according to the corresponding pixel values, and the continuous pure color pixel blocks are encoded according to the corresponding pixel values and the continuous number.
[0104] In an embodiment of the present invention, CR is predicted based on PBTR in a sequence to be encoded corresponding to a bit plane map to be processed, and the cache capacity occupied by the CR predicted compression result is determined to determine whether the cache capacity exceeds a preset cache capacity. If so, the sequence to be encoded corresponding to the bit plane map to be processed is re-determined by increasing the CB-FJND model threshold until the cache capacity after the predicted encoding does not exceed the preset cache capacity threshold. Then, each pixel block in the sequence to be encoded is encoded based on the pixel block type corresponding to each pixel block in the sequence to be encoded to obtain a compression result corresponding to the bit plane map. The above strategy adds a data overflow prevention mechanism for the encoding result, thereby further improving the compression efficiency.
[0105] In some embodiments, determining the sequence to be encoded corresponding to the bit plane map to be processed includes: dividing the bit plane map to be processed according to a preset number of rows to obtain multiple sequences to be encoded, wherein the preset number of rows is determined based on the compression rate and the total cache data; wherein encoding each pixel block in the sequence to be encoded according to the pixel block type corresponding to each pixel block in the sequence to be encoded to obtain the compression result corresponding to the bit plane map includes: for each sequence to be encoded in the multiple sequences to be encoded, encoding each pixel block in the current sequence to be encoded according to the pixel block type corresponding to each pixel block in the current sequence to be encoded to obtain compressed data corresponding to the current sequence to be encoded; determining the compression result corresponding to the bit plane map according to the compressed data corresponding to the multiple sequences to be encoded.
[0106] In this embodiment, selecting different preset numbers of rows when dividing the bit plane map into sequences to be encoded will generate different sequences to be encoded, thereby resulting in different compression ratios and total cache data for the encoded data.
[0107] Therefore, when selecting the optimal preset number of rows, it is generally necessary to balance the compression effect and the total cache data. For example, the optimal preset number of rows is set to all factors and partial reciprocals of the number of bit plane rows, and statistical experiments are conducted on the test collection to obtain the following: Figure 7 The relationship between the optimal number of lines and CR and the total cache data is shown.
[0108] The total buffered data is generally related to the amount of sequence data to be encoded, the amount of encoded data, the frame buffer data, and the amount of decoded data. The relationship can be expressed as follows:
[0109] D TC =D PC +D EC +D FC +D DC (6)
[0110] D PC =SRC×n (7)
[0111] D EC =SRC×n×R C (8)
[0112] D FC =m×n×s×R C ×2 (9)
[0113] D DC =SRC×n (10)
[0114] Among them, D TC Represents the total cache data, D PC Represents the amount of sequence data to be encoded, D EC Represents the amount of encoded data, D FC Represents the frame buffer data volume, D DC Represents the amount of decoded data, SRC represents the optimal preset number of rows, R C Represents CR, m represents the number of rows of the bit plane, n represents the number of columns of the bit plane, s represents the number of bit planes, and 2 represents the use of a double-frame buffering strategy when scanning the image.
[0115] Figure 7 In the example, SRC represents the optimal preset number of rows, CR represents the compression ratio, and TCD represents the total cache data. Figure 7 Analysis shows that when SRC is 10, CR reaches its minimum value and the compression effect is the best, but the corresponding cache data volume is not the minimum value; when SRC is 2, although CR is slightly higher than when SRC is 10, TCD reaches its minimum value. Therefore, the optimal preset number of rows can be selected based on the comprehensive trade-off between CR and total cache data in actual conditions.
[0116] After selecting the preset number of rows, the bit plane image can be divided into multiple sequences to be encoded, and each pixel block in each sequence to be encoded can be encoded in turn according to the corresponding pixel block type to obtain the compressed data corresponding to each sequence to be encoded, and finally the compression result corresponding to the final bit plane image can be obtained according to the compressed data corresponding to each sequence to be encoded.
[0117] Optionally, after obtaining the compression result of the bit plane image, it also includes: using a preset storage structure to store the compression result, wherein the preset storage structure includes subspaces corresponding to the multiple sequences to be encoded, each subspace includes a preset number of subfield storage spaces, and each subfield storage space includes color channel storage spaces corresponding to multiple color channels.
[0118] In this embodiment, the subspace can be understood as each sequence to be encoded by dividing the bit plane map according to the preset number of rows. The preset storage structure is as follows: Figure 8 shown.
[0119] For example, the original image is decomposed into 25 bit planes according to the three color channels of R, G, and B. The resolution of each bit plane is 2150*2150, and the preset number of rows is 2. Then each bit plane can be divided into 1280 subspaces. Figure 8 Here, SF0 to SF24 represent the 25 decomposed bit planes, and subspace0 to subspace1279 represent the 1280 subspaces that each bit plane is divided into. The advantage of this structure is that only the capacity of each subspace needs to be set, which effectively reduces unused cache capacity and improves cache resource utilization efficiency.
[0120] Example 4
[0121] Figure 4 This is a schematic diagram of the structure of a bit plane data compression device provided by the present invention. Figure 4 As shown, the apparatus includes: a to-be-encoded sequence determination module 401 and a bit plane image encoding module 402.
[0122] A to-be-encoded sequence determination module, configured to determine a to-be-encoded sequence corresponding to a to-be-encoded bit plane image to be processed, wherein the to-be-encoded sequence includes a plurality of pixel blocks;
[0123] A bit plane image encoding module is used to encode each pixel block in the sequence to be encoded according to the pixel block type corresponding to each pixel block in the sequence to be encoded, so as to obtain a compression result corresponding to the bit plane image, wherein the pixel block type includes pure color pixel blocks and non-pure color pixel blocks, the non-pure color pixel blocks are encoded according to the corresponding pixel values, and the continuous pure color pixel blocks are encoded according to the corresponding pixel values and continuous quantities.
[0124] An embodiment of the present invention provides a bit plane data compression device that solves the problem of low coding efficiency caused by a single coding strategy. First, a sequence to be encoded corresponding to a bit plane image to be processed is determined, wherein the sequence to be encoded includes multiple pixel blocks. Then, when encoding the pixel blocks, an encoding method is determined based on the pixel block type corresponding to the pixel block, whether it is a non-pure color pixel block or a pure color pixel block. The non-pure color pixel blocks are encoded according to the corresponding pixel values, and the continuous pure color pixel blocks are encoded according to the corresponding pixel values and continuous numbers. Bit plane images often contain a large number of continuous identical pixels. Encoding the continuous pure color pixel blocks according to the corresponding pixel values and continuous numbers can effectively reduce the amount of encoded data and the number of encoding operations, improve coding efficiency, solve the problem of low coding efficiency caused by a single coding strategy, reduce the redundancy of the encoded data, and thus improve the image compression effect. When applied to a digitally driven silicon-based OLED microdisplay system, the device can effectively reduce the transmission and caching requirements of bit plane data in the system.
[0125] Optionally, the bit plane encoding module includes:
[0126] a pixel block determining unit, configured to determine a current pixel block to be processed in the sequence to be encoded, wherein each pixel block in the sequence to be encoded is determined as the current pixel block in sequence according to the order in which the pixel blocks are arranged in the sequence to be encoded;
[0127] an encoding unit configured to accumulate a count value when a current pixel block is a pure color pixel block and is the same as a previous pixel block; determine the current count value as a continuous number when the current pixel block and the previous pixel block are different pure color pixel blocks, generate corresponding encoding data based on the pixel value and the continuous number corresponding to the previous pixel block, and reset the current count value to 1; set the current count value to 1 when the current pixel block is a pure color pixel block and the previous pixel block is a non-pure color pixel block; generate corresponding encoding data based on the pixel value corresponding to the current pixel block when the current pixel block is a non-pure color pixel block and the previous pixel block is a non-pure color pixel block; generate corresponding encoding data based on the pixel value corresponding to the previous pixel block and the continuous number when the current pixel block is a non-pure color pixel block and the previous pixel block is a pure color pixel block, generate corresponding encoding data based on the pixel value corresponding to the previous pixel block and the continuous number, generate corresponding encoding data based on the pixel value corresponding to the current pixel block, and reset the current count value to 0;
[0128] The compressed data determination unit is used to re-determine the current pixel block to be processed when there are pixel blocks that have not participated in the encoding; if there are no pixel blocks that have not participated in the encoding, determine the compressed data corresponding to the sequence to be encoded according to the generation order of each encoded data.
[0129] Optionally, corresponding coded data is generated based on the pixel value and continuous number corresponding to the previous pixel block, including: in response to the continuous number being less than or equal to a preset counting threshold, generating corresponding coded data based on the pixel value and continuous number corresponding to the previous pixel block; in response to the continuous number being greater than a preset counting threshold, generating first coded sub-data based on the pixel value corresponding to the previous pixel block and the preset counting threshold, generating second coded sub-data based on the difference between the continuous number and the preset counting threshold, and determining corresponding coded data based on the first coded sub-data and the second coded sub-data.
[0130] Optionally, the to-be-encoded sequence determination module is configured to determine the to-be-encoded sequence corresponding to the to-be-processed bit plane image based on a foveal just noticeable difference (CB-FJND) model threshold of the cross block;
[0131] The device also includes:
[0132] a compression rate prediction module, configured to predict a compression rate based on a pixel block jump rate in the sequence to be encoded corresponding to the bit plane map to be processed, before encoding each pixel block in the sequence to be encoded according to the pixel block type corresponding to each pixel block in the sequence to be encoded to obtain a compression result corresponding to the bit plane map, wherein the pixel block jump rate is used to represent a frequency of change between adjacent pixel blocks;
[0133] A cache capacity prediction module for compression results, configured to predict the cache capacity occupied by the compression results according to the compression rate;
[0134] A preset cache overlimit judgment module is used to judge whether the occupied cache capacity exceeds a preset cache capacity threshold;
[0135] A threshold adjustment module is used to increase the CB-FJND model threshold when the occupied cache capacity exceeds a preset cache capacity threshold, and to re-determine the sequence to be encoded corresponding to the bit plane image to be processed until the cache capacity occupied by the compression result predicted according to the compression rate is less than or equal to the preset cache capacity threshold.
[0136] Optionally, the pixel block jump rate is expressed using the following expression:
[0137]
[0138] Among them, R PBT Represents the pixel block jump rate, N T Represents the number of pixel block jumps in the sequence to be encoded, N PB represents the total number of pixel blocks in the sequence to be encoded, wherein the total number of pixel blocks in the sequence to be encoded is expressed by the following expression:
[0139] N PB =[w*n / x]
[0140] Wherein, w represents the optimal number of rows selected when dividing the bit plane image into the sequence to be encoded, n represents the number of columns of the bit plane image, w*n represents the length of the sequence to be encoded, and x represents the number of pixels in the pixel block;
[0141] The compression ratio is expressed as follows:
[0142]
[0143] Among them, R C Indicates the compression ratio, S C Indicates the amount of compressed data, S O Indicates the amount of data before compression.
[0144] Optionally, the improved CB-FJND model threshold is determined by the following expression:
[0145]
[0146] Among them, J CB-FJND (l,e,s,c) represents the improved CB-FJND model threshold, l represents brightness, e represents eccentricity angle, s represents pixel block size, c represents contrast, R C represents the predicted compression rate of the sequence to be encoded, σ represents the cache capacity ratio, μ represents the fitting parameter, and J JND,l,s Represents the original CB-FJND model threshold when the contrast is not 0, J JND,c,s Represents the original CB-FJND model threshold when the contrast is 0.
[0147] Optionally, the module for determining the sequence to be encoded is used to: divide the bit plane map to be processed according to a preset number of rows to obtain multiple sequences to be encoded, wherein the preset number of rows is determined based on the compression ratio and the total cache data.
[0148] Optionally, the bit plane encoding module includes:
[0149] a sequence to be encoded compressing unit, configured to, for each sequence to be encoded in the plurality of sequences to be encoded, encode each pixel block in the current sequence to be encoded according to the pixel block type corresponding to each pixel block in the current sequence to be encoded, to obtain compressed data corresponding to the current sequence to be encoded;
[0150] The bit plane image compression result determination unit is configured to determine the compression result corresponding to the bit plane image according to the compressed data respectively corresponding to the plurality of sequences to be encoded.
[0151] Optionally, the device further includes:
[0152] A compression result storage module is used to store the compression result using a preset storage structure, wherein the preset storage structure includes subspaces corresponding to the multiple sequences to be encoded, each subspace includes a preset number of subfield storage spaces, and each subfield storage space includes color channel storage spaces corresponding to multiple color channels.
[0153] The bit-plane data compression device provided in the embodiment of the present invention can execute the bit-plane data compression method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.
[0154] Example 5
[0155] Figure 5 A schematic diagram of the structure of an electronic device 500 that can be used to implement an embodiment of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.
[0156] like Figure 5 As shown, the electronic device 500 includes at least one processor 501, and a memory connected to the at least one processor 501 in communication, such as a read-only memory (ROM) 502, a random access memory (RAM) 503, etc., wherein the memory stores a computer program that can be executed by the at least one processor, and the processor 501 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 502 or the computer program loaded from the storage unit 508 into the random access memory (RAM) 503. In the RAM 503, various programs and data required for the operation of the electronic device 500 can also be stored. The processor 501, ROM 502 and RAM 503 are connected to each other via a bus 504. An input / output (I / O) interface 505 is also connected to the bus 504.
[0157] Multiple components in the electronic device 500 are connected to the I / O interface 505, including: an input unit 506, such as a keyboard, a mouse, etc.; an output unit 507, such as various types of displays, speakers, etc.; a storage unit 508, such as a magnetic disk, an optical disk, etc.; and a communication unit 509, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 509 allows the electronic device 500 to exchange information / data with other devices via a computer network such as the Internet and / or various telecommunication networks.
[0158] The processor 501 may be any general-purpose and / or specialized processing component with processing and computing capabilities. Examples of the processor 501 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various specialized artificial intelligence (AI) computing chips, various processors for running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 501 performs the various methods and processes described above, such as the bit-plane data compression method.
[0159] In some embodiments, the bit-plane data compression method may be implemented as a computer program that is tangibly contained in a computer-readable storage medium, such as storage unit 508. In some embodiments, part or all of the computer program may be loaded and / or installed on electronic device 500 via ROM 502 and / or communication unit 509. When the computer program is loaded into RAM 503 and executed by processor 501, one or more steps of the bit-plane data compression method described above may be performed. Alternatively, in other embodiments, processor 501 may be configured to perform the bit-plane data compression method in any other appropriate manner (e.g., by means of firmware).
[0160] Various embodiments of the systems and techniques described herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), system-on-chip systems (SOCs), programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include being implemented in one or more computer programs that are executable and / or interpreted on a programmable system that includes at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0161] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when the computer program is executed by the processor, the functions / operations specified in the flowcharts and / or block diagrams are implemented. The computer program may be executed entirely on the machine, partially on the machine, as a stand-alone software package, partially on the machine and partially on a remote machine, or entirely on a remote machine or server.
[0162] In the context of the present invention, computer-readable storage media can be tangible media that can contain or store a computer program for use with an instruction execution system, device or equipment or used in combination with an instruction execution system, device or equipment. Computer-readable storage media can include but are not limited to electronic, magnetic, optical, electromagnetic, infrared or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, computer-readable storage media can be machine-readable signal media. More specific examples of machine-readable storage media can include electrical connections based on one or more lines, portable computer disks, hard disks, random access memories (RAM), read-only memories (ROM), erasable programmable read-only memories (EPROM or flash memory), optical fibers, portable compact disk read-only memories (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0163] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).
[0164] The systems and techniques described herein can be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.
[0165] A computing system may include clients and servers. The clients and servers are typically remote from each other and typically interact via a communication network. This client-server relationship arises through computer programs running on the respective computers, creating a client-server relationship. The server may be a cloud server, also known as a cloud computing server or cloud host. This server is a hosting product within the cloud computing service ecosystem that addresses the management difficulties and limited scalability of traditional physical hosting and VPS services.
[0166] It should be understood that the various forms of the processes shown above can be used to reorder, add, or delete steps. For example, the steps described in the present invention can be performed in parallel, sequentially, or in a different order, as long as the desired results of the technical solution of the present invention can be achieved. This is not limited herein.
[0167] The above specific embodiments do not limit the scope of protection of the present invention. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and substitutions may be made based on design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention are intended to be included within the scope of protection of the present invention.
Claims
1. A bit plane data compression method, characterized in that: include: Determining a sequence to be encoded corresponding to the bit plane image to be processed, wherein the sequence to be encoded includes a plurality of pixel blocks; Each pixel block in the sequence to be encoded is encoded according to the pixel block type corresponding to each pixel block in the sequence to be encoded, so as to obtain a compression result corresponding to the bit plane image, wherein the pixel block type includes pure color pixel blocks and non-pure color pixel blocks, the non-pure color pixel blocks are encoded according to the corresponding pixel values, and the continuous pure color pixel blocks are encoded according to the corresponding pixel values and the continuous number.
2. The method according to claim 1, characterized in that Encoding each pixel block in the sequence to be encoded according to the pixel block type corresponding to each pixel block in the sequence to be encoded, including: Determining a current pixel block to be processed in the sequence to be encoded, wherein the pixel blocks in the sequence to be encoded are sequentially determined as the current pixel blocks according to the arrangement order in the sequence to be encoded; When the current pixel block is a pure color pixel block and is the same as the previous pixel block, the count value is accumulated; when the current pixel block and the previous pixel block are different pure color pixel blocks, the current count value is determined as a continuous number, and corresponding coding data is generated according to the pixel value and the continuous number corresponding to the previous pixel block, and the current count value is reset to 1; when the current pixel block is a pure color pixel block and the previous pixel block is a non-pure color pixel block, the current count value is set to 1; when the current pixel block is a non-pure color pixel block and the previous pixel block is a non-pure color pixel block, the corresponding coding data is generated according to the pixel value corresponding to the current pixel block; when the current pixel block is a non-pure color pixel block and the previous pixel block is a pure color pixel block, the corresponding coding data is generated according to the pixel value and the continuous number corresponding to the previous pixel block, the corresponding coding data is generated according to the pixel value corresponding to the current pixel block, and the current count value is reset to 0; If there are pixel blocks that are not involved in the encoding, the current pixel block to be processed is re-determined; if there are no pixel blocks that are not involved in the encoding, the compressed data corresponding to the sequence to be encoded is determined according to the generation order of each encoded data.
3. The method according to claim 2, characterized in that Generate corresponding coded data based on the pixel value and continuous number corresponding to the previous pixel block, including: In response to the continuous number being less than or equal to a preset counting threshold, generating corresponding coded data according to the pixel value corresponding to the previous pixel block and the continuous number; In response to the continuous number being greater than a preset counting threshold, first coded sub-data is generated based on the pixel value corresponding to the previous pixel block and the preset counting threshold, second coded sub-data is generated based on the difference between the continuous number and the preset counting threshold, and corresponding coded data is determined based on the first coded sub-data and the second coded sub-data.
4. The method according to claim 1, wherein The step of determining a sequence to be encoded corresponding to the bit plane image to be processed includes: Determine the sequence to be encoded corresponding to the bit plane image to be processed based on the foveal just noticeable difference (CB-FJND) model threshold of the cross block; Wherein, before encoding each pixel block in the sequence to be encoded according to the pixel block type corresponding to each pixel block in the sequence to be encoded to obtain the compression result corresponding to the bit plane image, the method further includes: Predicting a compression rate according to a pixel block jump rate in a sequence to be encoded corresponding to the bit plane image to be processed, wherein the pixel block jump rate is used to represent a frequency of changes between adjacent pixel blocks; predicting the cache capacity occupied by the compression result according to the compression ratio; Determine whether the occupied cache capacity exceeds a preset cache capacity threshold; If exceeded, the CB-FJND model threshold is increased, and the sequence to be encoded corresponding to the bit plane image to be processed is re-determined until the cache capacity occupied by the compression result predicted according to the compression rate is less than or equal to the preset cache capacity threshold.
5. The method according to claim 4, characterized in that The pixel block jump rate is expressed by the following expression: Among them, R PBT Represents the pixel block jump rate, N T Represents the number of pixel block jumps in the sequence to be encoded, N PB represents the total number of pixel blocks in the sequence to be encoded, wherein the total number of pixel blocks in the sequence to be encoded is expressed by the following expression: N PB =[w*n / x] Wherein, w represents the optimal number of rows selected when dividing the bit plane image into the sequence to be encoded, n represents the number of columns of the bit plane image, w*n represents the length of the sequence to be encoded, and x represents the number of pixels in the pixel block; The compression ratio is expressed by the following expression: Among them, R C Indicates the compression ratio, S C Indicates the amount of compressed data, S O Indicates the amount of data before compression.
6. The method according to claim 4, characterized in that The improved CB-FJND model threshold is determined by the following expression: Among them, J CB-FJND (l,e,s,c) represents the improved CB-FJND model threshold, l represents brightness, e represents eccentricity angle, s represents pixel block size, c represents contrast, R C represents the predicted compression rate of the sequence to be encoded, σ represents the cache capacity ratio, μ represents the fitting parameter, and J JND,l,s Represents the original CB-FJND model threshold when the contrast is not 0, J JND,c,s Represents the original CB-FJND model threshold when the contrast is 0.
7. The method according to claim 1, characterized in that The step of determining a sequence to be encoded corresponding to the bit plane image to be processed includes: Dividing the bit plane map to be processed according to a preset number of rows to obtain a plurality of sequences to be encoded, wherein the preset number of rows is determined based on the compression ratio and the total cache data; The step of encoding each pixel block in the sequence to be encoded according to the pixel block type corresponding to each pixel block in the sequence to be encoded to obtain a compression result corresponding to the bit plane image includes: For each of the plurality of sequences to be encoded, encoding each pixel block in the current sequence to be encoded according to the pixel block type corresponding to each pixel block in the current sequence to be encoded, to obtain compressed data corresponding to the current sequence to be encoded; A compression result corresponding to the bit plane image is determined according to the compressed data respectively corresponding to the multiple sequences to be encoded.
8. The method according to claim 7, characterized in that Also includes: The compression result is stored using a preset storage structure, wherein the preset storage structure includes subspaces corresponding to the multiple sequences to be encoded, each subspace includes a preset number of subfield storage spaces, and each subfield storage space includes color channel storage spaces corresponding to multiple color channels.
9. A bit-plane data compression device, characterized in that: include: A to-be-encoded sequence determination module, configured to determine a to-be-encoded sequence corresponding to a to-be-encoded bit plane image to be processed, wherein the to-be-encoded sequence includes a plurality of pixel blocks; A bit plane image encoding module is used to encode each pixel block in the sequence to be encoded according to the pixel block type corresponding to each pixel block in the sequence to be encoded, so as to obtain a compression result corresponding to the bit plane image, wherein the pixel block type includes pure color pixel blocks and non-pure color pixel blocks, the non-pure color pixel blocks are encoded according to the corresponding pixel values, and the continuous pure color pixel blocks are encoded according to the corresponding pixel values and continuous quantities.
10. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor to enable the at least one processor to perform the bit-plane data compression method according to any one of claims 1 to 8.
11. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the bit-plane data compression method according to any one of claims 1 to 8 when executed.
12. A computer program product, characterized in that The computer program product comprises a computer program which, when executed by a processor, implements the bit-plane data compression method according to any one of claims 1 to 8.
Citation Information
Cited By
Image processing method and display device
CN121708853A
Pixel processing method and device, electronic equipment, storage medium and program product
CN122160516A