Method and device for post-processing enhancement of screen image

By post-processing the computer screen image on the decoding side, the compression distortion problem caused by the traditional image encoding and compression method when processing computer screen images is solved, and efficient image enhancement and user experience are achieved.

CN119788873AActive Publication Date: 2025-04-08PEKING UNIV +1
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
CN202411635848.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-15
Publication Date
2025-04-08
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 text blurring and background color casting.

Method used

By post-processing the decoded and reconstructed image to be processed on the decoding side, it is divided into multiple processing units, and the pixel values ​​of the decoded and reconstructed image are replaced based on the post-processing control information and the real pixel value list parsed from the code stream to obtain the enhanced image.

Benefits of technology

Effectively reduce distortion in decoded images, improve the clarity and detail expressiveness of the image, make the decoded image closer to the original image, and enhance the user's viewing experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119788873A_ABST
    Figure CN119788873A_ABST
Patent Text Reader

Abstract

The invention discloses a post-processing enhancement method and device for a screen image. The post-processing enhancement method comprises the steps that a decoding side divides a to-be-processed decoding reconstruction image into a plurality of processing units; analyzing post-processing control information corresponding to each processing unit from the code stream; analyzing a real pixel value list corresponding to each processing unit from a code stream under the condition that post-processing is started according to the post-processing control information; for each pixel in each processing unit, sequentially calculating a difference value between each real pixel value in the real pixel value list and the pixel value of the current decoded reconstructed image; and replacing the pixel value of the current decoded reconstructed image with the real pixel value with the minimum difference value. And obtaining an enhanced image and outputting the enhanced image. According to the method, the subjective and objective quality of the decoded image can be remarkably improved by correcting the sample value.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of image processing, and in particular to a method and device for post-processing enhancement of screen images. Background Art

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

[0003] First, images on computer screens usually contain highly saturated colors because elements such as text, charts, and graphics require clear and eye-catching visual effects for easy recognition and understanding by users. In addition, computer screen images also contain a large number of high-frequency signals, such as text edges, chart lines, and graphic details. These high-frequency signals are crucial to the clarity and detail of the image.

[0004] However, traditional image coding compression methods, such as JPEG and H.264, are mainly designed for natural images. They often fail to effectively balance compression efficiency and image quality when processing computer screen images. These methods often cause compression distortion when compressing computer screen images, such as blurred text and background color cast. These distortions not only affect the readability and aesthetics of the image, but also seriously damage the user's subjective feelings and reduce the user experience. Summary of the invention

[0005] The embodiments of the present application provide a method and device for post-processing enhancement of a screen image, so as to at least solve the technical problem of compression distortion caused when reconstructing a screen image in the related art.

[0006] The embodiment of the present application provides a post-processing enhancement method for a screen image, which is applied to a decoding side, and includes:

[0007] Dividing the decoded and reconstructed image to be processed into a plurality of processing units;

[0008] Parsing 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, a list of real pixel values ​​corresponding to each processing unit is parsed from the bitstream;

[0010] Based on the real pixel values ​​in the real pixel value list, the pixel values ​​of the decoded and reconstructed image in the corresponding processing unit are replaced to obtain an enhanced image.

[0011] In an optional 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 includes:

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

[0013] The real pixel value with the smallest difference value is used to replace the pixel value of the current decoded reconstructed image.

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

[0015] The sum of absolute errors or the sum of square errors between each real pixel value in the real pixel value list and the pixel value of the current decoded and reconstructed image is calculated in sequence;

[0016] The difference value is obtained based on the sum of absolute errors or the sum of squared errors.

[0017] In an optional embodiment, parsing a real pixel value list corresponding to each processing unit from a bitstream includes:

[0018] Parsing the first real pixel value number of the current processing unit from the bit stream using a truncated unary code;

[0019] According to the number of second real pixel values ​​of the upper processing unit and / or the left processing unit of the current processing unit, read the second real pixel value number of binary bits from the bit stream in sequence, and if the binary bit is 1, store the 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;

