METHOD OF LAYER BLENDING AND RECONSTRUCTION BASED ON THE ALPHA CHANNEL
20220159226 · 2022-05-19
Inventors
Cpc classification
H04N9/646
ELECTRICITY
H04N19/85
ELECTRICITY
H04N19/44
ELECTRICITY
International classification
H04N19/44
ELECTRICITY
Abstract
A device and method for blending image data and the alpha channel and reconstructing to obtain the image again after transmission. An encoder blends the alpha channel and the red-green-blue (RGB) image data through a layer blending method that is supported by the general application processor (AP). Transporter image data, such as a checkerboard pattern, is blended with 1-alpha channel data to obtain a transporter. The blended image data (RGB+alpha) is mixed with the transporter to obtain mixed image data. The mixed image data is then transmitted through the existing transmission interface. After receiving the mixed image data, reconstruction processing is performed by a decoder to obtain the original RGB image data and the alpha channel again.
Claims
1. A method of layer blending and reconstruction based on an alpha channel comprising: layer blending the alpha channel and red-green-blue (RGB) image data to obtain blended image data; blending transporter image data with 1-alpha channel data to obtain a transporter; and blending the transporter with the blended image data to obtain mixed image data.
2. The method of layer blending and reconstruction based on an alpha channel of claim 1, wherein the RGB image data comprises 30-bit RGB image data.
3. The method of layer blending and reconstruction based on an alpha channel of claim 1, wherein the alpha channel comprises an 8-bit alpha channel.
4. The method of layer blending and reconstruction based on an alpha channel of claim 1, wherein the transporter image data comprises a checkerboard pattern.
5. The method of layer blending and reconstruction based on an alpha channel of claim 1, wherein the transporter image data comprises a colored checkerboard pattern.
6. A method of layer blending and reconstruction based on an alpha channel comprising: receiving mixed image data; removing transporter image data from the mixed image data to obtain blended image data; and reconstructing red-green-blue (RGB) image data and the alpha channel from the blended image data.
7. The method of layer blending and reconstruction based on an alpha channel of claim 6, wherein the RGB image data comprises 30-bit RGB image data.
8. The method of layer blending and reconstruction based on an alpha channel of claim 6, wherein the alpha channel comprises an 8-bit alpha channel.
9. The method of layer blending and reconstruction based on an alpha channel of claim 6, wherein the transporter image data comprises a checkerboard pattern.
10. The method of layer blending and reconstruction based on an alpha channel of claim 6, wherein the transporter image data comprises a colored checkerboard pattern.
11. The method of layer blending and reconstruction based on an alpha channel of claim 6, wherein, for decoding processing, C.sub.r1=RGB*alpha, C.sub.r2=RGB*alpha+255*(1-alpha), and alpha=1+(C.sub.r1−C.sub.r2)/255; wherein C.sub.r1 is obtained from C.sub.r2 in left, right, top, and bottom positions; and wherein different costs are calculated to determine interpolation direction.
12. A method of layer blending and reconstruction based on an alpha channel comprising: receiving mixed image data; determining if a mode flag is set, the mode flag indicating ARGB mode when set and RGB mode when not set; performing a cost calculation when in ARGB mode; performing a C.sub.r1/C.sub.r2 estimation; performing an alpha calculation; performing alpha smoothing; and performing ARGB reconstruction based on the C.sub.r1/C.sub.r2 estimation, the alpha smoothing, and transporter image data.
13. An electronic device for layer blending and reconstruction based on an alpha channel comprising: an encoder for layer blending the alpha channel and red-green-blue (RGB) image data to obtain blended image data; blending transporter image data with 1-alpha channel data to obtain a transporter; and blending the transporter with the blended image data to obtain mixed image data.
14. The electronic device for layer blending and reconstruction based on an alpha channel of claim 13, wherein the RGB image data comprises 30-bit RGB image data.
15. The electronic device for layer blending and reconstruction based on an alpha channel of claim 13, wherein the alpha channel comprises an 8-bit alpha channel.
16. The electronic device for layer blending and reconstruction based on an alpha channel of claim 13, wherein the transporter image data comprises a checkerboard pattern.
17. The electronic device for layer blending and reconstruction based on an alpha channel of claim 13, wherein the transporter image data comprises a colored checkerboard pattern.
18. An electronic device for layer blending and reconstruction based on an alpha channel comprising: a decoder for receiving mixed image data; removing transporter image data from the mixed image data to obtain blended image data; and reconstructing red-green-blue (RGB) image data and the alpha channel from the blended image data.
19. The electronic device for layer blending and reconstruction based on an alpha channel of claim 18, wherein the RGB image data comprises 30-bit RGB image data.
20. The electronic device for layer blending and reconstruction based on an alpha channel of claim 18, wherein the alpha channel comprises an 8-bit alpha channel.
21. The electronic device for layer blending and reconstruction based on an alpha channel of claim 18, wherein the transporter image data comprises a checkerboard pattern.
22. The electronic device for layer blending and reconstruction based on an alpha channel of claim 18, wherein the transporter image data comprises a colored checkerboard pattern.
23. The electronic device for layer blending and reconstruction based on an alpha channel of claim 18, wherein, for decoder processing, C.sub.r1=RGB*alpha, C.sub.r2=RGB*alpha+255*(1-alpha), and alpha=1+(C.sub.r1−C.sub.r2)/255; wherein C.sub.r1 is obtained from C.sub.r2 in left, right, top, and bottom positions; and wherein different costs are calculated to determine interpolation direction.
24. An electronic device for layer blending and reconstruction based on an alpha channel comprising: an encoder for layer blending the alpha channel and red-green-blue (RGB) image data to obtain blended image data; blending transporter image data with 1-alpha channel data to obtain a transporter; blending the transporter with the blended image data to obtain mixed image data; and transmitting the mixed image data to a decoder; and the decoder for receiving the mixed image data from the encoder; removing the transporter from the mixed image data to obtain blended image data; and reconstructing the red-green-blue (RGB) image data and the alpha channel from the blended image data.
25. The electronic device for layer blending and reconstruction based on an alpha channel of claim 24, wherein the RGB image data comprises 30-bit RGB image data.
26. The electronic device for layer blending and reconstruction based on an alpha channel of claim 24, wherein the alpha channel comprises an 8-bit alpha channel.
27. The electronic device for layer blending and reconstruction based on an alpha channel of claim 24, wherein the transporter image data comprises a checkerboard pattern.
28. The electronic device for layer blending and reconstruction based on an alpha channel of claim 24, wherein the transporter image data comprises a colored checkerboard pattern.
29. The electronic device for layer blending and reconstruction based on an alpha channel of claim 24, wherein, for decoder processing, C.sub.r1=RGB*alpha, C.sub.r2=RGB*alpha+255*(1-alpha), and alpha=1+(C.sub.r1−C.sub.r2)/255; wherein C.sub.r1 is obtained from C.sub.r2 in left, right, top, and bottom positions; and wherein different costs are calculated to determine interpolation direction.
Description
BRIEF DESCRIPTION OF THE DRAWINGS
[0034]
[0035]
[0036]
[0037]
[0038]
[0039]
[0040]
[0041]
[0042]
[0043]
[0044]
[0045]
[0046]
DETAILED DESCRIPTION OF THE INVENTION
[0047] To facilitate understanding of the object, characteristics and effects of this present disclosure, embodiments together with the attached drawings for the detailed description of the present disclosure are provided.
[0048] Following are details of embodiments of the present invention.
[0049] Refer to
[0050] In the method 100, initially, RGB image data and alpha channel data are provided to an encoder 110. The encoder 110 encodes the RGB image data and the alpha channel data to obtain blended RGB data. The blended RGB data is transmitted 120 to a decoder 130. The decoder 130 decodes the blended RGB data to obtain the original RGB image data and the original alpha channel again.
[0051] Refer to
[0052] In the layer blending encoding process method 200 illustrated in
[0053] The 30/24-bit mixed data 250 is now encoded and ready for transmission.
[0054] In embodiments of the present invention the RGB image data 210 comprises a different number of bits other than 30 bits or 24 bits as used in this embodiment.
[0055] In embodiments of the present invention the alpha channel data 220 comprises a different number of bits other than 8 bits as used in this embodiment.
[0056] In embodiments of the present invention the transporter image data 230 comprises a different number of bits other than 30 bits or 24 bits as used in this embodiment.
[0057] In embodiments of the present invention the 1-alpha channel data 240 comprises a different number of bits other than 8 bits as used in this embodiment.
[0058] In embodiments of the present invention the mixed data 250 comprises a different number of bits other than 30 bits or 24 bits as used in this embodiment.
[0059] Refer to
[0060] The reconstruction decoding process method 300 illustrated in
[0061] During the reconstruction processing the transporter (
[0062] Refer to
[0063] In the embodiment illustrated in
[0064] In the embodiment illustrated in
[0065] Refer to
[0066] In the decoder processing, C.sub.r1=RGB*alpha and C.sub.r2=RGB*alpha+255*(1-alpha) are located in different pixel/subpixel coordinates within mixed image data. The C.sub.r1 and C.sub.r2 values at the same pixel/subpixel coordinates within the mixed image data will be first reconstructed, then the alpha can be calculated by alpha=1+(C.sub.r1−C.sub.r2)/255.
[0067] The decoder processing comprises: [0068] C.sub.r1 is obtained from C.sub.r2 in left, right, top, and bottom positions; [0069] Different costs are calculated to determine the interpolation direction; [0070] C.sub.r1 & C.sub.r2 reconstruction is performed; [0071] alpha reconstruction is performed; and [0072] RGB reconstruction is performed.
[0073] Refer to
[0074] The decoding process flow 700 illustrated in
[0075] The decoder also receives a mode flag in Step 706. In Step 710, the decoder determines if the mode flag represents that the input data is RGB image data or that the input data is mixed image data.
[0076] If the decoder determines that the mode flag indicates that the input data is RGB image data (RGB mode), the input data (RGB image data) is output as RGB image data to the image processing system in Step 711 and the image processing system utilizes the RGB image data in the standard method of processing image data.
[0077] If the decoder determines that the mode flag indicates that the input data is mixed image data (ARGB mode), then the input data continues processing as mixed image data in Step 712.
[0078] In Step 715, cost calculation processing is performed on the mixed data (ARGB) and the cost calculation results data is used along with the transporter data in performing a C.sub.r1/C.sub.r2 estimation process in Step 720.
[0079] In Step 725, the C.sub.r1/C.sub.r2 estimation results are used to perform an alpha channel calculation process. The results of the alpha channel calculation process are used to perform an alpha channel smoothing process in Step 730.
[0080] The transporter data, the C.sub.r1/C.sub.r2 estimation results, and the results of the alpha channel smoothing process are used to perform an ARGB reconstruction process in Step 740. As a result of the ARGB reconstruction process, the original RGB image data and the original alpha channel data are obtained.
[0081] Refer to
[0082] In order to determine the interpolation direction, different costs need to be calculated. The cost calculation comprises:
[0083] Input:
L.sub.Cr2,T.sub.Cr2,R.sub.Cr2,B.sub.Cr2, L.sub.Cr1, R.sub.Cr1
[0084] Candidate:
LR_value=(L.sub.Cr2+R.sub.Cr2+1)>>1
TB_value=(T.sub.Cr2+B.sub.Cr2+1)>>1
[0085] Cost:
LR_cost=abs(L.sub.Cr2−R.sub.Cr2)
TB_cost=abs(T.sub.Cr2−B.sub.Cr2)
LC_cost=abs(L.sub.Cr1−C.sub.Cr1)
RC_cost=abs(R.sub.Cr1−C.sub.Cr1)
[0086] In the above, L.sub.Cr2 is the Left .sub.Cr2, T.sub.Cr2 is the Top .sub.Cr2, R.sub.Cr2 is the Right .sub.Cr2, B.sub.Cr2 is the Bottom .sub.Cr2, L.sub.Cr1 is the Left .sub.Cr1, and R.sub.Cr1 is the Right .sub.Cr1.
[0087] In the above, LR_value is the Left Right value, and TB_value is the Top Bottom value.
[0088] In the above, abs is the absolute value, LR_cost is the Left Right cost, TB_cost is the Top Bottom cost, LC_cost is the Left Center cost, and RC_cost is the Right Center cost.
[0089] In order to perform C.sub.r1 & C.sub.r2 reconstruction, an estimation process is performed. The C.sub.r2 estimation (the same process for C.sub.r1) comprises:
TABLE-US-00001 if (LR_cost<th1 && TB_cost<th1) if (LC_cost<=th2 ∥ RC_cost<=th2) C.sub.cr2=LR_value; else C.sub.cr2=TB_value; end elseif (LR_cost<=TB_cost) C.sub.cr2=LR_value; else C.sub.cr2=TB_value; end
[0090] In order to perform alpha reconstruction, an alpha calculation process is performed. The alpha calculation (for 0/255 checkerboard) comprises:
C.sub.r1=RGB*alpha
C.sub.r2=RGB*alpha+255*(1-alpha)
alpha=1+(C.sub.r1−C.sub.r2)/255
[0091] In order to perform RGB reconstruction, an ARGB reconstruction process is performed. The ARGB reconstruction process (example for Red) comprises:
TABLE-US-00002 if (pattern==0) //( C.sub.r1 is available and real, C.sub.r1=RGB*alpha) if (alpha<=th3) out_R=0; else out_R=min(max_value, round(C.sub.r1/alpha)); end else //( C.sub.r2 is available and real, C.sub.r2=RGB*alpha+255*(1-alpha)) if (alpha_est<= th3) out_R=0; else temp=max(0, C.sub.r2_R-255*(1-alpha))) out_R=min(max_value, round(temp/alpha)); end end
In the above, max_value=255 for 8-bit data, and max_value=1023 for 10-bit data.
[0092] Refer to
[0093] In summary, the present invention provides an electronic device for layer blending and reconstruction based on an alpha channel comprising an encoder for layer blending the alpha channel and red-green-blue (RGB) image data to obtain blended image data, blending transporter image data with 1-alpha channel data to obtain a transporter, blending the transporter with the blended image data to obtain mixed image data, and transmitting the mixed image data to a decoder and the decoder for receiving the mixed image data from the encoder, removing the transporter from the mixed image data to obtain blended image data, and reconstructing the red-green-blue (RGB) image data and the alpha channel from the blended image data.
[0094] The electronic device for layer blending and reconstruction based on an alpha channel in some embodiments comprises, for decoder processing, C.sub.r1=RGB*alpha, C.sub.r2=RGB*alpha+255*(1-alpha), and alpha=1+(C.sub.r1−C.sub.r2)/255, where C.sub.r1 is obtained from C.sub.r2 in left, right, top, and bottom positions and where different costs are calculated to determine interpolation direction.
[0095] The method of layer blending and reconstruction based on an alpha channel in some embodiments comprises, layer blending the alpha channel and red-green-blue (RGB) image data to obtain blended image data, blending transporter image data with 1-alpha channel data to obtain a transporter, and blending the transporter with the blended image data to obtain mixed image data.
[0096] The method of layer blending and reconstruction based on an alpha channel of the present invention in some embodiments comprises receiving mixed image data, removing transporter image data from the mixed image data to obtain blended image data, and reconstructing red-green-blue (RGB) image data and the alpha channel from the blended image data.
[0097] The method of layer blending and reconstruction based on an alpha channel of the present invention in some embodiments comprises receiving mixed image data, determining if a mode flag is set, the mode flag indicating ARGB mode when set and RGB mode when not set, performing a cost calculation when in ARGB mode, performing a C.sub.r1/C.sub.r2 estimation, performing an alpha calculation, performing alpha smoothing, and performing ARGB reconstruction based on the C.sub.r1/C.sub.r2 estimation, the alpha smoothing, and transporter image data.
[0098] While the present disclosure has been described by means of specific embodiments, numerous modifications and variations could be made thereto by those skilled in the art without departing from the scope and spirit of the present disclosure.