%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% LF Toolbox Version v0.4-CLIM %% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Added Functionalities from Dansereau's LF Toolbox v0.4: - Alternative calibration using existing mlaCalib information from LYTRO metadata (S. HEMAMI, M. LE PENDU) -Called automatically by LFUtilProcessWhiteImages.m during calibration phase in addition to the calibration from the original toolbox. -To use mlaCalibration instead of the toolbox calibration for the decoding : set the decode option WhiteProcDataFnameExtension to '.grid2.json' when calling LFLytroDecodeImage (or LFUtilDecodeLytroFolder). (by default, '.grid.json' is set to use the toolbox calibration). -Note : there may be errors in the way to derive the lenslet grid models (stored in .grid2.json files) from the mla calib data since the decoded images using this calibration are clearly wrong in tested cases. - Automatic White balancing (R. DAUDT) -Enable/Disable with DecodeOptions.DoAWB=true (default=false) and DecodeOptions.OptionalTasks='ColourCorrect' (default={}). -Method of the article : J.-Y. Huo, Y.-L. Chang, J. Wang and X.-X. Wei "Robust Automatic White Balance Algorithm using Gray Color Points in Images", IEEE Transactions on Consumer Electronics, 2006. -Original implementation from https://web.stanford.edu/~sujason/ColorBalancing/Code/robustAWB.m -Adapted for Light fields : White balance parameters determined for the central view and then applied to all the views. - Barycentric interpolation (method from KAIST toolbox, added by M. LE PENDU) -Enable/Disable with DeceodeOptions.ResampMethod='barycentric' (default=true). -Does not include generation of Weights (i.e. demultiplexed white image). - Hot pixel correction (method from KAIST toolbox, added by M. LE PENDU) -Enable/Disable with DeceodeOptions.HotPixelCorrect=true (default=true). - Weighted demosaicing (P. DAVID) -Enable/Disable with DeceodeOptions.WeightedDemosaic=true (default=true). - Weighted interpolation for rotation (P. DAVID) -Enable/Disable with DeceodeOptions.WeightedInterp=true (default=true). -Not implemented for barycentric interpolation. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Modified files from Dansereau's LF Toolbox v0.4: - LFUtilProcessWhiteImages.m - Added Processing of mla calibration data and white image metadata to generate grid2.json and gridcent.json alternative calibration files compatible with the decoding pipeline. - LFUtilDecodeLytroFolder.m - Updated comments with documentation of all the options. - Added DoAWB option (used when calling LFColourCorrect). - LFLytroDecodeImage.m - Added loading of black images (used for hot pixel correction). - New decoded option HotPixelCorrect. - SupportFunctions/LFDecodeLensletImageSimple.m - Added barycentric interpolation. - Added white lenslet image guided demosaicing and interpolation. - LFColourCorrect.m - Added Automatic White Color Balance (in option). %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Added sources from Dansereau's LF Toolbox v0.4: - CLIM/LFSearchBlackImages.m : Search black images names (required for hot pixel correction). - CLIM/LFAWB.m : Automatic White Color Balance of the Light field. - CLIM/LFHotPixelCorrection.m : Correction of Hot pixels (requires black images). - CLIM/LensletGuidedDemosaic/... functions for white image guided demosaicing and interpolations. - CLIM/MLACalib/... : functions to retreive mlaCalib metadata from Lytro and generate .json calibration files that can be used by the LF decoding functions. Note : the files displayLFViews.m, GetBayerMatrix.m, InvSliceXYImage.m are not used by the rest of the pipeline (only for tests). %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Added/Modified Decode Options : - WhiteProcDataFnameExtension = '.grid.json' (default, as in LF toolbox v0.4) / '.grid2.json' (use lensletGridModels computed from mlaCalibration). - defined in LFLytroDecodeImage.m - DoAWB = true (use Automatic White Balancing) / false (default). -defined in LFUtilDecodeLytroFolder.m -only applies if DecodeOptions.OptionalTasks='ColourCorrect' - ResampMethod = 'fast' (default) / 'triangulation' / 'barycentric' (added from KAIST toolbox) -defined in LFDecodeLensletImageSimple.m - HotPixelCorrect = true (default) / false (no HotPixel correction as in LF toolbox v0.4) -defined in LFLytroDecodeImage.m - WeightedDemosaic = true (default) / false (simple 2D RAW demosaicing as in LF toolbox v0.4) -defined in LFDecodeLensletImageSimple.m - WeightedInterp = true (default) / false (simple interpolations as in LF toolbox v0.4) -defined in LFDecodeLensletImageSimple.m