Post-processing enhancement method and apparatus for screen images

By dividing the screen image into processing units and applying post-processing control information, the distortion problem caused by traditional encoding and compression methods is solved, improving image quality and user experience, while also possessing high compatibility and flexibility.

CN119788873BActive Publication Date: 2025-12-09PEKING UNIV +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411635848.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-11-15
Publication Date
2025-12-09
Estimated Expiration
2044-11-15

AI Technical Summary

Technical Problem

Traditional image encoding and compression methods cannot effectively balance compression efficiency and image quality when processing computer screen images, resulting in compression distortion, such as blurred text and background color distortion, which affects the user experience.

Method used

The screen image is divided into multiple processing units. By parsing the post-processing control information and the list of real pixel values, the pixel values ​​of the decoded and reconstructed image are replaced. The pixel values ​​of the current decoded and reconstructed image are replaced with the real pixel values ​​with the smallest differences. Alternatively, the original pixel values ​​with higher frequencies are obtained on the encoding side and the rate distortion change is calculated to generate post-processing control information to determine whether post-processing is to be performed.

Benefits of technology

It effectively reduces distortion in decoded images, improves image clarity and detail, enhances the user viewing experience, and has high compatibility and flexibility, making it easy to integrate into existing codec frameworks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119788873B_ABST
    Figure CN119788873B_ABST
Patent Text Reader

Abstract

The application discloses a post-processing enhancement method and device of a screen image, and comprises the following steps: dividing a decoding reconstructed image to be processed into multiple processing units on the decoding side; parsing post-processing control information corresponding to each processing unit from a code stream; in the case that post-processing is enabled according to the post-processing control information, parsing a real pixel value list corresponding to each processing unit from the code stream; for each pixel in each processing unit, sequentially calculating a difference value of each real pixel value in the real pixel value list and a pixel value of a current decoding reconstructed image; and replacing the pixel value of the current decoding reconstructed image with a real pixel value with the minimum difference value. An enhanced image is obtained and output. The application can significantly improve the subjective and objective quality of a decoding image by correcting sample values.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of image processing technology, and more specifically, to a post-processing enhancement method and apparatus for screen images. Background Technology

[0002] With the rapid development of information technology, computer screen content (SCC) plays an increasingly important role in the digital media field. Computer screen images typically include elements such as text, charts, graphics, and video, and are widely used in various fields such as e-books, online education, remote work, and digital entertainment. However, compared with traditional natural images, computer screen images have unique visual characteristics, which pose new challenges to image encoding and compression technologies.

[0003] First, images on computer screens typically contain highly saturated colors because elements such as text, charts, and graphics require clear and striking visuals for easy user recognition and understanding. Furthermore, computer screen images contain a large number of high-frequency signals, such as text edges, chart lines, and graphic details, which are crucial for image clarity and detail.

[0004] However, traditional image compression methods, such as JPEG and H.264, are primarily designed for natural images. When processing computer screen images, they often fail to effectively balance compression efficiency and image quality. These methods frequently result in compression distortion when compressing computer screen images, such as blurred text and discolored backgrounds. This distortion not only affects the readability and aesthetics of the image but also severely damages the user's subjective experience, thus reducing the overall user experience. Summary of the Invention

[0005] This application provides a post-processing enhancement method and apparatus for screen images, which at least solves the technical problem of compression distortion caused when reconstructing screen images in related technologies.

[0006] This application provides a post-processing enhancement method for screen images, applied to the decoding side, including:

[0007] The decoded and reconstructed image to be processed is divided into multiple processing units;

[0008] Parse the post-processing control information corresponding to each processing unit from the bitstream;

[0009] When post-processing is enabled according to the post-processing control information, the list of real pixel values ​​corresponding to each processing unit is parsed from the bitstream.

[0010] Replace the pixel value of the decoded reconstructed image in the corresponding processing unit based on the real pixel value in the real pixel value list to obtain an enhanced image.

[0011] In an alternative embodiment, replacing the pixel value of the decoded reconstructed image in the corresponding processing unit based on the real pixel value in the real pixel value list comprises:

