File Exchange

image thumbnail

Light Field Toolbox v0.4 -- deprecated, v0.5 available now

version 1.2 (1.56 MB) by Donald Dansereau
A set of tools for working with light field (aka plenoptic) imagery in Matlab


Updated 28 Apr 2020

View Version History

View License

Get the new toolbox here:

This is a set of tools for working with light field (aka plenoptic) imagery in Matlab. Features include decoding, calibration, rectification, colour correction, basic filtering and visualization of light field images. New in version 0.4 are some linear depth/focus and denoising filters.
Download the sample light field pack at Sample calibration datasets can be found at

Cite As

D. G. Dansereau, O. Pizarro, and S. B. Williams, “Decoding, calibration and rectification for lenselet-based plenoptic cameras,” in Computer Vision and Pattern Recognition (CVPR), 2013, pp. 1027–1034.

Comments and Ratings (19)

Padmahasa M

please help to use this tool box

zhenxuan ma


Donald Dansereau

@Keigo Hirakawa LFFiltShiftSum does overwrite the LF variable as it goes. This sort of in-place filtering is not a problem so long as the overwritten variables aren't needed again, as in this example. To prove whether there's an issue or not try comparing the result of the code before & after use of a destination variable.

Zhijie Ma

Keigo Hirakawa

I believe there is a bug in LFFiltShiftSum. In line 105, LF is being overwritten, even though it is still being used in line 103 (within the same forloop). The workaround is to save LF as another variable, and use that new variable in line 103.

Tom Campbell

Antonin Sulc


Timin Li

David Hart

Alireza Moghaddam

Donald Dansereau

@Maryam Jaberi, see LFDemo*, and the examples in LFToolbox.pdf.

Damian Kösters

Luoluo Wang

Maryam Jaberi

Is the any sample code about how the functions can be used in an example scenario like generating .jason files, LF coordinates or rendering new views?

Donald Dansereau

@Corey Jaskoloski, I've addressed your question here:

Donald Dansereau

There's now a google community for the toolbox, feel free to post questions, projects, feature ideas, bugs and cool light field-related news:

Corey Jaskolski

This is a great toolbox. Thanks for sharing it! I am looking to extract from Lytro Illum raws left/right 3D image pairs with variable baseline. I didn't see a function in the toolbox to specifically do that. Do you have any guidance on how I could implement with the existing toolbox function?

MATLAB Release Compatibility
Created with R2014b
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!