一、简介
DIBR的核心就是首先利用深度信息将参考图像投影到三维欧式空间,然后再将三维空间点投影到虚拟摄像机的成像平面上。在计算机图形学中被称为3D Image Warping技术。
像素坐标系和图像坐标系
如图一所示,三维空间点在成像平面上的位置可以通过像素坐标系和图像坐标系来表示。
二、源代码
rows = 768 ;
cols = 1024;
numf = 1;
Color = 'Color.yuv';
Depth = 'Depth.yuv';
%Stereoscopic view generation
[L R] = cd2lr(Color,Depth,rows, cols, numf);
figure, imshow(yuv2rgb(L{1}.luma,L{1}.chroma1,L{1}.chroma2));
figure, imshow(yuv2rgb(R{1}.luma,R{1}.chroma1,R{1}.chroma2));
%Stereoscopic view generation only luma components
[L R] = cd2lrluma(Color,Depth,rows, cols, numf);
figure, imshow(uint8(L{1}.luma));
figure, imshow(uint8(R{1}.luma));
三、运行结果
四、备注
版本:2014a