[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, the remaining real pixel values ​​are decoded using Huffman codes.

[0021] The embodiment of the present application provides a post-processing enhancement method for a screen image, which is applied to an encoding side and includes:

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

[0023] For each processing unit, a preset number of original pixel values ​​with higher frequencies in the processing unit are obtained as the real pixel values ​​of the processing unit, and stored in the real pixel value list;

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

[0025] When it is determined according to the post-processing control information that the post-processing is turned on, the real pixel value list is written into the bitstream and transmitted to the decoding side.

[0026] In an optional embodiment, writing the real pixel value list into the code stream includes:

[0027] The truncated unary code is used to record the number of real pixel values ​​in each processing unit;

[0028] Sequentially traverse the first real pixel value of the upper processing unit and / or the left processing unit of the current processing unit, and if the first real pixel value is the same as the second real pixel value to be encoded by the current processing unit, record binary 1, and record the second real pixel value as encoded, otherwise record binary 0;

[0029] If there are still real pixel values ​​to be encoded in the real pixel value list of the current processing unit, Huffman code is used for encoding.

[0030] In an optional embodiment, calculating the rate-distortion variation includes:

[0031] For each pixel of the processing unit, the closest real pixel value is searched from the real pixel value list table according to the reconstructed pixel value, and the reconstructed pixel value is replaced with the closest real pixel value to obtain the corrected pixel value;

[0032] The sum of the errors between the corrected pixel value and the original pixel value in the processing unit is calculated to obtain the corrected distortion;

[0033] The sum of the errors between the reconstructed pixel value and the original pixel value in the processing unit is calculated to obtain the distortion before correction;

[0034] The rate-distortion change is calculated based on the distortion after correction, the distortion before correction, and the number of binary bits encoded in the true pixel value list.

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

[0036] When the rate-distortion change is less than 0, the post-processing on flag is set to a first value;

[0037] When the rate distortion change is greater than or equal to 0, the post-processing on flag is set to a second value;

[0038] The first value turns on post-processing, and the second value turns off post-processing.

[0039] The embodiment of the present application provides a post-processing enhancement method for a screen image, comprising:

[0040] The encoding side divides the image to be processed into a plurality of processing units; for each processing unit, obtains a preset number of original pixel values ​​with a higher frequency in the processing unit as the real pixel value of the processing unit, and stores them in a real pixel value list; calculates the rate distortion change, and obtains post-processing control information based on the rate distortion change; writes the post-processing control information into a bitstream; and when it is determined according to the post-processing control information to start post-processing, writes the real pixel value list into the bitstream and transmits it to the decoding side;

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

[0042] According to another aspect of an embodiment of the present application, there is also provided an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to execute the post-processing enhancement method of the screen image through the computer program.

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

[0044] The post-processing enhancement method for screen images provided in the embodiment of the present application, for each pixel of the processing unit, finds the closest real pixel value from the real pixel value list according to the reconstructed pixel value, and uses the above real pixel value to replace the reconstructed pixel value to obtain the corrected pixel value. Through the targeted sample value correction algorithm, the present invention can effectively reduce the distortion phenomenon in the decoded image, such as text blur and background color cast, thereby improving the clarity and detail expression 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 invention does not involve changes to the existing encoding and decoding process, which means that it can be easily adapted to any existing encoding and decoding framework without additional modification or optimization of the codec, and has high compatibility and practicality. Easy to integrate: Since the present invention only operates on the decoded reconstructed image, it can be integrated into the existing image processing process as an independent module or tool, which simplifies the integration process and reduces the complexity and cost of technical implementation. High flexibility: The algorithm of the present invention 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 encoding and decoding standards. BRIEF DESCRIPTION OF THE DRAWINGS

[0045] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:

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

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

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

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

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

[0051] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present application.

[0052] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application 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 data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising 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.

[0053] At the same time, it should be understood that for the sake of ease of description, the sizes of the various parts shown in the drawings are not drawn according to the actual proportional relationship. The technologies, methods and devices known to ordinary technicians in the relevant fields may not be discussed in detail, but in appropriate cases, the technologies, methods and devices should be regarded as part of the specification.

[0054] The following is combined with Figure 1-4 The post-processing enhancement method of the screen image in the embodiment of the present application is introduced in detail.

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

[0056] S101 divides the image to be processed into multiple processing units.

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

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

[0059] S102: For each processing unit, a preset number of original pixel values ​​with higher frequencies in the processing unit are obtained as the real pixel values ​​of the processing unit, and stored in a real pixel value list.

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

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

[0062] S103 calculates the rate distortion change, obtains post-processing control information based on the rate distortion change, and writes the post-processing control information into the bitstream;

[0063] The present application is mainly based on truncated unary code and Huffman code for encoding. In an optional embodiment, it includes:

[0064] The truncated unary code is used to record the number of real pixel values ​​in each processing unit;

[0065] The first real pixel value of the processing unit above and / or the processing unit on the left of the current processing unit is traversed in sequence. If it 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 encoded; otherwise, binary 0 is recorded.

[0066] The solution provided in the present application can inherit part or all of the coding information from the adjacent processing unit, for example, it can inherit the coding information from the upper processing unit of the current processing unit, or inherit the coding information from the left processing unit of the current processing unit, or inherit the coding information of the upper processing unit and the left processing unit. 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 upper processing unit adjacent to the current processing unit is traversed in sequence. If it is the same as the second real pixel value to be encoded of the current processing unit, record binary 1 and record the second real pixel value as encoded, otherwise record binary 0.

[0068] The present application adopts the method of sequentially traversing the TV values ​​in the TV table of the adjacent upper processing unit. For example, if the upper processing unit has 5 TV values, each TV value is sequentially determined to be the same as the TV value of the current processing unit. If it is the same as the TV value to be encoded in the TV table of the current processing unit, a binary 1 is recorded, and the same TV value in the current TV table is recorded as encoded.

[0069] If there are still real pixel values ​​to be encoded in the real pixel value list of the current processing unit, and if the processing unit to the left of the current processing unit is available (exists and the post-processing correction tool is turned on), traverse the real pixel values ​​of the left processing units adjacent to the current processing unit in turn. If they are the same as the second real pixel value to be encoded in the current processing unit, record binary 1 and record the second real pixel value as encoded, otherwise record binary 0.

[0070] If there are still real pixel values ​​to be encoded in the real pixel value list of the current processing unit, Huffman code is used for encoding. Because in the actual implementation, according to the raster execution order, only the processing units above and to the left are currently encoded, so some or all of the encoding information is inherited from the adjacent processing unit.

[0071] Furthermore, the rate-distortion variation is calculated, and post-processing control information is obtained based on the rate-distortion variation.

[0072] In an optional embodiment, calculating the rate-distortion variation includes:

[0073] For each pixel of the processing unit, the closest real pixel value is found from the real pixel value list table according to 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 the errors between the corrected pixel value and the original pixel value in the calculation processing unit is used to obtain the distortion after correction; the sum of the errors between the reconstructed pixel value and the original pixel value in the calculation processing unit is used to obtain the distortion before correction.

[0075] Specifically, for each pixel of the processing unit, the closest TV value is found from the TV table according to the reconstructed pixel value, and the reconstructed pixel value is replaced with the TV 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 respectively, and the sum of the errors of all pixels is recorded as the distortion after correction D2 and the distortion before correction D1 respectively.

[0076] Furthermore, based on the distortion after correction, the distortion before correction and the number of binary bits in the encoding of the true pixel value list, the rate distortion change is calculated, including calculation according to the following formula:

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

[0078] Among them, △cost represents the rate distortion change, λ represents the preset weight coefficient (the larger the weight coefficient, the more important the bit rate is compared with the distortion in the encoding process), and R represents the number of binary bits obtained after encoding the real pixel value list.

[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 turning on post-processing can improve the rate-distortion performance, and the post-processing turn-on flag is set to a first value; when the rate-distortion change is greater than or equal to 0, the post-processing turn-on flag is set to a second value; wherein the first value is to turn on post-processing, and the second value is to turn off post-processing.

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

[0081] S104: When it is determined according to the post-processing control information that the post-processing is turned on, the real pixel value list is written into the bitstream and transmitted to the decoding side.

[0082] If it is determined to start post-processing according to 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, see step S103.

[0083] like Figure 2 As shown, a post-processing enhancement method for a screen image is applied to a decoding side, comprising:

[0084] S201 divides the decoded and reconstructed image to be processed into multiple processing units in the same manner as the encoding side.

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

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

[0087] The post-processing control information is obtained from the code stream. Specifically, for each processing unit, the post-processing start flag is obtained. If the flag is a first value, the post-processing is turned on by default. If the flag is a second value, the post-processing is turned off by default.

[0088] S203: When the post-processing is enabled according to the post-processing control information, a real pixel value list corresponding to each processing unit is parsed from the code stream.

[0089] Specifically, the first real pixel value quantity of the current processing unit is parsed from the code stream using a truncated unary code.

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

[0091] The second real pixel value quantity is the real pixel value quantity of the upper processing unit of the current processing unit, or the real pixel value quantity of the left processing unit of the current processing unit, or the sum of the real pixel value quantities of the upper and left processing units.

[0092] In an optional implementation, the upper processing unit is used for decoding first, and if the decoding is not completed, the left processing unit information 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 turned on), according to the second real pixel value number of the processing unit above the current processing unit, the second real pixel value number of binary bits is read from the code stream in sequence. If the binary bit is 1, the real pixel value corresponding to the upper processing unit is stored in the real pixel value list 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 first real pixel value number, and if the processing unit to the left of the current processing unit is available (exists and the post-processing correction tool is turned on), according to the third real pixel value number of the processing unit to the left of the current processing unit, the third real pixel value number of binary bits are read from the code stream in sequence. If the binary bit is 1, the real pixel value corresponding to the left processing unit is stored in the real pixel value list of the current processing unit.

[0095] 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, the remaining real pixel values ​​are decoded using Huffman codes to obtain a parsed real pixel value list.

[0096] S204 replaces the pixel values ​​of the decoded and reconstructed image in the corresponding processing unit based on the real pixel values ​​in the real pixel value list to obtain an 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 current decoded reconstructed image is calculated in turn, and the real pixel value with the smallest difference value is used to replace the pixel value of the current decoded reconstructed image.

[0098] The difference value can be calculated using the sum of absolute errors or the sum of square errors. For RGB images, each pixel contains multiple pixel components of R, G, and B. The sum of the absolute errors between 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.

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

[0100] The encoding side divides the image to be processed into multiple processing units; for each processing unit, obtains a preset number of original pixel values ​​with higher frequencies in the processing unit as the real pixel values ​​of the processing unit, and stores them in a real pixel value list; calculates the rate-distortion change, and obtains post-processing control information based on the rate-distortion change; writes the post-processing control information into the bitstream; and when it is determined to start post-processing according to the post-processing control information, writes the real pixel value list into the bitstream and transmits it to the decoding side.

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

[0102] In order to facilitate understanding of the image post-processing method provided in the embodiment of the present application, Figure 4 Further description.

[0103] like Figure 4 As shown, the original image block is coded and decoded to obtain a reconstructed image block, the reconstructed pixel is obtained based on the reconstructed image block, and the TV table (real pixel value list) is obtained based on the most frequently occurring pixel of the original image block. The real pixel value in the real pixel value list is the candidate correction value.

[0104] The difference between the reconstructed pixel and the real pixel value is calculated, and the reconstructed pixel value is replaced based on the real pixel value closest to the reconstructed pixel to obtain the enhanced image.

[0105] According to another aspect of an embodiment of the present application, an electronic device corresponding to the post-processing enhancement method of a screen image provided in the aforementioned embodiment is also provided to execute the above-mentioned post-processing enhancement method of a screen image.

[0106] Please refer to Figure 5 , which shows a schematic diagram of an electronic device provided by some embodiments of the present application. Figure 5 As shown, the electronic device includes: a processor 500, a memory 501, a bus 502 and a communication interface 503, and the processor 500, the communication interface 503 and the memory 501 are connected via the bus 502; the memory 501 stores a computer program that can be run on the processor 500, and when the processor 500 runs the computer program, it executes the post-processing enhancement method of the screen image provided in any of the aforementioned embodiments of the present application.

[0107] The memory 501 may include a high-speed random access memory (RAM), and may also include a non-volatile memory, such as at least one disk storage. 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 may be wired or wireless), and the Internet, wide area network, local area network, metropolitan area network, etc. may be used.

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