[0012] For each pixel in each processing unit, calculate the difference value between each real pixel value in the real pixel value list and the pixel value of the current decoded reconstructed image in sequence;

[0013] Replace the pixel value of the current decoded reconstructed image with the real pixel value with the smallest difference value.

[0014] In an alternative embodiment, calculating the difference value between each real pixel value in the real pixel value list and the pixel value of the current decoded reconstructed image in sequence comprises:

[0015] Calculate the sum of absolute errors or the sum of squared errors between each real pixel value in the real pixel value list and the pixel value of the current decoded reconstructed image in sequence;

[0016] Obtain the difference value according to the sum of absolute errors or the sum of squared errors.

[0017] In an alternative embodiment, parsing the real pixel value list corresponding to each processing unit from the bitstream comprises:

[0018] Parse the first number of real pixel values of the current processing unit from the bitstream using truncated unary code;

[0019] According to the second number of real pixel values of the processing unit above and / or the processing unit on the left side of the current processing unit, read the second number of binary bits from the bitstream in sequence, and if the binary bit is 1, store the real pixel value corresponding to the processing unit above or the processing unit on the left side in the real pixel value list of the current processing unit.

[0020] If the number of real pixel values in the real pixel value list of the current processing unit is less than the first number of real pixel values, decode the remaining real pixel values using Huffman code.

[0021] Embodiments of the present application provide a post-processing enhancement method for screen images, applied to the encoding side, comprising:

[0022] Divide the image to be processed into a plurality of processing units;

[0023] For each processing unit, obtain a preset number of original pixel values with higher frequency in the processing unit as real pixel values of the processing unit, and store them in a real pixel value list;

[0024] calculating a rate-distortion change amount, obtaining post-processing control information based on the rate-distortion change amount; and writing the post-processing control information into a bitstream;

[0025] determining, according to the post-processing control information, whether to turn on post-processing, and writing the list of real pixel values into the bitstream and transmitting to a decoding side if the post-processing is turned on.

[0026] In an optional embodiment, writing the list of real pixel values into the bitstream comprises:

[0027] using a truncated unary code to record the number of real pixel values in each processing unit;

[0028] sequentially traversing a first real pixel value of an upper processing unit and / or a left processing unit of the current processing unit, and if the first real pixel value is the same as a second real pixel value to be encoded of the current processing unit, recording a binary 1 and recording the second real pixel value as having been encoded, otherwise recording a binary 0;

[0029] if there is still a real pixel value to be encoded in the list of real pixel values of the current processing unit, using a Huffman code to encode.

[0030] In an optional embodiment, calculating the rate-distortion change amount comprises:

[0031] for each pixel of the processing unit, finding a closest real pixel value from the list of real pixel values according to a reconstructed pixel value, replacing the reconstructed pixel value with the closest real pixel value to obtain a corrected pixel value;

[0032] calculating a sum of errors between the corrected pixel values and original pixel values in the processing unit to obtain a corrected distortion;

[0033] calculating a sum of errors between the reconstructed pixel values and the original pixel values in the processing unit to obtain an uncorrected distortion;

[0034] calculating the rate-distortion change amount based on the corrected distortion, the uncorrected distortion, and a number of binary bits encoded from the list of real pixel values.

[0035] In an optional embodiment, obtaining the post-processing control information based on the rate-distortion change amount comprises:

[0036] in a case where the rate-distortion change amount is less than 0, setting a post-processing turn-on flag bit to a first value;

[0037] in a case where the rate-distortion change amount is greater than or equal to 0, setting the post-processing turn-on flag bit to a second value;

[0038] the first value is to turn on the post-processing, and the second value is to turn off the post-processing.

[0039] Embodiments of the present application provide a post-processing enhancement method for screen images, comprising:

