[출처] YUV420을 RGB로 변환하기 (차니의 컴퓨터 마을) |작성자 newchany
'멀티미디어 > 이미지 프로세싱' 카테고리의 다른 글
YCbCr과 YPbPr (0) | 2009.03.18 |
---|---|
YUV420(YV12) (0) | 2009.03.18 |
동영상 파일끼리 PSNR 비교하는 프로그램 (0) | 2009.03.18 |
DCT 프로그램 (0) | 2009.03.18 |
H.264 tutoroals (0) | 2009.03.18 |
[출처] YUV420을 RGB로 변환하기 (차니의 컴퓨터 마을) |작성자 newchany
YCbCr과 YPbPr (0) | 2009.03.18 |
---|---|
YUV420(YV12) (0) | 2009.03.18 |
동영상 파일끼리 PSNR 비교하는 프로그램 (0) | 2009.03.18 |
DCT 프로그램 (0) | 2009.03.18 |
H.264 tutoroals (0) | 2009.03.18 |
참조 사이트: http://www.fourcc.org
YUV에도 여러 가지 종류가 있다. 그 중에서 YUV420(YV12)에 대해서 알아보도록 하겠다.
This is the format of choice for many software MPEG codecs. It comprises an NxM Y plane followed by (N/2)x(M/2) V and U planes.
Horizontal | Vertical | |
Y Sample Period | 1 | 1 |
V Sample Period | 2 | 2 |
U Sample Period | 2 | 2 |
Positive biHeight implies top-down image (top line first)
ATI says they have a download which contains this codec but I can't find it on their site. If you would like something similar for Quicktime, try here.
=======================================================================================
// 아래 코드는 YUV 바이트 스트림 배열에서의 YUV 각 값의 위치를 찾기위한 코드가 설명되어 있다.
Height = 16;
Width = 16;
Y'ArraySize = Height × Width; // (256)
Y' = Array[7 × Width + 5];
U = Array[(7/2) × (Width/2) + 5/2 + Y'ArraySize];
V = Array[(7/2) × (Width/2) + 5/2 + Y'ArraySize + Y'ArraySize/4];
RGB = Y'UV444toRGB888(Y', U, V);
위 예제 그림은 Y -> U -> V 순으로 바이트 스트림이 되어 있지만 항상 정해진 것은 아니다.
다른 바이트 스트림의 경우 Y -> V -> U 순으로 되어 있는 경우도 있다.
YUV420 <------> RGB 변환
참고 사이트 : http://www.fourcc.org/fccyvrgb.php
The following 2 sets of formulae are taken from information from Keith Jack's excellent book "Video Demystified" (ISBN 1-878707-09-4).
Y = (0.257 * R) + (0.504 * G) + (0.098 * B) + 16
Cr = V = (0.439 * R) - (0.368 * G) - (0.071 * B) + 128
Cb = U = -(0.148 * R) - (0.291 * G) + (0.439 * B) + 128
B = 1.164(Y - 16) + 2.018(U - 128)
G = 1.164(Y - 16) - 0.813(V - 128) - 0.391(U - 128)
R = 1.164(Y - 16) + 1.596(V - 128)
#define clip(var) ((var>=255)?255:(var<=0)?0:var)
변환을 하면서 위와 같이 각 값에 대하여 clip이 필요하다.
[출처] YUV420(YV12) (차니의 컴퓨터 마을) |작성자 newchany
YCbCr과 YPbPr (0) | 2009.03.18 |
---|---|
YUV420을 RGB로 변환하기 (0) | 2009.03.18 |
동영상 파일끼리 PSNR 비교하는 프로그램 (0) | 2009.03.18 |
DCT 프로그램 (0) | 2009.03.18 |
H.264 tutoroals (0) | 2009.03.18 |
YUV420을 RGB로 변환하기 (0) | 2009.03.18 |
---|---|
YUV420(YV12) (0) | 2009.03.18 |
DCT 프로그램 (0) | 2009.03.18 |
H.264 tutoroals (0) | 2009.03.18 |
YUV 420 포멧 viewer 및 소스 파일 (0) | 2009.03.18 |
YUV420(YV12) (0) | 2009.03.18 |
---|---|
동영상 파일끼리 PSNR 비교하는 프로그램 (0) | 2009.03.18 |
H.264 tutoroals (0) | 2009.03.18 |
YUV 420 포멧 viewer 및 소스 파일 (0) | 2009.03.18 |
JPEG 파일을 볼 수 있는 프로그램의 소스 (0) | 2009.03.18 |
1. Avc Picturemanagement Draft 1
2. Overview
3. Loopfilter(Deblocking filter)
4. Inter prediction
5. Intra prediction
6. VLC(UVLC, CAVLC)
7. CABAC
8. Transform(DCT, Quantization)
동영상 파일끼리 PSNR 비교하는 프로그램 (0) | 2009.03.18 |
---|---|
DCT 프로그램 (0) | 2009.03.18 |
YUV 420 포멧 viewer 및 소스 파일 (0) | 2009.03.18 |
JPEG 파일을 볼 수 있는 프로그램의 소스 (0) | 2009.03.18 |
Modeling AWGN channel (0) | 2009.03.18 |
DCT 프로그램 (0) | 2009.03.18 |
---|---|
H.264 tutoroals (0) | 2009.03.18 |
JPEG 파일을 볼 수 있는 프로그램의 소스 (0) | 2009.03.18 |
Modeling AWGN channel (0) | 2009.03.18 |
영상 처리 용어 해설 (0) | 2009.03.18 |
DCT 프로그램 (0) | 2009.03.18 |
---|---|
H.264 tutoroals (0) | 2009.03.18 |
YUV 420 포멧 viewer 및 소스 파일 (0) | 2009.03.18 |
Modeling AWGN channel (0) | 2009.03.18 |
영상 처리 용어 해설 (0) | 2009.03.18 |
This section models noise at the output y(t) of the channel in Section 1. h(t) in figure 1.1 is used to represent the combined effect of modulator, demodulator and channel. In this course, only discrete-input modulators are of interest. Hence, input symbols X take their values in a finite sample while the channel output value Y can take on any values along the real line. Such a model is called a Discrete-Input Continuous-Output channel and is characterized by the conditional probability density function
Equation 2.1:
k = 0,1,……,q-1
relating the real output value to all possible inputs. The most representative of such a model is the Additive White Gaussian Noise Channel for which
Equation 2.2:
where N is the zero mean Gaussian random variable with variance and X = for k = 0,1,….,q-1. For a given X, it follows that Y is Gaussian with mean and variance . Using this new information, the previous conditional probability density function becomes
Equation 2.3:
For every input sequence , i=1,2,…,n, there is a corresponding output sequence that can be expressed as
Equation 2.4:
i=1,2,….,n
For a memoryless channel, we can express the conditional probability density function for each given input sequence as
Equation 2.5:
The typical model of such a channel is shown below in Figure 2.1.
Figure 2.1:
DCT 프로그램 (0) | 2009.03.18 |
---|---|
H.264 tutoroals (0) | 2009.03.18 |
YUV 420 포멧 viewer 및 소스 파일 (0) | 2009.03.18 |
JPEG 파일을 볼 수 있는 프로그램의 소스 (0) | 2009.03.18 |
영상 처리 용어 해설 (0) | 2009.03.18 |
DCT 프로그램 (0) | 2009.03.18 |
---|---|
H.264 tutoroals (0) | 2009.03.18 |
YUV 420 포멧 viewer 및 소스 파일 (0) | 2009.03.18 |
JPEG 파일을 볼 수 있는 프로그램의 소스 (0) | 2009.03.18 |
Modeling AWGN channel (0) | 2009.03.18 |