[0109] The processor 500 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the hardware integrated logic circuit or software instructions in the processor 500. The above processor 500 can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The methods, steps and logic block diagrams disclosed in the embodiments of the present application can be implemented or executed. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor. The steps of the method disclosed in the embodiments of the present application can be directly embodied as a hardware decoding processor to be executed, or the hardware and software modules in the decoding processor can be executed. The software module can be located in a mature storage medium in the field such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory 501, and the processor 500 reads the information in the memory 501 and completes the steps of the above method in combination with its hardware.

[0110] The electronic device provided in the embodiment of the present application and the post-processing enhancement method of the screen image provided in the embodiment of the present application are based on the same inventive concept and have the same beneficial effects as the methods adopted, operated or implemented therein.

[0111] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0112] The above embodiments only express several implementation methods of the present invention, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present invention. It should be pointed out that, for a person of ordinary skill in the art, several modifications and improvements can be made without departing from the concept of the present invention, and these all belong to the protection scope of the present invention. Therefore, the protection scope of the present invention patent shall be subject to the attached claims.

Claims

1. A post-processing enhancement method for screen images, applied to a decoding side, characterized in that: include: Dividing the decoded and reconstructed image to be processed into a plurality of processing units; Parsing post-processing control information corresponding to each processing unit from the bitstream; When post-processing is enabled according to the post-processing control information, a list of real pixel values ​​corresponding to each processing unit is parsed from the bitstream; Based on the real pixel values ​​in the real pixel value list, the pixel values ​​of the decoded and reconstructed image in the corresponding processing unit are replaced to obtain an enhanced image.