[0040] The encoding side divides the image to be processed into a plurality of processing units; for each processing unit, a preset number of original pixel values with higher frequency in the processing unit are obtained as real pixel values of the processing unit and stored in a real pixel value list; a rate-distortion change amount is calculated, and post-processing control information is obtained based on the rate-distortion change amount; the post-processing control information is written into a bitstream; and when it is determined according to the post-processing control information that post-processing is enabled, the real pixel value list is written into the bitstream and transmitted to the decoding side;

[0041] The decoding side divides the decoded reconstructed image to be processed into a plurality of processing units; the post-processing control information corresponding to each processing unit is parsed from the bitstream; when it is determined according to the post-processing control information that post-processing is enabled, the real pixel value list corresponding to each processing unit is parsed from the bitstream; and based on the real pixel values in the real pixel value list, the pixel values of the decoded reconstructed image in the corresponding processing unit are replaced to obtain an enhanced image.

[0042] According to another aspect of the embodiments of the present application, an electronic device is also provided, comprising a memory and a processor, the memory stores a computer program, and the processor is configured to execute the post-processing enhancement method for screen images by using the computer program.

[0043] The technical solutions provided by the embodiments of the present application can have the following beneficial effects:

[0044] The post-processing enhancement method for screen images provided by the embodiments of the present application can find the closest real pixel value from the real pixel value list according to the reconstructed pixel value for each pixel of the processing unit, replace the reconstructed pixel value with the real pixel value to obtain a corrected pixel value. Through the targeted sample correction algorithm, the present application can effectively reduce the distortion phenomena in the decoded image, such as text blurring and background color deviation, thereby improving the clarity and detail performance of the image, making the decoded image closer to the original image, and improving the user's viewing experience. The algorithm design of the present application does not involve modification of the existing coding and decoding process, which means that it can be easily adapted to any existing coding and decoding framework without additional modification or optimization of the coder, and has high compatibility and practicality. Easy to integrate: since the present application only operates on the decoded reconstructed image, it can be integrated as an independent module or tool into the existing image processing process, simplifying the integration process and reducing the complexity and cost of technical implementation. High flexibility: the algorithm of the present application can be adjusted and optimized according to different application scenarios and requirements, has high flexibility and scalability, and can adapt to different image types and coding standards. BRIEF DESCRIPTION OF DRAWINGS

[0045] The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this application, illustrate embodiments of the application and together with the description serve to explain the application. In the drawings:

[0046] Figure 1 is a schematic diagram of a method for post-processing enhancement of a screen image on an encoding side according to an embodiment of the application;

[0047] Figure 2 is a schematic diagram of a method for post-processing enhancement of a screen image on a decoding side according to an embodiment of the application;

[0048] Figure 3 is a flow chart of a method for post-processing enhancement of a screen image according to an embodiment of the application;

[0049] Figure 4 is a schematic diagram of a method for post-processing enhancement of a screen image according to an embodiment of the application;

[0050] Figure 5 is a schematic diagram of a structure of an optional electronic device according to an embodiment of the application. DETAILED DESCRIPTION

[0051] In order to enable persons skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by persons skilled in the art without creative work should fall within the protection scope of the present application.

[0052] It should be noted that the terms "first", "second", and the like in the specification and claims of the present application and the above-described drawings are used to distinguish similar objects, and do not necessarily indicate a specific order or a sequence. It should be understood that the data thus used can be interchanged under appropriate circumstances, so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein. In addition, the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusion, for example, a process, method, system, product or device that includes a series of steps or units does not necessarily have to include only those steps or units clearly listed, but can include other steps or units that are not clearly listed or inherent to the process, method, product or device.

[0053] It is to be understood that the drawings are to be used only for illustrating the general manner of embodiments. In addition, it should be understood that the drawings are not to scale. For the purpose of clarity, not all of the minor aspects of the technologies, methods and devices could be described or shown. However, it is to be understood that such technologies, methods and devices are to be considered as forming part of the specification.

[0054] The following detailed description of the application will be made with reference to the accompanying drawings. Figures 1-4 The post-processing enhancement method of the screen image of the embodiments of the present application is described in detail.

[0055] As shown in the figure, a post-processing enhancement method of a screen image is applied to the encoding side, comprising: Figure 1

