Alpha channel post-processing in image transcoding
Through alpha channel post-processing, bilateral filters are used to filter images, which solves the problems of artifacts and reconstruction errors in image compression and improves image quality, especially in lossy compression of alpha channels.
Patent Information
- Application Number
- CN202110627284.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2020-07-07
- Filing Date
- 2021-06-04
- Publication Date
- 2024-09-06
- Estimated Expiration
- 2041-06-04
AI Technical Summary
During the image compression process, the compression of the alpha channel will introduce artifacts and reconstruction errors, affecting image quality.
A specialized alpha channel post-processing approach is employed, which involves decoding the color channel and alpha channel values from the bitstream, filtering the alpha channel values using a bilateral filter, and generating portions of the reconstructed image to reduce the visibility of artifacts.
Improved image quality and reduced artifacts and noise introduced by compression, especially in lossy compression of the alpha channel, significantly improves visual effects.
Smart Images

Figure CN113382264B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to alpha channel post-processing in image transcoding. Background Art
[0002] Image content (e.g., still images or video frames) represents a large amount of online content. For example, a web page may include multiple images, and most of the time and resources spent rendering the web page are dedicated to rendering those images for display. The amount of time and resources required to receive and render images for display depends in part on the way the images are compressed. Thus, images can be rendered faster by reducing the overall data size of the images using compression and decompression techniques. Summary of the invention
[0003] Compression and decompression techniques can introduce artifacts and other reconstruction errors into the image. Post-processing specifically designed for the alpha channel can improve image quality by reducing the visibility of these errors.
[0004] A first aspect of the teachings herein is a method for transcoding by post-processing an alpha channel. The method may include decoding color channel values for encoding an image from a plurality of color channels of a bitstream, and decoding an alpha channel value for encoding an image from an alpha channel of the bitstream. The method may also include determining a bilateral filter based on a compression level for encoding the alpha channel, post-processing the alpha channel value by filtering the alpha channel value using a bilateral filter to obtain a filtered alpha channel value, and generating at least a portion of a reconstructed image corresponding to the encoded image by using the filtered alpha channel value and the color channel value.
[0005] Another aspect of the teachings herein is a device that performs the method of transcoding by using alpha channel post-processing as described herein. The device may be an image decoder or a frame decoder. The device may include a processor and a memory storing instructions that, when executed, cause the processor to perform the method of transcoding by using alpha channel post-processing as described herein.
[0006] These and other aspects of the disclosure are disclosed in the following detailed description of the embodiments, the appended claims and the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0007] Figure 1 is a diagram of a computing device according to an embodiment of the present disclosure.
[0008] Figure 2 is a diagram of a computing and communication system according to an embodiment of the present disclosure.
[0009] Figure 3is a diagram of a video stream for encoding and decoding according to an embodiment of the present invention.
[0010] Figure 4 is a block diagram of an encoder according to an embodiment of the present disclosure.
[0011] Figure 5 is a block diagram of a decoder according to an embodiment of the present invention.
[0012] Figure 6 is a flowchart of a method of transcoding by using alpha channel post-processing according to an embodiment of the present disclosure.
[0013] Fig. 7A is a first example of a spatial kernel for a bilateral filter for alpha channel post-processing.
[0014] Figure 7B is a second example of a spatial kernel for a bilateral filter for alpha channel post-processing.
[0015] Fig. 8A is a first example of a range kernel for a bilateral filter for alpha channel post-processing.
[0016] Figure 8B is a second example of a range kernel for a bilateral filter for alpha channel post-processing.
[0017] Figure 8C is a third example of a range kernel for a bilateral filter for alpha channel post-processing.
[0018] Fig.9A is the reconstructed image without the alpha channel post-processing described in this article.
[0019] Fig. 9B yes Fig.9A The reconstructed image includes the alpha channel post-processing described herein. DETAILED DESCRIPTION
[0020] Image and video compression schemes may include breaking down an image or frame into smaller parts, such as blocks, and generating an output bitstream using techniques that minimize bandwidth utilization of information included in each block in the output. The techniques may include limiting information by reducing spatial redundancy, reducing temporal redundancy, or a combination thereof. For example, temporal or spatial redundancy may be used to predict a block or a portion thereof so that the difference or residual between the predicted block and the original block is represented in the bitstream. The residual may be further compressed by transforming the residual information into transform coefficients, quantizing the transform coefficients, and entropy transcoding the quantized transform coefficients. Other transcoding information (e.g., information required to reconstruct the block from the coded block information) may also be included in the bitstream.
[0021] The image may include three color channels, such as a luminance channel and two chrominance channels, and optionally an alpha channel for describing transparency information. When decoding the color channels, a deblocking filter may be applied to the reconstructed data to mitigate block edge artifacts. However, the alpha channel has different characteristics than the color channels, thus making the deblocking filter less useful for post-processing.
[0022] Implementations of the teachings herein describe alpha channel post-processing, and more particularly describe post-processing filters specific to the alpha channel.Details are first described herein with reference to a system in which the teachings herein may be implemented.
[0023] Figure 1 1 is a diagram of a computing device 100 according to an embodiment of the present disclosure. The computing device 100 shown includes a memory 110, a processor 120, a user interface (UI) 130, an electronic communication unit 140, a sensor 150, a power supply 160, and a bus 170. As used herein, the term "computing device" includes any unit, or combination of units, capable of performing any method disclosed herein, or any one or more parts thereof.
[0024] The computing device 100 may be a fixed computing device, such as a personal computer (PC), a server, a workstation, a minicomputer, or a mainframe computer; or a mobile computing device, such as a mobile phone, a personal digital assistant (PDA), a portable computer, or a tablet PC. Although illustrated as a single unit, any one or more elements of the computing device 100 may be integrated into any number of separate physical units. For example, the user interface 130 and the processor 120 may be integrated into a first physical unit, and the memory 110 may be integrated into a second physical unit.
[0025] The memory 110 may include any non-transitory computer-usable or computer-readable medium, such as any tangible device in which data 112, instructions 114, operating system 116, or any information associated therewith may be contained, stored, communicated, or transmitted, for example, for use by or in conjunction with other components of the computing device 100. The non-transitory computer-usable or computer-readable medium may be, for example, a solid-state drive, a memory card, a removable medium, a read-only memory (ROM), a random access memory (RAM), any type of magnetic disk including a hard disk, a floppy disk, an optical disk, a magnetic or optical card, an application specific integrated circuit (ASIC), or any type of non-transitory medium suitable for storing electronic information, or any combination thereof.
[0026] Although illustrated as a single unit, memory 110 may include multiple physical units, for example, one or more primary memory units, such as random access memory units; one or more secondary data storage units, such as disks; or a combination thereof. For example, data 112 or a portion thereof, instructions 114 or a portion thereof, or both may be stored in a secondary storage unit and may be loaded or otherwise transferred to a primary storage unit in conjunction with processing corresponding data 112, executing corresponding instructions 114, or both. In some embodiments, memory 110 or a portion thereof may be a removable memory.
[0027] Data 112 may include information, such as input audio and / or visual data, encoded audio and / or visual data, decoded audio and / or visual data, and the like. Visual data may include still images, frames of a video sequence, and / or a video sequence. Instructions 114 may include instructions, such as code, for performing any method disclosed herein, or any one or more portions thereof. Instructions 114 may be implemented in hardware, software, or any combination thereof. For example, instructions 114 may be implemented as information stored in memory 110, such as a computer program, which may be executed by processor 120 to perform any of the corresponding methods, algorithms, aspects, or combinations thereof as described herein.
[0028] Although shown as included in the memory 110, in some embodiments, the instructions 114 or a portion thereof may be implemented as a special-purpose processor or circuit, which may include dedicated hardware for performing any of the methods, algorithms, aspects, or combinations thereof as described herein. Portions of the instructions 114 may be distributed across multiple processors on the same machine or different machines, or across a network such as a local area network, a wide area network, the Internet, or a combination thereof.
[0029] Processor 120 may include any existing or later developed device or system capable of manipulating or processing digital signals or other electronic information, including optical processors, quantum processors, molecular processors, or combinations thereof. For example, processor 120 may include a dedicated processor, a central processing unit (CPU), a digital signal processor (DSP), multiple microprocessors, one or more microprocessors associated with a DSP core, a controller, a microcontroller, an ASIC, a field programmable gate array (FPGA), a programmable logic array, a programmable logic controller, microcode, firmware, any type of integrated circuit (IC), a state machine, or any combination thereof. As used herein, the term "processor" includes a single processor or multiple processors.
[0030] The user interface 130 may include any unit capable of docking with a user, such as a virtual or physical keypad, a touchpad, a display, a touch display, a speaker, a microphone, a camera, a sensor, or any combination thereof. For example, the user interface 130 may be an audio-visual display device, and the computing device 100 may, for example, be combined with a video display such as a decoded video, by presenting an audio such as a decoded audio using the user interface 130 audio-visual display device. Although shown as a single unit, the user interface 130 may include one or more physical units. For example, the user interface 130 may include an audio interface for performing audio communication with a user, and a touch display for performing visual and touch-based communication with a user.
[0031] The electronic communication unit 140 can transmit, receive, or transmit and receive signals through a wired or wireless electronic communication medium 180, such as a radio frequency (RF) communication medium, an ultraviolet (UV) communication medium, a visible light communication medium, an optical fiber communication medium, a wired communication medium, or a combination thereof. For example, as shown, the electronic communication unit 140 is operably connected to an electronic communication interface 142, such as an antenna, which is configured to communicate via wireless signals.
[0032] Despite Figure 1 The electronic communication interface 142 is shown as a wireless antenna, but the electronic communication interface 142 can be a wireless antenna as shown, a wired communication port such as an Ethernet port, an infrared port, a serial port, or any other wired or wireless unit capable of interfacing with a wired or wireless electronic communication medium 180. Figure 1 A single electronic communication unit 140 and a single electronic communication interface 142 are shown, but any number of electronic communication units and any number of electronic communication interfaces may be used.
[0033] Sensor 150 may include, for example, an audio sensing device, a visible light sensing device, a motion sensing device, or a combination thereof. For example, sensor 150 may include a sound sensing device, such as a microphone, or any other sound sensing device, now available or later developed, which may sense sounds, such as voice or other speech, emitted by a user operating computing device 100 near computing device 100. In another example, sensor 150 may include a camera, or any other image sensing device, now available or later developed, which may sense an image, such as an image of a user operating a computing device. Although a single sensor 150 is shown, computing device 100 may include multiple sensors 150. For example, computing device 100 may include a first camera oriented with a field of view pointing toward a user of computing device 100, and a second camera oriented with a field of view away from the user of computing device 100.
[0034] Power supply 160 may be any suitable device for powering computing device 100. For example, power supply 160 may include: a wired external power interface; one or more dry cell batteries, such as nickel cadmium (NiCd), nickel zinc (NiZn), nickel metal hydride (NiMH), lithium ion (Li-ion); solar cells; fuel cells; or any other device capable of powering computing device 100. Figure 1 A single power source 160 is shown in FIG. 1 , but the computing device 100 may include multiple power sources 160 , such as a battery and a wired external power interface.
[0035] Although shown as separate units, the electronic communication unit 140, the electronic communication interface 142, the user interface 130, the power supply 160 or a portion thereof may be configured as a combined unit. For example, the electronic communication unit 140, the electronic communication interface 142, the user interface 130 and the power supply 160 may be implemented as a communication port capable of docking with an external display device to provide communication, power or both.
[0036] One or more of the memory 110, the processor 120, the user interface 130, the electronic communication unit 140, the sensor 150, or the power source 160 may be operably coupled via the bus 170. Figure 1 1, a single bus 170 is shown, but the computing device 100 may include multiple buses. For example, the memory 110, the processor 120, the user interface 130, the electronic communication unit 140, the sensor 150, and the bus 170 may receive power from the power supply 160 via the bus 170. In another example, the memory 110, the processor 120, the user interface 130, the electronic communication unit 140, the sensor 150, the power supply 160, or a combination thereof may communicate data, for example, by sending and receiving electronic signals via the bus 170.
[0037] although Figure 1 Although not separately shown in the drawings, one or more of the processor 120, the user interface 130, the electronic communication unit 140, the sensor 150, or the power supply 160 may include an internal memory, such as an internal buffer or register. For example, the processor 120 may include an internal memory (not shown) and may read the data 112 from the memory 110 into the internal memory (not shown) for processing.
[0038] Although illustrated as separate elements, the memory 110, processor 120, user interface 130, electronic communication unit 140, sensor 150, power supply 160 and bus 170, or any combination thereof, may be integrated into one or more electronic units, circuits, or chips.
[0039] Figure 22 is a diagram of a computing and communication system 200 according to an embodiment of the present disclosure. The computing and communication system 200 shown includes computing and communication devices 100A, 100B, 100C, access points 210A, 210B, and a network 220. For example, the computing and communication system 200 can be a multiple-access system that provides communications (e.g., voice, audio, data, video, messaging, broadcast, or a combination thereof) to one or more wired or wireless communication devices, such as computing and communication devices 100A, 100B, 100C. Although for simplicity, Figure 2 Three computing and communication devices 100A, 100B, 100C, two access points 210A, 210B, and one network 220 are shown, but any number of computing and communication devices, access points, and networks may be used.
[0040] The computing and communication device 100A, 100B or 100C may be, for example, a computing device, such as Figure 1 . For example, computing and communication devices 100A, 100B may be user devices, such as mobile computing devices, laptop computers, thin clients, or smart phones, and computing and communication device 100C may be a server, such as a mainframe or cluster. Although computing and communication devices 100A and computing and communication devices 100B are described as user devices, and computing and communication device 100C is described as a server, any computing and communication device may perform some or all of the functions of a server, some or all of the functions of a user device, or some or all of the functions of a server and a user device. For example, server computing and communication device 100C may receive, encode, process, store, transmit audio data, or a combination thereof; and one or both of computing and communication devices 100A and computing and communication devices 100B may receive, decode, process, store, present audio data, or a combination thereof.
[0041] Each computing and communication device 100A, 100B, 100C may be configured to perform wired or wireless communications, such as over a network 220, and the computing and communication devices may include user equipment (UE), mobile stations, fixed or mobile subscriber units, cellular phones, personal computers, tablet computers, servers, consumer electronics, or any similar devices. For example, the computing and communication devices 100A, 100B, 100C may be configured to transmit or receive wired or wireless communication signals. Although each computing and communication device 100A, 100B, 100C is illustrated as a single unit, the computing and communication devices may include any number of interconnected elements.
[0042] Each access point 210A, 210B can be any type of device configured to communicate with computing and communication devices 100A, 100B, 100C, network 220, or both via wired or wireless communication links 180A, 180B, 180C. For example, the access points 210A, 210B can include a base station, a base transceiver station (BTS), a node-B, an enhanced node-B (eNode-B), a home node-B (HNode-B), a wireless router, a wired router, a hub, a repeater, a switch, or any similar wired or wireless device. Although each access point 210A, 210B is illustrated as a single unit, an access point can include any number of interconnected elements.
[0043] The network 220 may be any type of network configured to provide services such as voice, data, applications, voice over Internet protocol (VoIP), or any other communication protocol or combination of communication protocols via a wired or wireless communication link. For example, the network 220 may be a local area network (LAN), a wide area network (WAN), a virtual private network (VPN), a mobile or cellular telephone network, the Internet, or any other electronic communication means. The network may use a communication protocol such as a transmission control protocol (TCP), a user datagram protocol (UDP), an Internet protocol (IP), a real-time transport protocol (RTP), a hypertext transfer protocol (HTTP), or a combination thereof.
[0044] The computing and communication devices 100A, 100B, 100C can communicate with each other via the network 220 by using one or more wired or wireless communication links, or by a combination of wired and wireless communication links. For example, as shown, the computing and communication devices 100A, 100B can communicate via wireless communication links 180A, 180B, and the computing and communication device 100C can communicate via a wired communication link 180C. Any of the computing and communication devices 100A, 100B, 100C can communicate by using any one or more wired or wireless communication links. For example, the first computing and communication device 100A can communicate via a first access point 210A using a first type of communication link, the second computing and communication device 100B can communicate via a second access point 210B using a second type of communication link, and the third computing and communication device 100C can communicate via a third access point (not shown) using a third type of communication link. Similarly, access points 210A, 210B may communicate with network 220 via one or more types of wired or wireless communication links 230A, 230B. Figure 2The computing and communication devices 100A, 100B, 100C are shown communicating via a network 220, but the computing and communication devices 100A, 100B, 100C may communicate with each other via any number of communication links, such as direct wired or wireless communication links.
[0045] In some implementations, communications between one or more of the computing and communication devices 100A, 100B, 100C may omit communications via the network 220, and may include transferring data via another medium (not shown), such as a data storage device. For example, the server computing and communication device 100C may store audio data, such as encoded audio data, in a data storage device, such as a portable data storage unit, and one or both of the computing and communication devices 100A or 100B may access, read, or retrieve the stored audio data from the data storage unit, such as by physically disconnecting the data storage device from the server computing and communication device 100C and physically connecting the data storage device to the computing and communication device 100A or 100B.
[0046] Other implementations of the computing and communication system 200 are possible. For example, in an implementation, the network 220 may be an ad hoc network, and one or more of the access points 210A, 210B may be omitted. The computing and communication system 200 may include Figure 2 For example, computing and communication system 200 may include more communication devices, networks, and access points.
[0047] Figure 3 3 is a diagram of a video stream 300 for encoding and decoding according to an embodiment of the present disclosure. The video stream 300, such as a video stream captured by a camera or a video stream generated by a computing device, may include a video sequence 310. The video sequence 310 may include a sequence of adjacent frames 320. Although three adjacent frames 320 are shown, the video sequence 310 may include any number of adjacent frames 320.
[0048] Each frame 330 from adjacent frames 320 may represent a single image from a video stream. Figure 3 3, but frame 330 may include one or more segments, tiles, or planes that may be independently (e.g., in parallel) transcoded or otherwise processed. Frame 330 may include block 340. Figure 3, but a block may include pixels. For example, a block may include a 16×16 pixel group, an 8×8 pixel group, an 8×16 pixel group, or any other pixel group. Unless otherwise indicated herein, the term "block" may include a superblock, macroblock, segment, slice, or any other portion of a frame. A frame, block, pixel, or combination thereof may include display information, such as luminance information, chrominance information, or any other information that may be used to store, modify, communicate, or display a video stream or a portion thereof.
[0049] Figure 4 is a block diagram of an encoder 400 according to an embodiment of the present disclosure. Figure 1 The computing device 100 shown in Figure 2 In the computing and communication devices 100A, 100B, 100C shown in FIG. , the encoder 400 may be implemented as, for example, a computer program stored in, for example, Figure 1 The computer software program may include a computer software program in the data storage unit of the memory 110 shown in FIG. The computer software program may include a computer software program that can be executed by a processor (e.g. Figure 1 The encoder 400 may be implemented as dedicated hardware included in the computing device 100, for example.
[0050] The encoder 400 has the following stages for performing various functions in a forward path (shown by solid connecting lines) to produce an encoded bitstream or compressed bitstream 420 by using the video stream 300 as input: an intra / inter prediction stage 402, a transform stage 404, a quantization stage 406, and an entropy coding stage 408. The encoder 400 may also include a reconstruction path (shown by dashed connecting lines) to reconstruct frames for encoding future blocks. Figure 4 4 , the encoder 400 has the following stages for performing various functions in the reconstruction path: a dequantization stage 410, an inverse transform stage 412, a reconstruction stage 414, and a loop filter stage 416. Other structural variations of the encoder 400 may be used to encode the video stream 300.
[0051] In some cases, the functions performed by the encoder 400 may occur after filtering of the video stream 300. That is, before the encoder 400 receives the video stream 300, the video stream 300 may undergo pre-processing according to one or more embodiments of the present disclosure. Alternatively, the encoder 400 itself may proceed to perform the filtering of the video stream 300. Figure 4 Such pre-processing is performed on the video stream 300 before the described functionality, such as before processing the video stream 300 at the intra / inter prediction stage 402 .
[0052] When the video stream 300 is presented for encoding after pre-processing, each adjacent frame 320, such as frame 330, can be processed in units of blocks. At the intra / inter prediction stage 402, each block can be encoded using intra prediction (also referred to as intra prediction) or inter prediction (also referred to as inter prediction). In any case, a prediction block can be formed. In the case of intra prediction, the prediction block can be formed from samples in the current frame that have been previously encoded and reconstructed. In the case of inter prediction, the prediction block can be formed from samples in one or more previously constructed reference frames.
[0053] Next, the prediction block can be subtracted from the current block at the intra / inter prediction stage 402 to produce a residual block (also referred to as a residual). A transform stage 404 transforms the residual into transform coefficients, for example, in the frequency domain, by using a block-based transform. A quantization stage 406 transforms the transform coefficients into discrete quantum values, referred to as quantized transform coefficients, by using a quantizer value or quantization level. For example, the transform coefficients can be divided by the quantization value and truncated.
[0054] The quantized transform coefficients are then entropy encoded by the entropy encoding stage 408. The entropy encoded coefficients, along with other information for decoding the block (which may include, for example, syntax elements such as for indicating the type of prediction used, the transform type, motion vectors, quantizer values, etc.), are then output to a compressed bitstream 420. The compressed bitstream 420 may be formatted using various techniques, such as variable length coding (VLC) or arithmetic transcoding. The compressed bitstream 420 may also be referred to as an encoded video stream or an encoded video bitstream, and these terms will be used interchangeably herein.
[0055] The reconstruction path (shown by the dashed connecting line) can be used to ensure that the encoder 400 and (hereinafter referred to as Figure 5 The decoder 500 (described below) uses the same reference frame to decode the compressed bitstream 420. The reconstruction path performs the same Figure 5 Functions similar to those performed during the decoding process described above include dequantizing the quantized transform coefficients at the dequantization stage 410 and inverse transforming the dequantized transform coefficients at the inverse transform stage 412 to produce a derived residual block (also referred to as a derived residual).
[0056] At reconstruction stage 414, the prediction block predicted at intra / inter prediction stage 402 may be added to the derived residual to create a reconstructed block. Loop filtering stage 416 may apply an in-loop filter or other filter to the reconstructed block to reduce distortion such as blocking artifacts. Examples of filters that may be applied at loop filtering stage 416 include, but are not limited to, a deblocking filter, a directional enhancement filter, and a loop restoration filter.
[0057] Other variations of the encoder 400 may be used to encode the compressed bitstream 420. In some embodiments, a non-transform based encoder may directly quantize the residual signal for certain blocks or frames without the transform stage 404. In some embodiments, the encoder may have a quantization stage 406 and a dequantization stage 410 combined in a common stage.
[0058] Figure 5 is a block diagram of a decoder 500 according to an embodiment of the present disclosure. Figure 1 The computing device 100 shown in Figure 2 In the computing and communication devices 100A, 100B, 100C shown in FIG. , the decoder 500 may be implemented as, for example, a computer program product stored in, for example, Figure 1 The computer software program may include a computer software program in the data storage unit of the memory 110 shown in FIG. The computer software program may include a computer software program that can be executed by a processor (e.g. Figure 1 The decoder 500 may be implemented as dedicated hardware included in the computing device 100, for example.
[0059] Similar to the reconstruction path of the encoder 400 described above, the decoder 500, in one example, includes the following stages for performing various functions to produce an output video stream 516 from the compressed bitstream 420: an entropy decoding stage 502, a dequantization stage 504, an inverse transform stage 506, an intra / inter prediction stage 508, a reconstruction stage 510, a loop filtering stage 512, and a post-filtering stage 514. Other structural variations of the decoder 500 may be used to decode the compressed bitstream 420.
[0060] When the compressed bitstream 420 is presented for decoding, the data elements within the compressed bitstream 420 may be decoded by an entropy decoding stage 502 to produce a set of quantized transform coefficients. A dequantization stage 504 dequantizes the quantized transform coefficients (e.g., by multiplying the quantized transform coefficients by a quantizer value), and an inverse transform stage 506 inversely transforms the dequantized transform coefficients to produce a derived residual that may be the same as the derived residual created by the inverse transform stage 412 in the encoder 400. Using the header information decoded from the compressed bitstream 420, the decoder 500 may use an intra / inter prediction stage 508 to create the same prediction block as created in the encoder 400 (e.g., at the intra / inter prediction stage 402).
[0061] At reconstruction stage 510, the prediction block can be added to the derived residual to create a reconstructed block. A loop filter stage 512 can be applied to the reconstructed block to reduce block artifacts. Examples of filters that can be applied at loop filter stage 512 include, but are not limited to, deblocking filters, directional enhancement filters, and loop recovery filters. Other filtering can be applied to the reconstructed block. In this example, a post-filter stage 514 is applied to the reconstructed block to reduce block distortion, and the result is output as an output video stream 516. The output video stream 516 may also be referred to as a decoded video stream, and these terms will be used interchangeably herein.
[0062] Other variations of the decoder 500 may be used to decode the compressed bitstream 420. In some implementations, the decoder 500 may generate the output video stream 516 without the post-filtering stage 514 or may otherwise omit the post-filtering stage 514.
[0063] As described above, the alpha channel describes transparency information. As a result, the data for the alpha channel has different characteristics than color channels, such as the typical luma or chroma channels. For example, the alpha channel typically contains sharp edges between fully opaque areas (e.g., pixels with a value of 255 in an 8-bit representation) and fully transparent areas (e.g., pixels with a value of 0). Therefore, lossy compression of images using an alpha channel can benefit from using different tools for the alpha channel than those for color. Figure 4 and Figure 5 In some cases, the alpha channel may be more efficiently compressed using run-length encoding (RLE) or other techniques than the inter- or intra-prediction tools described above. Even where inter- or intra-prediction tools are used, the characteristics of the alpha channel may be more highly compressed through relatively large quantization values (as opposed to quantization values used for the color channels) or through additional subsampling in which the number of pixels used to represent the underlying transparency data is reduced. Another technique, used alone or in conjunction with the compression techniques previously described for the alpha channel, reduces the number of available values for inclusion in the encoded alpha channel to a smaller subset of values that are optimally selected by an encoder (such as encoder 400).
[0064] At least for the reasons described above, lossy compression of the alpha channel typically results in very noticeable compression artifacts, such as noise in flat areas that may be referred to as ringing or mosquito noise. To mitigate artifacts in the color channels, a deblocking filter may be applied after the reconstructed channels, such as at post-filtering stage 514. Although deblocking filters may be useful for block edge artifacts even in the alpha channel, they may not be useful for mitigating ringing or mosquito noise in the alpha channel. Dithering is another technique that can be used to reduce artifacts in the reconstructed alpha channel when a reduced set of values (e.g., six values) is used for encoding. That is, after reconstructing the alpha channel, dithering may be applied to values that are neither minimum values (e.g., 0) nor maximum values (e.g., values associated with 8-bit, 12-bit, etc. representations). Dithering may use a random or fixed pattern to perturb the initial values, thereby producing a smooth gradient in the alpha plane. The smooth gradient is more visually pleasing than the original, highly compressed alpha plane.
[0065] While dithering can be a useful technique for reducing banding, it is less successful for ringing or mosquito artifacts. A post-processing filter specific to the alpha channel is required. Figure 6 We begin by describing a bilateral filter suitable for post-processing the alpha channel.
[0066] Figure 6 6 is a flow chart of a technique or method 600 for transcoding using alpha channel post-processing according to an embodiment of the present disclosure. The method 600 may implement image transcoding, such as decoding. The method 600 may be implemented, for example, by, for example Figure 2 The software program may include machine-readable instructions that may be stored in, for example, a computer program that is executed by one of the computing and communication devices 100A, 100B, 100C. Figure 1 The memory of the memory 110, and when by, for example Figure 1 When executed by the processor 120 of the processor 120, the computing and communication device can perform the method 600. In an example, the media data is a decoder (such as Figure 4 The reconstruction loop of the encoder 400 or Figure 5 Method 600 may be implemented at least in part in post-filter stage 514. Method 600 may be implemented using dedicated hardware or firmware. Multiple processors, memories, or both may be used.
[0067] At 602, at least a portion of an image decode can be determined or identified from an encoded bitstream. Figure 6 , but the determination may include obtaining (such as via Figure 2The data is received via a wired or wireless electronic communication medium such as the network 220 shown, or from an electronic data storage medium such as Figure 1 The portion may include the current block or other image portion, such as the memory 110 shown in FIG. Figure 3 The portion may correspond to a corresponding block within one or more color channels of the encoded image including corresponding color plane data, an alpha channel including alpha plane data, or both.
[0068] At 604, color channel values for the encoded image are decoded from a plurality of color channels of the bitstream. Each color channel used to represent an image portion (e.g., a block) may be decoded separately according to a decoding process corresponding to an encoding process used to encode the image portion within the color channel. For example, the color channel values for a channel may be decoded by entropy decoding color channel data for the block (e.g., compressed residual data), dequantizing the entropy decoded values, inversely transforming the dequantized values to obtain a residual, generating an inter-frame or intra-frame prediction block for encoding the block, and reconstructing the color channel values for the block by combining the residual with the prediction block, for example, with respect to Figure 5 In this example, the color channels are lossy encoded, but the teachings herein are also applicable to the case where the color channels are losslessly encoded.
[0069] In some embodiments, the color channel values are represented with reference to the first color space. As a result, a plurality of color channels of the bitstream may correspond to the first color space. For example, decoding the color channel values may include: decoding the color channel values represented in the color model based on the brightness component (Y) from the first color channel and the two chromaticity components (U and V or Cb and Cr) from the corresponding second and third chromaticity components. Therefore, the decoded color channel values may include the brightness channel value, the first chromaticity channel value and the second chromaticity channel value. Although the YUV or YCbCr color model or color space may be used as the first color space (e.g., for compressed color space or compressed color space), other color spaces may be used as the first color space.
[0070] At 606, alpha channel values of the encoded image are decoded from the alpha channel of the bitstream. Similar to the color channels, data representing the alpha channel of an image portion (e.g., a block) can be separately decoded according to a decoding process corresponding to the encoding process used to encode the image portion in the alpha channel. For example, the alpha channel value can be decoded by entropy decoding the alpha channel data of the block (e.g., compressed residual data), dequantizing the entropy decoded values, inversely transforming the dequantized values to obtain a residual, generating an inter-frame or intra-frame prediction block for encoding the block, and reconstructing the alpha channel value of the block by combining the residual with the prediction block, such as with respect to Figure 5 As previously mentioned, additional or other techniques may be used to compress the alpha channel, such as reducing the number of alpha values that are encoded and subsequently decoded.
[0071] like Figure 6 As shown by the dashed lines in , determining the image portion at 602, decoding the color channel values at 604, and decoding the alpha channel values at 608 may be repeated for each encoded image portion within each channel. Although shown as a sequence of steps, for example, parallel processing may be used to perform decoding of data for two or more channels simultaneously, or all encoded data for a corresponding channel may be decoded at 604 or 606 before proceeding to data for another channel.
[0072] After decoding the alpha channel value at 606, method 600 includes determining a bilateral filter based on a compression level for encoding the alpha channel at 608. For example, the compression level of the alpha channel can be identified by the value of one or more encoding parameters within the bitstream or determined from the bitstream, the one or more encoding parameters being related to the compression (e.g., relative quality) of the alpha channel by the encoder. The determination of the bilateral filter can be performed using a post-filtering stage such as post-filtering stage 514 of decoder 500.
[0073] In some embodiments, the compression level can be determined from the number of alpha values used to encode the alpha channel. For example, and as described above, encoding the alpha channel can include using a reduced (i.e., appropriate) subset of available alpha channel values. An encoder such as encoder 400 can optimally select the values of the appropriate subset by forming different combinations of the values and selecting the appropriate subset as the combination that minimizes the error generated by mapping each alpha value of the original image to the closest value within the combination.
[0074] The size of the appropriate subset can be a fixed value at the encoder and therefore at the decoder. However, in the case where the size of the appropriate subset of available values for the alpha channel can vary, the compression level can be indicated by the number of alpha values, so that a larger number of values indicates a higher encoding quality than a smaller number of values. Therefore, an appropriate subset of 6 values in an 8-bit system (i.e., 256 values) represents a lower quality coded alpha channel than a suitable subset of 10 values in an 8-bit system. In addition, an appropriate subset of 6 values in an 8-bit system represents a higher quality coded alpha channel than a suitable subset of 6 values in a 10-bit system.
[0075] In some embodiments, the compression level may be determined from a quantizer or quantization value of an alpha channel (e.g., decoded from a bitstream). That is, the quantization value of the alpha channel indicates the compression level. The quantization value is used in an encoder (such as in Figure 4 The alpha channel value is quantized to that value in the quantization level 406 of quantization level 406, regardless of how many alpha values are used to represent the original image data. A larger quantization value represents a lower quality of the encoded alpha channel than the quality produced by a smaller quantization value.
[0076] The bilateral filter determined at 608 may be one of a plurality of candidate bilateral filters based on a compression level. Each candidate filter may be associated with a different compression level. For example, where the quantization value of the alpha channel indicates the compression level, a first candidate bilateral filter is associated with a first quantization value of the alpha channel, a second candidate bilateral filter is associated with a second quantization value of the alpha channel, the first quantization value is different from the second quantization value, and the first candidate bilateral filter is different from the second candidate bilateral filter.
[0077] Typically, a higher quality of the coded alpha channel is associated with a bilateral filter having a weaker strength than a lower quality of the coded alpha channel. In other words, the lower the quality of the coded alpha channel, the stronger (e.g., larger) the filtering performed by the bilateral filter. The higher the quality of the coded alpha channel, the weaker (e.g., smaller) the filtering performed by the bilateral filter. Therefore, in the above example, when the first quantization value is greater than the second quantization value, the first candidate bilateral filter has a higher strength than the second candidate bilateral filter. On the contrary, when the first quantization value is less than the second quantization value, the first candidate bilateral filter has a lower strength than the second candidate bilateral filter.
[0078] The parameters of the bilateral filter determine its intensity. Therefore, using the compression level to determine that the bilateral filter at 608 places may include determining or identifying at least one parameter of the bilateral filter by using the compression level. The parameters of the bilateral filter may be determined from the bit stream, inferred from the coded data, or a combination thereof. The bilateral filter may include a spatial kernel and a kernel in scope, and these may be considered to be the parameters of the bilateral filter. At least one of the spatial kernel or the kernel in scope may be based on the compression level for encoding the alpha channel.
[0079] In some embodiments, the spatial kernel of the bilateral filter includes a two-dimensional (2D) kernel of at least two candidate kernel sizes. The candidate kernel size of the at least two candidate kernel sizes increases with the compression level. For example, a smaller candidate kernel size is associated with a higher quality for encoding the alpha channel as indicated by a first value of the compression level, while a larger candidate kernel size is associated with a lower compression quality for encoding the alpha channel as indicated by a second value of the compression level. The first value for the compression level and the second value for the compression level can be different quantized values of the alpha channel, or can be different values of another encoding parameter for indicating the compression level.
[0080] You can refer to Fig. 7A and Figure 7B To illustrate the spatial kernel. Fig. 7A is the first example of a spatial kernel for a bilateral filter for alpha channel post-processing, while Figure 7B is a second example of a spatial kernel for a bilateral filter for alpha channel post-processing. In these examples, the spatial kernel comprises the following equation (1).
[0081] exp(-(i 2 +j 2 ) / (2*radius)) (1)
[0082] In equation (1), i is the horizontal distance from the center of the kernel, j is the vertical distance from the center of the kernel, and the radius is an integer that determines the size of the kernel. In some embodiments, the radius is an integer based on the compression level. For example, the radius can be 1 or 2, so that the kernel size of the spatial kernel is 3x3 or 5x5. Fig. 7A The radius of the kernel is 1, resulting in a kernel size of 3x3. The kernel center includes the multiplier 1. Figure 7B In the spatial kernel of , the radius is 2, resulting in a kernel size of 5x5. Again, the kernel center includes the multiplier 1.
[0083] Fig. 7A A smaller candidate kernel size of is associated with a lower compression level (i.e., higher quality) for encoding the alpha channel, while Figure 7BA larger candidate kernel size is associated with a higher compression level (i.e., lower quality) for encoding the alpha channel. Assuming, for example, that the range kernel does not change with the encoding parameters of the alpha channel, i.e., the range kernel does not depend on the compression level, two candidate bilateral filters will be available, one of which includes Fig. 7A The range kernel and the spatial kernel of the other include Figure 7B Each candidate bilateral filter may be associated with a range of quantization values or other encoding parameters, such that an appropriate candidate bilateral filter is selected based on the quantization value or other encoding parameter value used to encode the alpha channel.
[0084] In some embodiments, the range kernel of the bilateral filter includes at least two candidate one-dimensional (1D) kernels. The smoothness (e.g., strength) level of the at least two candidate 1D kernels increases with the increase of the compression level. The range kernel can refer to Figures 8A to 8C To explain. Fig. 8A is a first example of a range kernel for a bilateral filter for alpha channel post-processing, Figure 8B is a second example of a range kernel for a bilateral filter for alpha channel post-processing, and Figure 8C is a third example of a range kernel for a bilateral filter for alpha channel post-processing. In these examples, the range kernel comprises the following equation (2).
[0085] exp(-k 2 / (2*sigma 2 )) (2)
[0086] In equation (2), k varies between 0 and the maximum absolute difference between two pixel values. In the example where the pixel values are between 0 and 255, k ranges from 0 to 255. In addition, in equation (2), sigma is a smoothing parameter that is a positive integer, such that different values of the smoothing parameter produce candidate one-dimensional (1D) kernels with different smoothing levels. In some embodiments, sigma includes one of at least two values such that the kernel within the range has one of at least two different smoothing levels.
[0087] exist Fig. 8A In the range kernel, sigma is 5. Figure 8B In the range kernel, sigma is 10. Finally, in Figure 8C In the range kernel, sigma is 20. Figures 8A-8C The range kernel only shows the first 9 values of each candidate 1D kernel. In this example, there are 256 values (corresponding to the 8-bit representation of the alpha channel value). Figure 8B For higher values of sigma, Fig. 8AThe smallest value for sigma in is associated with a lower compression level (i.e., higher quality) for encoding the alpha channel. Similarly, Figure 8C Compared with the highest value of sigma in Figure 8B Higher values for sigma in are associated with lower compression levels (i.e., higher quality) for encoding the alpha channel. More generally, the higher the value of sigma, the higher the filtering strength of the kernel. Although three candidate in-range kernels are shown, fewer or more candidate in-range kernels may be used with different values for sigma.
[0088] Assuming, for example, that the range kernel does not change with the encoding parameters of the alpha channel, i.e., that the range kernel does not depend on the compression level, three candidate bilateral filters will be available in this example, one of which includes Fig. 8A The range kernel and the spatial kernel of Figure 8B The range kernel and the spatial kernel of Figure 8C Each candidate bilateral filter may be associated with a range of quantization values or other encoding parameters, such that an appropriate candidate bilateral filter is selected based on the quantization value or other encoding parameter value used to encode the alpha channel.
[0089] In some embodiments of the bilateral filter described herein, the parameters of each of the in-range kernel and the spatial kernel are based on the compression level of the coded alpha channel. In an example, the quantization level of the alpha channel sent in the bitstream is used to select the value of the radius for the spatial kernel and the value of the sigma for the in-range kernel. That is, the candidate bilateral filter can be formed by a combination of the spatial kernel of different kernel sizes and the range kernel of different smoothing intensities. In the example where the value of the radius of the spatial kernel can be 1 or 2 and the value of the sigma of the in-range kernel can be 5, 10 or 20, there can be up to 6 candidate bilateral filters, each filter being associated with the corresponding compression level of the coded alpha channel.
[0090] In some embodiments, it is determined at 608 that the bilateral filter uses a fixed decision tree in the decoder and a compression level of the coded alpha channel as indicated by one or more coding parameters of the alpha channel. In an example, the alpha quality factor "q" can be read or otherwise determined from a bitstream having a value in the range from 0 (lowest quality) to 100 (highest quality). The alpha quality factor "q" can be, for example, based on the quantization value of the alpha channel, the number of different alpha values encoded into the alpha channel, or a certain combination of these coding parameters or other coding parameters. The decision tree can use "q" to implement the selection process. In a non-limiting example, if q is below 50, the bilateral filter uses a spatial kernel with a radius equal to 2 and a range kernel with sigma equal to 20. If q is between 50 and 70, the bilateral filter uses a spatial kernel with a radius equal to 1 and a range kernel with sigma equal to 20. If q is between 70 and 80, the bilateral filter uses a spatial kernel with a radius equal to 1 and a range kernel with sigma equal to 10. If q is between 80 and 100, the bilateral filter uses a spatial kernel with radius equal to 1 and a range kernel with sigma equal to 5.
[0091] Once the bilateral filter is determined at 608, the method 600 includes post-processing the alpha channel value using the bilateral filter at 610. The post-processing can be performed using a post-filtering stage such as the post-filtering stage 514 of the decoder 500. Post-processing the alpha channel value can include filtering the alpha channel value using the bilateral filter to obtain a filtered alpha channel value. For simplicity, as just one example of applying the bilateral filter, assume that the spatial kernel defined by equation (1) has a radius equal to 1 and the kernel has a sigma equal to 5 within the range defined by equation (2). For a pixel at coordinate (1, 1) whose alpha value is 100, the filter loops through all pixels within the range of the spatial kernel around the center of this kernel, so the distance in the horizontal or vertical direction is 1, which means pixels (0,0), (0,1), (0,2), (1,0), (1,1), (1,2), (2,0), (2,1), (2,2). For each pixel, a weight is calculated, which is the weight of the spatial kernel multiplied by the weight of the kernel in the range. For example, for the pixel at coordinate (0,0), the spatial weight is 0.3678794412. Assuming the alpha value of pixel (0,0) is 102, the difference with the current pixel is 2, so the range weight is 0.9231163464. The final weight is 0.3678794412*0.9231163464. The new (i.e. filtered) alpha value of the filtered pixel is the weighted sum of its surrounding pixels divided by the sum of the weights. When pixels adjacent to the center of the kernel are not available, a value of 0 can be used in the calculation, or padding using existing adjacent pixels can be used. Other pixels are filtered similarly.
[0092] After post-processing the alpha channel values to obtain filtered alpha channel values at 610, at least a portion of a reconstructed image corresponding to the encoded image is generated using the filtered alpha channel values and the color channel values at 612. Generating at least a portion of the reconstructed image at 612 may include aligning an alpha layer including the filtered alpha channel values with a plurality of color layers, each color layer including decoded color channel values for a corresponding color. The reconstructed image may be decoded at 614, such as via Figure 5 , such as for presentation or display to a user.
[0093] In some embodiments, determining the bilateral filter at 608, post-processing the alpha channel values at 610, and generating at least a portion (e.g., a block) of the reconstructed image at 612 may be repeated for multiple portions of the image, respectively. Because the values of the parameters used to encode the alpha channel are typically shared across the entire image, determining the bilateral filter at 608, post-processing the alpha channel values at 610, and generating at least a portion of the reconstructed image at 612 may be performed once for the entire image after all alpha channel values are decoded at 606.
[0094] Decoding the color channel values at 604 may optionally include color space conversion of the decoded color channel values from a first color space (e.g., from a YUV color space) to a second color space. The second color space may be an RGB color space, which includes a red channel (R), a green channel (G), and a blue channel (B). Thus, the decoded color channel values may include red channel values, green channel values, and blue channel values. Other color spaces may also be used appropriately, which may be visually perceptible color spaces or may be further converted into visually perceptible color spaces for display, such as by using a user interface 130. The color channel values may be converted to an intermediate color space before being converted to the second color space. The second color space may be an input color space of the original image data.
[0095] In some embodiments, the input image can be a premultiplied image in which an alpha channel (i.e., transparency) is applied to the input color space, such as red, green, and blue channels, before conversion to a first color space (e.g., YUV) and encoding in the first color space. Alternatively, the input image includes unmodified pixel values in the input color space that are converted to the encoded image in the first color space.
[0096] Despite Figure 6 , but filters other than bilateral filters may be used to filter the color channel values decoded at 604. In an example, filtering the color channel values is performed using a post-processing filter before generating a reconstructed image at 612. The filtering may be performed at a post-filtering stage, such as post-filtering stage 514 of decoder 500. In some embodiments, the post-processing filter may be a deblocking filter.
[0097] Typically, a bilateral filter can be used as a smoothing filter for edge preservation and noise reduction of an image. However, in image compression, it is not desirable to use it in post-processing because it will smooth the details of the color channel. Applying a bilateral filter in post-processing of the decompressed alpha value effectively reduces the noise added by the lossy compression process without significant loss of detail. The effect of the filter on visual quality is so great that the filter allows the use of more aggressive compression of the alpha channel than would be acceptable in the absence of the filter. The strength of the filter can be adjusted based on explicit parameters (i.e., parameters sent in the bitstream), implicit parameters (i.e., those derived from the decoded image), or both, so that differences in coding quality can be resolved.
[0098] Fig.9A is the reconstructed image without the alpha channel post-processing described in this article. Fig. 9B yes Fig.9A The reconstructed image includes the alpha channel post-processing described in this paper. Fig.9A As can be seen in Figure 1, ringing or mosquito artifacts are visible in flat areas of the image, such as to the left of the letter "g" and above and below the subsequent letters. These artifacts are caused by the compression of the alpha channel. Fig. 9B As can be seen in FIG. 5 , the artifacts are substantially reduced by applying the alpha channel post-processing described herein.
[0099] To simplify the explanation, Figure 6 The method 600 is depicted and described as a series of steps or operations. However, the steps or operations according to the present disclosure may occur in various orders and / or simultaneously. In addition, other steps or operations not proposed and described herein may be used. In addition, all the steps or operations described may not be required to implement the method according to the disclosed subject matter.
[0100] The word "example" is used herein to mean to be used as an example, instance or illustration. Any aspect or design described as "example" or the like in this article is not necessarily interpreted as being preferred or advantageous relative to other aspects or designs. Instead, the use of the word "example" is intended to present the concept in a specific way. As used in this application, the term "or" is intended to mean an inclusive "or" rather than an exclusive "or". That is, unless otherwise specified or clearly indicated by the context, the statement "X includes A or B" is intended to mean any one of its natural inclusive arrangements. That is, if X includes A, X includes B, or X includes both A and B, then "X includes A or B" is satisfied under any of the above examples. In addition, unless otherwise specified or indicated by the context as being directed to a singular form, the articles "one" and "an" used in this application and the appended claims should generally be interpreted as meaning "one or more". In addition, the use of the term "embodiment" or the term "one embodiment" or the term "implementation" or the term "one implementation" throughout this disclosure is not intended to mean the same implementation unless so described. The terms "determine" and "identify" or any variation thereof include any Figure 1 or Figure 2 , to select, ascertain, calculate, search, receive, determine, establish, obtain, or otherwise identify or determine by one or more of the devices shown in .
[0101] In addition, for simplicity of explanation, although the drawings and descriptions herein may include sequences or orders of operations or stages, the elements of the methods disclosed herein may occur in various orders and / or occur simultaneously. In addition, the elements of the methods disclosed herein may occur with other elements that are not clearly presented and described herein. In addition, according to the disclosed subject matter, one or more elements of the methods described herein may be omitted from the implementation of the methods.
[0102] The implementation of the sending computing and communication device 100A or the receiving computing and communication device 100B (as well as the algorithms, methods, instructions, etc. stored thereon and / or executed thereby) can be implemented in hardware, software, or any combination thereof. The hardware may include, for example, a computer, an IP core, an ASIC, a programmable logic array, an optical processor, a programmable logic controller, a microcode, a microcontroller, a server, a microprocessor, a digital signal processor, or any other suitable circuit. In the claims, the term "processor" should be understood to include any of the above-mentioned hardware alone or in combination. The terms "signal" and "data" are used interchangeably. In addition, the various parts of the sending computing and communication device 100A or the receiving computing and communication device 100B do not necessarily have to be implemented in the same manner.
[0103] Furthermore, in one embodiment, for example, a sending computing and communication device 100A or a receiving computing and communication device 100B may be implemented using a computer program that, when executed, performs any of the various methods, algorithms, and / or instructions described herein. Additionally or alternatively, for example, a special-purpose computer / processor may be utilized that may include specialized hardware for performing any of the methods, algorithms, or instructions described herein.
[0104] Sending calculation and communication device 100A and receiving calculation and communication device 100B can be implemented on the computer in real-time video system, for example. Alternatively, sending calculation and communication device 100A can be implemented on the server, and receiving calculation and communication device 100B can be implemented on the device (for example handheld communication device) separated from the server. In this case, sending calculation and communication device 100A can encode the content into a coded video signal by using encoder 400, and the coded video signal is sent to the communication device. Then, the communication device can decode the coded video signal by using decoder 500. Alternatively, the communication device can decode the content (such as the content not sent by sending calculation and communication device 100A) stored locally on the communication device. Other suitable sending calculation and communication device 100A and receiving calculation and communication device 100B embodiments are available. For example, receiving calculation and communication device 100B can be a usually stationary personal computer, rather than a portable communication device, and / or the device including encoder 400 can also include decoder 500.
[0105] In addition, some or all of the embodiments of the present disclosure may take the form of a computer program product that can be accessed, for example, from a computer-usable medium or a computer-readable medium. A computer-usable medium or a computer-readable medium may be, for example, any device that can tangibly contain, store, communicate, or transmit a program for use by any processor or in conjunction with any processor. The medium may be, for example, an electronic, magnetic, optical, electromagnetic, or semiconductor device. Other suitable media are also available. The above embodiments have been described to facilitate understanding of the present application and to not limit the present application. On the contrary, the present application is intended to cover various modifications and equivalent arrangements included within the scope of the appended claims, which scope should be given the broadest interpretation as permitted by law, so as to include all such modifications and equivalent arrangements.
Claims
1. A method for decoding by post-processing using an alpha channel, comprising: decoding color channel values for encoding an image from a plurality of color channels of a bitstream; decoding an alpha channel value for the encoded picture from an alpha channel of the bitstream; determining a bilateral filter based on a compression level used to encode the alpha channel; post-processing the alpha channel value by filtering the alpha channel value using the bilateral filter to obtain a filtered alpha channel value; filtering at least some of the decoded color channel values by using a color channel filter other than the bilateral filter; as well as At least a portion of a reconstructed image corresponding to the encoded image is generated by using the filtered alpha channel values and the filtered color channel values.
2. The method according to claim 1, wherein: The quantized value of the alpha channel is indicative of the compression level.
3. The method according to claim 2, wherein: The bilateral filter includes one of a plurality of candidate bilateral filters; A first candidate bilateral filter is associated with a first quantized value of the alpha channel; A second candidate bilateral filter is associated with a second quantized value of the alpha channel; The first quantized value is different from the second quantized value; as well as The first candidate bilateral filter is different from the second candidate bilateral filter.
4. The method according to claim 1, wherein: The bilateral filter includes a spatial kernel and a within-range kernel, and at least one of the spatial kernel and the within-range kernel is based on the compression level used to encode the alpha channel.
5. The method according to claim 4, wherein: The spatial kernel of the bilateral filter comprises a two-dimensional kernel having one of at least two candidate kernel sizes; and A candidate kernel size of the at least two candidate kernel sizes increases with the compression level.
6. The method according to claim 4, wherein: The spatial kernel of the bilateral filter comprises a two-dimensional kernel having one of two candidate kernel sizes; A smaller candidate kernel size is associated with a higher quality for encoding the alpha channel as indicated by the first value of the compression level; and A larger candidate kernel size is associated with a lower quality for encoding the alpha channel as indicated by the second value of the compression level.
7. The method according to claim 4, wherein: The spatial kernel includes exp(-(i 2 +j 2 ) / (2*radius)); i is the horizontal distance from the center of the kernel; j is the vertical distance from the center of the kernel; and The radius is an integer based on the compression level.
8. The method according to claim 7, wherein: The radius is 1 or 2, so that the kernel size of the spatial kernel is 3x3 or 5x5.
9. The method according to any one of claims 4 to 8, wherein: The in-range kernel of the bilateral filter comprises one of at least two candidate one-dimensional (1D) kernels; and The smoothness levels of the at least two candidate 1D kernels increase as the compression level increases.
10. The method according to any one of claims 4 to 8, wherein: The range of kernels includes exp(-k 2 / (2*sigma 2 )); k is the absolute difference between two pixel values; as well as Sigma is a smoothing parameter that is a positive integer such that different values for the smoothing parameter produce candidate one-dimensional (1D) kernels with different levels of smoothness.
11. The method according to claim 10, wherein: sigma comprises one of at least two values such that the kernel has one of at least two different levels of smoothness within the range.
12. The method according to claim 10, wherein: Sigma is 5, 10, or 20.
13. The method according to claim 1, wherein: The compression level is determined based on a number of alpha values used to encode the alpha channel of the bitstream.
14. An apparatus comprising a decoder configured to perform the method according to any one of claims 1 to 13.
15. A computer-readable storage medium comprising instructions which, when executed by a processor, cause the processor to perform the method according to any one of claims 1 to 13.