2. The method according to claim 1, characterized in that Replacing the pixel value of the decoded and reconstructed image in the corresponding processing unit based on the real pixel value in the real pixel value list comprises: For each pixel in each processing unit, the difference value between each real pixel value in the real pixel value list and the pixel value of the current decoded and reconstructed image is calculated in sequence; The real pixel value with the smallest difference value is used to replace the pixel value of the current decoded reconstructed image.

3. The method according to claim 2, characterized in that The difference between each real pixel value in the real pixel value list and the pixel value of the current decoded and reconstructed image is calculated in sequence, including: The sum of absolute errors or the sum of square errors between each real pixel value in the real pixel value list and the pixel value of the current decoded and reconstructed image is calculated in sequence; The difference value is obtained according to the sum of the absolute errors or the sum of the square errors.

4. The method according to claim 1, characterized in that: Parse the real pixel value list corresponding to each processing unit from the code stream, including: Parsing the first real pixel value number of the current processing unit from the bit stream using a truncated unary code; According to the number of second real pixel values ​​of the upper processing unit and / or the left processing unit of the current processing unit, read the second real pixel value number of binary bits from the bit stream in sequence, and if the binary bit is 1, store the 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 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, the remaining real pixel values ​​are decoded using Huffman codes.

5. A post-processing enhancement method for screen images, applied to the encoding side, characterized in that: include: Dividing the image to be processed into a plurality of processing units; For each processing unit, a preset number of original pixel values ​​with higher frequencies in the processing unit are obtained as the real pixel values ​​of the processing unit, and stored in the real pixel value list; Calculating a rate-distortion variation, and obtaining post-processing control information based on the rate-distortion variation; Writing the post-processing control information into a bitstream; When it is determined according to the post-processing control information that the post-processing is turned on, the real pixel value list is written into the bitstream and transmitted to the decoding side.