[0056] S101 divides the image to be processed into a plurality of processing units.

[0057] In the field of image processing and coding, dividing the image to be processed into a plurality of processing units is an image processing technology, mainly used for image compression, enhancement, analysis or other processing tasks. This process involves dividing the entire image into smaller parts, each part being called a "processing unit".

[0058] For example, the image is divided into fixed-size grids, such as 8x8, 16x16, 512x8 pixels, and each grid is a processing unit. The specific division method is not limited in the embodiments of the present application.

[0059] S102 For each processing unit, obtain a preset number of original pixel values with higher frequency in the processing unit as the true pixel value of the processing unit, and store it in the true pixel value list.

[0060] In an optional embodiment, a histogram of the distribution of all original pixel values in the processing unit is obtained. The histogram is a statistical chart used to show the distribution of pixel values in the image. In image processing, the histogram is usually used to represent the frequency of different brightness or color values in the image.

[0061] Specifically, an RGB pixel histogram or a YUV pixel histogram can be obtained. Based on the histogram, the frequency of each original pixel value is determined. Based on the frequency from high to low, a preset number of original pixel values with higher frequency are selected as the true pixel value TV of the processing unit and stored in the true pixel value list.

[0062] S103 Calculate the rate-distortion change amount, obtain the post-processing control information based on the rate-distortion change amount, and write the post-processing control information into the bitstream.

[0063] The present application mainly encodes based on truncated unary code and Huffman code. In an optional embodiment, it comprises:

[0064] ​The number of real pixel values in each processing unit is recorded by using a truncated unary code;

[0065] The first real pixel value of the processing unit above and / or the processing unit left of the current processing unit is sequentially traversed. If the first real pixel value is the same as the second real pixel value to be encoded of the current processing unit, binary 1 is recorded, and the second real pixel value is recorded as having been encoded. Otherwise, binary 0 is recorded.

[0066] The scheme provided in the present application can inherit part or all of the encoding information from the adjacent processing unit, for example, the encoding information can be inherited from the processing unit above the current processing unit, or the encoding information can be inherited from the processing unit left of the current processing unit, or the encoding information of the processing unit above and the processing unit left of the current processing unit can be inherited. The specific inheritance order is not limited in the embodiments of the present application.

[0067] For example, if the processing unit above the current processing unit is available (exists and the post-processing correction tool is turned on), the first real pixel value of the processing unit above the current processing unit is sequentially traversed. If the first real pixel value is the same as the second real pixel value to be encoded of the current processing unit, binary 1 is recorded, and the second real pixel value is recorded as having been encoded. Otherwise, binary 0 is recorded.

[0068] The present application sequentially traverses the TV values in the TV table of the adjacent processing unit above, for example, if the processing unit above has 5 TV values, it is determined whether each TV value is the same as the TV value of the current processing unit. If the TV value is the same as the TV value to be encoded in the TV table of the current processing unit, binary 1 is recorded, and the same TV value in the current TV table is recorded as having been encoded.

[0069] If there is still a real pixel value to be encoded in the real pixel value list of the current processing unit, and if the processing unit left of the current processing unit is available (exists and the post-processing correction tool is turned on), the real pixel value of the processing unit left of the current processing unit is sequentially traversed. If the real pixel value is the same as the second real pixel value to be encoded of the current processing unit, binary 1 is recorded, and the second real pixel value is recorded as having been encoded. Otherwise, binary 0 is recorded.

[0070] If there is still a real pixel value to be encoded in the real pixel value list of the current processing unit, the real pixel value is encoded by using the Huffman code. Because in the actual implementation process, according to the raster execution order, only the processing unit above and the processing unit left are encoded, part or all of the encoding information is inherited from the adjacent processing unit.

[0071] Further, the rate-distortion change amount is calculated, and the post-processing control information is obtained based on the rate-distortion change amount.

[0072] In an optional embodiment, the rate-distortion change amount is calculated, including:

