# US 2017/0323617 A1 · Rgb to yuv format conversion and inverse conversion method and circuit for depth packing and depacking

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2017/0323617 A1
- Document ID: US20170323617A1
- Status: Published application
- Kind: A1
- Application number: 15/590,451
- Filed: 2017-05-09
- Published: 2017-11-09
- Earliest claimed: 2016-05-09
- Assignees: National Cheng Kung University
- Applicants: National Cheng Kung University
- Inventors: Jar-Ferr YANG
- Web page: https://patentgrep.com/patent/US20170323617A1

## CPC

- G09G 5/02: characterised by the way in which colour is displayed {(details of colour display specific for CRTs G09G1/28; specific for flat matrix panels other than liquid crystal displays G09G3/2003; specific for liquid crystal displays G09G3/3607)}
- H04N 9/646: {for image enhancement, e.g. vertical detail restoration, cross-colour elimination, contour correction, chrominance trapping filters}
- G09G 2300/0452: Details of colour pixel setup, e.g. pixel composed of a red, a blue and two green components
- G09G 2320/0666: for control of colour parameters, e.g. colour temperature
- G09G 2340/02: Handling of images in compressed format, e.g. JPEG, MPEG
- G09G 2340/06: Colour space transformation
- G09G 2350/00: Solving problems of bandwidth in display systems
- H04N 13/139: Format conversion, e.g. of frame-rate or size
- H04N 2013/0081: {Depth or disparity estimation from stereoscopic image signals}
- G09G: ARRANGEMENTS OR CIRCUITS FOR CONTROL OF INDICATING DEVICES USING STATIC MEANS TO PRESENT VARIABLE INFORMATION (arrangements for transferring data between digital computers and displays G06F3/14; static indicating arrangements comprising an association of a number of separate sources or light control cells G09F9/00; static indicating arrangements comprising integral associations of a number of light sources H01J, H01K, H10H, H05B33/12; scanning, transmission or reproduction of documents or the like, e.g. facsimile transmission, details thereof H04N1/00)
- H04N: PICTORIAL COMMUNICATION, e.g. TELEVISION

## Abstract

A conversion method includes: obtaining two R's, two G's and two B's sub-pixel values having interleaved positions from four pixels of the RGB format; obtaining four Y-luminance value, one U-chrominance value and one V-chrominance value of the YUV format according to the obtained sub-pixel values. The Y-luminance values of the first, second, third and fourth pixels in the YUV format are calculated from R's of the first pixel, G's of the second pixel, G's of the third pixel and B's sub-pixel value of the fourth pixel respectively. The U-chrominance value of the first pixel is calculated from B's of the first pixel, R's of the first pixel and the G's sub-pixel value of the third pixel. The V-chrominance value of the first pixel is calculated from the R of the fourth pixel, G of the second pixel and B of the fourth pixel.

## Claims

### Claim 1

A method applied in depacking a depth frame to convert from a YUV format to a RGB format, wherein one pixel in the YUV format includes Y luminance, U chrominance and V chrominance, and one pixel in the RGB format includes a R subpixel, a G subpixel and a B subpixel, the depth frame in YUV format include at least four adjacent pixels in one group and the Y luminance, U chrominance and V chrominance of each pixel are arranged in vertical, theses four pixels in each group includes a first pixel, a second pixel, a third pixel, and a fourth pixel, the first pixel is located adjacent to the second pixel and the third pixel, and the fourth pixel is also located adjacent to the second pixel and the third pixel, the method comprising steps of:
obtaining four Y luminance values, one U chrominance value and one V chrominance value from the four pixels of the YUV format; and
obtaining two R, two G and two B subpixel values of the RGB format according to the obtained four Y luminance values, one U-chrominance value and one V chrominance value,
wherein, of four pixels in the RGB format, the R subpixel value of the first pixel in the RGB format are calculated according to the Y luminance value of the first pixel in the YUV format, the G subpixel value of the second pixel in the RGB format are calculated according to the Y luminance value of the second pixel in the YUV format, the G subpixel value of the third pixel in the RGB format are calculated according to the Y luminance value of the third pixel in the YUV format, and the B subpixel value of the fourth pixel in the RGB format are calculated according to the Y luminance value of the fourth pixel in the YUV format, the B subpixel value of the first pixel in the RGB format is calculated according to the U chrominance value of the first pixel in the YUV format and an average of the R subpixel value of the first pixel and the G subpixel value of the third pixel in the RGB format, the R subpixel value of the fourth pixel in the RGB format is calculated according to the V chrominance value of the first pixel in the YUV format and an average of the G subpixel value of the second pixel and the B subpixel value of the fourth pixel in the RGB format.

