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 | andreafarina/SOLUS-master | fix_lines.m | .m | SOLUS-master/src/util/export_fig/fix_lines.m | 6,441 | utf_8 | ffda929ebad8144b1e72d528fa5d9460 | %FIX_LINES Improves the line style of eps files generated by print
%
% Examples:
% fix_lines fname
% fix_lines fname fname2
% fstrm_out = fixlines(fstrm_in)
%
% This function improves the style of lines in eps files generated by
% MATLAB's print function, making them more similar to those seen on
% scre... |
github | andreafarina/SOLUS-master | splsqr.m | .m | SOLUS-master/src/util/regu/splsqr.m | 4,613 | utf_8 | 0181a37f320874537246273fe4ae9b3a | function x = splsqr(A,b,lambda,Vsp,maxit,tol,reorth)
%SPLSQR Subspace preconditioned LSQR for discrete ill-posed problems.
%
% x = splsqr(A,b,lambda,Vsp,maxit,tol,reorth)
%
% Subspace preconditioned LSQR (SP-LSQR) for solving the Tikhonov problem
% min { || A x - b ||^2 + lambda^2 || x ||^2 }
% with a precond... |
github | andreafarina/SOLUS-master | discrep.m | .m | SOLUS-master/src/util/regu/discrep.m | 5,823 | utf_8 | a520d1bf79c0055419bc02e05bebc36e | function [x_delta,lambda] = discrep(U,s,V,b,delta,x_0)
%DISCREP Discrepancy principle criterion for choosing the reg. parameter.
%
% [x_delta,lambda] = discrep(U,s,V,b,delta,x_0)
% [x_delta,lambda] = discrep(U,sm,X,b,delta,x_0) , sm = [sigma,mu]
%
% Least squares minimization with a quadratic inequality constra... |
github | andreafarina/SOLUS-master | corner.m | .m | SOLUS-master/src/util/regu/corner.m | 8,640 | utf_8 | 1fc59ce57e9ede542069ef7b1fce444d | function [k_corner,info] = corner(rho,eta,fig)
%CORNER Find corner of discrete L-curve via adaptive pruning algorithm.
%
% [k_corner,info] = corner(rho,eta,fig)
%
% Returns the integer k_corner such that the corner of the log-log
% L-curve is located at ( log(rho(k_corner)) , log(eta(k_corner)) ).
%
% The vecto... |
github | andreafarina/SOLUS-master | splsqrL.m | .m | SOLUS-master/src/util/regu/splsqrL.m | 5,128 | utf_8 | 1e24aa441349e75e253fbc2c5296364f | function x = splsqr(A,L,b,lambda,Vsp,maxit,tol,reorth)
%SPLSQR Subspace preconditioned LSQR for discrete ill-posed problems.
%
% x = splsqr(A,L,b,lambda,Vsp,maxit,tol,reorth)
%
% Subspace preconditioned LSQR (SP-LSQR) for solving the Tikhonov problem
% min { || A x - b ||^2 + lambda^2 || L x ||^2 }
% with a p... |
github | andreafarina/SOLUS-master | RecSolverTK0_TD.m | .m | SOLUS-master/src/solvers/RecSolverTK0_TD.m | 5,808 | utf_8 | d062281845b0da893711d62f1f5c8a01 | %==========================================================================
% This function contains solvers for DOT or fDOT.
% To have available all the functionalty install REGU toolbox
% Andrea Farina 12/16
% Andrea Farina 11/2020: simplified normalizations of X, Jac, Data, dphi
%====================================... |
github | andreafarina/SOLUS-master | RecSolverL1_TD_.m | .m | SOLUS-master/src/solvers/RecSolverL1_TD_.m | 4,567 | utf_8 | 71ec8697b0a2f9804c46ee57893e22bf | %==========================================================================
% This function contains solvers for DOT or fDOT.
% To have available all the functionalty install REGU toolbox
% Andrea Farina 12/16
%==========================================================================
function [bmua,bmus] = RecS... |
github | andreafarina/SOLUS-master | FitVoxel.m | .m | SOLUS-master/src/solvers/FitVoxel.m | 1,246 | utf_8 | 814d3aee178f4f2b0dcc28baf8428dea | function [fbmua,fbmus,fbConc,fbA,fbbB]=FitVoxel(bmua,bmus,spe)
nL = spe.nLambda;
nV = size(bmua,1);
opts = optimoptions('lsqcurvefit',...
'Jacobian','off',...
...'Algorithm','levenberg-marquardt',...
'DerivativeCheck','off',...
'MaxIter',100,'Display','none','FinDiffRelStep',repmat(1e-5,2,1));%,'TolFun'... |
github | andreafarina/SOLUS-master | SpectralFitConcAB_TD.m | .m | SOLUS-master/src/solvers/SpectralFitConcAB_TD.m | 12,999 | utf_8 | bd7e1ac5ac742c497e6277031ba22e18 |
%==========================================================================
% This function contains a solver for fitting optical properties of
% homogeneous phantom using routines in Matlab Optimization Toolbox
%
% Andrea Farina 10/15
%==========================================================================
functi... |
github | andreafarina/SOLUS-master | SpectralFitMuaMus_TD.m | .m | SOLUS-master/src/solvers/SpectralFitMuaMus_TD.m | 8,682 | utf_8 | ccd66ec5f1e92daf914cde29ebd9337d | %==========================================================================
% This function contains a solver for fitting optical properties of
% homogeneous phantom using routines in Matlab Optimization Toolbox
%
% Andrea Farina 10/15
%==========================================================================
functio... |
github | andreafarina/SOLUS-master | FitMuaMus_TD_weighted.m | .m | SOLUS-master/src/solvers/FitMuaMus_TD_weighted.m | 10,607 | utf_8 | 07f0b1aacd410d6c21dee2788a9f6667 | %==========================================================================
% This function contains a solver for fitting optical properties of
% homogeneous phantom using routines in Matlab Optimization Toolbox
%
% Andrea Farina 10/15
%==========================================================================
functio... |
github | andreafarina/SOLUS-master | FitMuaMus_TD.m | .m | SOLUS-master/src/solvers/FitMuaMus_TD.m | 9,595 | utf_8 | 6828e8f9c41383ef887ca557ec1099f3 | %==========================================================================
% This function contains a solver for fitting optical properties of
% homogeneous phantom using routines in Matlab Optimization Toolbox
%
% Andrea Farina 10/15
% Andrea Farina 11/20 fixed error arising by fitting with fraction
%================... |
github | andreafarina/SOLUS-master | RecSolverTK0_spectra_TD.m | .m | SOLUS-master/src/solvers/RecSolverTK0_spectra_TD.m | 6,653 | utf_8 | 5841b7f325397ee3e0718a2305ef93f2 | %==========================================================================
% This function contains solvers for DOT or fDOT.
% To have available all the functionalty install REGU toolbox
% Andrea Farina 12/16
%==========================================================================
function [bmua,bmus,bconc,bA,bB] ... |
github | andreafarina/SOLUS-master | RecSolverL1_TD.m | .m | SOLUS-master/src/solvers/RecSolverL1_TD.m | 7,236 | utf_8 | 0b4532c2e96fb136be141dd62b376dc0 | %==========================================================================
% This function contains solvers for DOT or fDOT.
% To have available all the functionalty install REGU toolbox
% Andrea Farina 12/16
%==========================================================================
function [bmua,bmus] = RecS... |
github | andreafarina/SOLUS-master | RecSolverGN_TD.m | .m | SOLUS-master/src/solvers/RecSolverGN_TD.m | 12,667 | utf_8 | 22bea224cd1aeec0f91147fef69edc03 | %==========================================================================
% This function contains solvers for DOT or fDOT.
% To have available all the functionalty install REGU toolbox
% Andrea Farina 05/15
%==========================================================================
function [bmua,bmus,erri] = RecSo... |
github | andreafarina/SOLUS-master | RecSolverBORN_CW.m | .m | SOLUS-master/src/solvers/RecSolverBORN_CW.m | 4,994 | utf_8 | f353cef1f4fa512abeb5e877a927313d | %==========================================================================
% This function contains solvers for DOT or fDOT.
% To have available all the functionalty install REGU toolbox
% Andrea Farina 12/16
%==========================================================================
function [bmua,bmus] = RecS... |
github | andreafarina/SOLUS-master | RecSolverTK1_TD.m | .m | SOLUS-master/src/solvers/RecSolverTK1_TD.m | 4,637 | utf_8 | e6ae7733c83a817546c4d99240d00bdf | %==========================================================================
% This function contains solvers for DOT or fDOT.
% Andrea Farina 04/17
% Andrea Farina 11/2020: simplified normalizations of X, Jac, Data, dphi
%==========================================================================
function [bmua,bmus] =... |
github | andreafarina/SOLUS-master | Fit2Mua2Mus_TD.m | .m | SOLUS-master/src/solvers/Fit2Mua2Mus_TD.m | 6,126 | utf_8 | 35cf1e3b713af5f0162fad4ecd5c12f2 | %==========================================================================
% This function contains a solver for fitting optical properties of
% 2 regions mesh using TOAST as forward and Matlab Optimization Toolbox
%
% Andrea Farina 02/18
%==========================================================================
fun... |
github | andreafarina/SOLUS-master | RecSolverTK1_spectra_TD.m | .m | SOLUS-master/src/solvers/RecSolverTK1_spectra_TD.m | 5,352 | utf_8 | ecf0e59511a88c73993c0a170b83dd4e | %==========================================================================
% This function contains solvers for DOT or fDOT.
% Andrea Farina 04/17
%==========================================================================
function [bmua,bmus,bconc,bA,bB] = RecSolverTK1_spectra_TD(solver,grid,mua0,mus0, n, A,...... |
github | andreafarina/SOLUS-master | setHete.m | .m | SOLUS-master/src/subroutines/setHete.m | 2,169 | utf_8 | 475ae79d62d08c374b9af95a0844f3af | %==========================================================================
% This version of steHete requires the geometry of the honomogeneity
%
% N. Ducros - Departamento di Fisica - Politecnico di Milano - 15/01/09
% N. Ducros - Departamento di Fisica - Politecnico di Milano - 02/02/09
% N. Ducros - Departamen... |
github | andreafarina/SOLUS-master | sphere3D.m | .m | SOLUS-master/src/subroutines/sphere3D.m | 6,285 | utf_8 | 59757a2b622bcab5b18466c12af11847 | %-------------------------------------------------------------------------%
% Add a spherical inhomogeneity
%
% c -- [1x3] -- position of the center of the sphere
% var -- string -- the field you wanna mofify
% back -- [1x1] -- background value of 'var'
% DISTRIB -- string -- indica... |
github | andreafarina/SOLUS-master | cylinder3D.m | .m | SOLUS-master/src/subroutines/cylinder3D.m | 8,364 | utf_8 | 33231d4c4a08d5b0dee675158407e8f3 | %-------------------------------------------------------------------------%
% Add a cylindrical inhomogeneity
%
% c -- [1x3] -- a point on the axis of the cylinder
% d -- [1x3] -- the direction of the axis of the cylinder
% var -- string -- the field you wanna mofify
% back -- [... |
github | andreafarina/SOLUS-master | prior3D.m | .m | SOLUS-master/src/subroutines/prior3D.m | 3,176 | utf_8 | 9bd7d15c3e7e055072acf30d162488f6 | %-------------------------------------------------------------------------%
% Add a generic inhomogeneity
%
% var -- string -- the field you wanna mofify
% back -- [1x1] -- background value of 'var'
% INTENSITY -- [1x1] -- maximum value of the inhomogeneous 'var'
%
% No profiles are implemented. We g... |
github | andreafarina/SOLUS-master | remove_voxels.m | .m | SOLUS-master/src/subroutines/remove_voxels.m | 468 | utf_8 | bed213d459f444c0f6d71d1219b366df | % load('C:\Users\monia\Desktop\PROVE\15-2m\0.01spectral_tk1-ROItuttalacurva_fattorediconversione\Test_Standard_REC')
function [bmua, bmusp, bConc] = remove_voxels(bmua, bmusp, bConc, dim, mua0, musp0, conc0)
for j = 1 : (dim(1)*dim(2))
bConc(j,:) = conc0(:);
end
for j = 1 : (dim(1)*dim(2))
bmua(j,:) = mua0(:);
... |
github | andreafarina/SOLUS-master | setGrid.m | .m | SOLUS-master/src/subroutines/setGrid.m | 2,690 | utf_8 | 732894c18aa28cb60b948248c2b5042e | % =========================================================================
% This function sets the reconstruction grid
%
% N. Ducros - Departimento di Fisica - Politecnico di Milano - 24/09/10
% A. Farina - CNR-IFN - Dip. di Fisica - Politecnico di Milano 14/04/15
% A. Farina - CNR-IFN - Dip di Fisica - Politec... |
github | andreafarina/SOLUS-master | SemiInfinite_TR.m | .m | SOLUS-master/src/fwd/SemiInfinite_TR.m | 525 | utf_8 | 395e442bc390be99bf780418ee65523f | % TIME-RESOLVED FLUENCE INSIDE A Semi-INFINITE MEDIUM using PCBC
% function phi = SemiInfinite_TR(time,rs,rd,mua,mus,v,A);
function phi = SemiInfinite_TR(time,rs,rd,mua,mus, v,A)
%%
% rs source position
% rd detector position
if rs(3) > 0
z0=rs(3);
elseif rs(3)==0
z0=1/mus;
rs(3)=z0;
end... |
github | andreafarina/SOLUS-master | SemiInfinite_CW.m | .m | SOLUS-master/src/fwd/SemiInfinite_CW.m | 393 | utf_8 | 2f69b19854a125fc414d5463289a93e7 |
% CW FLUENCE INSIDE AN INFINITE MEDIUM
function phi = SemiInfinite_CW(rs,rd,mua,mus,A)
%%
% rs source position
% rd detector position
if rs(3) > 0,
z0=rs(3);
elseif rs(3)==0,
z0=1/mus;
rs(3)=z0;
end
D = 1/(3*mus);
ze=2*A*D;
rs_min=rs; rs_min(3)=-2*ze-z0;
phi=(Infinite_CW(rs,rd,mua... |
github | andreafarina/SOLUS-master | Infinite_TR.m | .m | SOLUS-master/src/fwd/Infinite_TR.m | 446 | utf_8 | 4f1a24f68544581262548ceaea4bf7fb |
% TIME-RESOLVED FLUENCE INSIDE AN INFINITE MEDIUM
% function phi = Infinite_TR(time,rs,rd,mua,mus, v,~);
function phi = Infinite_TR(time,rs,rd,mua,mus, v,~,~)
%%
% rs source position
% rd detector position
delta_r=rs-rd;
rhosq=delta_r*delta_r';
%cm/ps velocita' della luce
D = 1/(3*mus);
mu = 1./(4*D*... |
github | andreafarina/SOLUS-master | Contini1997.m | .m | SOLUS-master/src/fwd/Contini1997.m | 13,674 | utf_8 | 63a3ea2a3b300d70e1033f4c76bece33 | function [Rrhot,Trhot,Rrho,Trho,Rt,Tt,lrhoR,lrhoT,R,T,A,Z] = Contini1997(rho,t,s,mua,musp,n1,n2,phantom,DD,m)
%
% [Rrhot,Trhot,Rrho,Trho,Rt,Tt,lrhoR,lrhoT,R,T,A,Z] = Contini1997(rho,t,s,mua,musp,n1,n2,phantom,DD,m)
%
% From:
% Contini D, Martelli F, Zaccanti G.
% Photon migration through a turbid slab described b... |
github | andreafarina/SOLUS-master | Infinite_CW.m | .m | SOLUS-master/src/fwd/Infinite_CW.m | 301 | utf_8 | 28ac6a483f8c19ea5e80ec219038914b |
% CW FLUENCE INSIDE AN INFINITE MEDIUM
function phi = Infinite_CW(rs,rd,mua,mus)
%%
% rs source position
% rd detector position
delta_r=rs-rd;
rho=sqrt(delta_r*delta_r');
mueff=sqrt(mua*mus*3);
D = 1/(3*mus);
phi=1./(4*pi*D*rho).*exp(-mueff*rho);
%phi(isnan(phi))=0;
return |
github | andreafarina/SOLUS-master | priormask3D.m | .m | SOLUS-master/src/UCLutils/priormask3D.m | 1,111 | utf_8 | 184186495cd0560c9d45d51990567d4a |
function mask = priormask3D(path,grid, type)
Nx = grid.Nx;
Ny = grid.Ny;
Nz = grid.Nz;
DOT_GRID = 1;FACT = [1,1,1];
%% here!
smask = load(path);
fn = fieldnames(smask);
mask = smask.(fn{1});
delta = smask.(fn{2});
%% swap fields... in case
if ~isvector(delta)
dd = mask;
mask = delta;
delta = dd;
end... |
github | andreafarina/SOLUS-master | snake_fitting.m | .m | SOLUS-master/src/UCLutils/snake_fitting.m | 8,043 | utf_8 | f7a210f7a4dd17eb784c7d0857801cdd | function [sgm, param] = snake_fitting(im, cor)
%
% [SGM, PARAM] = snake_fitting(IM, COR)
% This function takes as input a 2d rgb US-image IM and a set of user generated
% points COR and tries to fit a better contour to the inclusion.
% It returns the resulted segmented image SGM and an updated set of points
% PARAM to ... |
github | andreafarina/SOLUS-master | Lee_spline.m | .m | SOLUS-master/src/UCLutils/Lee_spline.m | 708 | utf_8 | d0dfb4b20892c4b75f850645482cb8e2 |
function out_curve = Lee_spline(points, npoints)
% takes points as input and returns the spline interpolant using Eugene
% Lee's centripetal method
x = points(1,:);
y = points(2,:);
if points(:,1)==points(:,end)
endconds = 'periodic';
else
endconds = 'varia... |
github | andreafarina/SOLUS-master | roispline_OLD.m | .m | SOLUS-master/src/UCLutils/roispline_OLD.m | 13,939 | utf_8 | fab1bf8f64640fa91ea9ba554df2526f | function mask=roispline_OLD(I,kind,tension)
% function [mask,perimeter,area]=roispline(I,str,tension)
%
% INPUT :
% - I : Grayscale or color image
% - kind : String specifying the kind of spline ('natural' for natural
% cubic spline, 'cardinal' for cardinal cubic spline).
% D... |
github | HanyangLiu/SOGE-master | SOGE.m | .m | SOGE-master/SOGE.m | 1,689 | utf_8 | 277980301ed17c6f0202f387e43a3562 | function [ W_final, obj, prop ] = SOGE( X, T, L, U, para )
%SOGE Recursively projecting the data
% X: each colomn is a data point
% L: Laplacian matrix
% T: n*c matrix, class indicator matrix. Tij=1 if xi is labeled as j, Tij=0 otherwise
% para: parameters
% para.alpha trade-off parameter alpha
% para.uu ... |
github | HanyangLiu/SOGE-master | constructW_PKN.m | .m | SOGE-master/func/CLR_code/constructW_PKN.m | 1,137 | utf_8 | f211e688d3d381a5961c15b41baa3d67 | % construct similarity matrix with probabilistic k-nearest neighbors. It is a parameter free, distance consistent similarity.
function W = constructW_PKN(X, k, issymmetric)
% X: each column is a data point
% k: number of neighbors
% issymmetric: set W = (W+W')/2 if issymmetric=1
% W: similarity matrix
if nargin < 3
... |
github | HanyangLiu/SOGE-master | CLR.m | .m | SOGE-master/func/CLR_code/CLR.m | 3,020 | utf_8 | 17b2b5bb1a290856916058c30a4e4fad | % min_{S>=0, S*1=1, F'*F=I} ||S - A||^2 + r*||S||^2 + 2*lambda*trace(F'*L*F)
% or
% min_{S>=0, S*1=1, F'*F=I} ||S - A||_1 + r*||S||^2 + 2*lambda*trace(F'*L*F)
function [y, S, evs, cs] = CLR(A0, c, isrobust, islocal)
% A0: the given affinity matrix
% c: cluster number
% isrobust: solving the second (L1 based) problem ... |
github | HanyangLiu/SOGE-master | L2_distance_1.m | .m | SOGE-master/func/CLR_code/funs/L2_distance_1.m | 491 | utf_8 | 2f9db3fa2b71ea0e0afa9786182f85ed | % compute squared Euclidean distance
% ||A-B||^2 = ||A||^2 + ||B||^2 - 2*A'*B
function d = L2_distance_1(a,b)
% a,b: two matrices. each column is a data
% d: distance matrix of a and b
if (size(a,1) == 1)
a = [a; zeros(1,size(a,2))];
b = [b; zeros(1,size(b,2))];
end
aa=sum(a.*a); bb=sum(b.*b); ab=a'*b;
d =... |
github | pkaroly/Data-Driven-Estimation-master | generateData.m | .m | Data-Driven-Estimation-master/examples/generateData.m | 1,443 | utf_8 | be7cb3a61869036096febbe4eecac1d6 | %% generateData
% plots simulated data from the neural mass model at different input values
%%
% Dean Freestone, Philippa Karoly 2016
% This code is licensed under the MIT License 2018
%%
clear
clc
close all
addpath(genpath('../src/'));
time = 60;
Fs = 1e3;
x = 1/Fs:1/Fs:time;
sigma_R = 0;
for input = 0:10:320
... |
github | pkaroly/Data-Driven-Estimation-master | g.m | .m | Data-Driven-Estimation-master/src/g.m | 175 | utf_8 | 3c2d4fd0784019408a5147bb4676cfc0 | % error function sigmoid
function out = g(v,v0,varsigma)
out = 0.5*erf((v - v0) / (sqrt(2)*varsigma)) + 0.5;
% out = 1 ./ (1 + exp(varsigma*(-v+v0)));
end |
github | saradindusengupta/Regularization_parametre_in_reconstruction_of_cparallel-MR-image-master | grid_setup.m | .m | Regularization_parametre_in_reconstruction_of_cparallel-MR-image-master/@GRID/private/grid_setup.m | 1,092 | utf_8 | 2a9d539e9ee619df6e32025f9304f7ae | function mtx = grid_setup(k,kernel,ks,imSize, os)
k = k(:);
sk = length(k);
sx= imSize(1); sy = imSize(2);
ks = ks;
% cconvert k-space samples to matrix indices
nx = (sx/2+1) + sx*real(k) ;
ny = (sy/2+1) + sy*imag(k) ;
% make sparse matrix
mtx = sparse(sk,sx*sy);
% loop over kernel
for lx=-(ks-1)/2:(ks-1)/2
for ... |
github | saradindusengupta/Regularization_parametre_in_reconstruction_of_cparallel-MR-image-master | AdSPIRiT_recon.m | .m | Regularization_parametre_in_reconstruction_of_cparallel-MR-image-master/Template/AdSPIRiT_recon.m | 2,156 | utf_8 | 44b588ac39447c31f99ba7e2bf577464 | function [K, E] = AdSPIRiT_recon(Kz, GOP, nIter, x0, im,bet)
%
%
% res = pocsSPIRIT(y, GOP, nIter, x0, T, show)
%
% Implementation of the Cartesian, POCS l1-SPIRiT reconstruction
%
% INPUTS:
% data - Undersampled k-space data. Make sure that empty entries are zero
% or else they will n... |
github | saradindusengupta/Regularization_parametre_in_reconstruction_of_cparallel-MR-image-master | main_Ad_spirit.m | .m | Regularization_parametre_in_reconstruction_of_cparallel-MR-image-master/Template/main_Ad_spirit.m | 1,265 | utf_8 | a5c5c19a58a2380a5ad7b4b5f82059d4 | function[I_recon,Istk,Kstk,E]=main_Ad_spirit(DATA, kSize, nIter, mask)
% INPUTS
% kSize : SPIRiT kernel size
% nIter : number of iteration; phantom requires twice as much as the brain.
% mask : mask can be uniform or random
% lambda : Tykhonov regularization in the calibration
% T : W... |
github | saradindusengupta/Regularization_parametre_in_reconstruction_of_cparallel-MR-image-master | AdSPIRiT_recon.m | .m | Regularization_parametre_in_reconstruction_of_cparallel-MR-image-master/GCV/AdSPIRiT_recon.m | 2,221 | utf_8 | 8875cd86c27db78e6f6d1b39d8310845 | function [K, E] = AdSPIRiT_recon(Kz, GOP, nIter, x0, im,bet)
%
%
% res = pocsSPIRIT(y, GOP, nIter, x0, T, show)
%
% Implementation of the Cartesian, POCS l1-SPIRiT reconstruction
%
% INPUTS:
% data - Undersampled k-space data. Make sure that empty entries are zero
% or else they will n... |
github | saradindusengupta/Regularization_parametre_in_reconstruction_of_cparallel-MR-image-master | main_Ad_spirit.m | .m | Regularization_parametre_in_reconstruction_of_cparallel-MR-image-master/GCV/main_Ad_spirit.m | 1,339 | utf_8 | 39fef43bcf3728de325214772a17a60a | function[I_recon,Istk,Kstk,E]=main_Ad_spirit(DATA, kSize, nIter, nACS,s)
% INPUTS
% kSize : SPIRiT kernel size
% nIter : number of iteration; phantom requires twice as much as the brain.
% mask : mask can be uniform or random
% lambda : Tykhonov regularization in the calibration
% T :... |
github | saradindusengupta/Regularization_parametre_in_reconstruction_of_cparallel-MR-image-master | cgESPIRiT.m | .m | Regularization_parametre_in_reconstruction_of_cparallel-MR-image-master/ESPIRiT_code/cgESPIRiT.m | 1,647 | utf_8 | 01cddc231e49ccce3c4b83fdefb870ea | function [res,imgs, RESVEC] = cgESPIRiT(y,ESP, nIter, lambda, x0)
%
%
% res = cgESPIRiT(y,ESP, nIter, lambda,x0)
%
% Implementation of the Cartesian, conjugate gradient ESPIRiT
% reconstruction. This implementation is similar to Cartesian SPIRiT. It
% only solves for missing data in k-space.
%
%
% Input:
% y -... |
github | saradindusengupta/Regularization_parametre_in_reconstruction_of_cparallel-MR-image-master | cgL1ESPIRiT.m | .m | Regularization_parametre_in_reconstruction_of_cparallel-MR-image-master/ESPIRiT_code/cgL1ESPIRiT.m | 3,034 | utf_8 | ffc184de7b5326ee960cc9fd6f28520b | function [res] = cgL1ESPIRiT(kData, x0, FT, MapOp, nIterCG, XOP, lambda, alpha,nIterSplit)
%
%[res] = cgESPIRiT(kData, x0, FT, MapOp, nIterCG, [ XOP, lambda, alpha,nIterSplit)
%
% Implementation of image-domain L1-Wavelet regularized ESPIRiT reconstruction from arbitrary
% k-space. The splitting is based on F. Huang MR... |
github | saradindusengupta/Regularization_parametre_in_reconstruction_of_cparallel-MR-image-master | pocsSPIRiT.m | .m | Regularization_parametre_in_reconstruction_of_cparallel-MR-image-master/SPIRiT_code/pocsSPIRiT.m | 2,051 | utf_8 | 274d8938904dd230725d40a0c62d69c7 | function x = pocsSPIRiT(data, GOP, nIter, x0, wavWeight, show)
%
%
% res = pocsSPIRIT(y, GOP, nIter, x0, wavWeight, show)
%
% Implementation of the Cartesian, POCS l1-SPIRiT reconstruction
%
% Input:
% y - Undersampled k-space data. Make sure that empty entries are zero
% or else they will not be filled.
% GOP - th... |
github | saradindusengupta/Regularization_parametre_in_reconstruction_of_cparallel-MR-image-master | cgSPIRiT.m | .m | Regularization_parametre_in_reconstruction_of_cparallel-MR-image-master/SPIRiT_code/cgSPIRiT.m | 2,348 | utf_8 | 49959baab3f3a7c18e3c25fbe672e09d | function [res, RESVEC] = cgSPIRiT(y,GOP, nIter, lambda, x0)
%
%
% res = cgSPIRiT(y,GOP, nIter, lambda,x0)
%
% Implementation of the Cartesian, conjugate gradiend SPIRiT reconstruction
%
% Input:
% y - Undersampled k-space data. Make sure that empty entries are zero
% or else they will not be filled.
% GOP - th... |
github | saradindusengupta/Regularization_parametre_in_reconstruction_of_cparallel-MR-image-master | cgNUSPIRiT.m | .m | Regularization_parametre_in_reconstruction_of_cparallel-MR-image-master/SPIRiT_code/cgNUSPIRiT.m | 1,504 | utf_8 | 672fd0e5a854d1c34d0ff92f72ef2f28 | function [res,FLAG,RELRES,ITER,RESVEC,LSVEC] = cgNUSPIRiT(kData, x0, NUFFTOP, GOP, nIter, lambda)
% Implementation of image-domain SPIRiT reconstruction from arbitrary
% k-space. The function is based on Jeff Fessler's nufft code and LSQR
%
% Inputs:
% kData - k-space data matrix it is 3D corresponding to [... |
github | saradindusengupta/Regularization_parametre_in_reconstruction_of_cparallel-MR-image-master | GRAPPA.m | .m | Regularization_parametre_in_reconstruction_of_cparallel-MR-image-master/utils/GRAPPA.m | 3,551 | utf_8 | a089a5cd2acaf2d6a4e638b4cee1ea54 | function res = GRAPPA(kData,kCalib,kSize,lambda, dispp)
% res = GRAPPA(kData,kCalib,kSize,lambda [, disp)
%
% This is a GRAPPA reconstruction algorithm that supports
% arbitrary Cartesian sampling. However, the implementation
% is highly inefficient in Matlab because it uses for loops.
% This implementation is very s... |
github | saradindusengupta/Regularization_parametre_in_reconstruction_of_cparallel-MR-image-master | main_Ad_spiritL.m | .m | Regularization_parametre_in_reconstruction_of_cparallel-MR-image-master/l-curve/main_Ad_spiritL.m | 1,263 | utf_8 | 863a20754a0c874ae20d3ca1ff5cc697 | function[I_recon,Istk,Kstk,E]=main_Ad_spiritL(DATA, kSize, nIter, mask)
% INPUTS
% kSize : SPIRiT kernel size
% nIter : number of iteration; phantom requires twice as much as the brain.
% mask : mask can be uniform or random
% lambda : Tykhonov regularization in the calibration
% T : ... |
github | saradindusengupta/Regularization_parametre_in_reconstruction_of_cparallel-MR-image-master | splsqr.m | .m | Regularization_parametre_in_reconstruction_of_cparallel-MR-image-master/REGU/splsqr.m | 4,613 | utf_8 | 0181a37f320874537246273fe4ae9b3a | function x = splsqr(A,b,lambda,Vsp,maxit,tol,reorth)
%SPLSQR Subspace preconditioned LSQR for discrete ill-posed problems.
%
% x = splsqr(A,b,lambda,Vsp,maxit,tol,reorth)
%
% Subspace preconditioned LSQR (SP-LSQR) for solving the Tikhonov problem
% min { || A x - b ||^2 + lambda^2 || x ||^2 }
% with a precond... |
github | saradindusengupta/Regularization_parametre_in_reconstruction_of_cparallel-MR-image-master | discrep.m | .m | Regularization_parametre_in_reconstruction_of_cparallel-MR-image-master/REGU/discrep.m | 5,655 | utf_8 | 43a45ee002360136ca2339f5e1e85164 | function [x_delta,lambda] = discrep(U,s,V,b,delta,x_0)
%DISCREP Discrepancy principle criterion for choosing the reg. parameter.
%
% [x_delta,lambda] = discrep(U,s,V,b,delta,x_0)
% [x_delta,lambda] = discrep(U,sm,X,b,delta,x_0) , sm = [sigma,mu]
%
% Least squares minimization with a quadratic inequality constraint:
%... |
github | saradindusengupta/Regularization_parametre_in_reconstruction_of_cparallel-MR-image-master | corner.m | .m | Regularization_parametre_in_reconstruction_of_cparallel-MR-image-master/REGU/corner.m | 8,640 | utf_8 | 1fc59ce57e9ede542069ef7b1fce444d | function [k_corner,info] = corner(rho,eta,fig)
%CORNER Find corner of discrete L-curve via adaptive pruning algorithm.
%
% [k_corner,info] = corner(rho,eta,fig)
%
% Returns the integer k_corner such that the corner of the log-log
% L-curve is located at ( log(rho(k_corner)) , log(eta(k_corner)) ).
%
% The vecto... |
github | saradindusengupta/Regularization_parametre_in_reconstruction_of_cparallel-MR-image-master | splsqrL.m | .m | Regularization_parametre_in_reconstruction_of_cparallel-MR-image-master/REGU/splsqrL.m | 5,128 | utf_8 | 1e24aa441349e75e253fbc2c5296364f | function x = splsqr(A,L,b,lambda,Vsp,maxit,tol,reorth)
%SPLSQR Subspace preconditioned LSQR for discrete ill-posed problems.
%
% x = splsqr(A,L,b,lambda,Vsp,maxit,tol,reorth)
%
% Subspace preconditioned LSQR (SP-LSQR) for solving the Tikhonov problem
% min { || A x - b ||^2 + lambda^2 || L x ||^2 }
% with a p... |
github | Rafnuss-PhD/A2PK-master | A2PK.m | .m | A2PK-master/A2PK.m | 2,973 | utf_8 | db3017b89b940420b2dfebbc8d3abe49 | %% Area-to-Point kriging A2PK
% *Area-to-Point kriging A2PK* generates stocastic Gaussian realization
% |*z*| constrained to a variable |*Z*| which is lineraly related
% to |*z*| by |*G*|:
%
% $$\mathbf{Z = Gz}$$
%
%
% The argument of the function are
% * |x|: vector of coordinates along the first axes
% * |y|: vecto... |
github | Rafnuss-PhD/A2PK-master | Matlat2R2min.m | .m | A2PK-master/ERT/R2/Matlat2R2min.m | 1,323 | utf_8 | 35f6061fcd250c1e80c714cf42ee08eb | %% Create R2.in and protocol.dat
%
% Comment are from the Readme Manual (2.7a)
%
% INPUT (generated with this script):
% * R2.in : geometry informaton
% * protocol.dat : index, 4 electrodes index
% ( * mesh.dat : for triangulare meshing)
%
% OUPUT:
% * R2.out : main log exectution
% * ele... |
github | Rafnuss-PhD/A2PK-master | Matlat2R2.m | .m | A2PK-master/ERT/R2/Matlat2R2.m | 9,124 | UNKNOWN | 19b55369dab4c602fb74b47c8b60cc04 | %% Create R2.in and protocol.dat
%
% Comment are from the Readme Manual (2.7a)
%
% INPUT (generated with this script):
% * R2.in : geometry informaton
% * protocol.dat : index, 4 electrodes index
% ( * mesh.dat : for triangulare meshing)
%
% OUPUT:
% * R2.out : main log exectution
% * ele... |
github | Rafnuss-PhD/A2PK-master | Matlat2R2.m | .m | A2PK-master/HT/R2/Matlat2R2.m | 9,204 | UNKNOWN | d6cba5cbe13d7f795688bb216cfba617 | %% Create R2.in and protocol.dat
%
% Comment are from the Readme Manual (2.7a)
%
% INPUT (generated with this script):
% * R2.in : geometry informaton
% * protocol.dat : index, 4 electrodes index
% ( * mesh.dat : for triangulare meshing)
%
% OUPUT:
% * R2.out : main log exectution
% * ele... |
github | Rafnuss-PhD/A2PK-master | fftma_perso.m | .m | A2PK-master/functions/fftma_perso.m | 3,643 | UNKNOWN | b7a05f9031a738f87199ecb466f92df6 | function field_f=fftma_perso(covar, grid)
%% Create super grid
grid_s.x_min = grid.x(1);
grid_s.x_max = grid.x(end)*3;
grid_s.y_min = grid.y(1);
grid_s.y_max = grid.y(end)*3;
if ~isfield(grid, 'dx')
grid_s.dx = grid.x(2)-grid.x(1);
grid_s.dy = grid.y(2)-grid.y(1);
else
grid_s.dx = grid.dx;
... |
github | UMich-BipedLab/Cassie_Model-master | ExportJacobians_IMU.m | .m | Cassie_Model-master/@Cassie/ExportJacobians_IMU.m | 4,985 | utf_8 | 090bed5ffa0a31f9a377539e9242bffd | function ExportJacobians_IMU(obj, export_function, export_path)
% Computes the Manipulator Jacobians to be used for state estimation (IMU to contact)
%
% Author: Ross Hartley
% Date: 7/17/2018
%
% Encoder Vector
encoders = SymVariable(obj.States.x(7:end));
% --- Frames ---
H_WI = obj.OtherPoints.VectorNav.comput... |
github | snigdhabhagat/Thin-plate-spline-interpolation-master | thinplatespline.m | .m | Thin-plate-spline-interpolation-master/thinplatespline.m | 832 | utf_8 | f126bb402acf44d12293eb07645998c0 | %% Thin plate spline
function [new_location]=thinplatespline(ctrl_pts,mask_location,new_location,image)
[m,n] = size(ctrl_pts);
P = [ones(m,1) ctrl_pts];
[K,P,control_points,ctrl_val] = computeK(ctrl_pts,m,mask_location,P,image);
clear i j;
[t,u] = size(control_points);
L = [K P;P.' zeros(3,3)];
det(L);
zero... |
github | chaovite/crack_pipe-master | sbp_staggered_strong_4th.m | .m | crack_pipe-master/source/SBP/staggered/strong/sbp_staggered_strong_4th.m | 2,654 | utf_8 | 5eec22304ac1706dda70c9c08352b1e5 |
function [xp,xm,Pp,Pm,Qp,Qm] = sbp_staggered_strong_4nd(n,h,test)
if nargin < 3
test = false;
end
assert(n >= 8,'Not enough grid points');
% Free parameters determined by optimizing spectral radius/truncation error
x = [0.002435378086542 0.999421296296229];
qm03 = x(1);
pm3 = x(2);
% Coefficients determined s... |
github | chaovite/crack_pipe-master | pipe_crack_inf.m | .m | crack_pipe-master/source/analytical_solutions/pipe_crack_inf.m | 3,800 | utf_8 | 219166998275fca0b070a9ebfab08aa4 | function [p, v, t, R, omega] = pipe_crack_inf(L, a, d, rho, cp0, cc0, ...
g, dt, z, r, mu)
% [p, v, t, R, omega] = pipe_crack_inf(L, a, d, rho, c, ...
% g, dt, z, r, mu)
% calculate the pres... |
github | chaovite/crack_pipe-master | acoustics2D_pointsource.m | .m | crack_pipe-master/source/analytical_solutions/acoustics2D_pointsource.m | 1,235 | utf_8 | 60d76a44e90b7ff161ef5b3958104165 | function [p, t] = acoustics2D_pointsource(r, c, g, dt)
% 2d linear acoustics with subject to a point source at xs, ys.
% Greens' function G = -i/4*H_0^{2}.
%
% dp+ux+uy = g(t)*delta(r).
%
% 1/c^2*d^2p/dt^2 + Lap(p) = g'(t)*delta(r)
%
% Notation of fourier transform ghat(omega) = int exp(-i*omega*t)*g(t)dt.
% this notat... |
github | chaovite/crack_pipe-master | acoustics2D_axial_sym.m | .m | crack_pipe-master/source/analytical_solutions/acoustics2D_axial_sym.m | 1,520 | utf_8 | 62e7e95fd2ecd2e3818fa4b3c175f24f | function [p, v, t] = acoustics2D_axial_sym(a, rho, c0, g, dt, r, d, mu, btype)
% outgoing wave for axial-symmetrical 2d acoustics. velocity boundary
% condition is prescribed at r=a.
%
if nargin<9
btype='p';
end
beta = 12*mu/d^2;
[ghat, f] = fft_dim(g,dt);
omega = 2*pi*f;
c = c0./sqrt(1+1i*beta./(rho*omega));
k... |
github | chaovite/crack_pipe-master | pipe_inf_crack_inf.m | .m | crack_pipe-master/source/analytical_solutions/pipe_inf_crack_inf.m | 4,001 | utf_8 | f88a9bb0f94cb78bfc72f14fdee0c642 | function [p, v, t, R, T, omega] = pipe_inf_crack_inf(L, a, d, rho, cp0, cc0, ...
g, dt, z, r, mu)
% [p, v] = pipe_inf_crack_inf(l, a, d, rho, c, g, z, r)
% calculate the pressure and velocity response of a pipe-crack system.
% Infinite pipe... |
github | chaovite/crack_pipe-master | stretched_grid.m | .m | crack_pipe-master/source/helper/stretched_grid.m | 2,742 | utf_8 | fe8b5830c559f4d057f908134be4d64c | function g = stretched_grid(grid_type,order,operator_type,nx,ny,Lx,Ly,r_g,r_bl,truncate)
% Construct grids with np = n + 1, and nm = n + 2 grid points
order = min(order,6);
[xp,xm, Pxp, Pxm, Qxp, Qxm] = sbp_staggered_weak(order,nx,Lx/nx);
[yp, ym, Pyp, Pym, Qyp, Qym] = sbp_staggered_weak(order,ny,Ly/ny);
Dxp = inv(... |
github | chaovite/crack_pipe-master | grids_frac1d.m | .m | crack_pipe-master/source/helper/grids_frac1d.m | 1,533 | utf_8 | af9f4425bee148a7dccdbc6d4f977839 | function [g, op] = grids_frac1d(nx, Lx, order, operator_type)
% construct grid and operators for 1d fracture, grouped by unknowns, p, u
% weak b.c. treatment is used in this code.
%
% p: on staggered grid (m)
% u: on standard grid (p)
if nargin < 4
operator_type = 'weak';
end
switch operator_type
case 'weak'... |
github | chaovite/crack_pipe-master | grids_frac3d.m | .m | crack_pipe-master/source/helper/grids_frac3d.m | 6,463 | utf_8 | ed40b791e1a831e8a023bc7bd0df6f3c | function [g, op] = grids_frac3d(nx,ny,nz, Lx, Ly, Lz, order, operator_type, r_g, r_bl, order_z)
% construct grid and operators for 3d fracture, grouped by unknowns, p, vx, vy, ux, uy.
% r_g, r_bl are grid stretching parameters in z direction.
%
% p: x,y standard grid, z, staggered grid. (ppm)
% vx: x staggered, y,z sta... |
github | chaovite/crack_pipe-master | intgrV.m | .m | crack_pipe-master/source/surface_disp/frac_disp/Fialk2001/intgrV.m | 621 | utf_8 | a1d9e3cfc6c1878f0300aa46e09313cb | %function [V,Vs]=intgrV(fi,psi,h,Wt,t)
function [V]=intgrV(fi,h,Wt,t)
% V,Vs - volume of crack, volume of surface uplift
% fi,psi: basis functions
% t: interval of integration
%large=1e10;
V = sum(Wt.*fi.*t);
%Vs = sum(Wt.*fi.*(t-h*(h-t)./(h^2+t.^2)));
%V1 = sum(Wt.*(fi.*Q(0,t,0,41)));
%V2 = sum(Wt.*(fi.*Q(0,t,large,41... |
github | chaovite/crack_pipe-master | fpkernel.m | .m | crack_pipe-master/source/surface_disp/frac_disp/Fialk2001/fpkernel.m | 1,020 | utf_8 | 34db1a95baafa67be73b2e36d10f0cc8 | function [K]=fpkernel(h,t,r,n)
% Kernels calculation
p=4*h^2;
K=[];
%[dumb,nr]=size(r);
%[dumb,nt]=size(t);
switch n
case 1 %KN
K=p*h*(KG(t-r,p)-KG(t+r,p));
case 2 %KN1
Dlt=1e-6;
a=t+r;
b=t-r;
y=a.^2;
z=b.^2;
g=2*p*h*(p^2+6*p*(t.^2+r.^2)+5*(a.*b).^2);
s=((p+z).*(p+y)).^2;
s=g./s;
trbl=-4*h/(p+t.^2)*ones(si... |
github | chaovite/crack_pipe-master | fred.m | .m | crack_pipe-master/source/surface_disp/frac_disp/Fialk2001/fred.m | 1,218 | utf_8 | 3f8d821d21a1dc0a806aed26bd8921b8 | function [fi,psi,t,Wt]=fred(h,m,er)
% fi,psi: basis functions
% t: interval of integration
% m: size(t)
%er=1e-7;
lamda=2/pi;
RtWt;
NumLegendreTerms=length(Rt);
for k=1:m
for i=1:NumLegendreTerms
d1=1/m;
t1=d1*(k-1);
r1:=d1*k;
j=NumLegendreTerms*(k-1)+i;
t(j)=Rt(j)*(r1-t1)*0.5+(r1+t1)*0.5;
end
end
%[t,Wt]=S... |
github | chaovite/crack_pipe-master | ex.m | .m | crack_pipe-master/source/disloc3d/ex.m | 2,524 | utf_8 | f4fafe38d971840a9496c5c90f7ed9cd | function ex()
% Example showing how to use disloc3d.
mu = 1;
nu = 0.25;
n = 200;
d = -100;
x = linspace(-3,1,n);
z = linspace(d-2,d+2,n);
[xm zm] = meshgrid(x,z);
obs = [xm(:)'
zeros(1,n^2)
zm(:)'];
% I sent length to a very large number to simulate a 2D (in-plane) problem.
length = 1e5; % N-S
... |
github | chaovite/crack_pipe-master | disloc3dpm.m | .m | crack_pipe-master/source/disloc3d/disloc3dpm.m | 45,369 | utf_8 | c0e73ca06a4b54e4daa2aecee257bfa9 | function [U D S flag] = disloc3dpm(mdl,stat,mu,nu)
%[U D S flag] = disloc3dpm(m,x,mu,nu) [pure Matlab version of disloc3d]
%
% Returns the deformation at point 'x', given dislocation model 'm'. 'mu'
% specifies the shear modulus and 'nu' specifies Poisson's ratio.
%
% Both 'm' and 'x' can be matrices, holding differen... |
github | chaovite/crack_pipe-master | TDstressFS.m | .m | crack_pipe-master/source/TriDisloc3d/TDstressFS.m | 13,751 | utf_8 | 95ddebabb6cd9e49e3d39122c78e8974 | function [Stress,Strain]=TDstressFS(X,Y,Z,P1,P2,P3,Ss,Ds,Ts,mu,lambda)
% TDstressFS
% Calculates stresses and strains associated with a triangular dislocation
% in an elastic full-space.
%
% TD: Triangular Dislocation
% EFCS: Earth-Fixed Coordinate System
% TDCS: Triangular Dislocation Coordinate System
% ADC... |
github | chaovite/crack_pipe-master | TDdispHS.m | .m | crack_pipe-master/source/TriDisloc3d/TDdispHS.m | 19,206 | utf_8 | 733bdbfdf3c4c66242e92cfcb69b7d73 | function [ue,un,uv]=TDdispHS(X,Y,Z,P1,P2,P3,Ss,Ds,Ts,nu)
% TDdispHS
% Calculates displacements associated with a triangular dislocation in an
% elastic half-space.
%
% TD: Triangular Dislocation
% EFCS: Earth-Fixed Coordinate System
% TDCS: Triangular Dislocation Coordinate System
% ADCS: Angular Dislocation ... |
github | chaovite/crack_pipe-master | TDstressHS.m | .m | crack_pipe-master/source/TriDisloc3d/TDstressHS.m | 45,581 | utf_8 | d5f7cd8bddd53eda49774969927762a3 | function [Stress,Strain]=TDstressHS(X,Y,Z,P1,P2,P3,Ss,Ds,Ts,mu,lambda)
% TDstressHS
% Calculates stresses and strains associated with a triangular dislocation
% in an elastic half-space.
%
% TD: Triangular Dislocation
% EFCS: Earth-Fixed Coordinate System
% TDCS: Triangular Dislocation Coordinate System
% ADC... |
github | chaovite/crack_pipe-master | TDdispFS.m | .m | crack_pipe-master/source/TriDisloc3d/TDdispFS.m | 10,409 | utf_8 | dbf65044c43e2187e8c9eb6f63a395e1 | function [ue,un,uv]=TDdispFS(X,Y,Z,P1,P2,P3,Ss,Ds,Ts,nu)
% TDdispFS
% Calculates displacements associated with a triangular dislocation in an
% elastic full-space.
%
% TD: Triangular Dislocation
% EFCS: Earth-Fixed Coordinate System
% TDCS: Triangular Dislocation Coordinate System
% ADCS: Angular Dislocation ... |
github | mangye16/IDE-baseline-Market-1501-master | LOMO.m | .m | IDE-baseline-Market-1501-master/market_evaluation/LOMO_XQDA/code/LOMO.m | 10,918 | utf_8 | 20a351130c8001186927d19a29d23814 | function descriptors = LOMO(images, options)
%% function Descriptors = LOMO(images, options)
% Function for the Local Maximal Occurrence (LOMO) feature extraction
%
% Input:
% <images>: a set of n RGB color images. Size: [h, w, 3, n]
% [optioins]: optional parameters. A structure containing any of the
% following... |
github | mangye16/IDE-baseline-Market-1501-master | evalData.m | .m | IDE-baseline-Market-1501-master/market_evaluation/KISSME/toolbox/evalData.m | 4,143 | utf_8 | fa4260fdbaa73509795057250201aece | function [ds,rocPlot] = evalData(pairs, ds, params)
% EVALDATA Evaluate results and plot figures
%
% Input:
% pairs - [1xN] struct. N is the number of pairs. Fields: pairs.fold
% pairs.match, pairs.img1, pairs.img2.
% ds - [1xF] data struct. F is the number of folds.
% ds.method.dist is required to comp... |
github | mangye16/IDE-baseline-Market-1501-master | LearnAlgoLMNN.m | .m | IDE-baseline-Market-1501-master/market_evaluation/KISSME/toolbox/learnAlgos/LearnAlgoLMNN.m | 2,829 | utf_8 | f833d30dfe0476ecab72fc14f7cacc8a | %LEARNALGOLMNN Wrapper class to the actual LMNN code
classdef LearnAlgoLMNN < LearnAlgo
properties
p %parameters
s %struct
available
fhanlde
end
properties (Constant)
type = 'lmnn'
end
methods
function obj = LearnAlgoLMNN(p)
if... |
github | mangye16/IDE-baseline-Market-1501-master | icg_roc.m | .m | IDE-baseline-Market-1501-master/market_evaluation/KISSME/toolbox/helper/icg_roc.m | 1,425 | utf_8 | 11d04e9c4c3db15aa1c3b9b771eff30e | function [tpr,fpr,thresh] = icg_roc(tp,confs)
% ICG_ROC computes ROC measures (tpr,fpr)
%
% Input:
% tp - [m x n] matrix of zero-one labels. one row per class.
% confs - [m x n] matrix of classifier scores. one row per class.
%
% Output:
% tpr - true positive rate in interval [0,1], [m x n+1] matrix
% ... |
github | mangye16/IDE-baseline-Market-1501-master | lmnn.m | .m | IDE-baseline-Market-1501-master/market_evaluation/KISSME/toolbox/lib/LMNN/lmnn.m | 15,400 | utf_8 | cb91112611f161bfe0a081b291878dea | function [L,Det]=lmnn(x,y,varargin);
%
% function [L,Det]=lmnn(maxiter,L,x,y,Kg,'Parameter1',Value1,'Parameter2',Value2,...);
%
% Input:
%
% x = input matrix (each column is an input vector)
% y = labels
% (*optional*) L = initial transformation matrix (e.g eye(size(x,1)))
% (*optional*) Kg = attract Kg nearest simi... |
github | mangye16/IDE-baseline-Market-1501-master | knnclassify.m | .m | IDE-baseline-Market-1501-master/market_evaluation/KISSME/toolbox/lib/LMNN/knnclassify.m | 2,559 | utf_8 | 02d7cf7e68cc0dc6f86bc8765e02e66b | function [Eval,Details]=LSevaluate(L,xTr,lTr,xTe,lTe,KK);
% function [Eval,Details]=LSevaluate(L,xTr,yTr,xTe,yTe,Kg);
%
% INPUT:
% L : transformation matrix (learned by LMNN)
% xTr : training vectors (each column is an instance)
% yTr : training labels (row vector!!)
% xTe : test vectors
% yTe : test ... |
github | mangye16/IDE-baseline-Market-1501-master | energyclassify.m | .m | IDE-baseline-Market-1501-master/market_evaluation/KISSME/toolbox/lib/LMNN/energyclassify.m | 2,926 | utf_8 | 9155befdcfcd16052c23bbab1cf7b530 | function [err,yy,Value]=energyclassify(L,x,y,xTest,yTest,Kg,varargin);
% function [err,yy,Value]=energyclassify(L,xTr,yTr,xTe,yTe,Kg,varargin);
%
% INPUT:
% L : transformation matrix (learned by LMNN)
% xTr : training vectors (each column is an instance)
% yTr : training labels (row vector!!)
% xTe : test... |
github | mangye16/IDE-baseline-Market-1501-master | draw_confusion_matrix.m | .m | IDE-baseline-Market-1501-master/market_evaluation/utils/draw_confusion_matrix.m | 1,023 | utf_8 | a9d55f96cdc7d7b9e03092bd89fe0715 | % calculate and draw confusion matrix
function [ap_mat, r1_mat] = draw_confusion_matrix(ap, r1, queryCam)
ap_mat = zeros(6, 6);
r1_mat = zeros(6, 6);
count1 = zeros(6, 6);
count2 = zeros(6, 6);
for n = 1:length(queryCam)
for k = 1:6
ap_mat(queryCam(n), k) = ap_mat(queryCam(n), k) + ap(n, k);
if ap(... |
github | zhangyuygss/WSL-master | example_layout.m | .m | WSL-master/tmp/VOCdevkit/example_layout.m | 4,470 | utf_8 | faaf53dfba2457f3f7e5542cd51ad5fb | function example_layout
% change this path if you install the VOC code elsewhere
addpath([cd '/VOCcode']);
% initialize VOC options
VOCinit;
% train and test detector
cls='person';
detector=train(VOCopts,cls); % train detector
test(VOCopts,cls,detector); ... |
github | zhangyuygss/WSL-master | example_detector.m | .m | WSL-master/tmp/VOCdevkit/example_detector.m | 4,055 | utf_8 | 940dbf93f88c7210c89a2e4885c0fac2 | function example_detector
% change this path if you install the VOC code elsewhere
addpath([cd '/VOCcode']);
% initialize VOC options
VOCinit;
% train and test detector for each class
for i=1:VOCopts.nclasses
cls=VOCopts.classes{i};
detector=train(VOCopts,cls); % train d... |
github | zhangyuygss/WSL-master | create_segmentations_from_detections.m | .m | WSL-master/tmp/VOCdevkit/create_segmentations_from_detections.m | 3,667 | utf_8 | e991547b4a595e58313d5b11c0a91942 | % Creates segmentation results from detection results.
% CREATE_SEGMENTATIONS_FROM_DETECTIONS(ID) creates segmentations from
% the detection results with identifier ID e.g. 'comp3'. All detections
% will be used, no matter what their confidence level.
%
% CREATE_SEGMENTATIONS_FROM_DETECTIONS(ID, CONFIDENCE) as above... |
github | zhangyuygss/WSL-master | example_segmenter.m | .m | WSL-master/tmp/VOCdevkit/example_segmenter.m | 366 | utf_8 | 811cf1eb98ef8899c06077d47bd601f6 | % example_segmenter Segmentation algorithm based on detection results.
%
% This segmenter requires that some detection results are present in
% 'Results' e.g. by running 'example_detector'.
%
% Segmentations are generated from detection bounding boxes.
function example_segmenter
VOCinit
create_segmentations_from_detec... |
github | zhangyuygss/WSL-master | example_classifier.m | .m | WSL-master/tmp/VOCdevkit/example_classifier.m | 2,884 | utf_8 | 4d037fe9f87eb5181d869b1435e95025 | function example_classifier
% change this path if you install the VOC code elsewhere
addpath([cd '/VOCcode']);
% initialize VOC options
VOCinit;
% train and test classifier for each class
for i=1:VOCopts.nclasses
cls=VOCopts.classes{i};
classifier=train(VOCopts,cls); % tr... |
github | zhangyuygss/WSL-master | VOCevalseg.m | .m | WSL-master/tmp/VOCdevkit/VOCcode/VOCevalseg.m | 2,709 | utf_8 | 3d832544dce45b76923c6413db5ca130 | %VOCEVALSEG Creates a confusion matrix for a set of segmentation results.
% VOCEVALSEG(VOCopts,ID); prints out the per class and overall
% segmentation accuracies.
%
% [ACCURACIES,AVACC,CONF] = VOCEVALSEG(VOCopts,ID) returns the per class
% percentage ACCURACIES, the average accuracy AVACC and the confusion
% mat... |
github | zhangyuygss/WSL-master | VOClabelcolormap.m | .m | WSL-master/tmp/VOCdevkit/VOCcode/VOClabelcolormap.m | 691 | utf_8 | 0bfcd3122e62038f83e2d64f456d556b | % VOCLABELCOLORMAP Creates a label color map such that adjacent indices have different
% colors. Useful for reading and writing index images which contain large indices,
% by encoding them as RGB images.
%
% CMAP = VOCLABELCOLORMAP(N) creates a label color map with N entries.
function cmap = labelcolormap(N)
i... |
github | zhangyuygss/WSL-master | VOCwritexml.m | .m | WSL-master/tmp/VOCdevkit/VOCcode/VOCwritexml.m | 1,166 | utf_8 | 5eee01a8259554f83bf00cf9cf2992a2 | function VOCwritexml(rec, path)
fid=fopen(path,'w');
writexml(fid,rec,0);
fclose(fid);
function xml = writexml(fid,rec,depth)
fn=fieldnames(rec);
for i=1:length(fn)
f=rec.(fn{i});
if ~isempty(f)
if isstruct(f)
for j=1:length(f)
fprintf(fid,'%s',re... |
github | zhangyuygss/WSL-master | VOCreadrecxml.m | .m | WSL-master/tmp/VOCdevkit/VOCcode/VOCreadrecxml.m | 1,767 | utf_8 | 6dd61b87dc93a2f814399e42610184b1 | function rec = VOCreadrecxml(path)
x=VOCreadxml(path);
x=x.annotation;
rec=rmfield(x,'object');
rec.size.width=str2double(rec.size.width);
rec.size.height=str2double(rec.size.height);
rec.size.depth=str2double(rec.size.depth);
rec.segmented=strcmp(rec.segmented,'1');
rec.imgname=[x.folder '/JPEGImages... |
github | zhangyuygss/WSL-master | VOCxml2struct.m | .m | WSL-master/tmp/VOCdevkit/VOCcode/VOCxml2struct.m | 1,920 | utf_8 | 6a873dba4b24c57e9f86a15ee12ea366 | function res = VOCxml2struct(xml)
xml(xml==9|xml==10|xml==13)=[];
[res,xml]=parse(xml,1,[]);
function [res,ind]=parse(xml,ind,parent)
res=[];
if ~isempty(parent)&&xml(ind)~='<'
i=findchar(xml,ind,'<');
res=trim(xml(ind:i-1));
ind=i;
[tag,ind]=gettag(xml,i);
if ~strcmp(tag,['/' pare... |
github | zhangyuygss/WSL-master | PASreadrectxt.m | .m | WSL-master/tmp/VOCdevkit/VOCcode/PASreadrectxt.m | 3,179 | utf_8 | 3b0bdbeb488c8292a1744dace066bb73 | function record=PASreadrectxt(filename)
[fd,syserrmsg]=fopen(filename,'rt');
if (fd==-1),
PASmsg=sprintf('Could not open %s for reading',filename);
PASerrmsg(PASmsg,syserrmsg);
end;
matchstrs=initstrings;
record=PASemptyrecord;
notEOF=1;
while (notEOF),
line=fgetl(fd);
notEOF=ischar(li... |
github | cocoanlab/humanfmri_preproc_bids-master | humanfmri_c3_make_nuisance_regressors.m | .m | humanfmri_preproc_bids-master/codes/humanfmri_c3_make_nuisance_regressors.m | 6,395 | utf_8 | f53e212728aa5bea91b2b7a366e20669 | % ========================================================= %
% Possible combinations %
% --------------------------------------------------------- %
% 1. 24 parameter + spike covatiates + linear drift %
% 2. 24 parameter + spike covariates + WM and CSF + linear %
% drfit ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.