[0073] For each pixel in the processing unit, the closest real pixel value is found in the real pixel value list based on the reconstructed pixel value, and the reconstructed pixel value is replaced with the real pixel value to obtain the corrected pixel value.

[0074] The sum of errors between the corrected pixel values ​​and the original pixel values ​​in the processing unit is used to obtain the post-correction distortion; the sum of errors between the reconstructed pixel values ​​and the original pixel values ​​in the processing unit is used to obtain the pre-correction distortion.

[0075] Specifically, for each pixel in the processing unit, the closest TV value is found in the TV table based on the reconstructed pixel value. This TV value is then used to replace the reconstructed pixel value to obtain the corrected pixel value. The errors between the corrected pixel value and the reconstructed pixel value and the original pixel value are calculated separately. The sum of the errors of all pixels is denoted as the post-correction distortion D2 and the pre-correction distortion D1, respectively.

[0076] Furthermore, based on the post-correction distortion, the pre-correction distortion, and the number of bits in the true pixel value list encoding, the rate-distortion change is calculated. This includes calculations based on the following formula:

[0077] △cost=λ×R+D2-D1;

[0078] Where Δcost represents the rate-distortion variation, λ represents the preset weighting coefficient (the larger the weighting coefficient, the more important the bit rate is compared to distortion during the encoding process), and R represents the number of bits obtained after encoding the list of real pixel values.

[0079] Furthermore, post-processing control information is obtained based on the rate-distortion change. When the rate-distortion change is less than 0, it means that enabling post-processing can improve rate-distortion performance, and the post-processing enable flag is set to the first value. When the rate-distortion change is greater than or equal to 0, the post-processing enable flag is set to the second value. The first value enables post-processing, and the second value disables post-processing.

[0080] Write post-processing control information into the bitstream.

[0081] S104 determines that post-processing is enabled based on the post-processing control information, writes the list of real pixel values ​​into the bitstream, and transmits it to the decoding side.

[0082] If post-processing is enabled based on the post-processing control information, the encoding information of the real pixel value list is written into the bitstream and transmitted to the decoding side. For the specific encoding process, please refer to step S103.

[0083] like Figure 2 As shown, a post-processing enhancement method for screen images, applied to the decoding side, includes:

[0084] S201 divides the decoded reconstructed picture to be processed into a plurality of processing units in the same manner as the encoding side.

[0085] In the image coding process, in order to ensure consistency of the encoding and decoding processes, the decoding side needs to divide the decoded reconstructed picture into a plurality of processing units in the same manner as the encoding side.

[0086] S202 parses post-processing control information corresponding to each processing unit from the bitstream.

[0087] The post-processing control information is obtained from the bitstream. Specifically, for each processing unit, a post-processing enable flag is obtained. If the flag is a first value, post-processing is enabled by default, and if the flag is a second value, post-processing is disabled by default.

[0088] S203, in the case where post-processing is enabled according to the post-processing control information, parses a list of real pixel values corresponding to each processing unit from the bitstream.

[0089] Specifically, the number of first real pixel values of the current processing unit is parsed from the bitstream using truncated unary.

[0090] According to the number of second real pixel values of the processing unit above and / or the processing unit to the left of the current processing unit, a number of binary bits equal to the number of second real pixel values are read from the bitstream in sequence. If the binary bit is 1, the real pixel value corresponding to the processing unit above or the processing unit to the left is stored in the list of real pixel values of the current processing unit.

[0091] The number of second real pixel values is the number of real pixel values of the processing unit above the current processing unit, or the number of real pixel values of the processing unit to the left of the current processing unit, or the sum of the numbers of real pixel values of the processing units above and to the left.

[0092] In an alternative embodiment, the processing unit above is used for decoding first, and if decoding is not complete, the processing unit to the left is used for decoding.

[0093] Specifically, if the processing unit above the current processing unit is available (exists and the post-processing correction tool is enabled), according to the number of second real pixel values of the processing unit above the current processing unit, a number of binary bits equal to the number of second real pixel values are read from the bitstream in sequence. If the binary bit is 1, the real pixel value corresponding to the processing unit above is stored in the list of real pixel values of the current processing unit.