### Claim 2 (depends on 1)

The method according to claim 1, wherein the R subpixel value of the first pixel is equal to the Y luminance value of the first pixel minus 16 and then multiplied by 1.1644, the G subpixel value of the second pixel is equal to the Y luminance value of the second pixel minus 16 and then multiplied by 1.1644, the G subpixel value of the third pixel is equal to the Y luminance value of the third pixel minus 16 and then multiplied by 1.1644, the B subpixel value of the fourth pixel is equal to the Y luminance value of the fourth pixel minus 16 and then multiplied by 1.1644, the B subpixel value of the first pixel is equal to the U chrominance value of the first pixel minus 128 and multiplied by 2.2768, and then added with the average of the R subpixel value of the first pixel and the G subpixel value of the third pixel, and the R subpixel value of the fourth pixel is equal to the V chrominance value of the first pixel minus 128 and multiplied by 2.2768, and then added with the average of the G subpixel value of the second pixel and the B subpixel value of the fourth pixel.

### Claim 3

A circuit to convert a YUV format to a RGB format applied in depacking a depth frame, wherein one pixel in the YUV format includes Y luminance, U chrominance and V chrominance, and one pixel in the RGB format includes a R subpixel, a G subpixel and a B subpixel, the depth frame in YUV format include at least four adjacent pixels in one group and the Y luminance, U chrominance and V chrominance of each pixel are arranged in vertical, theses four pixels in each group includes a first pixel, a second pixel, a third pixel, and a fourth pixel, the first pixel is located adjacent to the second pixel and the third pixel, and the fourth pixel is also located adjacent to the second pixel and the third pixel, the circuit comprising:
a pixel retrieving unit to retrieve four Y luminance values, one U chrominance value and one V chrominance value from the four pixels of the YUV format; and
a pixel converting unit to obtain two R, two G and two B subpixel values of the RGB format according to the obtained four Y luminance values, one U-chrominance value and one V chrominance value,
wherein, of four pixels in the RGB format, the R subpixel value of the first pixel in the RGB format are calculated according to the Y luminance value of the first pixel in the YUV format, the G subpixel value of the second pixel in the RGB format are calculated according to the Y luminance value of the second pixel in the YUV format, the G subpixel value of the third pixel in the RGB format are calculated according to the Y luminance value of the third pixel in the YUV format, and the B subpixel value of the fourth pixel in the RGB format are calculated according to the Y luminance value of the fourth pixel in the YUV format, the B subpixel value of the first pixel in the RGB format is calculated according to the U chrominance value of the first pixel in the YUV format and an average of the R subpixel value of the first pixel and the G subpixel value of the third pixel in the RGB format, the R subpixel value of the fourth pixel in the RGB format is calculated according to the V chrominance value of the first pixel in the YUV format and an average of the G subpixel value of the second pixel and the B subpixel value of the fourth pixel in the RGB format.

### Claim 4 (depends on 3)

The circuit according to claim 3, wherein the R subpixel value of the first pixel is equal to the Y luminance value of the first pixel minus 16 and then multiplied by 1.1644, the G subpixel value of the second pixel is equal to the Y luminance value of the second pixel minus 16 and then multiplied by 1.1644, the G subpixel value of the third pixel is equal to the Y luminance value of the third pixel minus 16 and then multiplied by 1.1644, the B subpixel value of the fourth pixel is equal to the Y luminance value of the fourth pixel minus 16 and then multiplied by 1.1644, the B subpixel value of the first pixel is equal to the U chrominance value of the first pixel minus 128 and multiplied by 2.2768, and then added with the average of the R subpixel value of the first pixel and the G subpixel value of the third pixel, and the R subpixel value of the fourth pixel is equal to the V chrominance value of the first pixel minus 128 and multiplied by 2.2768, and then added with the average of the G subpixel value of the second pixel and the B subpixel value of the fourth pixel.

### Claim 5

