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 | geodesymiami/GeodMod-master | plot_gibbs.m | .m | GeodMod-master/inver/gibbslib/plot_gibbs.m | 11,026 | utf_8 | c26d519bacd4187643d82afd78dcfdb0 | function [momin,ppd1d,ppd2d]=plot_gibbs(models,energy,bounds,gibbsopt,inverseopt,objfuncopt,momin,ppd1d,ppd2d)
%
% PLOT_GIBBS plots 1-D and 2-D marginal probability distributions
%
% usage: [momin,ppd1d,ppd2d]=plot_gibbs(models,energy,bounds,gibbsopt,momin,ppd1d,ppd2d)
%
% PLOT_GIBBS(MODELS,ENERGY,BOUNDS,OPT) ... |
github | geodesymiami/GeodMod-master | gibbs.m | .m | GeodMod-master/inver/gibbslib/gibbs.m | 8,861 | utf_8 | d6463ed66f8327e5b86a12b84bbff0f3 | function [mhat,models,energy]=gibbs(FUN,bounds,gibbsopt,varargin)
% gibbs sampling by Falk Amelung - simulated annealing by Peter Cervelli
%ANNEAL [mhat,F,model,energy,count]=anneal(FUN,bounds,OPTIONS,x1,x2...,xn)
%
%Simulated annealing algorithm that tries to find a minimum to the function 'FUN'.
%
%INPUTS:
%... |
github | geodesymiami/GeodMod-master | StackRandFalk.m | .m | GeodMod-master/preparelib/StackRandFalk.m | 11,933 | utf_8 | fa018626dfec942e3de73ce9ece9c6c5 | function [Stacks]=StackRandFalk(igram,varargin);
%StackRandFalk - random stacks (modified from Noel's Stacks)
%
% usage: [Stacks]=Stack(igram,'NbStck',10,'rating',9999,'repeatNb',1,'LowTmpThresh',0,'HighTmpThresh',9999,'CSpaceLim',[100 200 100 200])
% plot_igram(igram(2:3))
%
% Input: igr... |
github | geodesymiami/GeodMod-master | intgrV.m | .m | GeodMod-master/legacy/magma_sources/penny/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 | geodesymiami/GeodMod-master | fpkernel.m | .m | GeodMod-master/legacy/magma_sources/penny/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 | geodesymiami/GeodMod-master | fred.m | .m | GeodMod-master/legacy/magma_sources/penny/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 | geodesymiami/GeodMod-master | displotmulti.m | .m | GeodMod-master/modellib/displotmulti.m | 3,949 | utf_8 | 6af5a892a3e40bff73154ec91af677b3 | function [] = displotmulti(param,objfunc,modelopt,x_unit)
% displotmulti - plots one or more dislocations using displot
% usage: [] = displotmulti(param);
%
% FA, last modified 30 Nov 2003
% Yunjun, 2015-12-05: add circle()
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
PlotType = '2D... |
github | geodesymiami/GeodMod-master | imcapture.m | .m | GeodMod-master/mimiclib/imcapture.m | 17,050 | utf_8 | faaad167f7d796f7293ad1521120e17e | function img = imcapture( h, opt, dpi, opt2, opt3)
% IMCAPTURE do screen captures at controllable resolution using the undocumented "hardcopy" built-in function.
%
% USAGE:
% IMG = IMCAPTURE(H) gets a screen capture from object H, where H is a handle to a figure, axis or an image
% When H is an... |
github | geodesymiami/GeodMod-master | unitsratio.m | .m | GeodMod-master/mimiclib/toolboxfiles_map/unitsratio.m | 9,235 | utf_8 | 1bde505713b24cfa1596c75bc07817b2 | function ratio = unitsratio(to, from)
%UNITSRATIO Unit conversion factors
%
% RATIO = UNITSRATIO(TO, FROM) returns the number of TO units per one
% FROM unit. For example, UNITSRATIO('cm', 'm') returns 100 because
% there are 100 centimeters per meter. UNITSRATIO makes it easy to
% convert from one system of ... |
github | geodesymiami/GeodMod-master | medfilt2.m | .m | GeodMod-master/mimiclib/toolboxfiles_map/medfilt2.m | 4,311 | utf_8 | b0cb0d7f735abab6f17ff2e91c8ce90a | function b = medfilt2(varargin)
%MEDFILT2 2-D median filtering.
% B = MEDFILT2(A,[M N]) performs median filtering of the matrix
% A in two dimensions. Each output pixel contains the median
% value in the M-by-N neighborhood around the corresponding
% pixel in the input image. MEDFILT2 pads the image with zeros
... |
github | geodesymiami/GeodMod-master | padarray.m | .m | GeodMod-master/mimiclib/toolboxfiles_map/padarray.m | 7,400 | utf_8 | c6fe9a958653dbf82356a6efe4082591 | function b = padarray(varargin)
%PADARRAY Pad array.
% B = PADARRAY(A,PADSIZE) pads array A with PADSIZE(k) number of zeros
% along the k-th dimension of A. PADSIZE should be a vector of
% positive integers.
%
% B = PADARRAY(A,PADSIZE,PADVAL) pads array A with PADVAL (a scalar)
% instead of with zeros.
%
% ... |
github | geodesymiami/GeodMod-master | demcmap.m | .m | GeodMod-master/mimiclib/toolboxfiles_map/demcmap.m | 14,848 | utf_8 | 1f21d2f93a7494c5566dcdad13655b5d | function [cmap,clim] = demcmap(varargin)
%DEMCMAP Colormaps appropriate to terrain elevation data
%
% DEMCMAP(map) creates and assigns a colormap appropriate for elevation data.
% The colormap has the number of land and sea colors in proportion to
% the maximum elevations and depths in the matrix map. With no output... |
github | geodesymiami/GeodMod-master | bwareaopen.m | .m | GeodMod-master/mimiclib/toolboxfiles_map/bwareaopen.m | 2,780 | utf_8 | 8b54d8714f1fc9be142de230a2b8a24b | function bw2 = bwareaopen(varargin)
%BWAREAOPEN Morphologically open binary image (remove small objects).
% BW2 = BWAREAOPEN(BW,P) removes from a binary image all connected
% components (objects) that have fewer than P pixels, producing another
% binary image BW2. The default connectivity is 8 for two dimensions... |
github | geodesymiami/GeodMod-master | distance.m | .m | GeodMod-master/mimiclib/toolboxfiles_map/distance.m | 9,722 | utf_8 | a9e729399100476c41b19739741111ea | function [rng, az] = distance(varargin)
%DISTANCE Distance between points on sphere or ellipsoid
%
% [RNG, AZ] = DISTANCE(LAT1,LON1,LAT2,LON2) computes the great circle
% distance(s) and azimuth(s) between pairs of points on the surface of
% a sphere. The input latitudes and longitudes, LAT1, LON1, LAT2,
% LO... |
github | geodesymiami/GeodMod-master | normfit.m | .m | GeodMod-master/mimiclib/toolboxfiles_map/normfit.m | 9,769 | utf_8 | 324099093c434e469c983f4c0b4038c7 | function [muhat, sigmahat, muci, sigmaci] = normfit(x,alpha,censoring,freq,options)
%NORMFIT Parameter estimates and confidence intervals for normal data.
% [MUHAT,SIGMAHAT] = NORMFIT(X) returns estimates of the parameters of
% the normal distribution given the data in X. MUHAT is an estimate of
% the mean, and ... |
github | geodesymiami/GeodMod-master | reckon.m | .m | GeodMod-master/mimiclib/toolboxfiles_map/reckon.m | 4,883 | utf_8 | 2df8663560d5c0dc5980a147ec1d74d4 | function [latout,lonout] = reckon(varargin)
%RECKON Point at specified azimuth, range on sphere or ellipsoid
%
% [LATOUT, LONOUT] = RECKON(LAT, LON, RNG, AZ), for scalar inputs,
% calculates a position (LATOUT, LONOUT) at a given range RNG and azimuth
% AZ along a great circle from a starting point defined by LA... |
github | geodesymiami/GeodMod-master | optimset.m | .m | GeodMod-master/mimiclib/toolboxfiles_map/optimset.m | 18,072 | utf_8 | 52379a35432e00e9b6c34d237eb5ca75 | function options = optimset(varargin)
%OPTIMSET Create/alter optimization OPTIONS structure.
% OPTIONS = OPTIMSET('PARAM1',VALUE1,'PARAM2',VALUE2,...) creates an
% optimization options structure OPTIONS in which the named parameters have
% the specified values. Any unspecified parameters are set to [] (parameter... |
github | geodesymiami/GeodMod-master | iptcheckconn.m | .m | GeodMod-master/mimiclib/toolboxfiles_map/iptcheckconn.m | 3,636 | utf_8 | 5e525f699686b325761185fd83c95cd5 | function iptcheckconn(conn,function_name,variable_name,arg_position)
%IPTCHECKCONN Check validity of connectivity argument.
% IPTCHECKCONN(CONN,FUNC_NAME,VAR_NAME,ARG_POS) checks if CONN
% is a valid connectivity argument. If it is invalid, the function
% issues a formatted error message.
%
% A connectivity arg... |
github | geodesymiami/GeodMod-master | convertlat.m | .m | GeodMod-master/mimiclib/toolboxfiles_map/convertlat.m | 10,824 | utf_8 | f974246c634cc6583cc2f1d2ca74a15c | function latout = convertlat(ellipsoid, latin, from, to, units)
%CONVERTLAT Convert between geodetic and auxiliary latitudes
%
% LATOUT = CONVERTLAT(ELLIPSOID, LATIN, FROM, TO, UNITS) converts
% latitude values in LATIN from type FROM to type TO. ELLIPSOID is a
% 1-by-2 ellipsoid vector of the form [SEMIMAJORAX... |
github | geodesymiami/GeodMod-master | iptcheckstrs.m | .m | GeodMod-master/mimiclib/toolboxfiles_map/iptcheckstrs.m | 4,005 | utf_8 | c7fa725ef221a3d03aa97887ef54ab73 | function out = iptcheckstrs(in, valid_strings, function_name, ...
variable_name, argument_position)
%IPTCHECKSTRS Check validity of text string.
% OUT = IPTCHECKSTRS(IN,VALID_STRINGS,FUNC_NAME,VAR_NAME,ARG_POS) checks
% the validity of the text string IN. If the text string matches one of
... |
github | geodesymiami/GeodMod-master | almanac.m | .m | GeodMod-master/mimiclib/toolboxfiles_map/almanac.m | 41,894 | utf_8 | 09565ef6ada12021ec8cec0580d86eb0 | function mat = almanac(object,parm,units,refbody)
%ALMANAC Parameters for Earth, planets, Sun, and Moon
%
% ALMANAC, without any input arguments, displays a list of the heavenly
% objects recognized by ALMANAC.
%
% ALMANAC('object') displays recognized parameters, units, and reference
% body strings for the pl... |
github | geodesymiami/GeodMod-master | ordfilt2.m | .m | GeodMod-master/mimiclib/toolboxfiles_map/ordfilt2.m | 4,145 | utf_8 | e99494d517112c6f6bfcd28e1b2db16e | function B = ordfilt2(varargin)
%ORDFILT2 2-D order-statistic filtering.
% B=ORDFILT2(A,ORDER,DOMAIN) replaces each element in A by the
% ORDER-th element in the sorted set of neighbors specified by
% the nonzero elements in DOMAIN.
%
% B = ORDFILT2(A,ORDER,DOMAIN,S), where S is the same size as
% DOMAIN, u... |
github | geodesymiami/GeodMod-master | bwlabeln.m | .m | GeodMod-master/mimiclib/toolboxfiles_map/bwlabeln.m | 2,774 | utf_8 | 7d4b7a06a54ad4ba8019a003b79f0cdf | function [L,num] = bwlabeln(varargin)
%BWLABELN Label connected components in N-D binary image.
% L = BWLABELN(BW) returns a label matrix, L, containing labels for the
% connected components in BW. BW can have any dimension; L is the same
% size as BW. The elements of L are integer values greater than or equal
... |
github | geodesymiami/GeodMod-master | regionprops.m | .m | GeodMod-master/mimiclib/toolboxfiles_map/regionprops.m | 34,506 | utf_8 | 02272a9beba17c8fd9e792030d8937b3 | function outstats = regionprops(varargin)
%REGIONPROPS Measure properties of image regions (blob analysis).
% STATS = REGIONPROPS(L,PROPERTIES) measures a set of properties for each
% labeled region in the label matrix L. Positive integer elements of L
% correspond to different regions. For example, the set of el... |
github | geodesymiami/GeodMod-master | readOptimHashTable.m | .m | GeodMod-master/mimiclib/toolboxfiles_map/readOptimHashTable.m | 6,852 | utf_8 | 06bd898d7a6b2dc44cfac1969f5399a1 | function [probStruct,optStruct,errProb,errOpt] = readOptimHashTable(hashProb, hashOptions)
%readOptimHashTable Read hash table from optimtool and return MATLAB structures.
% Private to OPTIMTOOL
% Copyright 2005-2006 The MathWorks, Inc.
% $Revision: 1.1.6.2 $ $Date: 2007/12/10 21:50:06 $
% Add problem/options k... |
github | geodesymiami/GeodMod-master | optimguiGeneratemfile.m | .m | GeodMod-master/mimiclib/toolboxfiles_map/private/optimguiGeneratemfile.m | 7,160 | utf_8 | dfe8f711798d442a6274ef25b0e74705 | function err = optimguiGeneratemfile(hashProb,hashOpt)
%optimguiGeneratemfile generates an M-file from OPTIMTOOL.
% hashProb and hashOpt are Java hash tables containing information about
% the problem and options model. hashProb and hashOpt contain only information
% that user has changed since last time the dat... |
github | geodesymiami/GeodMod-master | geodesicinv.m | .m | GeodMod-master/mimiclib/toolboxfiles_map/private/geodesicinv.m | 11,939 | utf_8 | 0a7fa74a3d7f693ee05b16b69b603f82 | function [s, faz, baz] = geodesicinv(phi1, lambda1, phi2, lambda2, ellipsoid)
% Solve the inverse problem of geometric geodesy: Given a pair of points
% with geodetic coordinates PHI1, LAMBDA1, PHI2, LAMBDA2, find the
% distance S between them along a geodesic on the specified ELLIPSOID.
% Also determine the ... |
github | geodesymiami/GeodMod-master | checkstrs.m | .m | GeodMod-master/mimiclib/toolboxfiles_map/private/checkstrs.m | 3,438 | utf_8 | bafa4aef61d71e8901908508aa7c0179 | function out = checkstrs(in, valid_strings, function_name, ...
variable_name, argument_position)
%CHECKSTRS Check validity of option string.
% OUT = CHECKSTRS(IN,VALID_STRINGS,FUNCTION_NAME,VARIABLE_NAME, ...
% ARGUMENT_POSITION) checks the validity of the option string IN. It
% returns ... |
github | geodesymiami/GeodMod-master | dislocLayers.m | .m | GeodMod-master/deformation_sources/dislocLayers.m | 32,912 | utf_8 | e47248a92481f94c58b95683d6ca9a7c | function U=dislocLayers(m,xloc,d,mu,lam,scaleN)
%U=LayeredGreens(m,d,mu,lam,xloc)
% Calculates the surface displacements for a dislocation in a layered
% elastic halfspace using propagator matrix methods.
%%INPUTS:
%fault model (standard Okada paramterization -- must be column vector):
% m(1) = length (km) (do ... |
github | geodesymiami/GeodMod-master | intgrV.m | .m | GeodMod-master/deformation_sources/penny/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 | geodesymiami/GeodMod-master | fpkernel.m | .m | GeodMod-master/deformation_sources/penny/fpkernel.m | 2,641 | utf_8 | 14db3d9eddeeca4172dab4e976009670 | function [K]=fpkernel(h,t,r,n)
% Kernels calculation
% Support matrix 't','r' and array 'n' input, Yunjun, 2015-11-10
p=4*h^2;
% K=[];
%[dumb,nr]=size(r);
%[dumb,nt]=size(t);
%Support array 'n' input, Yunjun, 2015-11-10
[s1,s2] = size(t);
s3 = length(n);
K=zeros(s1,s2,s3);
kg = zeros(s1,s2,3);
kg(:,:,1) = KG( t-r, p... |
github | geodesymiami/GeodMod-master | Q.m | .m | GeodMod-master/deformation_sources/penny/Q.m | 2,816 | utf_8 | e0c9c4c9713cd8d420c0842375da6e69 | function [K]=Q(h,t,r,n)
% Kernels calculation
% Support matrix 't' and array 'n' input, Yunjun, 2015-11-10
K=[];
E=h^2+r.^2-t.^2;
D=(E.^2+4*h^2*t.^2).^(0.5);
D3=D.^3;
%i=sqrt(-1);
% switch n
% case 1 %Q1
% K=sqrt(2)*h.*t./(D.*sqrt(D+E));
%
% case 2 %Q2
% D3=D.^3;
% K=1/sqrt(2)... |
github | geodesymiami/GeodMod-master | fred.m | .m | GeodMod-master/deformation_sources/penny/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 | hg2ecz/ProgrammingLanguageBenchmark-FFT_4096-master | benchmark.m | .m | ProgrammingLanguageBenchmark-FFT_4096-master/Octave/benchmark.m | 737 | utf_8 | 84ac8c1d6a7fbbfa66a6e4508740e8d4 | #!/usr/bin/octave
LOG2FFTSIZE = 12
FFT_REPEAT = 10
SIZE = bitshift(1, LOG2FFTSIZE);
xy = zeros(1, SIZE);
function main(log2fftsize, xy, fft_repeat)
fftsize = bitshift(1, log2fftsize);
for i = 1 : fftsize/2
xy(i) = 1. + 0*j;
endfor
for i = fftsize/2+1 : fftsize
xy(i) = -1. + 0*j;
endfor
t... |
github | anarakonjac/absorption-image-analyser-master | ImageAnalyser.m | .m | absorption-image-analyser-master/ImageAnalyser.m | 94,203 | utf_8 | 59dafee1308b8e91229b8323c16b6336 | function varargout = ImageAnalyser(varargin)
% IMAGEANALYSER MATLAB code for ImageAnalyser.fig
% IMAGEANALYSER, by itself, creates a new IMAGEANALYSER or raises the existing
% singleton*.
%
% H = IMAGEANALYSER returns the handle to a new IMAGEANALYSER or the handle to
% the existing singleton*.
%
% ... |
github | anarakonjac/absorption-image-analyser-master | configfileeditor.m | .m | absorption-image-analyser-master/configfileeditor.m | 37,328 | UNKNOWN | 3eb02c12c7bed4e43328d025f0917596 | function varargout = configfileeditor(varargin)
% CONFIGFILEEDITOR MATLAB code for configfileeditor.fig
% CONFIGFILEEDITOR, by itself, creates a new CONFIGFILEEDITOR or raises the existing
% singleton*.
%
% H = CONFIGFILEEDITOR returns the handle to a new CONFIGFILEEDITOR or the handle to
% the exis... |
github | Acicone/MIF-master | Decomp_MIF_2D_v10.m | .m | MIF-master/Decomp_MIF_2D_v10.m | 12,904 | utf_8 | 9852248f1fee61b66d0ace32f9d53fbe | function [IMF,SDlog,havelog] = Decomp_MIF_2D_v10(f,options,alpha)
%
% Generate the decomposition of a 2D signal f :
%
% f = IMF(:,:,1) + IMF(:,:,2) + ... + IMF(:, :,size(IMF, 3))
%
% where the last component is the trend and other components are IMFs
% The mask length is computed based on alpha and the mask l... |
github | terryum/Athletic_Movement_Detection-master | GetManipulability.m | .m | Athletic_Movement_Detection-master/GetManipulability.m | 1,998 | utf_8 | 95b43c0bb369ba58b591e7e56f39825d | %% Calculate manipulability for detecting pre-stretch poses
% made by Terry Taewoong Um (terry.t.um@gmail.com)
% Adaptive Systems Lab., University of Waterloo
function [myManiRatio maxID minID] = GetManipulability(myModel)
nData = size(myModel{1,1}.T_Moving_Local, 4);
nBody = size(myModel,1);
... |
github | terryum/Athletic_Movement_Detection-master | GetFileNames.m | .m | Athletic_Movement_Detection-master/GetFileNames.m | 2,293 | utf_8 | f46fcce26788d60e48e8b62a72bca865 |
%% Get the filenames of the mocap data
% made by Terry Taewoong Um (terry.t.um@gmail.com)
% Adaptive Systems Lab., University of Waterloo
function [AsfFilename AmcFilename] = GetFileNames(str)
% Jump : trial #2 is presented in the figure of the paper
if strcmp(str, 'jump')
... |
github | terryum/Athletic_Movement_Detection-master | LieConvolution.m | .m | Athletic_Movement_Detection-master/LieConvolution.m | 1,652 | utf_8 | 2eb89bf9a2beb43d649e129d00c738b4 |
%% Convolution (Applying BCH formula) for SO3 values
% made by Terry Taewoong Um (terry.t.um@gmail.com)
% Adaptive Systems Lab., University of Waterloo
function [Conv_MagDelta] = LieConvolution(model, IdxTrain)
% [nJoint ig nTraining nFiles] = size(input_LieVec);
% LieParam3 = zeros(nTraining,3);
... |
github | dpar39/ppp-master | mlp_training.m | .m | ppp-master/research/mlp_training.m | 6,664 | utf_8 | 62539c6ab8118f8af6520d4072200b85 | function mlp_training()
root_dir = 'mugshot_frontal_original_all';
img_files = dir([root_dir '/*.jpg']);
pos_files = dir([root_dir '/*.pos']);
ann_files = dir([root_dir '/*.ann']);
do_display = 0; % Don't display annotations
num_faces = length(pos_files);
image_indices = 1:num_faces;
%image_indices = [98];
% Derive... |
github | dpar39/ppp-master | eye_separation_face_height_experiment.m | .m | ppp-master/research/eye_separation_face_height_experiment.m | 4,593 | utf_8 | b1f0345c2264353d7cad75a0119133ef | function eye_separation_face_height_experiment()
root_dir = 'mugshot_frontal_original_all';
img_files = dir([root_dir '/*.jpg']);
pos_files = dir([root_dir '/*.pos']);
ann_files = dir([root_dir '/*.ann']);
do_display = 0; % Don't display annotations
num_faces = length(pos_files);
image_indices = 1:num_faces;
%image_... |
github | OdellDotson/Direct_Shooting_Simulation-_Single_and_Multiple_Shooting-master | DSS.m | .m | Direct_Shooting_Simulation-_Single_and_Multiple_Shooting-master/DSS.m | 3,070 | utf_8 | 3b559f522e99c6755066b83b79ea6394 | function [X,U,t,J] = DSS(L,M,scon,psi,f_ode,x_0,m,tf,Nodes,guess)
% f
% initialize
n = numel(x_0);
if(nargin==9)
w_0 = ones((m)*(Nodes+1),1);
else
t_guess=guess.t_guess;
x_guess=guess.x_guess;% n*(nodes+1)
u_guess=guess.u_guess;
w_0=[u_guess]';
end
if isempty(tf)
tf0=2;
w_0 = [... |
github | OdellDotson/Direct_Shooting_Simulation-_Single_and_Multiple_Shooting-master | forSim.m | .m | Direct_Shooting_Simulation-_Single_and_Multiple_Shooting-master/forSim.m | 511 | utf_8 | eb10c3e59c3a71d656ff2dd7361e7c23 | function [X,ts] = forSim(f,x_0,U,T,N)
% u(x,t)
ts = linspace(0,T,N+1);
X = zeros(numel(x_0),N+1);
dt = 0.1*T/N;
X(:,1) = x_0;
for i = 1:N
tnow=ts(i);
Xtemp=X(:,i);
while tnow < ts(i+1)
Xtemp = rk4(f,Xtemp,U(:,i),tnow,dt);
tnow=tnow+dt;
end
X(:,i+1) = Xtemp;
end
end... |
github | OdellDotson/Direct_Shooting_Simulation-_Single_and_Multiple_Shooting-master | DMS2.m | .m | Direct_Shooting_Simulation-_Single_and_Multiple_Shooting-master/DMS2.m | 2,474 | utf_8 | 7b97e655bd4f78d694ab2a1dc0f61552 | function [X,U,t,J] = DMS2(L,M,h,r,f,x_0,m,T,N)
% initialize
n = numel(x_0);
w_0 = 0.01*ones((n+m)*(N+1),1);
% w_0 = 2*rand(m*(N+1),1)-1;
if isempty(T)
w_0 = [w_0; 10];
end
% defining objective function
fun = @(w)bolzaDMS(w,L,M,f,x_0,m,T,N);
% defining constraints
nonlcon = @(w)constraintDMS(w,f,h,r,x_0,m,T,N);
... |
github | OdellDotson/Direct_Shooting_Simulation-_Single_and_Multiple_Shooting-master | DMS.m | .m | Direct_Shooting_Simulation-_Single_and_Multiple_Shooting-master/DMS.m | 3,409 | utf_8 | 4cd5929a9d8913706d05fa33b33bea23 | function [X,U,t,J] = DMS(L,M,scon,psi,f_ode,x_0,m,tf,Nodes,guess)
% initialize
n = numel(x_0);
if(nargin==9)
w_0 = 0.01*ones((n+m)*(Nodes+1),1);
else
t_guess=guess.t_guess;
x_guess=guess.x_guess;% n*(nodes+1)
u_guess=guess.u_guess;
w_0=[reshape(x_guess,[1,n*(Nodes+1)]),...
u_gue... |
github | yuanyc06/rcrr-master | rcrr_demo.m | .m | rcrr-master/rcrr_demo.m | 773 | utf_8 | ab9e68c015988ee3527aa7d6631e8b70 | % Demo for publication "Reversion Correction and Regularized
% Random Walks Ranking for Saliency Detection"
% by Yuchen Yuan
% The BMIT Group, The University of Sydney 2015
function rcrr_demo()
%% Initialization
addpath('support');
imDir = 'image';
salDir = 'result';% Output path of the saliency map
if ~... |
github | yuanyc06/rcrr-master | removeFrame.m | .m | rcrr-master/support/removeFrame.m | 1,793 | utf_8 | 577f197a3a35295f13c1eb9b5f3c6096 | % Frame removal function used in the manifold ranking algorithm.
% C. Yang, L. Zhang, H. Lu, X. Ruan, and M.-H. Yang. Saliency
% detection via graph-based manifold ranking. In CVPR, 2013.
function [input_im,w]=removeFrame(imname)
threshold=0.5;
input_im=imread(imname);
input_im=im2double(input_im);
% gray=rg... |
github | yuanyc06/rcrr-master | colorSpace.m | .m | rcrr-master/support/colorSpace.m | 14,022 | utf_8 | 1f08814aca11401f4d09ada8f889d7b5 | function varargout = colorSpace(Conversion,varargin)
% colorSpace Convert a color image between color representations.
% B = COLORSPACE(S,A) converts the color representation of image A
% where S is a string specifying the conversion. S tells the
% source and destination color spaces, S = 'dest<-src', or
... |
github | yuanyc06/rcrr-master | contextAware.m | .m | rcrr-master/support/contextAware.m | 2,118 | utf_8 | d7bcd1762dd300e818bef965631bb70a |
function bSPSal = contextAware(img, superpixels)
[m,n,z] = size(img);
img_pixels = reshape(img, m*n, z);
% c = 3;
bRow = {1, m, 1:m, 1:m};
bCol = {1:n, 1:n, 1, n};
bSP = [];
for i = 1:4
bSP = union(bSP, superpixels(bRow{i}, bCol{i}));
end
nBSP = length(bSP);
fColor = zeros(nBSP, 3);
% fP... |
github | yuanyc06/rcrr-master | kMeans.m | .m | rcrr-master/support/kMeans.m | 5,224 | utf_8 | 62e7c2086d5c0232ea3f027b2ab727cf | %% Fast K means Algorithm for clustering a Gray Image or Color Image
% It uses Preallocation and parallel operations to optimize algorithm time.
function [labelIm,vecMean] = kMeans(img,clusterNum,varargin)
% IM input Image. NO_OF_CLUSTER is number of cluster.
% VARARGIN will define Colorspace if it is empty RGB col... |
github | hansemannn/ti.onepassword-master | OnePasswordExtension.m | .m | ti.onepassword-master/iphone/Classes/OnePasswordExtension/OnePasswordExtension.m | 43,631 | utf_8 | 032eb1f853405cff9759700c39779e00 | //Copyright (c) 2014-2020 AgileBits Inc.
//
//Permission is hereby granted, free of charge, to any person obtaining a copy
//of this software and associated documentation files (the "Software"), to deal
//in the Software without restriction, including without limitation the rights
//to use, copy, modify, merge, publish... |
github | gergoorban/sampling_in_gsm-master | get_pz_x_max.m | .m | sampling_in_gsm-master/get_pz_x_max.m | 1,527 | utf_8 | f6d6a216669e1ddb1897878bb64577e0 | function [z, zMin, zMax]=get_pz_x_max(x, Sigma0, ACAT, x0,kGam,thGam)
% Usage: [z, zMin, zMax]=get_pz_x_max(x, Sigma0, ACAT, x0,kGam,thGam)
%
% this function aims to determine a sensible range of integration for the latent
% variable z based on the posterior Pz_x for one particular image
% Output arguments: z: the val... |
github | vid33/MPS-DMRG-TDVP-for-finite-systems-mid-spectrum-states-master | calculate_rhol.m | .m | MPS-DMRG-TDVP-for-finite-systems-mid-spectrum-states-master/calculate_rhol.m | 535 | utf_8 | 10af3047d88adb26cf23b1a460f313d2 | %calculates left density matrix
function [ rhol ] = calculate_rhol( A, N )
rhol = cell(1, N+1); % rhol{N+1} := rhol{0}
rhol{N+1} =1;
rhol{1} = Contract({A{1}, conj(A{1})}, {[1, -1], [1, -2]});
for kk=2:N-1
rhol{kk} = Contract({rhol{kk-1}, A{kk}}, {[1, -1], [1, -2, -3]});
rhol{kk}... |
github | vid33/MPS-DMRG-TDVP-for-finite-systems-mid-spectrum-states-master | calculate_rhor.m | .m | MPS-DMRG-TDVP-for-finite-systems-mid-spectrum-states-master/calculate_rhor.m | 574 | utf_8 | 1de4d1f965eb51f76659affe333a449c | %calculates right density matrix
function [ rhor ] = calculate_rhor( A, N )
rhor = cell(1, N+1); % convention rhor{N+1} := rhor{0}
rhor{N} =1;
rhor{N-1} = Contract({A{N}, conj(A{N})}, {[-1, 1], [-2, 1]});
for kk=1:N-2
rhor{N-kk-1} = Contract({A{N-kk}, rhor{N-kk}}, {[-1, -2, 1], [1, -3]... |
github | vid33/MPS-DMRG-TDVP-for-finite-systems-mid-spectrum-states-master | Contract.m | .m | MPS-DMRG-TDVP-for-finite-systems-mid-spectrum-states-master/Contract.m | 3,086 | utf_8 | ffdd05dd983ccc7cb565f9a24c01ee55 | function X=Contract(tensors,contractions)
numcont=max(cell2mat(contractions));
%fprintf('numcont is %d\n', numcont);
table=zeros(numcont,2);
for k=1:length(contractions)
c=contractions{k};
for i=c(c>0)
if table(i,1)==0
table(i,1)=k;
... |
github | effepivi/ICP3038-master | illustration7.m | .m | ICP3038-master/Lectures/Chapter 09 -- Fourier transform/illustration7.m | 2,035 | utf_8 | 2dbb88a0520cc51bcbafb2a7d6f406af | close all
clear
pkg load image
function f=gaussian2d(N,sigma)
% N is grid size, sigma speaks for itself
[x y]=meshgrid(round(-N/2):round(N/2), round(-N/2):round(N/2));
f=exp(-x.^2/(2*sigma^2)-y.^2/(2*sigma^2));
f=f./sum(f(:));
endfunction
% First create some data. Consider data sampled at 1000 Hz. Start by for... |
github | effepivi/ICP3038-master | createData.m | .m | ICP3038-master/Labs/backup/Lab-04-Image_statistics/octave/createData.m | 3,851 | utf_8 | 977063ec02fd18f6300b6fab25c451c0 | clear
close all
pkg load communications
function value = gauss(A, B, C, x)
value = A * exp(-((x - B)^2)/(2*(C^2)));
end
function NCC = computeNCC(y1, y2)
NCC=100*sum(((y1 .- mean(y1)).*(y2 .- mean(y2))) ./ (std(y1, 1)*std(y2, 1))) / (size(y1, 1) * size(y1, 2));
end
function SAE = computeSAE(y1, y2)
SAE = su... |
github | mjbays/ROS-IvP-Native-master | make_imatlab.m | .m | ROS-IvP-Native-master/MOOS/MOOSMatlab/iMatlab/make_imatlab.m | 3,437 | utf_8 | 462054d85eb0b5afa287456a6ecedc69 |
function make_imatlab
%this is a simple build script for iMatlab. Simply run make_imatlab from
%the matlab command line and follow instructions. Basically you get given
%the choice to autodiscover the location of the MOOS source tree and
%the build you want to link against or specify them yourself.
%ask the user if... |
github | sunenj/Fast-diffusion-kurtosis-imaging-DKI-master | levmar.m | .m | Fast-diffusion-kurtosis-imaging-DKI-master/levmar.m | 2,730 | utf_8 | d0da90cec5b83252e5a5531a97f26493 | function [x,s2,n] = levmar(f,x,y,lambda,upFactor,downFactor,gradeps,imax,eps)
% Levenberg-Marquardt implementation by Jonas Olesen for unbounded
% non-linear fitting based on the algortihm presented by Transtrum and
% Sethna.
%
%
% INPUT:
% f - Objective function in the format [y,J] = f(x), where y contains the... |
github | sunenj/Fast-diffusion-kurtosis-imaging-DKI-master | getCscale.m | .m | Fast-diffusion-kurtosis-imaging-DKI-master/example/getCscale.m | 429 | utf_8 | bd18ba822fd28c420f5c7e0f4a6e0097 | function Cscale = getCscale(data,target)
if nargin==1
target = 0.98;
end
if target==1
Cscale = [min(data(:)) max(data(:))];
return
end
x0 = median(data(:));
Cscale(1) = fminsearch(@(x) errorFunc(x,data(:),target),x0);
targetHigh = 1-target;
Cscale(2) = fminsearch(@(x) errorFunc(x,data(:),targetHigh),x0);... |
github | jkooij/depthaware-momag-master | checkMemAvailableFor.m | .m | depthaware-momag-master/matlab/utils/checkMemAvailableFor.m | 1,764 | utf_8 | cff34d10d651ff2670a0a95374ea93de | function checkMemAvailableFor(size, type)
if nargin < 2; type = 'double'; end
[numBytesNeeded, type] = bytesizeof(type);
numBytesNeeded = numBytesNeeded * prod(size(:));
% See http://stackoverflow.com/a/14144392/218682
maxMemFrac = 0.8; % use at most 80% of the available memory
%... |
github | jkooij/depthaware-momag-master | build_bilatspyr.m | .m | depthaware-momag-master/matlab/bilatspyr/build_bilatspyr.m | 7,569 | utf_8 | 8467c659a56f350e159197afee4d5f96 | % [PYR, INDICES, STEERMTX, HARMONICS] = BUILD_BILATSPYR(IM, HEIGHT, FILTFILE, EDGES)
%
% NOTE: Adapted from buildSpyr, originally by
% Eero Simoncelli, 6/96.
% See http://www.cis.upenn.edu/~eero/steerpyr.html for more
% information about the Steerable Pyramid image decomposition.
%
% Construct a steerable pyramid... |
github | jkooij/depthaware-momag-master | fastbilat_corrDn.m | .m | depthaware-momag-master/matlab/bilatspyr/fastbilat_corrDn.m | 1,060 | utf_8 | 2c6125ed2cd56fea89cf0c248cf6c113 | % Apply EVM_Matlab's corrDn on both data and weights each depth layer
% Uses MEX implementation corrDnBatch
%
% Based upon bilateralFilter.m of Paris and Durand's
% "A Fast Approximation of the Bilateral Filter using a Signal Processing Approach", (ECCV 2006).
% See http://people.csail.mit.edu/jiawen/#code
%
% c... |
github | jkooij/depthaware-momag-master | fastbilat_convn.m | .m | depthaware-momag-master/matlab/bilatspyr/fastbilat_convn.m | 562 | utf_8 | 1b53cbd48907d6bc76fea86c207fc305 | % N-d convolution on both data and weights
%
% Based upon bilateralFilter.m of Paris and Durand's
% "A Fast Approximation of the Bilateral Filter using a Signal Processing Approach", (ECCV 2006).
% See http://people.csail.mit.edu/jiawen/#code
%
% created by Julian Kooij, Delft University of Technology, 2015
% "D... |
github | jkooij/depthaware-momag-master | fastbilat_corr_gridonly.m | .m | depthaware-momag-master/matlab/bilatspyr/fastbilat_corr_gridonly.m | 926 | utf_8 | 7b0c62eaa354a51875a488881c0df732 | % Apply EVM_Matlab's corrDn (on data ONLY) at each depth layer, but WITHOUT 'Dn' subsampling
% Uses MEX implementation corrDnBatch
%
% Based upon bilateralFilter.m of Paris and Durand's
% "A Fast Approximation of the Bilateral Filter using a Signal Processing Approach", (ECCV 2006).
% See http://people.csail.mit.... |
github | jkooij/depthaware-momag-master | fastbilat_upsample.m | .m | depthaware-momag-master/matlab/bilatspyr/fastbilat_upsample.m | 1,097 | utf_8 | fd15e331bfeb310ab5a1d5b2c8d4bb8a | % Sample extended representation at the depth coordinates.
%
% Based upon bilateralFilter.m of Paris and Durand's
% "A Fast Approximation of the Bilateral Filter using a Signal Processing Approach", (ECCV 2006).
% See http://people.csail.mit.edu/jiawen/#code
%
% created by Julian Kooij, Delft University of Technol... |
github | jkooij/depthaware-momag-master | fastbilat_gaussconv.m | .m | depthaware-momag-master/matlab/bilatspyr/fastbilat_gaussconv.m | 619 | utf_8 | 910b93a5df83a16ce39403feaa31046d | % Run gaussconv on data and weights at each depth layer
%
% Based upon bilateralFilter.m of Paris and Durand's
% "A Fast Approximation of the Bilateral Filter using a Signal Processing Approach", (ECCV 2006).
% See http://people.csail.mit.edu/jiawen/#code
%
% created by Julian Kooij, Delft University of Technology... |
github | jkooij/depthaware-momag-master | fastbilat_normalize.m | .m | depthaware-momag-master/matlab/bilatspyr/fastbilat_normalize.m | 708 | utf_8 | 58361c36ae83a074f5f3d4792d2dc452 | % Normalize each cell by dividing it by its weight
%
% Based upon bilateralFilter.m of Paris and Durand's
% "A Fast Approximation of the Bilateral Filter using a Signal Processing Approach", (ECCV 2006).
% See http://people.csail.mit.edu/jiawen/#code
%
% created by Julian Kooij, Delft University of Technology, 201... |
github | jkooij/depthaware-momag-master | fastbilat_tdistconv.m | .m | depthaware-momag-master/matlab/bilatspyr/fastbilat_tdistconv.m | 633 | utf_8 | d7c479dfa295faa177c31022eed010a2 | % Run tdistconv on data and weights at each depth layer
%
% Based upon bilateralFilter.m of Paris and Durand's
% "A Fast Approximation of the Bilateral Filter using a Signal Processing Approach", (ECCV 2006).
% See http://people.csail.mit.edu/jiawen/#code
%
% created by Julian Kooij, Delft University of Technology... |
github | jkooij/depthaware-momag-master | fastbilat_subsample.m | .m | depthaware-momag-master/matlab/bilatspyr/fastbilat_subsample.m | 868 | utf_8 | 702c8d21f36b9e00b7a550c7a6d24945 | % Subsample the extended representation, keep cells at given step interval
%
% Based upon bilateralFilter.m of Paris and Durand's
% "A Fast Approximation of the Bilateral Filter using a Signal Processing Approach", (ECCV 2006).
% See http://people.csail.mit.edu/jiawen/#code
%
% created by Julian Kooij, Delft Unive... |
github | jkooij/depthaware-momag-master | fastbilat_corrDn_gridonly.m | .m | depthaware-momag-master/matlab/bilatspyr/fastbilat_corrDn_gridonly.m | 994 | utf_8 | a203fecbc9581bb34dfa005dd7f44e7d | % Apply EVM_Matlab's corrDn (on data ONLY) at each depth layer, including 'Dn' subsampling
% Uses MEX implementation corrDnBatch
%
% Based upon bilateralFilter.m of Paris and Durand's
% "A Fast Approximation of the Bilateral Filter using a Signal Processing Approach", (ECCV 2006).
% See http://people.csail.mit.ed... |
github | jkooij/depthaware-momag-master | recon_bilatspyr.m | .m | depthaware-momag-master/matlab/bilatspyr/recon_bilatspyr.m | 690 | utf_8 | 221a89c77e289bbf0e91144ca481eb13 | %% Back-project the extended pyramid to a normal pyramid
function [pyr, pind] = recon_bilatspyr(xpyr, pind)
nbands_in_level = spyrNumBands(pind(:,1:2));
nbands = size(pind,1);
pyr = [];
for band = 1:nbands
midx = ceil((band-1) / nbands_in_level)+1;
map = xpyr.pmap... |
github | jkooij/depthaware-momag-master | fastbilat_build.m | .m | depthaware-momag-master/matlab/bilatspyr/fastbilat_build.m | 2,027 | utf_8 | cccaf519500791952a5c6f64c0d76e33 | % Create an extended representation for fast bilateral filtering
%
% Based upon bilateralFilter.m of Paris and Durand's
% "A Fast Approximation of the Bilateral Filter using a Signal Processing Approach", (ECCV 2006).
% See http://people.csail.mit.edu/jiawen/#code
%
% created by Julian Kooij, Delft University of T... |
github | jkooij/depthaware-momag-master | sp3Filters_imag.m | .m | depthaware-momag-master/matlab/filters/sp3Filters_imag.m | 1,298 | utf_8 | 4948b3bf132306d38abd20bd1a3137af | % Steerable pyramid filters. Transform described in:
%
% @INPROCEEDINGS{Simoncelli95b,
% TITLE = "The Steerable Pyramid: A Flexible Architecture for
% Multi-Scale Derivative Computation",
% AUTHOR = "E P Simoncelli and W T Freeman",
% BOOKTITLE = "Second Int'l Conf on Image Processing",
% ADDRESS = "Washingt... |
github | jkooij/depthaware-momag-master | tdistconv.m | .m | depthaware-momag-master/matlab/filters/tdistconv.m | 1,234 | utf_8 | e37708d9df1f69ddac0858009e1b2b95 | function [I, G] = tdistconv(I, sigma, G)
if nargin < 2; sigma = 1; end
if nargin < 3;
% create Student-T filter for I
[h, w, ~] = size(I);
% multivariate implementation
nu = 2;
Rho = [1 0; 0 1];
cw = (floor(w/2)+1);
ch = (floor(h/2... |
github | jkooij/depthaware-momag-master | gaussconv.m | .m | depthaware-momag-master/matlab/filters/gaussconv.m | 1,187 | utf_8 | 83af97fb94eb61925b37b2253c5621b2 | function [I, G] = gaussconv(I, sigma, G)
if nargin < 2; sigma = 1; end
if nargin < 3;
% create Student-T filter for I
[h, w, ~] = size(I);
%h = 5;
%w = h;
% multivariate implementation
cw = (floor(w/2)+1);
ch = (floor(h/2)+1);
... |
github | lynch829/image-registration-master | thin_plate_splines3d.m | .m | image-registration-master/registration/thin_plate_splines3d.m | 4,307 | utf_8 | a6273a0db2dbd57e7021fc4f85d4d728 | function [output, displacementField] = thin_plate_splines3d(input, outputSize, ...
inputLandmarks, outputLandmarks)
% THIN_PLATE_SPLINES3D Deforms input volume according to given landmarks and thin plate splines
%
% [output] = thin_plate_splines3d(input, outputSize, ...
% inputLandmarks, outputLandmarks)
%
% I... |
github | jindongwang/activityrecognition-master | demo.m | .m | activityrecognition-master/code/percom18_stl/demo.m | 2,629 | utf_8 | 1d8f78a47b53a10be3cee9ca57556513 | clear;
addpath(genpath('data/'))
file_name = 'DSADS'; %% 'OPP' | 'DSADS' | 'PAMAP'
dim = 30; %% < 81
%% Use i and j to denote the different body positions in each dataset
for i = 2 : 2
for j = 3 : 3
if i == j
continue;
end
%% Get source and t... |
github | jindongwang/activityrecognition-master | sc_pdist2.m | .m | activityrecognition-master/code/percom18_stl/base/sc_pdist2.m | 4,793 | utf_8 | 6bc7d508cf5a43c21f4c24bdaed7f268 | function Dist = sc_pdist2( X, Y, metric )
% Calculates the pairwise distance between sets of vectors.
%
% Let X be an D-by-M matrix representing m points in D-dimensional space
% and Y be an D-by-N matrix representing another set of points in the same
% space. This function computes the M-by-N distance matrix Dist wher... |
github | jindongwang/activityrecognition-master | lle.m | .m | activityrecognition-master/code/percom18_stl/base/preprocess/lle.m | 2,140 | utf_8 | 60fedb1591ea586ab17af758db2bcb69 | % LLE ALGORITHM (using K nearest neighbors)
%
% [Y] = lle(X,K,dmax)
%
% X = data as D x N matrix (D = dimensionality, N = #points)
% K = number of neighbors
% dmax = max embedding dimensionality
% Y = embedding as dmax x N matrix
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
function [Y] = lle(X,K,d)
... |
github | yuhanghe01/caffe_triplet_multiple_inputs-master | classification_demo.m | .m | caffe_triplet_multiple_inputs-master/matlab/demo/classification_demo.m | 5,412 | utf_8 | 8f46deabe6cde287c4759f3bc8b7f819 | function [scores, maxlabel] = classification_demo(im, use_gpu)
% [scores, maxlabel] = classification_demo(im, use_gpu)
%
% Image classification demo using BVLC CaffeNet.
%
% IMPORTANT: before you run this demo, you should download BVLC CaffeNet
% from Model Zoo (http://caffe.berkeleyvision.org/model_zoo.html)
%
% *****... |
github | nick-hu/cpsc302-master | assignment7_q4.m | .m | cpsc302-master/assignment7/assignment7_q4.m | 1,886 | utf_8 | dba4c73b5c147cb78c3c073b40141b0d | %% *CPSC 302: Assignment 7*
% Nicholas Hu
% This code makes use of <http://www.cs.ubc.ca/labs/scl/spot/index.html Spot>,
% a linear operator toolbox by Ewout van den Berg and Michael P. Friedlander.
%% Question 4
% (b)
load clown
[m, n] = size(X);
N = m * n;
plotimage(X);
kernel = (1/9) * ones(3);
A = opConvolve(m,... |
github | golnazghiasi/LRR-master | LRRTestOnCityScape.m | .m | LRR-master/LRRTestOnCityScape.m | 11,951 | utf_8 | 602d876e4c2a960edc387bd455f3aac9 | function info = LRRTestOnCityScape()
path_to_matconvnet = '../matconvnet-1.0-beta20/';
fprintf('path to matconvnet library: %s\n', path_to_matconvnet);
run(fullfile(path_to_matconvnet, 'matlab/vl_setupnn.m'));
addpath(fullfile(path_to_matconvnet, 'examples'));
addpath modelInitialization;
addpath prepareData;
addpath ... |
github | golnazghiasi/LRR-master | LRR4xTrainVGG16Pascal.m | .m | LRR-master/LRR4xTrainVGG16Pascal.m | 15,245 | utf_8 | 6c3ad81fc9f10be9fa9638554307f79d | function LRR4xTrainVGG16Pascal(varargin)
path_to_matconvnet = '../matconvnet-1.0-beta20/';
fprintf('path to matconvnet library: %s\n', path_to_matconvnet);
run(fullfile(path_to_matconvnet, 'matlab/vl_setupnn.m'));
addpath(fullfile(path_to_matconvnet, 'examples'));
addpath prepareData;
addpath deconvBases;
addpath util... |
github | golnazghiasi/LRR-master | getBatch.m | .m | LRR-master/getBatch.m | 10,821 | utf_8 | f78b14c1be9ea42c5a2c75f69a502a26 | % This file is from Matconvnet library (https://github.com/vlfeat/matconvnet)
% and has minor modifications.
function y = getBatch(imdb, images, gt_resizes, batch_image_size_ind, data_path_fn, data_aug_path_fn, anno_de_path_fn, varargin)
% GET_BATCH Load, preprocess, and pack images for CNN evaluation
opts.imageSize ... |
github | golnazghiasi/LRR-master | cnnTrainDag.m | .m | LRR-master/cnnTrainDag.m | 16,497 | utf_8 | bae2c03bf553114446c6f2082b3ef856 | % This file is from Matconvnet library (https://github.com/vlfeat/matconvnet)
% and has minor modifications.
function [net,stats] = cnnTrainDag(net, imdb, getBatch_train, getBatch_val, batchSize_train, batchSize_val, varargin)
%CNN_TRAIN_DAG Demonstrates training a CNN using the DagNN wrapper
% CNN_TRAIN_DAG() is s... |
github | golnazghiasi/LRR-master | LRRTestOnPascal.m | .m | LRR-master/LRRTestOnPascal.m | 11,152 | utf_8 | 9d0f04d33db5ea7f122e94a07e07825a | function info = LRRTestOnPascal()
path_to_matconvnet = '../matconvnet-1.0-beta20/';
fprintf('path to matconvnet library: %s\n', path_to_matconvnet);
run(fullfile(path_to_matconvnet, 'matlab/vl_setupnn.m'));
addpath(fullfile(path_to_matconvnet, 'examples'));
addpath modelInitialization;
addpath prepareData;
addpath uti... |
github | golnazghiasi/LRR-master | PrepareDilatedErrodedGT.m | .m | LRR-master/prepareData/PrepareDilatedErrodedGT.m | 2,475 | utf_8 | 739427b442bfd0ce6860f125d80c3dbb | function ResizeAndSaveTrainData(multi_imageSizes, max_allow_size, images, gt_resizes, strel_rads, data_aug_path_fn, anno_de_path_fn, num_classes)
disp(gt_resizes)
disp(strel_rads)
for k = 1 : length(strel_rads)
strels{k} = strel('disk', strel_rads(k));
end
for size_ind = 1 : length(multi_imageSizes)
img_scale... |
github | golnazghiasi/LRR-master | CityScapeSetup.m | .m | LRR-master/prepareData/CityScapeSetup.m | 5,191 | utf_8 | 98ca18ae518c67a0f43a8bde491daab7 | function [imdb] = CityScapeSetup(dataDir, include_coarse)
%%{root}/{type}{video}/{split}/{city}/{city}_{seq:0>6}_{frame:0>6}_{type}{ext}
imdb.root_path = dataDir;
imdb.anno_path = [dataDir '/%s/%s/%s/%s'];
imdb.img_path = [dataDir '/leftImg8bit/%s/%s/%s_leftImg8bit.png'];
% Source images and classes
imdb.sets.id = ui... |
github | golnazghiasi/LRR-master | vocSetup.m | .m | LRR-master/prepareData/vocSetup.m | 10,269 | utf_8 | 3501728a7aad07947ee5693d8e0feb82 | % ------------------------------------------------------------------
% This file is copied from matconvnet-fcn repository
% (https://github.com/vlfeat/matconvnet-fcn)
% ------------------------------------------------------------------
function imdb = vocSetup(varargin)
opts.edition = '07' ;
opts.dataDir = fullfile('... |
github | golnazghiasi/LRR-master | ResizeAndSaveTrainData.m | .m | LRR-master/prepareData/ResizeAndSaveTrainData.m | 2,816 | utf_8 | e8360d28968ba47c525423b6cf8d9d9f | function ResizeAndSaveTrainData(multi_imageSizes, max_allow_size, imdb, images, data_path_fn, data_aug_path_fn)
resize_method = 'bicubic';
cmap = labelColors();
fprintf('\nPre-computing and saving scale augmented data (if they are not saved already) ...\n');
for size_ind = 1 : length(multi_imageSizes)
resizeImage... |
github | golnazghiasi/LRR-master | vocSetupAdditionalSegmentations.m | .m | LRR-master/prepareData/vocSetupAdditionalSegmentations.m | 4,511 | utf_8 | cc448b2e1ea1071c222ab985acde55e1 | % ------------------------------------------------------------------
% This file is copied from matconvnet-fcn repository
% (https://github.com/vlfeat/matconvnet-fcn)
% ------------------------------------------------------------------
function imdb = vocSetupAdditionalSegmentations(imdb, varargin)
%VOCSETUPADDITIONA... |
github | golnazghiasi/LRR-master | model2dot.m | .m | LRR-master/util/model2dot.m | 2,252 | utf_8 | 4a4f185282030a58327af7b9caf0427b | % ------------------------------------------------------------------
% This file is copied from matconvnet repository and just has
% a minor modification of getting model as the input instead of
% getting the model path.
% (https://github.com/vlfeat/matconvnet)
% --------------------------------------------------------... |
github | golnazghiasi/LRR-master | AddDilationErosionObjectives.m | .m | LRR-master/modelInitialization/AddDilationErosionObjectives.m | 2,955 | utf_8 | 475beab90ff4584fde1b8972ff685f73 | function net = AddDilationErosionObjectives(net, upsample_fac, rec_upsample, var_to_upsample, bases_size, num_basis, neigh_size, learningrate, opts)
up_name = [num2str(upsample_fac) 'x'];
net = AddSegObjective(net, var_to_upsample, up_name, upsample_fac, upsample_fac/rec_upsample, rec_upsample, neigh_size, num_basis, b... |
github | isetbio/ISETBioCSF-master | generateGifIcon.m | .m | ISETBioCSF-master/paperfigs/CSFpaper2/gifIcon/generateGifIcon.m | 8,235 | utf_8 | 6779581855c18401887d84bb57d52b0d | function generateGifIcon
[rootPath,~] = fileparts(which(mfilename));
[theMosaic, theIsomerizations, thePhotocurrents, theEMPath, responseTimeAxis] = generateData();
gifFineName = fullfile(rootPath,'Cottaris2020');
hFig = generateGIFVideo(theMosaic, theIsomerizations, theEMPath, responseTimeAx... |
github | isetbio/ISETBioCSF-master | generateFig1Components.m | .m | ISETBioCSF-master/paperfigs/CSFpaper2/Figure1_Resources/script/generateFig1Components.m | 32,028 | utf_8 | fa5485ff8cefe08c37e6426ebbd76e35 | function generateFig1Components
% This is the function used to make the components of Fig1 for the paper2 second submission.
nTrialsNum = 2;
dataFileName = sprintf('dynamicDataTrials%1.0f.mat', nTrialsNum);
[rootPath,~] = fileparts(which(mfilename));
rootPath = strrep(rootPath, 'script', 'isetbio_r... |
github | isetbio/ISETBioCSF-master | plotMacularPigmentTransmittance.m | .m | ISETBioCSF-master/paperfigs/CSFpaper/plotMacularPigmentTransmittance.m | 2,622 | utf_8 | 0704341f40ed168d6feda316ad16f97d | function plotMacularPigmentTransmittance
lens = Lens();
lambda = lens.wave;
macular = Macular('wave', lambda);
macularTransmittance = macular.transmittance;
xLims = [lambda(1) lambda(end)];
yLims = [0 1];
xTicks = 400:50:850;
yTicks = 0:0.1:1;
localDir = strrep(isetR... |
github | isetbio/ISETBioCSF-master | plotLensAndMacularPigmentTransmittance.m | .m | ISETBioCSF-master/paperfigs/CSFpaper/plotLensAndMacularPigmentTransmittance.m | 2,649 | utf_8 | bda7143f383968b515f91795f21f36cb | function plotMacularPigmentTransmittance
lens = Lens();
lambda = lens.wave;
macular = Macular('wave', lambda);
macularTransmittance = macular.transmittance;
xLims = [lambda(1) lambda(end)];
yLims = [0 1];
xTicks = 400:50:850;
yTicks = 0:0.1:1;
localDir = strrep(isetR... |
github | isetbio/ISETBioCSF-master | plotConeApertureMTF.m | .m | ISETBioCSF-master/paperfigs/CSFpaper/plotConeApertureMTF.m | 4,803 | utf_8 | 814218c0d27047c650d4f695b918db9b | function plotConeApertureMTF
localExportsDir = strrep(isetRootPath, 'toolboxes/isetbio/isettools', 'projects/IBIOColorDetect/paperfigs/CSFpaper/exports');
localResourcesDir = strrep(isetRootPath, 'toolboxes/isetbio/isettools', 'projects/IBIOColorDetect/paperfigs/CSFpaper/resources');
load(fullfile... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.