View License

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video

Highlights from
Depth Image Based Stereoscopic View Rendering

5.0 | 4 ratings Rate this file 17 Downloads (last 30 days) File Size: 1.35 MB File ID: #27538 Version: 1.1

Depth Image Based Stereoscopic View Rendering



08 May 2010 (Updated )

This program accepts a color and a depth video and converts them to stereoscopic views

| Watch this File

File Information

Color image and a corresponding per-pixel depth map is one method of 3D video representation. Based on DIBR, this program performs stereoscopic view generation. The depth maps are interpreted according to the MPEG N8038 informative recommendations and views are rendered. The disocclusions are filled according by background pixel extrapolation.

cd2lr.m is the code for DIBR. cd2lrluma.m is the same code, but applied only on luminance components. Users may run demo_cd2lr.m for a start.

Authors would like to thank Microsoft Research for Providing 'Ballet' Sequence for the demo purpose.

yuvimport.m is a function from the yuv toolbox which can be found at This toolbox enables to do many yuv related functions.

Please contact me if you cant get the yuv toolbox

Required Products Image Processing Toolbox
MATLAB release MATLAB 7.5 (R2007b)
Other requirements YUV Toolbox
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (11)
19 Oct 2016 jiangfeng li

study for project

Comment only
08 Oct 2015 hidangmayum saxena

Hello Sir,

I can a
run your code using my own data set . I want to know what is the mat file contained in your code and how to generate it using my data.please help me.


Comment only
05 Jan 2015 leon

leon (view profile)

Hello Sir,

Could you send me the yuvimport? I cannot get it.

Thank you.

28 Mar 2014 Ashwinkarthik


I have a depth map which is not in the YUV format.How do I make it compatible with this code ?


Comment only
10 Oct 2013 elaine

elaine (view profile)

14 Sep 2012 Qing-Long Deng

15 Jul 2010 Karthik Divakaruni


Thanks for sharing the code. I have tried your code for two sequences, ballet and 3D room. The rendered right view is fine, but there is a problem with the left view. The first frame of the left view is ok, but the holes are not getting filled starting from the second frame and due to this, patches are appearing at the occlusion spots. The first two frames of the Room sequence (colour and luma components) for the rendered left view can be found here.

Could you please advise?

Thanks & Regards

02 Jun 2010 Varuna De Silva

Hi Jason,

The Ghost artifacts are due to the imperfections of the depth maps. The depth maps may not necessarily align with the color image edges.

Further, such artifacts are due to the hole filling problems that are inherent with DIBR systems. However you may reduce the disparity so that you have less holes.

Thanks for your inquiry.

Comment only
02 Jun 2010 Jason Yang

Thanks for sharing. However, why there are serious artifacts in the synthesized stereo images (like some kind of ghost artifacts around the head of the person)? Thanks!

Comment only
11 May 2010 Varuna De Silva

The program should be working fine now.

Comment only
10 May 2010 Varuna De Silva

The demo needs to be modified. I have already submitted a new version which is being inspected. Further the new submission is much faster than this.

Comment only
10 May 2010 1.1

I have made this code faster now, with a look up table to stop calculating shift every time you read a depth pixel value.

Also, in the earlier version the demo did not work due to differences in file names

Contact us