A method applied in depacking a depth frame to convert from YUV format to RGB format, wherein one pixel in the YUV format includes Y luminance, U chrominance and V chrominance, and one pixel in the RGB format includes R subpixel, G subpixel and B subpixel, the depth frame in YUV format include at least four adjacent pixels in one group, and the Y luminance, U chrominance and V chrominance of each pixel are arranged in vertical, theses four pixels in each group includes a first pixel, a second pixel, a third pixel, and a fourth pixel, the first pixel is located adjacent to the second pixel and the third pixel, and the fourth pixel is also located adjacent to the second pixel and the third pixel, the method comprising steps of:
obtaining four Y luminance value, one U chrominance value and one V chrominance value from the four pixels of the YUV format; and
obtaining two R, two G and two B subpixel values of the RGB format according to the obtained four Y luminance value, one U chrominance value and one V chrominance value,
wherein, of four pixels in the RGB format, the R subpixel value of the first pixel in the RGB format are calculated according to the Y luminance value of the first pixel in the YUV format, the G subpixel value of the second pixel in the RGB format are calculated according to the Y luminance value of the second pixel in the YUV format, the G subpixel value of the third pixel in the RGB format are calculated according to the Y luminance value of the third pixel in the YUV format, and the B subpixel value of the fourth pixel in the RGB format are calculated according to the Y luminance value of the fourth pixel in the YUV format, the B subpixel value of the first pixel in the RGB format is calculated according to the U chrominance value of the first pixel in the YUV format and an average of the R subpixel value of the first pixel and the G subpixel value of the second pixel in the RGB format, the R subpixel value of the fourth pixel in the RGB format is calculated according to the V chrominance value of the first pixel in the YUV format and an average of the G subpixel value of the third pixel and the B subpixel value of the fourth pixel in the RGB format.

### Claim 6 (depends on 5)

The method according to claim 5, wherein the R subpixel value of the first pixel is equal to the Y luminance value of the first pixel minus 16 and then multiplied by 1.1644, the G subpixel value of the second pixel is equal to the Y luminance value of the second pixel minus 16 and then multiplied by 1.1644, the G subpixel value of the third pixel is equal to the Y luminance value of the third pixel minus 16 and then multiplied by 1.1644, the B subpixel value of the fourth pixel is equal to the Y luminance value of the fourth pixel minus 16 and then multiplied by 1.1644, the B subpixel value of the first pixel is equal to a value of an inverse function of the U chrominance value of the first pixel and then added with the average of the R subpixel value of the first pixel and the G subpixel value of the second pixel, and the R subpixel value of the fourth pixel is equal to a value of an inverse function of the V chrominance value of the first pixel and then added with the average of the G subpixel value of the third pixel and the B subpixel value of the fourth pixel.

### Claim 7

A circuit to convert a YUV format to a RGB format applied in depacking a depth frame, wherein one pixel in the YUV format includes Y luminance, U chrominance and V chrominance, and one pixel in the RGB format includes R subpixel, G subpixel and B subpixel, the depth frame in YUV format include at least four adjacent pixels in one group, and the Y luminance, U chrominance and V chrominance of each pixel are arranged in vertical, theses four pixels in each group includes a first pixel, a second pixel, a third pixel, and a fourth pixel, the first pixel is located adjacent to the second pixel and the third pixel, and the fourth pixel is also located adjacent to the second pixel and the third pixel, the circuit comprising:
a pixel retrieving unit to retrieve four Y luminance value, one U chrominance value and one V chrominance value from the four pixels of the YUV format; and
a pixel converting unit to obtain two R, two G and two B subpixel values of the RGB format according to the obtained four Y luminance value, one U chrominance value and one V chrominance value,
wherein, of four pixels in the RGB format, the R subpixel value of the first pixel in the RGB format are calculated according to the Y luminance value of the first pixel in the YUV format, the G subpixel value of the second pixel in the RGB format are calculated according to the Y luminance value of the second pixel in the YUV format, the G subpixel value of the third pixel in the RGB format are calculated according to the Y luminance value of the third pixel in the YUV format, and the B subpixel value of the fourth pixel in the RGB format are calculated according to the Y luminance value of the fourth pixel in the YUV format, the B subpixel value of the first pixel in the RGB format is calculated according to the U chrominance value of the first pixel in the YUV format and an average of the R subpixel value of the first pixel and the G subpixel value of the second pixel in the RGB format, the R subpixel value of the fourth pixel in the RGB format is calculated according to the V chrominance value of the first pixel in the YUV format and an average of the G subpixel value of the third pixel and the B subpixel value of the fourth pixel in the RGB format.

### Claim 8 (depends on 3)

