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 | xijunlee/Undergraduate-Thesis-Project-master | gramsmithorth.m | .m | Undergraduate-Thesis-Project-master/new_algorithm(lxl)/CodeLSA/helper_functions/gramsmithorth.m | 317 | utf_8 | 324ed13d7bac9f741e39fc1a759a42ea | %function y=gramsmithorth(x)
% Returns Y the Gram-Smith orthogonalization of the colums of X
% Y and X have the same dimensions
function y=gramsmithorth(x)
[K,D]=size(x);
I=eye(K);
y=x(:,1)/norm(x(:,1));
for(i=2:D)
newcol=(I-y*y')*x(:,i);
newcol=newcol/norm(newcol);
y=[y newcol];
end
|
github | xijunlee/Undergraduate-Thesis-Project-master | spectralclusternormalcut_recursive.m | .m | Undergraduate-Thesis-Project-master/new_algorithm(lxl)/CodeLSA/helper_functions/spectralclusternormalcut_recursive.m | 1,031 | utf_8 | 358bebb8231c4e0eff3a3f5417ba9daf | %function group=spectralclusternormalcut_recursive(n,simMat)
%n final number of cluster
%simMat similarity matrix
function group=spectralclusternormalcut_recursive(n,simMat)
%trivial case with 1 cluster
if(n==1)
group=ones(size(simMat,1),1);
end
%initial bipartition with spectral clustering
group=spec... |
github | xijunlee/Undergraduate-Thesis-Project-master | Misclassification.m | .m | Undergraduate-Thesis-Project-master/new_algorithm(lxl)/common_useage/Misclassification.m | 747 | utf_8 | 64f83e2c05684862aefe11a391531b35 | %--------------------------------------------------------------------------
% This function takes the groups resulted from spectral clutsering and the
% ground truth to compute the misclassification rate.
% groups: [grp1,grp2,grp3] for three different forms of Spectral Clustering
% s: ground truth vector
% Missrate: 3x... |
github | xijunlee/Undergraduate-Thesis-Project-master | BuildAdjacency.m | .m | Undergraduate-Thesis-Project-master/new_algorithm(lxl)/common_useage/BuildAdjacency.m | 1,024 | utf_8 | efa00260bc61cb7ddb34720083fc8300 | %--------------------------------------------------------------------------
% This function takes a NxN coefficient matrix and returns a NxN adjacency
% matrix by choosing the K strongest connections in the similarity graph
% CMat: NxN coefficient matrix
% K: number of strongest edges to keep; if K=0 use all the exitin... |
github | xijunlee/Undergraduate-Thesis-Project-master | thrC.m | .m | Undergraduate-Thesis-Project-master/new_algorithm(lxl)/common_useage/thrC.m | 680 | utf_8 | 1d57203ca466d32bcd882ce949a6fea8 | %--------------------------------------------------------------------------
% Copyright @ Ehsan Elhamifar, 2012
%--------------------------------------------------------------------------
function Cp = thrC(C,ro)
if (nargin < 2)
ro = 1;
end
if (ro < 1)
N = size(C,2);
Cp = zeros(N,N);
[S,Ind] = sort(a... |
github | xijunlee/Undergraduate-Thesis-Project-master | missclassGroups.m | .m | Undergraduate-Thesis-Project-master/new_algorithm(lxl)/common_useage/missclassGroups.m | 1,099 | utf_8 | fbb042310b95c08898c1c63f799c42db | %--------------------------------------------------------------------------
% [miss,index] = missclass(Segmentation,RefSegmentation,ngroups)
% Computes the number of missclassified points in the vector Segmentation.
% Segmentation: 1 by sum(npoints) or sum(ngroups) by 1 vector containing
% the label for each group, r... |
github | xijunlee/Undergraduate-Thesis-Project-master | BuildAdjacency_N.m | .m | Undergraduate-Thesis-Project-master/new_algorithm(lxl)/common_useage/BuildAdjacency_N.m | 996 | utf_8 | df787c53899c59842f3f1bd1ebdfcd56 | %--------------------------------------------------------------------------
% This function takes a NxN coefficient matrix and returns a NxN adjacency
% matrix by choosing the K strongest connections in the similarity graph
% CMat: NxN coefficient matrix
% K: number of strongest edges to keep; if K=0 use all the exitin... |
github | xijunlee/Undergraduate-Thesis-Project-master | DataProjection.m | .m | Undergraduate-Thesis-Project-master/new_algorithm(lxl)/common_useage/DataProjection.m | 754 | utf_8 | b3a44fded67998f640ca13c7059a36ad | %--------------------------------------------------------------------------
% This function takes the D x N data matrix with columns indicating
% different data points and project the D dimensional data into a r
% dimensional subspace using PCA.
% X: D x N matrix of N data points
% r: dimension of the PCA projection, i... |
github | xijunlee/Undergraduate-Thesis-Project-master | SpectralClustering.m | .m | Undergraduate-Thesis-Project-master/new_algorithm(lxl)/common_useage/SpectralClustering.m | 1,218 | utf_8 | 1dd5da7a3aa9d8acc02e7bbdae976eaa | %--------------------------------------------------------------------------
% This function takes an adjacency matrix of a graph and computes the
% clustering of the nodes using the spectral clustering algorithm of
% Ng, Jordan and Weiss.
% CMat: NxN adjacency matrix
% n: number of groups for clustering
% groups: N-d... |
github | Sina-Baharlou/Face-Recognition-master | loadset.m | .m | Face-Recognition-master/loadset.m | 529 | utf_8 | 6e8d8a9b5639a9c6163c645ca947877d | % Face Recognition using Independent Component Analysis (ICA)
% Created on Mar 2015
% Authors: Sid Ali Rezetane, Sina M. Baharlou, Harold Agudelo
% Load the first n *.pgm images in the specified directory to a matrix
function D = loadset(directory, n)
% get all pgm files in the specified directory
file_list ... |
github | Sina-Baharlou/Face-Recognition-master | getN.m | .m | Face-Recognition-master/getN.m | 357 | utf_8 | c9add1b05ed5de929739863a5b52559e | % Face Recognition using Independent Component Analysis (ICA)
% Created on Mar 2015
% Authors: Sid Ali Rezetane, Sina M. Baharlou, Harold Agudelo
function n = getN(x, thresh)
total_length = sum(x);
s = length(x);
for i = 1 : s
if ((sum(x(1: s - i)) / total_length) < thresh)
break
... |
github | Sina-Baharlou/Face-Recognition-master | loadsetEx.m | .m | Face-Recognition-master/loadsetEx.m | 538 | utf_8 | b8b9017ada92fd20d576d96700c834f5 | % Face Recognition using Independent Component Analysis (ICA)
% Created on Mar 2015
% Authors: Sid Ali Rezetane, Sina M. Baharlou, Harold Agudelo
% Load the first n *.pgm images (with offset 'o') from the m specified directory to a matrix
function D = loadsetEx(directory, n, m, o)
D = [];
for i = 1:m
d... |
github | Sina-Baharlou/Face-Recognition-master | archOne.m | .m | Face-Recognition-master/archOne.m | 1,484 | utf_8 | 54509da21d46dddab333f0334e021d83 | % Face Recognition using Independent Component Analysis (ICA)
% Created on Mar 2015
% Authors: Sid Ali Rezetane, Sina M. Baharlou, Harold Agudelo
function [b, r, u, w, a, m, evec] = archOne(filename, nImage, nClass, offset, thresh)
% constants
blockSize = 30; % infomax blockzize
epochs = 100; % infomax n... |
github | Sina-Baharlou/Face-Recognition-master | eigenface.m | .m | Face-Recognition-master/eigenface.m | 874 | utf_8 | e93314c7aefca4e72abe23c601da73f0 | % Face Recognition using Independent Component Analysis (ICA)
% Created on Mar 2015
% Authors: Sid Ali Rezetane, Sina M. Baharlou, Harold Agudelo
% calculate the eigenvalues
% V is the matrix containing the eigen vectors
% E is the matrix containing the eigen values
function [V, E] = eigen(M)
% calculate the size... |
github | Sina-Baharlou/Face-Recognition-master | annClassifier.m | .m | Face-Recognition-master/annClassifier.m | 1,241 | utf_8 | 1543fadcae097367c6eb8ce6a0c5702a | % Face Recognition using Independent Component Analysis (ICA)
% Created on Mar 2015
% Authors: Sid Ali Rezetane, Sina M. Baharlou, Harold Agudelo
% Solve an Input-Output Fitting problem with a Neural Network
% Script generated by NFTOOL
% Created Fri Feb 27 17:42:35 CET 2015
%
% This script assumes these variables are ... |
github | Sina-Baharlou/Face-Recognition-master | bvector.m | .m | Face-Recognition-master/bvector.m | 333 | utf_8 | 7c9b62b12df46bd4bb0d73084e45d011 | % Face Recognition using Independent Component Analysis (ICA)
% Created on Mar 2015
% Authors: Sid Ali Rezetane, Sina M. Baharlou, Harold Agudelo
% create binary vector
% n = size of the vector
% m = index of high bit
function v = bvector(n, m)
% create vector
v = zeros(n, 1);
% put m element to high
v... |
github | Sina-Baharlou/Face-Recognition-master | archTwo.m | .m | Face-Recognition-master/archTwo.m | 1,493 | utf_8 | f63d726742d933bc4ba6a8a3368de93d | % Face Recognition using Independent Component Analysis (ICA)
% Created on Mar 2015
% Authors: Sid Ali Rezetane, Sina M. Baharlou, Harold Agudelo
function [b, r, u, w, a, m, evec] = archTwo(filename, nImage, nClass, offset, thresh)
% constants
blockSize = 50; % infomax blockzize
epochs = 100; % infomax n... |
github | Sina-Baharlou/Face-Recognition-master | subMean.m | .m | Face-Recognition-master/subMean.m | 398 | utf_8 | 36da83bfa313a916a47de41cc1ba852d | % Face Recognition using Independent Component Analysis (ICA)
% Created on Mar 2015
% Authors: Sid Ali Rezetane, Sina M. Baharlou, Harold Agudelo
% subtract mean
% ZM= Zero-mean data
% M = data mean
function [ZM, M] = subMean(D)
% calculate the size of the matrix
m_size = size(D);
% calculate the mean (me... |
github | Sina-Baharlou/Face-Recognition-master | whiten.m | .m | Face-Recognition-master/whiten.m | 482 | utf_8 | 39db5dc3857bdd2e2f574d70c83995a0 | % Face Recognition using Independent Component Analysis (ICA)
% Created on Mar 2015
% Authors: Sid Ali Rezetane, Sina M. Baharlou, Harold Agudelo
% whiten the data
% x = input matrix
% X = output whitened data
% WZ = whiten matrix
function [X, WZ] = whiten(x)
% subtract the mean
[SM, M] = subMean(x);
% ... |
github | Sina-Baharlou/Face-Recognition-master | infomax.m | .m | Face-Recognition-master/infomax.m | 1,321 | utf_8 | 83e2df94c4c3f165c7055274864403be | % Face Recognition using Independent Component Analysis (ICA)
% Created on Mar 2015
% Authors: Sid Ali Rezetane, Sina M. Baharlou, Harold Agudelo
% calculate demixing matrix using infoMax algorithm
% x = input signal
% bs = block size
% epochs
% lr = learning rate
% wh = whittening the data
% ----
% W = demixing matrix... |
github | Sina-Baharlou/Face-Recognition-master | loadpgm.m | .m | Face-Recognition-master/loadpgm.m | 577 | utf_8 | 3db0f19d9b34f12491718bf34735c243 | % Face Recognition using Independent Component Analysis (ICA)
% Created on Mar 2015
% Authors: Sid Ali Rezetane, Sina M. Baharlou, Harold Agudelo
% simply load the pgm file to the memory convert it to grayscale and reshape it to a vector
function X = loadpgm(filename)
% read the image file
img = imread(filenam... |
github | Sina-Baharlou/Face-Recognition-master | pcamat.m | .m | Face-Recognition-master/fica/pcamat.m | 12,075 | utf_8 | bcb1117d4132558d0d54d8b7b616a902 | function [E, D] = pcamat(vectors, firstEig, lastEig, s_interactive, ...
s_verbose);
%PCAMAT - Calculates the pca for data
%
% [E, D] = pcamat(vectors, firstEig, lastEig, ...
% interactive, verbose);
%
% Calculates the PCA matrices for given data (row) vectors. Returns
% the eigenvector (E) and diag... |
github | Sina-Baharlou/Face-Recognition-master | icaplot.m | .m | Face-Recognition-master/fica/icaplot.m | 13,259 | utf_8 | dde3e6d852f657a3c1eaacbd03f5dcc7 | function icaplot(mode, varargin);
%ICAPLOT - plot signals in various ways
%
% ICAPLOT is mainly for plottinf and comparing the mixed signals and
% separated ica-signals.
%
% ICAPLOT has many different modes. The first parameter of the function
% defines the mode. Other parameters and their order depends on the
% mode. ... |
github | FateNozomi/sign_language_recognition-master | kinect_gui.m | .m | sign_language_recognition-master/kinect_gui.m | 13,798 | utf_8 | f565b17e03f7f311899be07087df0c6e | function varargout = kinect_gui(varargin)
% KINECT_GUI MATLAB code for kinect_gui.fig
% KINECT_GUI, by itself, creates a new KINECT_GUI or raises the existing
% singleton*.
%
% H = KINECT_GUI returns the handle to a new KINECT_GUI or the handle to
% the existing singleton*.
%
% KINECT_GUI('CALL... |
github | ionefine/retinotopic-mapping-master | doSimonScotoma2color.m | .m | retinotopic-mapping-master/doSimonScotoma2color.m | 9,571 | utf_8 | 780f6dc3c0fa388d0e08637ba1c402c1 |
function task=doSimonScotoma2color(display,task,curTime)
%s=doSimon(display,s,curTime)
escPressed=0;
switch task.action
case 'init' %set up simon variables
% 'simon' parameters
if ~isfield(task, 'scFac')
task.scFac=1;
end
task.size = angle2pix(dis... |
github | ionefine/retinotopic-mapping-master | RetinotopyMain.m | .m | retinotopic-mapping-master/RetinotopyMain.m | 14,348 | utf_8 | 0e5302c43a01b6f8269cd45f701fd505 | function [stim, eye, display]=RetinotopyMain(subjID, typeID, scanID)
% subjID='JMD1';
% typeID='bar'
% scanID='1';
close all hidden
place='Ione';
if strcmp(place, 'Ione')
homedir =[ 'C:' filesep 'Users' filesep 'Ione Fine' filesep 'Documents' filesep ...
'Work' filesep 'Science' filesep 'Projects' filesep... |
github | ionefine/retinotopic-mapping-master | doSimonScotoma.m | .m | retinotopic-mapping-master/doSimonScotoma.m | 7,558 | utf_8 | 8be74c9758f5c77974078edc16f1b274 |
function s=doSimonScotoma(display,s,curTime)
%s=doSimon(display,s,curTime)
escPressed=0;
switch s.action
case 'init' %set up simon variables
% 'simon' parameters
if ~isfield(s, 'scFac')
s.scFac=1;
end
s.size = [6,20,24,3]*s.scFac; %pixels
s.gap = ... |
github | 3arbouch/PersonDetection-master | imagesAlign.m | .m | PersonDetection-master/Source/toolbox/videos/imagesAlign.m | 8,167 | utf_8 | d125eb5beb502d940be5bd145521f34b | function [H,Ip] = imagesAlign( I, Iref, varargin )
% Fast and robust estimation of homography relating two images.
%
% The algorithm for image alignment is a simple but effective variant of
% the inverse compositional algorithm. For a thorough overview, see:
% "Lucas-kanade 20 years on A unifying framework,"
% S. B... |
github | 3arbouch/PersonDetection-master | opticalFlow.m | .m | PersonDetection-master/Source/toolbox/videos/opticalFlow.m | 7,361 | utf_8 | b97e8c1f623eca07c6f1a0fff26d171e | function [Vx,Vy,reliab] = opticalFlow( I1, I2, varargin )
% Coarse-to-fine optical flow using Lucas&Kanade or Horn&Schunck.
%
% Implemented 'type' of optical flow estimation:
% LK: http://en.wikipedia.org/wiki/Lucas-Kanade_method
% HS: http://en.wikipedia.org/wiki/Horn-Schunck_method
% SD: Simple block-based sum of ... |
github | 3arbouch/PersonDetection-master | seqWriterPlugin.m | .m | PersonDetection-master/Source/toolbox/videos/seqWriterPlugin.m | 8,280 | utf_8 | 597792f79fff08b8bb709313267c3860 | function varargout = seqWriterPlugin( cmd, h, varargin )
% Plugin for seqIo and videoIO to allow writing of seq files.
%
% Do not call directly, use as plugin for seqIo or videoIO instead.
% The following is a list of commands available (swp=seqWriterPlugin):
% h=swp('open',h,fName,info) % Open a seq file for writing ... |
github | 3arbouch/PersonDetection-master | kernelTracker.m | .m | PersonDetection-master/Source/toolbox/videos/kernelTracker.m | 9,315 | utf_8 | 4a7d0235f1e518ab5f1c9f1b5450b3f0 | function [allRct, allSim, allIc] = kernelTracker( I, prm )
% Kernel Tracker from Comaniciu, Ramesh and Meer PAMI 2003.
%
% Implements the algorithm described in "Kernel-Based Object Tracking" by
% Dorin Comaniciu, Visvanathan Ramesh and Peter Meer, PAMI 25, 564-577,
% 2003. This is a fast tracking algorithm that utili... |
github | 3arbouch/PersonDetection-master | seqIo.m | .m | PersonDetection-master/Source/toolbox/videos/seqIo.m | 17,019 | utf_8 | 9c631b324bb527372ec3eed3416c5dcc | function out = seqIo( fName, action, varargin )
% Utilities for reading and writing seq files.
%
% A seq file is a series of concatentated image frames with a fixed size
% header. It is essentially the same as merging a directory of images into
% a single file. seq files are convenient for storing videos because: (1)
%... |
github | 3arbouch/PersonDetection-master | seqReaderPlugin.m | .m | PersonDetection-master/Source/toolbox/videos/seqReaderPlugin.m | 9,617 | utf_8 | ad8f912634cafe13df6fc7d67aeff05a | function varargout = seqReaderPlugin( cmd, h, varargin )
% Plugin for seqIo and videoIO to allow reading of seq files.
%
% Do not call directly, use as plugin for seqIo or videoIO instead.
% The following is a list of commands available (srp=seqReaderPlugin):
% h = srp('open',h,fName) % Open a seq file for reading ... |
github | 3arbouch/PersonDetection-master | pcaApply.m | .m | PersonDetection-master/Source/toolbox/classify/pcaApply.m | 3,320 | utf_8 | a06fc0e54d85930cbc0536c874ac63b7 | function varargout = pcaApply( X, U, mu, k )
% Companion function to pca.
%
% Use pca.m to retrieve the principal components U and the mean mu from a
% set of vectors x, then use pcaApply to get the first k coefficients of
% x in the space spanned by the columns of U. See pca for general usage.
%
% If x is large, pcaAp... |
github | 3arbouch/PersonDetection-master | forestTrain.m | .m | PersonDetection-master/Source/toolbox/classify/forestTrain.m | 6,138 | utf_8 | de534e2a010f452a7b13167dbf9df239 | function forest = forestTrain( data, hs, varargin )
% Train random forest classifier.
%
% Dimensions:
% M - number trees
% F - number features
% N - number input vectors
% H - number classes
%
% USAGE
% forest = forestTrain( data, hs, [varargin] )
%
% INPUTS
% data - [NxF] N length F feature vectors
% hs ... |
github | 3arbouch/PersonDetection-master | fernsRegTrain.m | .m | PersonDetection-master/Source/toolbox/classify/fernsRegTrain.m | 5,914 | utf_8 | b9ed2d87a22cb9cbb1e2632495ddaf1d | function [ferns,ysPr] = fernsRegTrain( data, ys, varargin )
% Train boosted fern regressor.
%
% Boosted regression using random ferns as the weak regressor. See "Greedy
% function approximation: A gradient boosting machine", Friedman, Annals of
% Statistics 2001, for more details on boosted regression.
%
% A few notes ... |
github | 3arbouch/PersonDetection-master | rbfDemo.m | .m | PersonDetection-master/Source/toolbox/classify/rbfDemo.m | 2,929 | utf_8 | 14cc64fb77bcac3edec51cf6b84ab681 | function rbfDemo( dataType, noiseSig, scale, k, cluster, show )
% Demonstration of rbf networks for regression.
%
% See rbfComputeBasis for discussion of rbfs.
%
% USAGE
% rbfDemo( dataType, noiseSig, scale, k, cluster, show )
%
% INPUTS
% dataType - 0: 1D sinusoid
% 1: 2D sinusoid
% 2: ... |
github | 3arbouch/PersonDetection-master | pdist2.m | .m | PersonDetection-master/Source/toolbox/classify/pdist2.m | 5,162 | utf_8 | 768ff9e8818251f756c8325368ee7d90 | function D = pdist2( X, Y, metric )
% Calculates the distance between sets of vectors.
%
% Let X be an m-by-p matrix representing m points in p-dimensional space
% and Y be an n-by-p matrix representing another set of points in the same
% space. This function computes the m-by-n distance matrix D where D(i,j)
% is the ... |
github | 3arbouch/PersonDetection-master | pca.m | .m | PersonDetection-master/Source/toolbox/classify/pca.m | 3,244 | utf_8 | 848f2eb05c18a6e448e9d22af27b9422 | function [U,mu,vars] = pca( X )
% Principal components analysis (alternative to princomp).
%
% A simple linear dimensionality reduction technique. Use to create an
% orthonormal basis for the points in R^d such that the coordinates of a
% vector x in this basis are of decreasing importance. Instead of using all
% d bas... |
github | 3arbouch/PersonDetection-master | kmeans2.m | .m | PersonDetection-master/Source/toolbox/classify/kmeans2.m | 5,251 | utf_8 | f941053f03c3e9eda40389a4cc64ee00 | function [ IDX, C, d ] = kmeans2( X, k, varargin )
% Fast version of kmeans clustering.
%
% Cluster the N x p matrix X into k clusters using the kmeans algorithm. It
% returns the cluster memberships for each data point in the N x 1 vector
% IDX and the K x p matrix of cluster means in C.
%
% This function is in some w... |
github | 3arbouch/PersonDetection-master | acfModify.m | .m | PersonDetection-master/Source/toolbox/detector/acfModify.m | 4,202 | utf_8 | 7a49406d51e7a9431b8fd472be0476e8 | function detector = acfModify( detector, varargin )
% Modify aggregate channel features object detector.
%
% Takes an object detector trained by acfTrain() and modifies it. Only
% certain modifications are allowed to the detector and the detector should
% never be modified directly (this may cause the detector to be in... |
github | 3arbouch/PersonDetection-master | acfDetect.m | .m | PersonDetection-master/Source/toolbox/detector/acfDetect.m | 3,659 | utf_8 | cf1384311b16371be6fa4715140e5c81 | function bbs = acfDetect( I, detector, fileName )
% Run aggregate channel features object detector on given image(s).
%
% The input 'I' can either be a single image (or filename) or a cell array
% of images (or filenames). In the first case, the return is a set of bbs
% where each row has the format [x y w h score] and... |
github | 3arbouch/PersonDetection-master | bbGt.m | .m | PersonDetection-master/Source/toolbox/detector/bbGt.m | 34,046 | utf_8 | 69e66c9a0cc143fb9a794fbc9233246e | function varargout = bbGt( action, varargin )
% Bounding box (bb) annotations struct, evaluation and sampling routines.
%
% bbGt gives access to two types of routines:
% (1) Data structure for storing bb image annotations.
% (2) Routines for evaluating the Pascal criteria for object detection.
%
% The bb annotation sto... |
github | 3arbouch/PersonDetection-master | bbApply.m | .m | PersonDetection-master/Source/toolbox/detector/bbApply.m | 21,195 | utf_8 | cc9744e55c6b8442486ba7f71e3f84ce | function varargout = bbApply( action, varargin )
% Functions for manipulating bounding boxes (bb).
%
% A bounding box (bb) is also known as a position vector or a rectangle
% object. It is a four element vector with the fields: [x y w h]. A set of
% n bbs can be stores as an [nx4] array, most funcitons below can handle... |
github | 3arbouch/PersonDetection-master | imwrite2.m | .m | PersonDetection-master/Source/toolbox/images/imwrite2.m | 5,086 | utf_8 | c98d66c2cddd9ec90beb9b1bbde31fe0 | function I = imwrite2( I, mulFlag, imagei, path, ...
name, ext, nDigits, nSplits, spliti, varargin )
% Similar to imwrite, except follows a strict naming convention.
%
% Wrapper for imwrite that writes file to the filename:
% fName = [path name int2str2(i,nDigits) '.' ext];
% Using imwrite:
% imwrite( I, fName, wri... |
github | 3arbouch/PersonDetection-master | convnFast.m | .m | PersonDetection-master/Source/toolbox/images/convnFast.m | 9,102 | utf_8 | 03d05e74bb7ae2ecb0afd0ac115fda39 | function C = convnFast( A, B, shape )
% Fast convolution, replacement for both conv2 and convn.
%
% See conv2 or convn for more information on convolution in general.
%
% This works as a replacement for both conv2 and convn. Basically,
% performs convolution in either the frequency or spatial domain, depending
% on wh... |
github | 3arbouch/PersonDetection-master | imMlGauss.m | .m | PersonDetection-master/Source/toolbox/images/imMlGauss.m | 5,674 | utf_8 | 56ead1b25fbe356f7912993d46468d02 | function varargout = imMlGauss( G, symmFlag, show )
% Calculates max likelihood params of Gaussian that gave rise to image G.
%
% Suppose G contains an image of a gaussian distribution. One way to
% recover the parameters of the gaussian is to threshold the image, and
% then estimate the mean/covariance based on the c... |
github | 3arbouch/PersonDetection-master | montage2.m | .m | PersonDetection-master/Source/toolbox/images/montage2.m | 7,484 | utf_8 | 828f57d7b1f67d36eeb6056f06568ebf | function varargout = montage2( IS, prm )
% Used to display collections of images and videos.
%
% Improved version of montage, with more control over display.
% NOTE: Can convert between MxNxT and MxNx3xT image stack via:
% I = repmat( I, [1,1,1,3] ); I = permute(I, [1,2,4,3] );
%
% USAGE
% varargout = montage2( IS, ... |
github | 3arbouch/PersonDetection-master | jitterImage.m | .m | PersonDetection-master/Source/toolbox/images/jitterImage.m | 5,252 | utf_8 | 3310f8412af00fd504c6f94b8c48992c | function IJ = jitterImage( I, varargin )
% Creates multiple, slightly jittered versions of an image.
%
% Takes an image I, and generates a number of images that are copies of the
% original image with slight translation, rotation and scaling applied. If
% the input image is actually an MxNxK stack of images then applie... |
github | 3arbouch/PersonDetection-master | movieToImages.m | .m | PersonDetection-master/Source/toolbox/images/movieToImages.m | 889 | utf_8 | 28c71798642af276951ee27e2d332540 | function I = movieToImages( M )
% Creates a stack of images from a matlab movie M.
%
% Repeatedly calls frame2im. Useful for playback with playMovie.
%
% USAGE
% I = movieToImages( M )
%
% INPUTS
% M - a matlab movie
%
% OUTPUTS
% I - MxNxT array (of images)
%
% EXAMPLE
% load( 'images.mat' ); [X,map]=gray2ind... |
github | 3arbouch/PersonDetection-master | toolboxUpdateHeader.m | .m | PersonDetection-master/Source/toolbox/external/toolboxUpdateHeader.m | 2,255 | utf_8 | 7a5b75e586be48da97c84d20b59887ff | function toolboxUpdateHeader
% Update the headers of all the files.
%
% USAGE
% toolboxUpdateHeader
%
% INPUTS
%
% OUTPUTS
%
% EXAMPLE
%
% See also
%
% Piotr's Computer Vision Matlab Toolbox Version 3.40
% Copyright 2014 Piotr Dollar. [pdollar-at-gmail.com]
% Licensed under the Simplified BSD License [see extern... |
github | 3arbouch/PersonDetection-master | toolboxGenDoc.m | .m | PersonDetection-master/Source/toolbox/external/toolboxGenDoc.m | 3,639 | utf_8 | 4c21fb34fa9b6002a1a98a28ab40c270 | function toolboxGenDoc
% Generate documentation, must run from dir toolbox.
%
% 1) Make sure to update and run toolboxUpdateHeader.m
% 2) Update history.txt appropriately, including w current version
% 3) Update overview.html file with the version/date/link to zip:
% edit external/m2html/templates/frame-piotr/overv... |
github | 3arbouch/PersonDetection-master | toolboxHeader.m | .m | PersonDetection-master/Source/toolbox/external/toolboxHeader.m | 2,391 | utf_8 | 30c24a94fb54ca82622719adcab17903 | function [y1,y2] = toolboxHeader( x1, x2, x3, prm )
% One line description of function (will appear in file summary).
%
% General commments explaining purpose of function [width is 75
% characters]. There may be multiple paragraphs. In special cases some or
% all of these guidelines may need to be broken.
%
% Next come... |
github | 3arbouch/PersonDetection-master | mdot.m | .m | PersonDetection-master/Source/toolbox/external/m2html/mdot.m | 2,516 | utf_8 | 34a14428c433e118d1810e23f5a6caf5 | function mdot(mmat, dotfile,f)
%MDOT - Export a dependency graph into DOT language
% MDOT(MMAT, DOTFILE) loads a .mat file generated by M2HTML using option
% ('save','on') and writes an ascii file using the DOT language that can
% be drawn using <dot> or <neato> .
% MDOT(MMAT, DOTFILE,F) builds the graph containing... |
github | 3arbouch/PersonDetection-master | m2html.m | .m | PersonDetection-master/Source/toolbox/external/m2html/m2html.m | 49,063 | utf_8 | 472047b4c36a4f8b162012840e31b59b | function m2html(varargin)
%M2HTML - Documentation Generator for Matlab M-files and Toolboxes in HTML
% M2HTML by itself generates an HTML documentation of the Matlab M-files found
% in the direct subdirectories of the current directory. HTML files are
% written in a 'doc' directory (created if necessary). All the o... |
github | 3arbouch/PersonDetection-master | doxysearch.m | .m | PersonDetection-master/Source/toolbox/external/m2html/private/doxysearch.m | 7,724 | utf_8 | 8331cde8495f34b86aef8c18656b37f2 | function result = doxysearch(query,filename)
%DOXYSEARCH Search a query in a 'search.idx' file
% RESULT = DOXYSEARCH(QUERY,FILENAME) looks for request QUERY
% in FILENAME (Doxygen search.idx format) and returns a list of
% files responding to the request in RESULT.
%
% See also DOXYREAD, DOXYWRITE
% Copyright (C)... |
github | 3arbouch/PersonDetection-master | doxywrite.m | .m | PersonDetection-master/Source/toolbox/external/m2html/private/doxywrite.m | 3,584 | utf_8 | 3255d8f824957ebc173dde374d0f78af | function doxywrite(filename, kw, statinfo, docinfo)
%DOXYWRITE Write a 'search.idx' file compatible with DOXYGEN
% DOXYWRITE(FILENAME, KW, STATINFO, DOCINFO) writes file FILENAME
% (Doxygen search.idx. format) using the cell array KW containing the
% word list, the sparse matrix (nbword x nbfile) with non-null value... |
github | 3arbouch/PersonDetection-master | doxyread.m | .m | PersonDetection-master/Source/toolbox/external/m2html/private/doxyread.m | 3,093 | utf_8 | 3152e7d26bf7ac64118be56f72832a20 | function [statlist, docinfo] = doxyread(filename)
%DOXYREAD Read a 'search.idx' file generated by DOXYGEN
% STATLIST = DOXYREAD(FILENAME) reads FILENAME (Doxygen search.idx
% format) and returns the list of keywords STATLIST as a cell array.
% [STATLIST, DOCINFO] = DOXYREAD(FILENAME) also returns a cell array
% con... |
github | 3arbouch/PersonDetection-master | imwrite2split.m | .m | PersonDetection-master/Source/toolbox/external/deprecated/imwrite2split.m | 1,617 | utf_8 | 4222fd45df123e6dec9ef40ae793004f | % Writes/reads a large set of images into/from multiple directories.
%
% This is useful since certain OS handle very large directories (of say
% >20K images) rather poorly (I'm talking to you Bill). Thus, can take
% 100K images, and write into 5 separate directories, then read them back
% in.
%
% USAGE
% I = imwrite2... |
github | 3arbouch/PersonDetection-master | playmovies.m | .m | PersonDetection-master/Source/toolbox/external/deprecated/playmovies.m | 1,935 | utf_8 | ef2eaad8a130936a1a281f1277ca0ea1 | % [4D] shows R videos simultaneously as a movie.
%
% Plays a movie.
%
% USAGE
% playmovies( I, [fps], [loop] )
%
% INPUTS
% I - MxNxTxR or MxNx1xTxR or MxNx3xTxR array (if MxNxT calls
% playmovie)
% fps - [100] maximum number of frames to display per second use
% fps==0 to introduce n... |
github | 3arbouch/PersonDetection-master | pca_apply_large.m | .m | PersonDetection-master/Source/toolbox/external/deprecated/pca_apply_large.m | 2,062 | utf_8 | af84a2179b9d8042519bc6b378736a88 | % Wrapper for pca_apply that allows for application to large X.
%
% Wrapper for pca_apply that splits and processes X in parts, this may be
% useful if processing cannot be done fully in parallel because of memory
% constraints. See pca_apply for usage.
%
% USAGE
% same as pca_apply
%
% INPUTS
% same as pca_apply
%
%... |
github | 3arbouch/PersonDetection-master | montages2.m | .m | PersonDetection-master/Source/toolbox/external/deprecated/montages2.m | 2,269 | utf_8 | 505e2be915d65fff8bfef8473875cc98 | % MONTAGES2 [4D] Used to display R sets of T images each.
%
% Displays one montage (see montage2) per row. Each of the R image sets is
% flattened to a single long image by concatenating the T images in the
% set. Alternative to montages.
%
% USAGE
% varargout = montages2( IS, [montage2prms], [padSiz] )
%
% INPUTS
% ... |
github | 3arbouch/PersonDetection-master | filter_gauss_1D.m | .m | PersonDetection-master/Source/toolbox/external/deprecated/filter_gauss_1D.m | 1,137 | utf_8 | 94a453b82dcdeba67bd886e042d552d9 | % 1D Gaussian filter.
%
% Equivalent to (but faster then):
% f = fspecial('Gaussian',[2*r+1,1],sigma);
% f = filter_gauss_nD( 2*r+1, r+1, sigma^2 );
%
% USAGE
% f = filter_gauss_1D( r, sigma, [show] )
%
% INPUTS
% r - filter size=2r+1, if r=[] -> r=ceil(2.25*sigma)
% sigma - standard deviation of filter
% ... |
github | 3arbouch/PersonDetection-master | clfEcoc.m | .m | PersonDetection-master/Source/toolbox/external/deprecated/clfEcoc.m | 1,493 | utf_8 | e77e1b4fd5469ed39f47dd6ed15f130f | function clf = clfEcoc(p,clfInit,clfparams,nclasses,use01targets)
% Wrapper for ecoc that makes ecoc compatible with nfoldxval.
%
% Requires the SVM toolbox by Anton Schwaighofer.
%
% USAGE
% clf = clfEcoc(p,clfInit,clfparams,nclasses,use01targets)
%
% INPUTS
% p - data dimension
% clfInit - bi... |
github | 3arbouch/PersonDetection-master | getargs.m | .m | PersonDetection-master/Source/toolbox/external/deprecated/getargs.m | 3,455 | utf_8 | de2bab917fa6b9ba3099f1c6b6d68cf0 | % Utility to process parameter name/value pairs.
%
% DEPRECATED -- ONLY USED BY KMEANS2? SHOULD BE REMOVED.
% USE GETPARAMDEFAULTS INSTEAD.
%
% Based on code fromt Matlab Statistics Toolobox's "private/statgetargs.m"
%
% [EMSG,A,B,...]=GETARGS(PNAMES,DFLTS,'NAME1',VAL1,'NAME2',VAL2,...)
% accepts a cell array PNAMES o... |
github | 3arbouch/PersonDetection-master | normxcorrn_fg.m | .m | PersonDetection-master/Source/toolbox/external/deprecated/normxcorrn_fg.m | 2,699 | utf_8 | e65c38d97efb3a624e0fa94a97f75eb6 | % Normalized n-dimensional cross-correlation with a mask.
%
% Similar to normxcorrn, except takes an additional argument that specifies
% a figure ground mask for the T. That is T_fg must be of the same
% dimensions as T, with each entry being 0 or 1, where zero specifies
% regions to ignore (the ground) and 1 specifi... |
github | 3arbouch/PersonDetection-master | makemovie.m | .m | PersonDetection-master/Source/toolbox/external/deprecated/makemovie.m | 1,266 | utf_8 | 9a03d9a5227c4eaa86520f206ce283e7 | % [3D] Used to convert a stack of T images into a movie.
%
% To display same data statically use montage.
%
% USAGE
% M = makemovies( IS )
%
% INPUTS
% IS - MxNxT or MxNx1xT or MxNx3xT array of movies.
%
% OUTPUTS
% M - resulting movie
%
% EXAMPLE
% load( 'images.mat' );
% M = makemovie(... |
github | 3arbouch/PersonDetection-master | localsum_block.m | .m | PersonDetection-master/Source/toolbox/external/deprecated/localsum_block.m | 815 | utf_8 | 1216b03a3bd44ff1fc3256de16a2f1c6 | % Calculates the sum in non-overlapping blocks of I of size dims.
%
% Similar to localsum except gets sum in non-overlapping windows.
% Equivalent to doing localsum, and then subsampling (except more
% efficient).
%
% USAGE
% I = localsum_block( I, dims )
%
% INPUTS
% I - matrix to compute sum over
% dims -... |
github | 3arbouch/PersonDetection-master | imrotate2.m | .m | PersonDetection-master/Source/toolbox/external/deprecated/imrotate2.m | 1,326 | utf_8 | bb2ff6c3138ce5f53154d58d7ebc4f31 | % Custom version of imrotate that demonstrates use of apply_homography.
%
% Works exactly the same as imrotate. For usage see imrotate.
%
% USAGE
% IR = imrotate2( I, angle, [method], [bbox] )
%
% INPUTS
% I - 2D image [converted to double]
% angle - angle to rotate in degrees
% method - ['linear'] 'neare... |
github | 3arbouch/PersonDetection-master | imSubsResize.m | .m | PersonDetection-master/Source/toolbox/external/deprecated/imSubsResize.m | 1,338 | utf_8 | cd7dedf790c015adfb1f2d620e9ed82f | % Resizes subs by resizVals.
%
% Resizes subs in subs/vals image representation by resizVals.
%
% This essentially replaces each sub by sub.*resizVals. The only subtlety
% is that in images the leftmost sub value is .5, so for example when
% resizing by a factor of 2, the first pixel is replaced by 2 pixels and so
% l... |
github | 3arbouch/PersonDetection-master | imtranslate.m | .m | PersonDetection-master/Source/toolbox/external/deprecated/imtranslate.m | 1,183 | utf_8 | 054727fb31c105414b655c0f938b6ced | % Translate an image to subpixel accuracy.
%
% Note that for subplixel accuracy cannot use nearest neighbor interp.
%
% USAGE
% IR = imtranslate( I, dx, dy, [method], [bbox] )
%
% INPUTS
% I - 2D image [converted to double]
% dx - x translation (right)
% dy - y translation (up)
% method - ['linear... |
github | 3arbouch/PersonDetection-master | randperm2.m | .m | PersonDetection-master/Source/toolbox/external/deprecated/randperm2.m | 1,398 | utf_8 | 5007722f3d5f5ba7c0f83f32ef8a3a2c | % Returns a random permutation of integers.
%
% randperm2(n) is a random permutation of the integers from 1 to n. For
% example, randperm2(6) might be [2 4 5 6 1 3]. randperm2(n,k) is only
% returns the first k elements of the permuation, so for example
% randperm2(6) might be [2 4]. This is a faster version of randp... |
github | 3arbouch/PersonDetection-master | apply_homography.m | .m | PersonDetection-master/Source/toolbox/external/deprecated/apply_homography.m | 3,582 | utf_8 | 9c3ed72d35b1145f41114e6e6135b44f | % Applies the homography defined by H on the image I.
%
% Takes the center of the image as the origin, not the top left corner.
% Also, the coordinate system is row/ column format, so H must be also.
%
% The bounding box of the image is set by the BBOX argument, a string that
% can be 'loose' (default) or 'crop'. When ... |
github | 3arbouch/PersonDetection-master | pca_apply.m | .m | PersonDetection-master/Source/toolbox/external/deprecated/pca_apply.m | 2,427 | utf_8 | 0831befb6057f8502bc492227455019a | % Companion function to pca.
%
% Use pca to retrieve the principal components U and the mean mu from a
% set fo vectors X1 via [U,mu,vars] = pca(X1). Then given a new
% vector x, use y = pca_apply( x, U, mu, vars, k ) to get the first k
% coefficients of x in the space spanned by the columns of U. See pca for
% genera... |
github | 3arbouch/PersonDetection-master | mode2.m | .m | PersonDetection-master/Source/toolbox/external/deprecated/mode2.m | 731 | utf_8 | 5c9321ef4b610b4f4a2d43902a68838e | % Returns the mode of a vector.
%
% Was mode not part of Matlab before?
%
% USAGE
% y = mode2( x )
%
% INPUTS
% x - vector of integers
%
% OUTPUTS
% y - mode
%
% EXAMPLE
% x = randint2( 1, 10, [1 3] )
% mode(x), mode2( x )
%
% See also MODE
% Piotr's Image&Video Toolbox Version 1.5
% Written and maintain... |
github | 3arbouch/PersonDetection-master | savefig.m | .m | PersonDetection-master/Source/toolbox/external/other/savefig.m | 13,459 | utf_8 | 2b8463f9b01ceb743e440d8fb5755829 | function savefig(fname, varargin)
% Usage: savefig(filename, fighdl, options)
%
% Saves a pdf, eps, png, jpeg, and/or tiff of the contents of the fighandle's (or current) figure.
% It saves an eps of the figure and the uses Ghostscript to convert to the other formats.
% The result is a cropped, clean picture. There a... |
github | 3arbouch/PersonDetection-master | dirSynch.m | .m | PersonDetection-master/Source/toolbox/matlab/dirSynch.m | 4,570 | utf_8 | d288299d31d15f1804183206d0aa0227 | function dirSynch( root1, root2, showOnly, flag, ignDate )
% Synchronize two directory trees (or show differences between them).
%
% If a file or directory 'name' is found in both tree1 and tree2:
% 1) if 'name' is a file in both the pair is considered the same if they
% have identical size and identical datestamp... |
github | 3arbouch/PersonDetection-master | plotRoc.m | .m | PersonDetection-master/Source/toolbox/matlab/plotRoc.m | 5,212 | utf_8 | 008f9c63073c6400c4960e9e213c47e5 | function [h,miss,stds] = plotRoc( D, varargin )
% Function for display of rocs (receiver operator characteristic curves).
%
% Display roc curves. Consistent usage ensures uniform look for rocs. The
% input D should have n rows, each of which is of the form:
% D = [falsePosRate truePosRate]
% D is generated, for exampl... |
github | 3arbouch/PersonDetection-master | simpleCache.m | .m | PersonDetection-master/Source/toolbox/matlab/simpleCache.m | 4,098 | utf_8 | 92df86b0b7e919c9a26388e598e4d370 | function varargout = simpleCache( op, cache, varargin )
% A simple cache that can be used to store results of computations.
%
% Can save and retrieve arbitrary values using a vector (includnig char
% vectors) as a key. Especially useful if a function must perform heavy
% computation but is often called with the same in... |
github | 3arbouch/PersonDetection-master | tpsInterpolate.m | .m | PersonDetection-master/Source/toolbox/matlab/tpsInterpolate.m | 1,646 | utf_8 | d3bd3a26d048f32cfdc17884ccae6d8c | function [xsR,ysR] = tpsInterpolate( warp, xs, ys, show )
% Apply warp (obtained by tpsGetWarp) to a set of new points.
%
% USAGE
% [xsR,ysR] = tpsInterpolate( warp, xs, ys, [show] )
%
% INPUTS
% warp - [see tpsGetWarp] bookstein warping parameters
% xs, ys - points to apply warp to
% show - [1] will disp... |
github | 3arbouch/PersonDetection-master | checkNumArgs.m | .m | PersonDetection-master/Source/toolbox/matlab/checkNumArgs.m | 3,796 | utf_8 | 726c125c7dc994c4989c0e53ad4be747 | function [ x, er ] = checkNumArgs( x, siz, intFlag, signFlag )
% Helper utility for checking numeric vector arguments.
%
% Runs a number of tests on the numeric array x. Tests to see if x has all
% integer values, all positive values, and so on, depending on the values
% for intFlag and signFlag. Also tests to see if ... |
github | 3arbouch/PersonDetection-master | fevalDistr.m | .m | PersonDetection-master/Source/toolbox/matlab/fevalDistr.m | 11,227 | utf_8 | 7e4d5077ef3d7a891b2847cb858a2c6c | function [out,res] = fevalDistr( funNm, jobs, varargin )
% Wrapper for embarrassingly parallel function evaluation.
%
% Runs "r=feval(funNm,jobs{i}{:})" for each job in a parallel manner. jobs
% should be a cell array of length nJob and each job should be a cell array
% of parameters to pass to funNm. funNm must be a f... |
github | 3arbouch/PersonDetection-master | medfilt1m.m | .m | PersonDetection-master/Source/toolbox/filters/medfilt1m.m | 2,998 | utf_8 | a3733d27c60efefd57ada9d83ccbaa3d | function y = medfilt1m( x, r, z )
% One-dimensional adaptive median filtering with missing values.
%
% Applies a width s=2*r+1 one-dimensional median filter to vector x, which
% may contain missing values (elements equal to z). If x contains no
% missing values, y(j) is set to the median of x(j-r:j+r). If x contains
% ... |
github | 3arbouch/PersonDetection-master | FbMake.m | .m | PersonDetection-master/Source/toolbox/filters/FbMake.m | 6,692 | utf_8 | b625c1461a61485af27e490333350b4b | function FB = FbMake( dim, flag, show )
% Various 1D/2D/3D filterbanks (hardcoded).
%
% USAGE
% FB = FbMake( dim, flag, [show] )
%
% INPUTS
% dim - dimension
% flag - controls type of filterbank to create
% - if d==1
% 1: gabor filter bank for spatiotemporal stuff
% - if d==2
% ... |
github | 3arbouch/PersonDetection-master | evaluateMultipleMethods.m | .m | PersonDetection-master/Source/PersonDetectionFinal/NeuralNetworks/evaluateMultipleMethods.m | 1,493 | utf_8 | 8b76479ee09e2a4dd2430c139ff5e7d0 | % Automatically calls fastROC() to show multiple curves, one for each
% prediction vector provided.
%
% labels Nx1 vector
% predictions NxM vector, M being the number of predictions to show
%
% if showPlot == true => single plot with multiple curves is shown.
% legendNames is a cell list (optional) with the na... |
github | 3arbouch/PersonDetection-master | evaluateMultipleMethodsKFolds.m | .m | PersonDetection-master/Source/PersonDetectionFinal/NeuralNetworks/evaluateMultipleMethodsKFolds.m | 1,864 | utf_8 | 76811cce8def3f43d15cf44ead9a1853 | % Automatically calls fastROC() to show multiple curves, one for each
% prediction vector provided.
%
% labels Nx1 vector
% predictions NxM vector, M being the number of predictions to show
%
% if showPlot == true => single plot with multiple curves is shown.
% legendNames is a cell list (optional) with the na... |
github | 3arbouch/PersonDetection-master | evaluateMultipleMethodsForKFolds.m | .m | PersonDetection-master/Source/PersonDetectionFinal/NeuralNetworks/evaluateMultipleMethodsForKFolds.m | 1,811 | utf_8 | 60d21d9e720c02cef8283d2829f05f8d | % Automatically calls fastROC() to show multiple curves, one for each
% prediction vector provided.
% shows also the mean predictions over all the K folds
% labels Nx1 vector
% predictions NxM vector, M being the number of predictions to show
%
% if showPlot == true => single plot with multiple curves is show... |
github | 3arbouch/PersonDetection-master | splitFair.m | .m | PersonDetection-master/Source/PersonDetectionFinal/SVM/PersonDetection/splitFair.m | 1,196 | utf_8 | 213eae7350b86f58a8cf2db987255809 | function [XTr, yTr, XTe, yTe] = splitFair( X,y, prop,s)
% split the data into train and test given a proportion
setSeed(s);
N = size(y,1);
% generate random indices
idx = randperm(N);
Ntr = floor(prop * N);
% select few as training and others as testing
idxTr = idx(1:Ntr);
idxTe = idx(Ntr+1:end);
... |
github | 3arbouch/PersonDetection-master | split.m | .m | PersonDetection-master/Source/PersonDetectionFinal/SVM/PersonDetection/split.m | 623 | utf_8 | 1d182818178b64fc3af780057cf987a3 | function [XTr, yTr, XTe, yTe] = split( X,y, prop,s)
% split the data into train and test given a proportion
setSeed(s);
N = size(y,1);
% generate random indices
idx = randperm(N);
Ntr = floor(prop * N);
% select few as training and others as testing
idxTr = idx(1:Ntr);
idxTe = idx(Ntr+1:end);
% cre... |
github | 3arbouch/PersonDetection-master | splitAndSubSample.m | .m | PersonDetection-master/Source/PersonDetectionFinal/SVM/PersonDetection/splitAndSubSample.m | 755 | utf_8 | 7b2b67aac6ba27d454c06485657dceb3 | function [XTr, yTr, XTe, yTe] = splitNAdSubSample( X,y, prop,subSamplingRate,s)
% split the data into train and test given a proportion
setSeed(s);
N = size(y,1);
% generate random indices
idx = randperm(N);
Ntr = floor(prop * N);
% select few as training and others as testing
idxTr = idx(1:Ntr);
idx... |
github | 3arbouch/PersonDetection-master | test.m | .m | PersonDetection-master/Source/PersonDetectionFinal/SVM/PersonDetection/test.m | 301 | utf_8 | 955b4d4bf715a6608655fd538605fea3 |
function indicesNonFacesToTake= test(indicesNonFaces, numberToTake)
indicesNonFacesToTake= zeros(1,numberToTake) ;
for i=1:numberToTake
index = randi([1 length(indicesNonFaces)],1,1) ;
indicesNonFacesToTake(i) = indicesNonFaces(index) ;
indicesNonFaces(index) = [] ;
end
end |
github | 3arbouch/PersonDetection-master | myOctaveVersion.m | .m | PersonDetection-master/Source/DeepLearnToolbox-master/util/myOctaveVersion.m | 169 | utf_8 | d4603482a968c496b66a4ed4e7c72471 | % return OCTAVE_VERSION or 'undefined' as a string
function result = myOctaveVersion()
if isOctave()
result = OCTAVE_VERSION;
else
result = 'undefined';
end
|
github | 3arbouch/PersonDetection-master | isOctave.m | .m | PersonDetection-master/Source/DeepLearnToolbox-master/util/isOctave.m | 108 | utf_8 | 4695e8d7c4478e1e67733cca9903f9ef | %detects if we're running Octave
function result = isOctave()
result = exist('OCTAVE_VERSION') ~= 0;
end |
github | 3arbouch/PersonDetection-master | makeLMfilters.m | .m | PersonDetection-master/Source/DeepLearnToolbox-master/util/makeLMfilters.m | 1,895 | utf_8 | 21950924882d8a0c49ab03ef0681b618 | function F=makeLMfilters
% Returns the LML filter bank of size 49x49x48 in F. To convolve an
% image I with the filter bank you can either use the matlab function
% conv2, i.e. responses(:,:,i)=conv2(I,F(:,:,i),'valid'), or use the
% Fourier transform.
SUP=49; % Support of the largest filter (must be... |
github | 3arbouch/PersonDetection-master | caenumgradcheck.m | .m | PersonDetection-master/Source/DeepLearnToolbox-master/CAE/caenumgradcheck.m | 3,618 | utf_8 | 6c481fc15ab7df32e0f476514100141a | function cae = caenumgradcheck(cae, x, y)
epsilon = 1e-4;
er = 1e-6;
disp('performing numerical gradient checking...')
for i = 1 : numel(cae.o)
p_cae = cae; p_cae.c{i} = p_cae.c{i} + epsilon;
m_cae = cae; m_cae.c{i} = m_cae.c{i} - epsilon;
[m_cae, p_cae] = caerun(m_cae, p_cae, x... |
github | 3arbouch/PersonDetection-master | evaluateMultipleMethods.m | .m | PersonDetection-master/Source/PersondetectionExC/evaluateMultipleMethods.m | 1,493 | utf_8 | 8b76479ee09e2a4dd2430c139ff5e7d0 | % Automatically calls fastROC() to show multiple curves, one for each
% prediction vector provided.
%
% labels Nx1 vector
% predictions NxM vector, M being the number of predictions to show
%
% if showPlot == true => single plot with multiple curves is shown.
% legendNames is a cell list (optional) with the na... |
github | 3arbouch/PersonDetection-master | evaluateMultipleMethods.m | .m | PersonDetection-master/Source/PersondetectionExC2/evaluateMultipleMethods.m | 1,493 | utf_8 | 8b76479ee09e2a4dd2430c139ff5e7d0 | % Automatically calls fastROC() to show multiple curves, one for each
% prediction vector provided.
%
% labels Nx1 vector
% predictions NxM vector, M being the number of predictions to show
%
% if showPlot == true => single plot with multiple curves is shown.
% legendNames is a cell list (optional) with the na... |
github | weshu/HLx_Examples-master | db_cordic_atan2.m | .m | HLx_Examples-master/Math/atan2_cordic/M/db_cordic_atan2.m | 1,600 | utf_8 | bba622d55a11b90855ec23ff82286f61 | %/*
% Gain=1.647;
% mode 1: rotation; Rotates (x0,y0) by z0
% (xn,yn)=(cos(z0),sin(z0)) for (x0,y0)=(1,0)
% x[i+1] = x[i] - y[i] * d[i] * 2^(-1)
% y[i+1] = y[i] + x[i] * d[i] * 2^(-i)
% z[i+1] = z[i] - d[i] * atan(2^(-i))
% mode 0: vectoring; Rotates (x0,y0) to X-axis
% (xn,zn)=(r,thet... |
github | jjjjfrench/UW-UIOPS-master | read_binary_SEA_WMI.m | .m | UW-UIOPS-master/read_binary/read_binary_SEA_WMI.m | 17,995 | utf_8 | a7bae0e57054c13b60c40dcf05a0e960 | function read_binary_SEA_WMI(infilename,outfilename)
%% Function to decompress SEA raw files
% Need to double check the file format and code for each probes
% This only works for MC3E filed campaign
% * July 11, 2016, Created this new interface function, Wei Wu
starpos = find(infilename == '*',1,'last');
slashpos = ... |
github | jjjjfrench/UW-UIOPS-master | read_binary_SPEC.m | .m | UW-UIOPS-master/read_binary/read_binary_SPEC.m | 12,505 | utf_8 | a0c18ab97bc92b21845f9077e7bcec21 | function read_binary_SPEC(infilename,outfilename)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%
%% Read the raw base*.2DS file, and then write into NETCDF file
%% Follow the SPEC manual
%% by Will Wu, 08/01/2014
%%
%% Changed file naming conventions for UW use. Updated to use NETCDF4... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.