6. The method according to claim 1, characterized in that Writing the real pixel value list into the bitstream includes: The truncated unary code is used to record the number of real pixel values ​​in each processing unit; Sequentially traverse the first real pixel value of the upper processing unit and / or the left processing unit of the current processing unit, and if the first real pixel value is the same as the second real pixel value to be encoded by the current processing unit, record binary 1, and record the second real pixel value as encoded, otherwise record binary 0; If there are still real pixel values ​​to be encoded in the real pixel value list of the current processing unit, Huffman code is used for encoding.

7. The method according to claim 5, characterized in that Calculate the rate distortion change, including: For each pixel of the processing unit, searching the closest real pixel value from the real pixel value list table according to the reconstructed pixel value, and replacing the reconstructed pixel value with the closest real pixel value to obtain a corrected pixel value; Calculating the sum of errors between the corrected pixel value and the original pixel value in the processing unit to obtain the corrected distortion; Calculating the sum of errors between the reconstructed pixel value and the original pixel value in the processing unit to obtain the distortion before correction; The rate-distortion variation is calculated based on the distortion after correction, the distortion before correction and the number of binary bits encoded by the true pixel value list.

8. The method according to claim 5 or 7, characterized in that: Obtaining post-processing control information based on the rate-distortion variation includes: When the rate-distortion variation is less than 0, setting the post-processing on flag to a first value; When the rate distortion change is greater than or equal to 0, setting the post-processing on flag bit to a second value; The first value is to turn on post-processing, and the second value is to turn off post-processing.

9. A post-processing enhancement method for a screen image, characterized in that: include: 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 in the processing unit are obtained as the real pixel values ​​of the processing unit, and stored in the real pixel value list; Calculating a rate-distortion variation, and obtaining post-processing control information based on the rate-distortion variation; 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 real pixel value list into a bitstream and transmitting it to a decoding side; The decoding side divides the decoded and reconstructed image to be processed into a plurality of processing units; Parsing post-processing control information corresponding to each processing unit from the bitstream; and parsing a list of real pixel values ​​corresponding to each processing unit from the bitstream when post-processing is enabled according to the post-processing control information; Based on the real pixel values ​​in the real pixel value list, the pixel values ​​of the decoded and reconstructed image in the corresponding processing unit are replaced to obtain an enhanced image.

10. An electronic device, characterized in that: The invention comprises a processor and a memory storing program instructions, wherein the processor is configured to execute the post-processing enhancement method of the screen image according to any one of claims 1 to 9 when executing the program instructions.

Citation Information

Patent Citations

  • Encoding and decoding method with image output controllable, encoder and decoder

    CN101335890A

  • Sample self-adaption compensation in HEVC (high-efficiency video coding)

    CN104243985A

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

    CN107852493A

  • Coding and decoding method, device and equipment

    CN114640845A

  • Decoding and coding method, device and equipment

    CN116506619A