[0094] If the number of real pixel values ​​in the real pixel value list of the current processing unit is less than the number of first real pixel values, and if the processing unit to the left of the current processing unit is available (exists and the post-processing correction tool is enabled), then based on the number of third real pixel values ​​of the processing unit to the left of the current processing unit, read the number of binary bits of the third real pixel value from the bitstream in sequence. If the binary bit is 1, store the real pixel value corresponding to the processing unit to the left into the real pixel value list of the current processing unit.

[0095] If the number of real pixel values ​​in the current processing unit's real pixel value list is less than the number of the first real pixel values, use Huffman code to decode the remaining real pixel values ​​to obtain the parsed real pixel value list.

[0096] S204 replaces the pixel values ​​of the decoded and reconstructed image in the corresponding processing unit with the real pixel values ​​from the real pixel value list to obtain the enhanced image.

[0097] Specifically, for each reconstructed pixel in each processing unit, the difference between each real pixel value in the real pixel value list and the pixel value of the currently decoded and reconstructed image is calculated sequentially. The real pixel value with the smallest difference value is then used to replace the pixel value of the currently decoded and reconstructed image.

[0098] The difference value can be calculated using the sum of absolute errors or the sum of squared errors. For an RGB image, each pixel contains multiple pixel components, namely R, G, and B. The sum of the absolute errors of the real pixel value and the reconstructed pixel value on multiple components is calculated to obtain the real pixel value with the smallest difference from the reconstructed pixel value.

[0099] like Figure 3 As shown, a post-processing enhancement method for screen images includes:

[0100] The encoding side divides the image to be processed into multiple processing units; for each processing unit, a preset number of original pixel values ​​with higher frequencies are obtained as the real pixel values ​​of that processing unit and stored in the real pixel value list; the rate distortion change is calculated, and post-processing control information is obtained based on the rate distortion change; the post-processing control information is written into the bitstream; if post-processing is enabled according to the post-processing control information, the real pixel value list is written into the bitstream and transmitted to the decoding side.

[0101] The decoding side divides the decoded and reconstructed image to be processed into multiple processing units; it parses the post-processing control information corresponding to each processing unit from the bitstream; when post-processing is enabled according to the post-processing control information, it parses the list of real pixel values ​​corresponding to each processing unit from the bitstream; based on the real pixel values ​​in the list of real pixel values, it replaces the pixel values ​​of the decoded and reconstructed image in the corresponding processing unit to obtain the enhanced image.

[0102] In order to facilitate understanding of the image post-processing method provided by the embodiments of the present application, the following will combine the accompanying drawings to further describe the embodiments of the present application. Figure 4 Further description.

[0103] As shown in the figure, the original image block is coded to obtain a reconstructed image block, a reconstructed pixel is obtained based on the reconstructed image block, and a TV table (true pixel value list) is obtained based on the most frequently occurring pixel of the original image block. The true pixel value in the true pixel value list is a candidate correction value. Figure 4 The difference value between the reconstructed pixel and the true pixel value is calculated, the reconstructed pixel value is replaced based on the true pixel value closest to the reconstructed pixel, and an enhanced image is obtained.

[0104] According to still another aspect of the embodiments of the present application, an electronic device corresponding to the aforementioned screen image post-processing enhancement method is also provided to execute the aforementioned screen image post-processing enhancement method.

[0105] Please refer to

[0106] , which shows a schematic diagram of an electronic device provided by some embodiments of the present application. As shown in the figure, Figure 5 , the electronic device includes a processor 500, a memory 501, a bus 502 and a communication interface 503, the processor 500, the communication interface 503 and the memory 501 are connected through the bus 502; the memory 501 stores a computer program executable on the processor 500, and the processor 500 executes the computer program to execute the screen image post-processing enhancement method provided by any of the aforementioned embodiments of the present application. Figure 5

