Code covered by the BSD License  

Highlights from
Light Field Toolbox v0.2

image thumbnail

Light Field Toolbox v0.2

by

 

26 Apr 2013 (Updated )

A set of tools for working with light field (aka plenoptic) imagery in Matlab

LFVar2Struct( varargin )
% LFVar2Struct - Convenience function to build a struct from a set of variables
%
% Usage:
%     StructOut = LFVar2Struct( var1, var2, ... )
% 
% Example:
%     Apples = 3;
%     Oranges = 4;
%     FruitCount = LFVar2Struct( Apples, Oranges )
%
%     Results in a struct FruitCount:
%         FruitCount = 
%            Apples: 3
%            Oranges: 4
%
% See also: LFStruct2Var

% Part of LF Toolbox v0.2 released 27-May-2013
% Copyright (c) 2013, Donald G. Dansereau

function StructOut = LFVar2Struct( varargin )

VarNames = arrayfun( @inputname, 1:nargin, 'UniformOutput', false );
StructOut = cell2struct( varargin, VarNames, 2 );

end

Contact us