plateform
stringclasses
1 value
repo_name
stringlengths
13
113
name
stringlengths
3
74
ext
stringclasses
1 value
path
stringlengths
12
229
size
int64
23
843k
source_encoding
stringclasses
9 values
md5
stringlengths
32
32
text
stringlengths
23
843k
github
ylucet/CCA-master
plq_coSplit_test.m
.m
CCA-master/tests/plq_coSplit_test.m
6,280
utf_8
1c012fd8273507e6b5c09482c30fec29
function tests = plq_coSplit_test() tests = functiontests(localfunctions); end % Author: Mike Trienis, Bryan Gardiner % For: Dr. Yves Lucet % Whatsit: A test file for plq convex hull function plq_coSplit. % I = Indicator, E = Exponential, C = Conjugate, L = Linear, Q = Quadratic function [b] = testPointIndi...
github
ylucet/CCA-master
plq_add_Test.m
.m
CCA-master/tests/plq_add_Test.m
2,283
utf_8
72223477778971e187982a08e027ab67
%% Author: Mike Trienis %% For: Dr. Yves Lucet %% Whatsit: A test file for plq_add, adds two piecewise linear quadratic functions. %%mode(-1); %%L: Linear, Q: Quadratic, I: Indicator, PW: Piecewise %%__test_set = 'PLQ: plq_add'; function tests = plq_add_Test tests = functiontests(localfunctions); end f...
github
ylucet/CCA-master
plq_split_test.m
.m
CCA-master/tests/plq_split_test.m
1,441
utf_8
4e61a0e2842691344452cc25b35fd779
function tests = plq_split_test() tests = functiontests(localfunctions); end %perform all tests by comparing with plq functions function b = prim(p) P=gph_plq(p); q=plq_scalar(p,3);Q=gph_plq(q); QQ=gph_scalar(P,3); b = gph_isEqual(Q,QQ); q=plq_scalar(p,0);Q=gph_plq(q); QQ=gph_scalar(P,0); b = b & gph...
github
ylucet/CCA-master
plq_min_test.m
.m
CCA-master/tests/plq_min_test.m
2,474
utf_8
f304c3a87b23864e5c6b724a481332d4
function tests = plq_min_test() tests = functiontests(localfunctions); end % Author: Mike Trienis % For: Dr. Yves Lucet % Whatsit: A test file for plq_max, adds two piecewise linear quadratic functions. %L: Linear, Q: Quadratic, I: Indicator, PW: Piecewise function [b] = testLLMin(testCase) b = false; p...
github
ylucet/CCA-master
gph_check_test.m
.m
CCA-master/tests/gph_check_test.m
1,873
utf_8
2dda0168ec6cbbf03c72e215ef8774bb
function tests = gph_check_test() tests = functiontests(localfunctions); end function [b] = testBoundedDomain(testCase) f=[-1 -1 1 1;-1 0 0 1;inf 0 0 inf]; b=gph_check(f); assert(b) end function [b] = testXNondecreasing(testCase) f=[-1 -2 1 1;-1 0 0 1;0 0 0 0]; b= ~gph_check(f); assert(b) end function [b...
github
ylucet/CCA-master
gph_pa_test.m
.m
CCA-master/tests/gph_pa_test.m
2,336
utf_8
80b0ff973df76cc4d3246354181f3010
function tests = gph_pa_helper() tests = functiontests(localfunctions); end % I = Indicator, E = Exponential, C = Conjugate, L = Linear, Q = Quadratic function b=helper(f1, f2, lambda) rplq = plq_pa(f1,f2,lambda); G1=gph_plq(f1); G2=gph_plq(f2); G = gph_pa(G1,G2,lambda); rgph = plq_gph(G); b = plq_isEqual...
github
ylucet/CCA-master
plq_conv_test.m
.m
CCA-master/tests/plq_conv_test.m
4,951
utf_8
70767f3da63fe338cf326098a0f4657f
function tests = plq_conv_test() tests = functiontests(localfunctions); end % Author: Mike Trienis % For: Dr. Yves Lucet % Whatsit: A test file for plq %L: Linear, Q: Quadratic, I: Indicator function b = testInfconvLft(testCase) b = false; plqf = [inf,1/4,0,0]; plqg = [inf,1,0,0]; result = plq_infco...
github
ylucet/CCA-master
gph_plq_test.m
.m
CCA-master/tests/gph_plq_test.m
2,844
utf_8
5730c9c9fb170d8323974d470698c991
function tests = gph_plq_test() tests = functiontests(localfunctions); end % Unit test file for gph_plq function b = testAbs(testCase) %abs function p = [0,0,-1,0;inf,0,1,0]; G = gph_plq(p); E = [-1, 0, 0, 1; -1, -1, 1, 1; 1, 0, 0, 1]; b = all(G==E); assert(all(all(b))) ; end function b = testQuartic(testC...
github
ylucet/CCA-master
removeTriplicate_test.m
.m
CCA-master/tests/removeTriplicate_test.m
604
utf_8
19efe538d0b1d7571029d87534dd2e8d
function tests = removeTriplicate_test() tests = functiontests(localfunctions); end function [b] = test1(testCase) M=[1 2 2 3 3 3 4 4 4 4]; [N,k]=removeTriplicate(M,1E-6); b=all(N==[1 2 2 3 3 4 4]) & all(k==[1 2 3 4 6 7 10]); assert(b) end function [b] = test2(testCase) M=[1 2 2 3 3 3 4 4 4 4 1 1]; [N,k]...
github
ylucet/CCA-master
plq_isEqual_test.m
.m
CCA-master/tests/plq_isEqual_test.m
1,280
utf_8
1eaeeac91c15c077770bee61fa7d0714
function tests = plq_isEqual_test() tests = functiontests(localfunctions); end function b = test1(testCase) %domain is split p1=[inf 1 0 0]; p2=[0 1 0 0;inf 1 0 0]; b=plq_isEqual(p1,p2); %small values eps=1e-12; p2=[inf 1+eps eps -eps]; b=b & plq_isEqual(p1,p2); %small values + split partitions p...
github
ylucet/CCA-master
gph_add_test.m
.m
CCA-master/tests/gph_add_test.m
5,664
utf_8
65879a46c95294e9112bc35b1f1d23ce
function tests = gph_add_test() tests = functiontests(localfunctions); end % Unit test file for gph_add % The codes for the gph model are as follows: % - I represents a point indicator % - L represents a linear plq region (flat line in the gph) % - Q represents a quadratic plq region (non-flat line in the gph) % - B ...
github
ylucet/CCA-master
gph_scalar_test.m
.m
CCA-master/tests/gph_scalar_test.m
1,429
utf_8
86d9179e6949dd73a0b94cf9da0ad91f
function tests = gph_scalar_test() tests = functiontests(localfunctions); end %perform all tests by comparing with plq functions function b = helper(p) P=gph_plq(p); q=plq_scalar(p,3); Q=gph_plq(q); QQ=gph_scalar(P,3); b = gph_isEqual(Q,QQ); q=plq_scalar(p,0); Q=gph_plq(q); QQ=gph_scalar(P,0); e...
github
ylucet/CCA-master
gph_isEqual_test.m
.m
CCA-master/tests/gph_isEqual_test.m
886
utf_8
34fd01765157409680c99adb0b725d05
function tests = gph_isEqual_test() tests = functiontests(localfunctions); end function b = test1(testCase) %domain is split p1=[inf 1 0 0];g1=gph_plq(p1); p2=[0 1 0 0;inf 1 0 0];g2=gph_plq(p2); b=gph_isEqual(g1,g2); %small values eps=1e-9; p2=[inf 1+eps eps -eps];g2=gph_plq(p2); b=b & gph_isEqual(g1...
github
ylucet/CCA-master
plq_conv_buildl.m
.m
CCA-master/macros/plq/plq_conv_buildl.m
3,414
utf_8
089e1a7e917222922d8c21336aad477b
%build a linear function, f1i, is the function index, and x1i is the x-value we wanted to evaluate the function on. %similarly f2i is the function index of the second function, and x2i corresponds to the value we evaluate the function on. %In other words constructs a linear function from (x1i,f[f1i](x(x1i))), to (x(x2i...
github
ylucet/CCA-master
plq_conv_qlq.m
.m
CCA-master/macros/plq/plq_conv_qlq.m
1,138
utf_8
354736313b4d338c3590428c16b49aea
% This function processes a function containing a QLQ segment, where the % linear piece is converging to the convex hull of the quadratics. Given % the index i of the linear piece, it removes it, interpolating the % quadratics to their intersection point. It returns the new function, % and the index of the left quadr...
github
ylucet/CCA-master
pl_gph.m
.m
CCA-master/macros/plq/pl_gph.m
642
utf_8
867a7663eb9624b241e590a508509e02
%convert the subdifferential of a gph function into a piecewise-linear function %error out if the graph of the subdifferential is not a function (it is always %piecewise-linear but may have vertical pieces). function q = pl_gph(G) eps=1e-8; x0 = G(1,1:end-1);x1 = G(1,2:end); if any(find(abs(x1-x0)<eps)) q=[]; c...
github
ylucet/CCA-master
plq_eval.m
.m
CCA-master/macros/plq/plq_eval.m
1,332
utf_8
bc3d1ccabb95e50ed5f888cf94436e04
%%%%%%%%%%%%%%EVALUATES A PLQ FUNCTION ON A GRID%%%%%%%%%%%%%% function [y, k] = plq_eval(plqf,X) %evaluate a plq function on a grid y=plqf(x), %x(k(1,l-1))<=X(k(2,l))<=X(k(3,l))<=x(k(1,l)) i.e. k(:,l)=[i;jl;jr] x=plqf(:,1);a=plqf(:,2);b=plqf(:,3);c=plqf(:,4); n1=length(x);n=length(X); if size(X,1)<size(X,...
github
ylucet/CCA-master
plq_lft.m
.m
CCA-master/macros/plq/plq_lft.m
2,970
utf_8
80c07702f7d844e6aac7a4feecb75260
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%PLQ CONJUGATE%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% function plqfstar = plq_lft(plqf,isConvex) if nargin<=1 isConvex=false; end;%default to non-convex functions if ~isConvex plqf=plq_co(plqf); end; x=plqf(:,1);a=plqf(:,2);b=plqf(:,3);c=plqf...
github
ylucet/CCA-master
dl_maxoninterval.m
.m
CCA-master/macros/plq/dl_maxoninterval.m
787
utf_8
59decfa80407d18793aca4e2c2a0c2b9
%computes the maximum of two functions under the assumption that difference of q1 - q2 is linear function!!!!! function [plq,maxq] = dl_maxoninterval(q1,q2,lb,ub,a,b,c) if b == 0 %horizontal line, i.e. no intersection with the x-axis plq = maxoninterval(q1,q2,lb,ub,a,b,c); if (c > 0) maxq = [1,l...
github
ylucet/CCA-master
plq_diff.m
.m
CCA-master/macros/plq/plq_diff.m
156
utf_8
b6183f2b53373ceab1df8bdf97be2542
%compute the piecewise linear derivative of p %errors out (in pl_gph) if dp is not a function function dp = plq_diff(p) G=gph_plq(p); dp=pl_gph(G); end%
github
ylucet/CCA-master
plq_pa.m
.m
CCA-master/macros/plq/plq_pa.m
1,125
utf_8
52476e3ee72032dc09e0feb1c4ec5515
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%PROXIMAL AVERAGE%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% function pa = plq_pa(f1,f2,lambda_pa,isConvex) if nargin<=3 isConvex=true; end;%default to convex functions pa=[];%default value in case of error %f[lambda] = (lambda(f1 + (1/2)normsquared)* + (1...
github
ylucet/CCA-master
plq_gpa.m
.m
CCA-master/macros/plq/plq_gpa.m
372
utf_8
4ce033348ff00b5b6c66e54118a84053
%generalized proximal average from %W. Hare. A Proximal Average for Nonconvex Functions: %A Proximal Stability Perspective. SIOPT function pa = plq_gpa(p0,p1,lambda,r) pa1 = plq_scalar(plq_me(p0,1/r,false), -(1-lambda)); pa2 = plq_scalar(plq_me(p1,1/r,false), -lambda); pa=plq_add(pa1,pa2); pa=plq_me(pa,1/(r+la...
github
ylucet/CCA-master
plq_maxoninterval.m
.m
CCA-master/macros/plq/plq_maxoninterval.m
1,293
utf_8
c0803fd5c071801dbaf2a21496257b6e
%l1,l2,q1,q2 are all represented by the formar [a,b,c] which represents ax^2 + bx + c %Each corresponding function will find the maximum function between two functions %either quadratic-linear, quadratic-quadratic, linear-linear which is valid only %within the interval [lb,ub] the lower and upper bound. %main function...
github
ylucet/CCA-master
dq_maxoninterval.m
.m
CCA-master/macros/plq/dq_maxoninterval.m
2,316
utf_8
b48229058294bd7a7a72ba75df6ebe1f
%computes the maximum of two functions under the assumption that the difference of q1 - q2 is quadratic!!!!! function [plq,maxq] = dq_maxoninterval(q1,q2,lb,ub,a,b,c) delta = b.^2 - 4*a*c; %calculating the discriminant of the quadratic %printf(" a: if delta > 0 %there are two real roots %fin...
github
ylucet/CCA-master
plq_isEqual.m
.m
CCA-master/macros/plq/plq_isEqual.m
912
utf_8
ec1209d3ad6cdaaae0b413ff85b65343
%test whether 2 plq functions are equal %use the clean function to round small values %and contrary to the isEqual function compacts small intervals function b = plq_isEqual(p1,p2) %remove common inf values to prevent inf-inf=NaN isP1inf=(p1(end,1)==inf); isP2inf=(p2(end,1)==inf); large=realmax; i1=find(p1==i...
github
ylucet/CCA-master
plq_prox.m
.m
CCA-master/macros/plq/plq_prox.m
624
utf_8
952b3b805996a1c6b734ec8965dc749b
%compute the proximal mapping of a PLQ function %from the graph of the subdifferential %only works for convex functions function q=plq_prox(p,alpha) eps=1e-8; if alpha<0 cerror('alpha must be nonnegative'); end; G = gph_plq(p); P = [1 alpha;1 0] * G(1:2,:); P(3,:)=zeros(size(1,size(P,2))); q = pl_gph...
github
ylucet/CCA-master
mikeplq_lft.m
.m
CCA-master/macros/plq/mikeplq_lft.m
2,485
utf_8
4a8a376c96a6cdc8dbca409bb0666fd2
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%PLQ CONJUGATE%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% function plqfstar = mikeplq_lft(plqf) x=plqf(:,1);a=plqf(:,2);b=plqf(:,3);c=plqf(:,4); n = size(x,1); %number of rows i=1;j=1; while i <= n, plqType = getType(n,x,a,b,c,i); switch plqType, ...
github
ylucet/CCA-master
plq_clean.m
.m
CCA-master/macros/plq/plq_clean.m
2,258
utf_8
dc8dc83b379d4c42cedca04b558f4848
%%%%%%%%%PLQ CONJUGATE HELPER FUNCTION%%%%%%%%%%%%% function [plqClean] = plq_clean(plqDirty) eps=1E-6;%1E-6;precision below which numbers are rounded to zero % a Temporary Vector or matrix to check presence of infinite dplq=plqDirty(2:end-1,:)-plqDirty(1:end-2,:); %clear duplicate point values e.g [0,1,0,1;0...
github
ylucet/CCA-master
conv_interval_func.m
.m
CCA-master/macros/plq/conv_interval_func.m
2,426
utf_8
d8db504dd85cad8da52b3d2ab26d23e4
%The following routine solves [PROBLEM 2.]. function [plqco] = conv_interval_func(x,a,b,c,x1,x3,x5), EPS=1E-10; x(1)=x1;x(3)=x3;x(5)=x5; %solving the quadratic for x(2) if a(1) ~= 0 & x(5) < inf A1 = -a(1); B1 = 2*a(1)*x5; C1 = c(1) + b(1)*x5 -...
github
ylucet/CCA-master
maxoninterval.m
.m
CCA-master/macros/plq/maxoninterval.m
628
utf_8
ef4a1cb5891e30edc2832b2b459545fd
%calculates the max between two functions that do not intersect within the given interval. function [plq,i] = maxoninterval(q1,q2,lb,ub,a,b,c) if all(isinf([lb,ub])) m=0;%pick any point else%at most one bound is infinite lb1=lb;ub1=ub; if lb==-inf lb1=ub-1; end; ...
github
ylucet/CCA-master
getType.m
.m
CCA-master/macros/plq/getType.m
646
utf_8
b963a76342ad79eed66b859448a50f81
%%%%%%%%%PLQ CONJUGATE HELPER FUNCTION%%%%%%%%%%%%% function plqType=getType(n,x,a,b,c,i) if a(i) == 0 plqType = 1;%part is linear else plqType = 2;%part is quadratic end if n == 1 & x(i) == inf & a(i) == 0 plqType = 3;%LINE - TO - POINT elseif n == 1 & x(i) < inf %POINT -...
github
ylucet/CCA-master
plq_scalar.m
.m
CCA-master/macros/plq/plq_scalar.m
727
utf_8
560ba03ddd66d62e121fe08f9ee1358e
%%%%%%%%%%%%%%PLQ SCALAR MULTIPLCATION FUNCTION%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% function q = plq_scalar(p,lambda) %avoid 0 * inf i=find(p==inf);j=find(p==-inf); q = [p(:,1), lambda*p(:,2:4)]; %restore inf values; if lambda >= 0 q(i)=inf; else q(i)=-inf; %caref...
github
ylucet/CCA-master
plq_conv_on_interval.m
.m
CCA-master/macros/plq/plq_conv_on_interval.m
3,520
utf_8
136f014a8ae025791037254a1c77f4f4
%We assume x(1) < x(2) < x(3) < x(4) < x(5) are ordered and finite (no infinity values). %In creating the PLQ hull we may need to create points x(2) and x(4). %Note that x(1) is the LEFTBOUND, x(3) is the partition point, and x(5) is the RIGHTBOUND in our PLQ interval. %_plq_conv_on_interval finds the convex hull on ...
github
ylucet/CCA-master
plq_me.m
.m
CCA-master/macros/plq/plq_me.m
1,423
utf_8
14d93a30667f540fc25fed4ab4f9638b
%%%%%%%%%%%%%%PIECEWISE LINEAR QUADRATIC MOREAU ENVELOPE (WRAPPER) %%%%%%%%%%%%%% function plqme = plq_me(plqf,lambda,isConvex) if nargin<=2 isConvex=false; end;%default to non-convex functions a = plqf(:,2); if (lambda < 0 | a(1) < 0 | a(end) < 0) maxScale = plq_me_max_scale(plqf); if (lambda < 0...
github
ylucet/CCA-master
plq_rowalwaysinf.m
.m
CCA-master/macros/plq/plq_rowalwaysinf.m
324
utf_8
ed134c2e4377a82b7305df411e88ad48
% A polynomial is always infinite if a and b are not infinite % and not NaN, and c is infinite. function [alwaysinf, sgn] = plq_rowalwaysinf(plqf) alwaysinf = ~(any(isinf(plqf(:,2:end-1)), 2) ...... | any(isnan(plqf(:,2:end-1)), 2)) ...... & isinf(plqf(:,end)); sgn = sign(plqf(:,end));...
github
ylucet/CCA-master
plq_co.m
.m
CCA-master/macros/plq/plq_co.m
394
utf_8
84a6438464a1bd8dadfd7a74e702d207
%%%%%%%%%%PLQ CONVEX HULL%%%%%%%%%%%%%%%%%%%%%%%% %TODO, (1) UPDATE PLQ_EVAL FOR NONCONVEX FUNCTIONS?. % (2) UPDATE PLQ_BUILD FOR NONCONVEX FUNCTIONS. function plqco = plq_co(plqf, method) % Allowed values for method: direct, split. if nargin < 2 method = 'direct'; end; if method == 'direct' pl...
github
ylucet/CCA-master
soqs_build.m
.m
CCA-master/macros/soqs/soqs_build.m
5,023
utf_8
5d3ade6e9a1bf1f46c923cddfcac3598
% _soqs_build % % Builds a Shape-Preserving Osculatory Quadratic Spline (soqs) going % through (x,f(x)) with derivative df(x) at (x,f(x)). % % The code is taken partially from Algorithm 574: Shape-Preserving % Osculatory Quadratic Splines, Feb. 4, 1981 with permission from the % Association for Computing Machinery (ACM...
github
ylucet/CCA-master
soqs_choose.m
.m
CCA-master/macros/soqs/soqs_choose.m
3,372
utf_8
5050d77efb4aae22c93013e66d0cb794
% _soqs_choose % % Auxillary function for _soqs_build to determine the type of spline % regarding derivative slopes and distances between the spline end points. % % The code is taken partially from Algorithm 574: Shape-Preserving % Osculatory Quadratic Splines, Feb. 4, 1981 with permission from the % Association for Co...
github
ylucet/CCA-master
soqs_slopes.m
.m
CCA-master/macros/soqs/soqs_slopes.m
2,680
utf_8
aac2eddc8af85ce3b7b288e83cabd628
% _soqs_slopes % % Auxillary function for _soqs_build to calculate the derivative at each % data point. The slopes provided will insure that an osculatory % quadratic spline will have one additional knot between two adjacent % points of interpolation. Convexity and monotonicity are preserved % wherever these conditions...
github
ylucet/CCA-master
gph_ka.m
.m
CCA-master/macros/gph/gph_ka.m
10,017
utf_8
6448cbb26cb7e4dbecbab6b7fc75e706
% The actual ka calculating function % All matrices in GPH form and the output also is in GPH form % We need 5 parameters, representations are quite obvious % For notation sake, f3 = g here as mentioned in the paper % Return value ka is the GPH matrix of the kernel average % Note : The GPH matrix will have an even numb...
github
ylucet/CCA-master
gph_isEqual.m
.m
CCA-master/macros/gph/gph_isEqual.m
139
utf_8
baea777fec6ab7d18a888d6d313b2480
%returns true if both functions are equal function b = gph_isequal(g1,g2) p1=plq_gph(g1); p2=plq_gph(g2); b = plq_isEqual(p1,p2); end
github
ylucet/CCA-master
gph_me1.m
.m
CCA-master/macros/gph/gph_me1.m
816
utf_8
6db3acd48b9b25ca52f496faae0cd5b2
%works but requires gph_prox. Can we do better? function gphstar = gph_me1(gph,lambda) [b,n] = gph_check(gph); if ~b cerror('Unconsistent gph structure in gph_me1'); end; %do not multiply 3rd row (values of f) to avoid 0*inf giving gphstar = [1 lambda; 0 1] * gph(1:2,:); x = gph(1,:)';%s=gph(2,:);f=gph(3...
github
ylucet/CCA-master
gph_isBounded.m
.m
CCA-master/macros/gph/gph_isBounded.m
168
utf_8
d4a5346e041ef914a25558d0b4c03501
%returns a 1x2 matrix function B = gph_isBounded(gph) B = isinf([(gph(2,2)-gph(2,1))/(gph(1,2)-gph(1,1)), (gph(2,end)-gph(2,end-1))/(gph(1,end)-gph(1,end-1))]); end
github
ylucet/CCA-master
gph_prox.m
.m
CCA-master/macros/gph/gph_prox.m
406
utf_8
0dfa8497825f26f4ad3b641c61dc60be
%TO DO: TEST %compute the proximal mapping of a GPH function %from the graph of the subdifferential %only works for convex functions function Q = gph_prox(G,alpha) if alpha<0 Q=[]; cerror('alpha must be nonnegative'); end; eps=1e-8; P = [1 alpha;1 0] * G(1:2,:); P(3,:)=zeros(size(1,size(P,2))); %convert ...
github
ylucet/CCA-master
intervalIntersect.m
.m
CCA-master/macros/common/intervalIntersect.m
338
utf_8
20cfbfc07e398d3edde51acc558a546c
function J = intervalIntersect(I1,I2) %compute the intersection of 2 intervals %I1,I2: intervals stored as a 1x2 matrix: I1=[lb,ub] %when ub < lb it means the empty set %J: interval J=I1 intersection I2. (may be empty) J(1,1)=max(I1(1),I2(1)); J(1,2)=min(I1(2),I2(2)); end function b = intervalisempty(I) ...
github
ylucet/CCA-master
cerror.m
.m
CCA-master/macros/common/cerror.m
476
utf_8
6979800df65514b0064c984b5be12456
% All CCA functions should use this function instead of error(), % so that we can act differently depending on when we're generating % an error to pass a test or generating one for real. Currently % this function could be eliminated by having __testing_errors = 9999 % in test.sci:errorTestWrapper(), but this way prese...
github
ylucet/CCA-master
colMap.m
.m
CCA-master/macros/common/colMap.m
384
utf_8
9461e54cb1a9cb21e89387075ac3ed52
% Map a function to each of the columns of a matrix, putting the resulting column vectors into the output matrix % @param func A function that takes two parameters (the first is a column vector, % the second the number of the current column) and returns a column vector function out=colMap(func,m) out=[] s=si...
github
ylucet/CCA-master
gph_plot.m
.m
CCA-master/macros/plots/gph_plot.m
1,156
utf_8
3d4ec654a8b20c3434c895ced533a50d
%plot the subdifferential graph of an unknown number of gph functions %(limit of 5 gph functions) %automatically compute the display window and extrapolate to its boundary %see gph_version for utility functions _gph_plotbounds_gph_yCoord,_gph_extendGph function gph_plot(varargin) if(isempty(varargin)) error...
github
ylucet/CCA-master
plq_plot.m
.m
CCA-master/macros/plots/plq_plot.m
480
utf_8
325f581208cb8172b688c23b6a05511e
%Quick plot of one or two PLQ functions %x1, x5 can be finite or infinity values. function plq_plot(plqf1, plqf2, x1, x5) if(nargin < 2) plqf2 = 0; end if(nargin < 3 | x1 == -Inf) x1 = -5; end if(nargin < 4 | x5 == Inf) x5 = 5; end x = linspace(x1,x5, 201); ...
github
ylucet/CCA-master
gph_extendGph.m
.m
CCA-master/macros/plots/gph_extendGph.m
543
utf_8
e086ecc88dacc9aca1bdab0fb5cddb40
%extend the graph to boundary values by linear extrapolation %only return the first 2 rows and discard the 3rd row function G = gph_extendGph(g, rect) if g(1,1) == g(1,2) %vertical line on left %ERROR HERE G=[[g(1,1);rect(2)],g(1:2,:)]; else G=[[rect(1); gph_yCoord(rect(1),g(1,1),g(2,1),g(1,2),g(2...
github
ylucet/CCA-master
gph_yCoord.m
.m
CCA-master/macros/plots/gph_yCoord.m
291
utf_8
739e84ef71a3408dc304fa4908bb0a46
%compute the y coordinate for the poin on the line %going to (xi, yi) at x function y = gph_yCoord(x, x1, y1, x2, y2) if x == x1 %warning("yCoord: x == x1"); %warning message is removed to avoid warning y=y1; else y = (y2-y1)/(x2-x1)* (x-x1) + y1; end end
github
ylucet/CCA-master
plq_plotMultiple.m
.m
CCA-master/macros/plots/plq_plotMultiple.m
1,156
utf_8
3a907cc489ebcaf72b3002edd685d145
%Plot mutiple PLQ functions %x1, x5 can be finite or infinity values function plq_plotMultiple(x1, x5, varargin) if(nargin < 1 | x1 == false | x1 == -Inf) x1 = Inf; for i = 1:length(varargin) f = varargin{i}; lb = max(1, min(find(f(:,4) ~= Inf)) -1); x1 = min(x1, ...
github
panji530/Robust-shape-interaction-matrix-master
hungarian.m
.m
Robust-shape-interaction-matrix-master/hungarian.m
11,781
utf_8
294996aeeca4dadfc427da4f81f8b99d
function [C,T]=hungarian(A) %HUNGARIAN Solve the Assignment problem using the Hungarian method. % %[C,T]=hungarian(A) %A - a square cost matrix. %C - the optimal assignment. %T - the cost of the optimal assignment. %s.t. T = trace(A(C,:)) is minimized over all possible assignments. % Adapted from the FORTRAN ...
github
Vincentqyw/light-field-TB-master
ViewLightField.m
.m
light-field-TB-master/ViewLightField.m
1,062
utf_8
2f47d417127b5f68c9bc44bbbc3a43e5
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % 2015.05.14 Jaesik Park % 2017.10.15 Vincent Qin revised %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % function fn_ViewLightField % input : 5D light field image structure (t,s,y,x,ch), single type pixel intensities. funct...
github
Vincentqyw/light-field-TB-master
LFCalRectifyLF.m
.m
light-field-TB-master/LFToolbox0.4/LFCalRectifyLF.m
4,859
utf_8
58ca494191153d4b172d9f8d2408ca25
% LFCalRectifyLF - rectify a light field using a calibrated camera model, called as part of LFUtilDecodeLytroFolder % % Usage: % [LF, RectOptions] = LFCalRectifyLF( LF, CalInfo, RectOptions ) % [LF, RectOptions] = LFCalRectifyLF( LF, CalInfo ) % % This function is called by LFUtilDecodeLytroFolder to rectify a ...
github
Vincentqyw/light-field-TB-master
LFWriteMetadata.m
.m
light-field-TB-master/LFToolbox0.4/LFWriteMetadata.m
10,271
utf_8
18ac683694e04562a3249c7226bdde52
% LFWriteMetadata - saves variables to a file in JSON format % % Usage: % LFWriteMetadata( JsonFileFname, DataToSave ) % % This function saves data to a JSON file. % % Based on JSONlab by Qianqian Fang, % http://www.mathworks.com.au/matlabcentral/fileexchange/33381-jsonlab-a-toolbox-to-encodedecode-json-files-in-m...
github
Vincentqyw/light-field-TB-master
LFBuild4DFreqDualFan.m
.m
light-field-TB-master/LFToolbox0.4/LFBuild4DFreqDualFan.m
4,955
utf_8
b925c1d38066faa9f44d0c51b8c68d91
% LFBuild4DFreqDualFan - construct a 4D dual-fan passband filter in the frequency domain % % Usage: % % [H, FiltOptions] = LFBuild4DFreqDualFan( LFSize, Slope, BW, FiltOptions ) % H = LFBuild4DFreqDualFan( LFSize, Slope, BW ) % % This file constructs a real-valued magnitude response in 4D, for which the pas...
github
Vincentqyw/light-field-TB-master
LFBuild4DFreqHypercone.m
.m
light-field-TB-master/LFToolbox0.4/LFBuild4DFreqHypercone.m
4,501
utf_8
256d28a026711e06809d334c23db0633
% LFBuild4DFreqHypercone - construct a 4D hypercone passband filter in the frequency domain % % Usage: % % [H, FiltOptions] = LFBuild4DFreqHypercone( LFSize, Slope, BW, FiltOptions ) % H = LFBuild4DFreqHypercone( LFSize, Slope, BW ) % % This file constructs a real-valued magnitude response in 4D, for which ...
github
Vincentqyw/light-field-TB-master
LFUtilProcessWhiteImages.m
.m
light-field-TB-master/LFToolbox0.4/LFUtilProcessWhiteImages.m
12,517
utf_8
82b7183214df46d50702d31ad904317c
% LFUtilProcessWhiteImages - process a folder/tree of white images by fitting a grid model to each % % Usage: % % LFUtilProcessWhiteImages % LFUtilProcessWhiteImages( WhiteImagesPath ) % LFUtilProcessWhiteImages( WhiteImagesPath, FileOptions, GridModelOptions ) % LFUtilProcessWhiteImages( WhiteImagesPat...
github
Vincentqyw/light-field-TB-master
LFCalDispEstPoses.m
.m
light-field-TB-master/LFToolbox0.4/LFCalDispEstPoses.m
2,604
utf_8
1f7d8e57212bcbb143d2c597e59038f3
% LFCalDispEstPoses - Visualize pose estimates associated with a calibration info file % % Usage: % LFCalDispEstPoses( InputPath, CalOptions, DrawFrameSizeMult, BaseColour ) % % Draws a set of frames, one for each camera pose, in the colour defined by BaseColour. All inputs % except InputPath are optional. Pass an...
github
Vincentqyw/light-field-TB-master
LFMatlabPathSetup.m
.m
light-field-TB-master/LFToolbox0.4/LFMatlabPathSetup.m
629
utf_8
09c19ebacb36d9e2d70336dd7f62bc9c
% LFMatlabPathSetup - convenience function to add the light field toolbox to matlab's path % % It may be convenient to add this to your startup.m file. % Part of LF Toolbox v0.4 released 12-Feb-2015 % Copyright (c) 2013-2015 Donald G. Dansereau function LFMatlabPathSetup % Find the path to this script, and use it as...
github
Vincentqyw/light-field-TB-master
LFReadLFP.m
.m
light-field-TB-master/LFToolbox0.4/LFReadLFP.m
9,456
utf_8
12a412c0c96c3bd388028f4eb975749f
% LFReadLFP - Load a lytro LFP / LFR file % % Usage: % [LFP, ExtraSections] = LFReadLFP( Fname ) % % The Lytro LFP is a container format and may contain one of several types of data. The file extension varies based on % the source of the files, with exported files, on-camera files and image library files variousl...
github
Vincentqyw/light-field-TB-master
LFBuild4DFreqHyperfan.m
.m
light-field-TB-master/LFToolbox0.4/LFBuild4DFreqHyperfan.m
4,676
utf_8
2bec28d4e5b0d48494ee457844595957
% LFBuild4DFreqHyperfan - construct a 4D hyperfan passband filter in the frequency domain % % Usage: % % [H, FiltOptions] = LFBuild4DFreqHyperfan( LFSize, Slope, BW, FiltOptions ) % H = LFBuild4DFreqHyperfan( LFSize, Slope, BW ) % % This file constructs a real-valued magnitude response in 4D, for which the ...
github
Vincentqyw/light-field-TB-master
LFUtilProcessCalibrations.m
.m
light-field-TB-master/LFToolbox0.4/LFUtilProcessCalibrations.m
3,086
utf_8
b7ed374da00985b749186101dccbfc70
% LFUtilProcessCalibrations - process a folder/tree of camera calibrations % % Usage: % % LFUtilProcessCalibrations % LFUtilProcessCalibrations( CalibrationsPath ) % LFUtilProcessCalibrations( CalibrationsPath, FileOptions ) % LFUtilProcessCalibrations( [], FileOptions ) % % All parameters are optional...
github
Vincentqyw/light-field-TB-master
LFUtilExtractLFPThumbs.m
.m
light-field-TB-master/LFToolbox0.4/LFUtilExtractLFPThumbs.m
2,528
utf_8
bcf530be1d01e6c00268cf5bbf398fde
% LFUtilExtractLFPThumbs - extract thumbnails from LFP files and write to disk % % Usage: % % LFUtilExtractLFPThumbs % LFUtilExtractLFPThumbs( InputPath ) % % This extracts the thumbnail preview and focal stack images from LFR and LFP files, and is useful in providing a % preview, e.g. when copying files direct...
github
Vincentqyw/light-field-TB-master
LFFilt2DFFT.m
.m
light-field-TB-master/LFToolbox0.4/LFFilt2DFFT.m
4,344
utf_8
94c37a901f7a9a1271d469d23be351cc
% LFFilt2DFFT - Apply a 2D frequency-domain filter to a 4D light field using the FFT % % Usage: % % [LF, FiltOptions] = LFFilt2DFFT( LF, H, FiltDims, FiltOptions ) % LF = LFFilt2DFFT( LF, H, FiltDims ) % % % This filter works on 2D slices of the input light field, applying the 2D filter H to each in turn. It ...
github
Vincentqyw/light-field-TB-master
LFBuild2DFreqLine.m
.m
light-field-TB-master/LFToolbox0.4/LFBuild2DFreqLine.m
4,431
utf_8
0dcc452b6b957958b7243b285453790b
% LFBuild2DFreqLine - construct a 2D line passband filter in the frequency domain % % Usage: % % [H, FiltOptions] = LFBuild2DFreqLine( LFSize, Slope, BW, FiltOptions ) % H = LFBuild2DFreqLine( LFSize, Slope, BW ) % % This file constructs a real-valued magnitude response in 2D, for which the passband is a li...
github
Vincentqyw/light-field-TB-master
LFColourCorrect.m
.m
light-field-TB-master/LFToolbox0.4/LFColourCorrect.m
1,999
utf_8
07c213f4b7fbcaa5ad2fae5e30c82edf
% LFColourCorrect - applies a colour correction matrix, balance vector, and gamma, called by LFUtilDecodeLytroFolder % % Usage: % LF = LFColourCorrect( LF, ColMatrix, ColBalance, Gamma ) % % This implementation deals with saturated input pixels by aggressively saturating output pixels. % % Inputs : % % LF : ...
github
Vincentqyw/light-field-TB-master
LFBuild4DFreqPlane.m
.m
light-field-TB-master/LFToolbox0.4/LFBuild4DFreqPlane.m
4,768
utf_8
44b35c86e926ed95961fbf34e0872ffb
% LFBuild4DFreqPlane - construct a 4D planar passband filter in the frequency domain % % Usage: % % [H, FiltOptions] = LFBuild4DFreqPlane( LFSize, Slope, BW, FiltOptions ) % H = LFBuild4DFreqPlane( LFSize, Slope, BW ) % % This file constructs a real-valued magnitude response in 4D, for which the passband is...
github
Vincentqyw/light-field-TB-master
LFFindFilesRecursive.m
.m
light-field-TB-master/LFToolbox0.4/LFFindFilesRecursive.m
3,789
utf_8
d7e26a587e0dd5460fb2f59371802d2e
% LFFindFilesRecursive - Recursively searches a folder for files matching one or more patterns % % Usage: % % [AllFiles, BasePath, FolderList, PerFolderFiles] = LFFindFilesRecursive( InputPath ) % % Inputs: % % InputPath: the folder to recursively search % % Outputs: % % Allfiles : A list of all file...
github
Vincentqyw/light-field-TB-master
LFDispMousePan.m
.m
light-field-TB-master/LFToolbox0.4/LFDispMousePan.m
3,147
utf_8
19664da990653623f36d25770af65dec
% LFDispMousePan - visualize a 4D light field using the mouse to pan through two dimensions % % Usage: % FigureHandle = LFDispMousePan( LF ) % FigureHandle = LFDispMousePan( LF, ScaleFactor ) % % A figure is set up for high-performance display, with the tag 'LFDisplay'. Subsequent calls to % this function an...
github
Vincentqyw/light-field-TB-master
LFReadGantryArray.m
.m
light-field-TB-master/LFToolbox0.4/LFReadGantryArray.m
4,902
utf_8
80dc406ff9c8008ff8aa0877a0fcdb0f
% LFReadGantryArray - load gantry-style light field, e.g. the Stanford light fields at lightfield.stanford.edu % % Usage: % % LF = LFReadGantryArray( InputPath, DecodeOptions ) % % To use, download and unzip an image archive from the Stanford light field archive, and pass this function the path to % the unzipped ...
github
Vincentqyw/light-field-TB-master
LFRecenterIntrinsics.m
.m
light-field-TB-master/LFToolbox0.4/LFRecenterIntrinsics.m
599
utf_8
95e4073ad162508fcaf1705124873fc5
% LFRecenterIntrinsics - Recenter a light field intrinsic matrix % % Usage: % H = LFRecenterIntrinsics( H, LFSize ) % % The recentering works by forcing the central sample in a light field of LFSize samples to % correspond to the ray [s,t,u,v] = 0. Note that 1-based indexing is assumed in [i,j,k,l]. % Part of LF T...
github
Vincentqyw/light-field-TB-master
LFCalDispRectIntrinsics.m
.m
light-field-TB-master/LFToolbox0.4/LFCalDispRectIntrinsics.m
3,804
utf_8
9881daba2d9060eef02a39e1c9ac81dd
% LFCalDispRectIntrinsics - Visualize sampling pattern resulting from a prescribed intrinsic matrix % % Usage: % RectOptions = LFCalDispRectIntrinsics( LF, LFMetadata, RectOptions, PaintColour ) % % During rectification, the matrix RectOptions.RectCamIntrinsicsH determines which subset of the light field gets % sa...
github
Vincentqyw/light-field-TB-master
LFFiltShiftSum.m
.m
light-field-TB-master/LFToolbox0.4/LFFiltShiftSum.m
5,666
utf_8
08be7f6f27c502a03f85f49912ae8183
% LFFiltShiftSum - a spatial-domain depth-selective filter, with an effect similar to planar focus % % Usage: % % [ImgOut, FiltOptions, LF] = LFFiltShiftSum( LF, Slope, FiltOptions ) % ImgOut = LFFiltShiftSum( LF, Slope ) % % % This filter works by shifting all u,v slices of the light field to a common depth, ...
github
Vincentqyw/light-field-TB-master
LFUtilUnpackLytroArchive.m
.m
light-field-TB-master/LFToolbox0.4/LFUtilUnpackLytroArchive.m
5,667
utf_8
0af0d42eaef631b6f44fbfc81dd81b3e
% LFUtilUnpackLytroArchive - extract white images and other files from a multi-volume Lytro archive % % Usage: % LFUtilUnpackLytroArchive % LFUtilUnpackLytroArchive( InputPath ) % LFUtilUnpackLytroArchive( InputPath, FirstVolumeFname ) % LFUtilUnpackLytroArchive( [], FirstVolumeFname ) % % This extract...
github
Vincentqyw/light-field-TB-master
LFReadMetadata.m
.m
light-field-TB-master/LFToolbox0.4/LFReadMetadata.m
14,953
utf_8
98e987806e2f748e70644b1801d2bf95
% LFReadMetadata - reads the metadata files in the JSON file format, from a file or a char buffer % % Usage: % % Data = LFReadMetadata( JsonFileFname ) % % This function parses a JSON file and returns the data contained therein. If a char buffer is passed in, it's % interpreted directly. % % Based on code from JS...
github
Vincentqyw/light-field-TB-master
LFUtilDecodeLytroFolder.m
.m
light-field-TB-master/LFToolbox0.4/LFUtilDecodeLytroFolder.m
16,946
utf_8
6867204a9b31f8807a667ab1fe4fa420
% LFUtilDecodeLytroFolder - decode and optionally colour correct and rectify Lytro light fields % % Usage: % % LFUtilDecodeLytroFolder % LFUtilDecodeLytroFolder( InputPath ) % LFUtilDecodeLytroFolder( InputPath, FileOptions, DecodeOptions, RectOptions ) % LFUtilDecodeLytroFolder( InputPath, [], [], Rect...
github
Vincentqyw/light-field-TB-master
LFFilt4DFFT.m
.m
light-field-TB-master/LFToolbox0.4/LFFilt4DFFT.m
3,622
utf_8
bb1d9662c072ab5fb38568d45f44bd28
% LFFilt4DFFT -Applies a 4D frequency-domain filter using the FFT % % Usage: % % [LF, FiltOptions] = LFFilt4DFFT( LF, H, FiltOptions ) % LF = LFFilt4DFFT( LF, H ) % % % This filter works by taking the FFT of the input light field, multiplying by the provided magnitude response H, then % calling the inverse FFT...
github
Vincentqyw/light-field-TB-master
LFUtilCalLensletCam.m
.m
light-field-TB-master/LFToolbox0.4/LFUtilCalLensletCam.m
8,438
utf_8
56382b29c1b601dbae1ec2d6763a51b0
% LFUtilCalLensletCam - calibrate a lenslet-based light field camera % % Usage: % % LFUtilCalLensletCam % LFUtilCalLensletCam( Inputpath ) % LFUtilCalLensletCam( InputPath, CalOptions ) % LFUtilProcessCalibrations( [], CalOptions ) % % All parameters are optional and take on default values as set in the...
github
Vincentqyw/light-field-TB-master
LFHistEqualize.m
.m
light-field-TB-master/LFToolbox0.4/LFHistEqualize.m
6,002
utf_8
aaaa0313c7b80ba9ccf5524a24026bdb
% LFHistEqualize - histogram-based contrast adjustment % % Usage: % % LF = LFHistEqualize( LF ) % [LF, LowerBound, UpperBound] = LFHistEqualize( LF, Cutoff_percent ) % LF = LFHistEqualize( LF, [], LowerBound, UpperBound ) % LF = LFHistEqualize(LF, Cutoff_percent, [], [], Precision) % % This function p...
github
Vincentqyw/light-field-TB-master
LFReadRaw.m
.m
light-field-TB-master/LFToolbox0.4/LFReadRaw.m
2,387
utf_8
f61af2a213353cf523d8d47f5fd665aa
% LFReadRaw - Reads 8, 10, 12 and 16-bit raw image files % % Usage: % % Img = LFReadRaw( Fname ) % Img = LFReadRaw( Fname, BitPacking, ImgSize ) % Img = LFReadRaw( Fname, [], ImgSize ) % % There is no universal `RAW' file format. This function reads a few variants, including the 12-bit and 10-bit files % ...
github
Vincentqyw/light-field-TB-master
LFDispVidCirc.m
.m
light-field-TB-master/LFToolbox0.4/LFDispVidCirc.m
3,251
utf_8
7f29b601b697f1bf5daf1621b54fe7b0
% LFDispVidCirc - visualize a 4D light field animating a circular path through two dimensions % % Usage: % % FigureHandle = LFDispVidCirc( LF ) % FigureHandle = LFDispVidCirc( LF, PathRadius_percent, FrameDelay ) % FigureHandle = LFDispVidCirc( LF, PathRadius_percent, FrameDelay, ScaleFactor ) % Figu...
github
Vincentqyw/light-field-TB-master
LFDisp.m
.m
light-field-TB-master/LFToolbox0.4/LFDisp.m
1,447
utf_8
e7dcaf88325fd23f136fac4a166709e5
% LFDisp - Convenience function to display a 2D slice of a light field % % Usage: % LFSlice = LFDispMousePan( LF ) % LFDispMousePan( LF ) % % % The centermost image is taken in s and t. Also works with 3D arrays of images. If an output argument is included, no % display is generated, but the e...
github
Vincentqyw/light-field-TB-master
LFBuild2DFreqFan.m
.m
light-field-TB-master/LFToolbox0.4/LFBuild2DFreqFan.m
4,507
utf_8
d3bc64badf14c750b5f1f2a996936c1f
% LFBuild2DFreqFan - construct a 2D fan passband filter in the frequency domain % % Usage: % % [H, FiltOptions] = LFBuild2DFreqFan( LFSize, Slope1, Slope2, BW, FiltOptions ) % H = LFBuild2DFreqFan( LFSize, Slope, BW ) % % This file constructs a real-valued magnitude response in 2D, for which the passband is...
github
Vincentqyw/light-field-TB-master
LFDefaultIntrinsics.m
.m
light-field-TB-master/LFToolbox0.4/SupportFunctions/LFDefaultIntrinsics.m
2,030
utf_8
948ce39fff4f94ed954e090033778c04
% LFDefaultIntrinsics - Initializes a set of intrinsics for use in rectifying light fields % % Usage: % % RectCamIntrinsicsH = LFDefaultIntrinsics( LFSize, CalInfo ) % % This gets called by LFCalDispRectIntrinsics to set up a default set of intrinsics for rectification. Based on the % calibration information and...
github
Vincentqyw/light-field-TB-master
LFDefaultField.m
.m
light-field-TB-master/LFToolbox0.4/SupportFunctions/LFDefaultField.m
1,979
utf_8
485dfac0b4aba775cf4d1d20f537f0f7
% LFDefaultField - Convenience function to set up structs with default field values % % Usage: % % ParentStruct = LFDefaultField( ParentStruct, FieldName, DefaultVal ) % % This provides an elegant way to establish default field values in a struct. See LFDefaultValue for % setting up non-struct variables with defa...
github
Vincentqyw/light-field-TB-master
LFSign.m
.m
light-field-TB-master/LFToolbox0.4/SupportFunctions/LFSign.m
225
utf_8
901dea01bff401571d8125711feeffad
% LFSign - Like Matlab's sign, but never returns 0, treating 0 as positive % Part of LF Toolbox v0.4 released 12-Feb-2015 % Copyright (c) 2013-2015 Donald G. Dansereau function s = LFSign(i) s = ones(size(i)); s(i<0) = -1;
github
Vincentqyw/light-field-TB-master
LFRotz.m
.m
light-field-TB-master/LFToolbox0.4/SupportFunctions/LFRotz.m
306
utf_8
2a4fc216ff9e1b6b35762c010ebe50f2
% LFRotz - simple 3D rotation matrix, rotation about z % % Usage: % R = LFRotz( psi ) % % Part of LF Toolbox v0.4 released 12-Feb-2015 % Copyright (c) 2013-2015 Donald G. Dansereau function R = LFRotz(psi) c = cos(psi); s = sin(psi); R = [ c, -s, 0; ... s, c, 0; ... 0, 0, 1 ];
github
Vincentqyw/light-field-TB-master
LFHelperBuild4DFreq.m
.m
light-field-TB-master/LFToolbox0.4/SupportFunctions/LFHelperBuild4DFreq.m
4,143
utf_8
5cefe44f63c8fd80b66ad5e267298bff
% LFHelperBuild4DFreq - Helper function used to construct 4D frequency-domain filters % % Much of the complexity in constructing MD frequency-domain filters, especially around including aliased components and % controlling the filter rolloff, is common between filter shapes. This function wraps much of this complexity...
github
Vincentqyw/light-field-TB-master
LFCalInit.m
.m
light-field-TB-master/LFToolbox0.4/SupportFunctions/LFCalInit.m
10,538
utf_8
50b5d42f601852034d9bfaa26788439a
% LFCalInit - initialize calibration estimate, called by LFUtilCalLensletCam % % Usage: % CalOptions = LFCalInit( InputPath, CalOptions ) % CalOptions = LFCalInit( InputPath ) % % This function is called by LFUtilCalLensletCam to initialize a pose and camera model estimate % given a set of extracted checkerboa...
github
Vincentqyw/light-field-TB-master
LFHelperBuild2DFreq.m
.m
light-field-TB-master/LFToolbox0.4/SupportFunctions/LFHelperBuild2DFreq.m
3,367
utf_8
3cd16d8e0a260aa2447e46ea325a04f9
% LFHelperBuild2DFreq - Helper function used to construct 2D frequency-domain filters % % Much of the complexity in constructing MD frequency-domain filters, especially around including aliased components and % controlling the filter rolloff, is common between filter shapes. This function wraps much of this complexity...
github
Vincentqyw/light-field-TB-master
LFFindLytroPartnerFile.m
.m
light-field-TB-master/LFToolbox0.4/SupportFunctions/LFFindLytroPartnerFile.m
1,439
utf_8
a4f3d1519bad3b234bde99c00a97ea3d
% LFFindLytroPartnerFile - Finds metadata / raw data file partner for Lytro white images % % Usage: % % PartnerFilename = LFFindLytroPartnerFile( OrigFilename, PartnerFilenameExtension ) % % The LF Reader tool prepends filenames extracted from LFP storage files, complicating .txt / .raw % file association as the ...
github
Vincentqyw/light-field-TB-master
LFVar2Struct.m
.m
light-field-TB-master/LFToolbox0.4/SupportFunctions/LFVar2Struct.m
646
utf_8
8e9d0eed0d9242fdf45c14ba302e05d2
% 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 = % ...
github
Vincentqyw/light-field-TB-master
LFBuildLensletGridModel.m
.m
light-field-TB-master/LFToolbox0.4/SupportFunctions/LFBuildLensletGridModel.m
9,749
utf_8
77a704b9345494e7a5ab0bc07f763d10
% LFBuildLensletGridModel - builds a lenslet grid model from a white image, called by LFUtilProcessWhiteImages % % Usage: % [LensletGridModel, GridCoords] = LFBuildLensletGridModel( WhiteImg, GridModelOptions, DebugDisplay ) % % Inputs: % WhiteImg : path of an image taken through a diffuser, or of an e...
github
Vincentqyw/light-field-TB-master
LFDefaultVal.m
.m
light-field-TB-master/LFToolbox0.4/SupportFunctions/LFDefaultVal.m
1,291
utf_8
c246f7b5e263b013ced34d42170f53b4
% LFDefaultVal - Convenience function to set up default parameter values % % Usage: % % Var = LFDefaultVal( Var, DefaultVal ) % % % This provides an elegant way to establish default parameter values. See LFDefaultField for setting % up structs with default field values. % % Inputs: % % Var: string giving the ...
github
Vincentqyw/light-field-TB-master
LFDispSetup.m
.m
light-field-TB-master/LFToolbox0.4/SupportFunctions/LFDispSetup.m
2,717
utf_8
018642a726ed8feb41058f29f9ffeb14
% LFDispSetup - helper function used to set up a light field display % % Usage: % % [ImageHandle, FigureHandle] = LFDispSetup( InitialFrame ) % [ImageHandle, FigureHandle] = LFDispSetup( InitialFrame, ScaleFactor ) % % % This sets up a figure for LFDispMousePan and LFDispVidCirc. The figure is configured f...
github
Vincentqyw/light-field-TB-master
LFGatherCamInfo.m
.m
light-field-TB-master/LFToolbox0.4/SupportFunctions/LFGatherCamInfo.m
2,778
utf_8
c0acfa7e282c05682ab4f98ab740a59c
% LFGatherCamInfo - collect metadata from a folder of processed white images or calibrations % % Usage: % % CamInfo = LFGatherCamInfo( FilePath, FilenamePattern ) % % % This function is designed to work with one of two sources of information: a folder of Lytro white % images, as extracted from the calibration dat...
github
Vincentqyw/light-field-TB-master
LFToolboxVersion.m
.m
light-field-TB-master/LFToolbox0.4/SupportFunctions/LFToolboxVersion.m
252
utf_8
d37c67edd0424685c2530c25195c3826
% LFToolboxVersion - returns a string describing the current toolbox version % Part of LF Toolbox v0.4 released 12-Feb-2015 % Copyright (c) 2013-2015 Donald G. Dansereau function VersionStr = LFToolboxVersion VersionStr = 'v0.4 released 12-Feb-2015';
github
Vincentqyw/light-field-TB-master
LFStruct2Var.m
.m
light-field-TB-master/LFToolbox0.4/SupportFunctions/LFStruct2Var.m
871
utf_8
bd1821a5700012dfce0f79c4d5dd8ab0
% LFStruct2Var - Convenience function to break a subset of variables out of a struct % % Usage: % [var1, var2, ...] = LFStruct2Var( StructIn, 'var1', 'var2', ... ) % % This would ideally exclude the named variables in the argument list, but there was no elegant way % to do this given the absence of an `outputname'...