Several previous blogs mainly introduced the light field and the light field camera related knowledge, as well as the focus on the effect and multi-view effect of the display. A summary of the process of learning the light field.
This time affixed with the opencv/c++ written by the focus algorithm implementation, as well as interactive demo. Put on my open source China code cloud, connected here: Https://git.oschina.net/rxdj/refocus_LightFieldImg.git.
For a description of the code, see Readme. If you have any mistake, please advise me.
The image is an RGB color map captured by the Lytro Illum second-generation camera and decoded by the MATLAB Light Field toolkit, which is also the intermediate result of decoding the white image in the MATLAB toolkit.
The main references are: Tao M W, Hadap S, Malik J, et al. Depth from combining Defocus and correspondence using Light-field Cameras[c] Proceedings of the IEEE International Conference on computer Vision. 2013:673-680.
In this document, there is an open source MATLAB source code, using the image taken by the Lytro generation camera. The difference between a generation and a second-generation camera data is that the number of micro-lenses and the number of pixels behind each microlens are different, corresponding to the modified code.
Lytro Optical Field Camera focus C + + implementation