The circuit according to claim 3, wherein the R subpixel value of the first pixel is equal to the Y luminance value of the first pixel minus 16 and then multiplied by 1.1644, the G subpixel value of the second pixel is equal to the Y luminance value of the second pixel minus 16 and then multiplied by 1.1644, the G subpixel value of the third pixel is equal to the Y luminance value of the third pixel minus 16 and then multiplied by 1.1644, the B subpixel value of the fourth pixel is equal to the Y luminance value of the fourth pixel minus 16 and then multiplied by 1.1644. The B subpixel value of the first pixel is equal to a value of an inverse function of the U chrominance value of the first pixel and then added with the average of the R subpixel value of the first pixel and the G subpixel value of the second pixel, and the R subpixel value of the fourth pixel is equal to a value of an inverse function of the V chrominance value of the first pixel and then added with the average of the G subpixel value of the third pixel and the B subpixel value of the fourth pixel.

### Claim 9 (depends on 2)

The method according to claim 2, wherein the B subpixel value of the first pixel is equal to a nonlinear transform of the U chrominance value and then added with the average of the R subpixel value of the first pixel and the G subpixel value of the third pixel, and the R subpixel value of the fourth pixel is equal to the nonlinear transform of the V chrominance value and then added with the average of the G subpixel value of the second pixel and the B subpixel value of the fourth pixel.

### Claim 10 (depends on 9)

The method according to claim 9, wherein each of the nonlinear transforms of the U chrominance value and the V chrominance value is a piece-wise transform of the U chrominance value and the V chrominance value; if the U or V chrominance value is in the range of {16, 123}, the corresponding transformed value is equal to the U or V chrominance value minus 123, multiplied by 2.3364, and minus 5; if the U or V chrominance value is in the range of {123, 133}, the corresponding transformed value is equal to the U or V chrominance value minus 128; and if the U or V chrominance value is in the range of {133, 240}, the corresponding transformed value is equal to the chrominance value minus 133, multiplied by 2.3364, and plus 5.

### Claim 11 (depends on 4)

The method according to claim 4, wherein the B subpixel value of the first pixel is equal to a nonlinear transform of the U chrominance value and then added with the average of the R subpixel value of the first pixel and the G subpixel value of the third pixel, and the R subpixel value of the fourth pixel is equal to a nonlinear transform of the V chrominance value and then added with the average of the G subpixel value of the second pixel and the B subpixel value of the fourth pixel.

### Claim 12 (depends on 11)

The method according to claim 11, each of the nonlinear transform of the U chrominance value and V chrominance value is a piece-wise transform of the chrominance value; if the U or V chrominance value is in the range of {16, 123}, the corresponding transformed value is equal to the chrominance value minus 123, multiplied by 2.3364, and minus 5; if the U or V chrominance value is in the range of {123, 133}, the corresponding transformed value is equal to the chrominance value minus 128; and if the U or V chrominance value is in the range of {133, 240}, the corresponding transformed value is equal to the chrominance value minus 133, multiplied by 2.3364, and plus 5.

### Claim 13

A method applied in packing a depth frame to convert from RGB format to YUV format, wherein one pixel in the RGB format includes a R subpixel, a G subpixel and a B subpixels, and the one pixel in the YUV format includes Y luminance, U chrominance and V chrominance, the depth frame in RGB format include at least four adjacent pixels in one group, and the R subpixel, G subpixel and B subpixel of each pixel are arranged in vertical, these four pixels in each group includes a first pixel, a second pixel, a third pixel, and a fourth pixel, and the first pixel is located adjacent to the second pixel and the third pixel, and the fourth pixel is also located adjacent to the second pixel and the third pixel, the method comprises following steps of:
obtaining two R, two G and two B subpixel values having interleaved positions from the four pixels of the RGB format; and
obtaining four Y-luminance value, one U-chrominance value and one V-chrominance value of the YUV format according to the obtained two R, two G, and two B subpixel values,
wherein, of four pixels in the YUV format, the Y luminance value of the first pixel in the YUV format are calculated according to the R subpixel value of the first pixel in the RGB format, the Y luminance value of the second pixel in the YUV format are calculated according to the G subpixel value of the second pixel in the RGB format, the Y luminance value of the third pixel in the YUV format are calculated according to the G subpixel value of the third pixel in the RGB format, and the Y luminance value of the fourth pixel in the YUV format are calculated according to the B subpixel value of the fourth pixel in the RGB format, the U chrominance value of the first pixel in the YUV format is calculated according to subtracting the B subpixel value of the first pixel in the RGB format to an average of the R subpixel value of the first pixel and the G subpixel value of the third pixel in the RGB format, the V-chrominance value of the first pixel in the YUV format is calculated according to subtracting the R subpixel value of the fourth pixel in the RGB format and an average of the G subpixel value of the second pixel and the B subpixel value of the fourth pixel in the RGB format.