[0107] Among them, the memory 501 can contain a high-speed random access memory (RAM: Random Access Memory), and can also include a non-volatile memory, such as at least one disk memory. The communication connection between the system network element and at least one other network element is realized through at least one communication interface 503 (which can be wired or wireless), and the Internet, wide area network, local area network, metropolitan area network, etc. can be used.

[0108] The bus 502 can be an ISA bus, a PCI bus or an EISA bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc. Among them, the memory 501 is used to store programs, and the processor 500 executes the programs after receiving execution instructions. The aforementioned screen image post-processing enhancement method disclosed in any of the embodiments of the present application can be applied in the processor 500 or realized by the processor 500.

[0109] ​The processor 500 can be an integrated circuit chip with a processing capability of signals. In the implementation process, each step of the above method can be completed by the integrated logic circuit of hardware in the processor 500 or the instruction in the form of software. The processor 500 described above can be a general processor, including a central processing unit (CPU), a network processor (NP), etc.; can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a ready programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. Each method, step and logic block diagram disclosed in the embodiments of the present application can be implemented or executed. The general processor can be a microprocessor or the processor can also be any conventional processor. The steps of the method disclosed in combination with the embodiments of the present application can be directly embodied as a hardware code processor for execution, or a combination of hardware and software modules in the code processor for execution. The software module can be located in a random memory, a flash memory, a read only memory, a programmable read only memory or an electrically erasable programmable memory, a register or other mature storage medium in the art. The storage medium is located in the memory 501, and the processor 500 reads the information in the memory 501, and combines the hardware to complete the steps of the above method.

[0110] The electronic device provided by the embodiments of the present application and the post-processing enhancement method of the screen image provided by the embodiments of the present application have the same inventive concept and the same beneficial effects as the method adopted, run or implemented.

[0111] The technical features of the above embodiments can be combined arbitrarily. In order to make the description simple, all possible combinations of the technical features in the above embodiments are not described, but as long as the combination of the technical features does not exist, it should be considered as the scope of the present application.

[0112] The above embodiments only express several implementation manners of the present application, and the description is more specific and detailed, but it should not be understood as a limitation on the patent scope of the present application. It should be noted that for ordinary skilled in the art, without departing from the concept of the present application, a number of modifications and improvements can be made, which are within the protection scope of the present application. Therefore, the protection scope of the patent of the present application should be subject to the appended claims.

Claims

1. A method for post-processing enhancement of a screen image, applied to a decoding side, characterized in that, The method comprises the following steps: dividing a to-be-processed decoded reconstructed image into a plurality of processing units; parsing post-processing control information corresponding to each processing unit from a code stream; in a case where post-processing is enabled according to the post-processing control information, parsing a real pixel value list corresponding to each processing unit from the code stream; the parsing comprises the following steps: using a truncated unary code to parse a first real pixel value number of a current processing unit from the code stream; sequentially reading, from the code stream, a second real pixel value number of binary bits of an upper processing unit and / or a left processing unit of the current processing unit according to the second real pixel value number; if the binary bit is 1, storing a real pixel value corresponding to the upper processing unit or the left processing unit into the real pixel value list of the current processing unit; if a real pixel value number in the real pixel value list of the current processing unit is less than the first real pixel value number, using a Huffman code to decode the remaining real pixel value; based on the real pixel value in the real pixel value list, replacing a pixel value of the decoded reconstructed image in the corresponding processing unit to obtain an enhanced image.

2. The method of claim 1, wherein, based on the real pixel value in the real pixel value list, replacing a pixel value of the decoded reconstructed image in the corresponding processing unit, comprises the following steps: for each pixel in each processing unit, sequentially calculating a difference value of each real pixel value in the real pixel value list and a pixel value of a current decoded reconstructed image; using a real pixel value with the smallest difference value to replace the pixel value of the current decoded reconstructed image.

3. The method of claim 2, wherein, the sequentially calculating a difference value of each real pixel value in the real pixel value list and a pixel value of a current decoded reconstructed image comprises the following steps: sequentially calculating a sum of absolute errors or a sum of square errors of each real pixel value in the real pixel value list and a pixel value of a current decoded reconstructed image; obtaining the difference value according to the sum of absolute errors or the sum of square errors.

4. A method for post-processing enhancement of a screen image, applied to an encoding side, characterized in that, The method comprises the following steps: dividing a to-be-processed image into a plurality of processing units; for each processing unit, obtaining a preset number of original pixel values with higher frequency in the processing unit as real pixel values of the processing unit, and storing the real pixel values into a real pixel value list; calculating a rate-distortion change amount, and obtaining post-processing control information based on the rate-distortion change amount; writing the post-processing control information into a code stream; in a case where post-processing is enabled according to the post-processing control information, writing the real pixel value list into the code stream and transmitting the real pixel value list to a decoding side; the writing comprises the following steps: using a truncated unary code to record a real pixel value number in each processing unit; sequentially traversing a first real pixel value of an upper processing unit and / or a left processing unit of a current processing unit, if the first real pixel value is the same as a second real pixel value to be encoded of the current processing unit, recording binary 1, and recording the second real pixel value as having been encoded, otherwise, recording binary 0; if there is still a real pixel value to be encoded in the real pixel value list of the current processing unit, using a Huffman code to encode the real pixel value.

5. The method of claim 4, wherein, the calculating a rate-distortion change amount comprises the following steps: for each pixel of the processing unit, finding a closest real pixel value from the real pixel value list according to a reconstructed pixel value, using the closest real pixel value to replace the reconstructed pixel value to obtain a corrected pixel value; calculating a sum of errors between corrected pixel values and original pixel values in the processing unit to obtain a post-correction distortion; calculating a sum of errors between reconstructed pixel values and original pixel values in the processing unit to obtain a pre-correction distortion; calculating a rate-distortion change based on the post-correction distortion, the pre-correction distortion, and a number of bits of the list of true pixel values.

6. The method according to claim 4 or 5, characterized in that, obtaining post-processing control information based on the rate-distortion change, including: setting a post-processing on flag bit to a first value when the rate-distortion change is less than 0; setting the post-processing on flag bit to a second value when the rate-distortion change is greater than or equal to 0; the first value is to turn on post-processing, and the second value is to turn off post-processing.

7. A method of post-processing enhancement of a screen image, characterized by, including: encoding side divides a to-be-processed image into a plurality of processing units; for each processing unit, obtaining a preset number of original pixel values with higher frequency in the processing unit as true pixel values of the processing unit, and storing the true pixel values in a list of true pixel values; calculating a rate-distortion change based on the rate-distortion change to obtain post-processing control information; writing the post-processing control information into a bitstream; when it is determined according to the post-processing control information that post-processing is turned on, writing the list of true pixel values into the bitstream and transmitting the list of true pixel values to a decoding side, including: recording a number of true pixel values in each processing unit by using a truncated unary code; sequentially traversing first true pixel values of an upper processing unit and / or a left processing unit of a current processing unit, and if the first true pixel values are same as second true pixel values to be encoded in the current processing unit, recording binary 1 and recording the second true pixel values as having been encoded, otherwise, recording binary 0; if there are still true pixel values to be encoded in the list of true pixel values of the current processing unit, encoding the true pixel values by using a Huffman code; decoding side divides a to-be-processed decoded reconstructed image into a plurality of processing units; parses post-processing control information corresponding to each processing unit from a bitstream; when it is determined according to the post-processing control information that post-processing is turned on, parses a list of true pixel values corresponding to each processing unit from the bitstream; and replaces pixel values of the decoded reconstructed image in the corresponding processing unit based on true pixel values in the list of true pixel values to obtain an enhanced image.

8. An electronic device, comprising: including a processor and a memory storing program instructions, the processor being configured to execute the post-processing enhancement method of a screen image as claimed in any one of claims 1 to 7 when executing the program instructions.

Citation Information

Patent Citations

  • Image encoding method and device for sample value compensation and image decoding method and device for sample value compensation

    CN107852493A

  • Method and apparatus for encoding image data and method and apparatus for decoding image data

    US20160337668A1