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
aravindhm/deep-goggle-master
experiment_shallow_quantitative.m
.m
deep-goggle-master/experiments/experiment_shallow_quantitative.m
2,973
utf_8
d4877675fb7d85e8a7aa05917f69faed
function experiment_shallow_quantitative() % Run some CNN experiments experiment_setup; images = experiment_get_dataset('imnet'); %images = {images{1:10}}; % ------------------------------------------------------------------------- % Setup experiments % -------...
github
aravindhm/deep-goggle-master
experiment_run.m
.m
deep-goggle-master/experiments/experiment_run.m
5,990
utf_8
31d8e27f5acb9e020a6fe186b0232898
function experiment_run(exp) if matlabpool('size') > 0 parfor i=1:numel(exp) % Easily run lots of experiments on a cluster run_one(exp{i}) ; end else for i=1:numel(exp) ts = tic; fprintf(1, 'Starting an expeirment'); run_one(exp{i}) ; fprintf(1, 'done an expeirment'); toc(ts); end end e...
github
aravindhm/deep-goggle-master
dsift_net.m
.m
deep-goggle-master/experiments/networks/dsift_net.m
3,249
utf_8
79c1e14d5fe80ed6ff8d0b1f28d27069
function net = dsift_net(binSize, varargin) % Define a CNN equivalent to dense SIFT opts.numOrientations = 4 ; opts = vl_argparse(opts, varargin) ; opts.binSize = binSize ; % Spatial derivatives along NO directions NO = opts.numOrientations ; dx = [0 0 0 ; -1 0 1 ; 0 0 0]/2 ; dy = dx' ; for i=0:2*NO-1 t = (2*pi)/(...
github
aravindhm/deep-goggle-master
hog_net.m
.m
deep-goggle-master/experiments/networks/hog_net.m
8,690
utf_8
6a80d594176002581a3052779234f6a4
function net = hog_net(binSize, varargin) % HOG_NET CNN-HOG % NET = HOG_NET(BINSIZE) returns a CNN equivalent to the HOG feature % extractor for the specified bin size. % % The implementation is numerically identical to VL_HOG(), which in turns % is nearly exactly the same as UoCTTI HOG implementation (DPM V5...
github
felipegb94/hdr_imaging-master
rgb_to_lab.m
.m
hdr_imaging-master/rgb_to_lab.m
386
utf_8
c8eaa88b7289cc918354c0cc089c3f40
function [lab_img,l,a,b] = rgb_to_lab(src) %load rgb image rgb_img = imread(src); %convert to lab labTransformation = makecform('srgb2lab'); lab_img = applycform(rgb_img,labTransformation); %seperate l,a,b l = lab_img(:,:,1); a = lab_img(:,:,2); b = lab_img(:,:,3); % figure(1), imshow(l); % title('l'); % figure(2...
github
felipegb94/hdr_imaging-master
reinhardLocal.m
.m
hdr_imaging-master/reinhardLocal.m
2,040
utf_8
3cab43e5ee03ccbacc7dd2de9fc28a39
% Calculates the Reinhard local tone mapping of the HDR image % algorithm taken from: % http://www.cmap.polytechnique.fr/~peyre/cours/x2005signal/hdr_photographic.pdf function [ pic ] = reinhardLocal( hdr, sat, eps, phi ) luminanceMap = luminance(hdr); alpha = 1 / (2*sqrt(2)); key = 0.18; v1 = zeros...
github
felipegb94/hdr_imaging-master
weight.m
.m
hdr_imaging-master/weight.m
282
utf_8
ccf55804e41c7f529fc186dc7aca0194
% calculates the weight value % % assumes zmin = 0 % zmax = 255 % % z = a pixel value from 0-255 function w = weight(z) zmin = 0; zmax = 255; threshold = 0.5*(zmin+zmax); if z <= threshold w = (z - zmin)+1; % make sure it's never zero! else w = (zmax - z)+1; end
github
felipegb94/hdr_imaging-master
getRadianceMap.m
.m
hdr_imaging-master/getRadianceMap.m
1,242
utf_8
bd4a72f4f238cef55552d147b68f4655
% Calculate the HDR image by using weighted averaging. % % Input: % % * g(z) = inverse response curve E, log exposure corresponding to pixel. % Vector of size 256, each element corresponds to one pixel (0-255). % % * Z(i,j) = pixel values (either R G or B) of pixel at location i from % image j. So the matrix dimensions...
github
felipegb94/hdr_imaging-master
readImages.m
.m
hdr_imaging-master/readImages.m
934
utf_8
d12f9dac8684e52eb4012f5d7f0a0d02
% Create a list of all pictures in a directory and the exposure settings % % Enter the directory name to search for. Must include a .txt file named % list.txt. function [filenames, exposures, numExposures] = readImages(dirName) % read the list.txt file and extract strings file = fopen(strcat(dirName,'list.txt...
github
felipegb94/hdr_imaging-master
reinhardGlobal.m
.m
hdr_imaging-master/reinhardGlobal.m
665
utf_8
1e9e9100d316e568d2a78d8fcfd0923d
% This function computes the Reinhard global tone mapping algorithm function [ pic ] = reinhardGlobal( hdr, a, sat) luminanceMap = luminance(hdr); numPixels = size(hdr,1) * size(hdr,2); % small delta to avoid taking log(0) d = 0.00001; % compute key key = exp((1/numPixels)*(sum(sum(log(luminanceMap + d))))); % sca...
github
felipegb94/hdr_imaging-master
radianceWeights.m
.m
hdr_imaging-master/radianceWeights.m
324
utf_8
49927b1ef7381e0cf1862798244ece85
%% returns the weights list for radiance map equation function [ weights ] = radianceWeights(g) weights = zeros(256, 1); g2 = diff(g) + 0.1; for i = 1:255 weights(i,1) = g(i) / g2(i); if weights(i,1) < 0 weights(i,1) = exp(weights(i,1)); end end weights(256) = g(256) / g2(255); weights = weights ...
github
bithollow/ardupilot-master
RotToQuat.m
.m
ardupilot-master/libraries/AP_NavEKF/Models/Common/RotToQuat.m
288
utf_8
9239706354267c8f5f2a29f992c07de9
% convert froma rotation vector in radians to a quaternion function quaternion = RotToQuat(rotVec) vecLength = sqrt(rotVec(1)^2 + rotVec(2)^2 + rotVec(3)^2); if vecLength < 1e-6 quaternion = [1;0;0;0]; else quaternion = [cos(0.5*vecLength); rotVec/vecLength*sin(0.5*vecLength)]; end
github
bithollow/ardupilot-master
NormQuat.m
.m
ardupilot-master/libraries/AP_NavEKF/Models/Common/NormQuat.m
198
utf_8
ed913e87efc9194a2c52b266fced8da7
% normalise the quaternion function quaternion = normQuat(quaternion) quatMag = sqrt(quaternion(1)^2 + quaternion(2)^2 + quaternion(3)^2 + quaternion(4)^2); quaternion(1:4) = quaternion / quatMag;
github
bithollow/ardupilot-master
QuatToEul.m
.m
ardupilot-master/libraries/AP_NavEKF/Models/Common/QuatToEul.m
436
utf_8
c19c9235052d99b8b943a7157e83fc94
% Convert from a quaternion to a 321 Euler rotation sequence in radians function Euler = QuatToEul(quat) Euler = zeros(3,1); Euler(1) = atan2(2*(quat(3)*quat(4)+quat(1)*quat(2)), quat(1)*quat(1) - quat(2)*quat(2) - quat(3)*quat(3) + quat(4)*quat(4)); Euler(2) = -asin(2*(quat(2)*quat(4)-quat(1)*quat(3))); Euler(3) =...
github
mars920314/DeepFi-master
get_scaled_csi.m
.m
DeepFi-master/DeepFi/get_scaled_csi.m
1,842
utf_8
25f6ee30c68e10fbfaaeff35624ab758
%GET_SCALED_CSI Converts a CSI struct to a channel matrix H. % % (c) 2008-2011 Daniel Halperin <dhalperi@cs.washington.edu> % function ret = get_scaled_csi(csi_st) % Pull out CSI csi = csi_st.csi; % Calculate the scale factor between normalized CSI and RSSI (mW) csi_sq = csi .* conj(csi); csi_pwr =...
github
mars920314/DeepFi-master
get_total_rss.m
.m
DeepFi-master/DeepFi/get_total_rss.m
592
utf_8
9f75c5f068248c64a969d4b65b5aa054
%GET_TOTAL_RSS Calculates the Received Signal Strength (RSS) in dBm from % a CSI struct. % % (c) 2011 Daniel Halperin <dhalperi@cs.washington.edu> % function ret = get_total_rss(csi_st) error(nargchk(1,1,nargin)); % Careful here: rssis could be zero rssi_mag = 0; if csi_st.rssi_a ~= 0 rssi_mag ...
github
mars920314/DeepFi-master
get_eff_SNRs.m
.m
DeepFi-master/DeepFi/get_eff_SNRs.m
2,622
utf_8
ed7119854587f1abc99cab9b0ecd1312
%GET_EFF_SNRS Compute the effective SNR values from a CSI matrix % Note that the matrix is expected to have dimensions M x N x S, where % M = # TX antennas % N = # RX antennas % S = # subcarriers % % (c) 2008-2011 Daniel Halperin <dhalperi@cs.washington.edu>, % Wenjun Hu % function ret=ge...
github
mars920314/DeepFi-master
CG_MNIST.m
.m
DeepFi-master/DeepFi/CG_MNIST.m
2,727
utf_8
4679a67a7470f0d5835c1cad7f2d0896
% Version 1.000 % % Code provided by Ruslan Salakhutdinov and Geoff Hinton % % Permission is granted for anyone to copy, use, modify, or distribute this % program and accompanying programs and documents for any purpose, provided % this copyright notice is retained and prominently displayed, along with % a note saying t...
github
mars920314/DeepFi-master
GaussianRBM.m
.m
DeepFi-master/DeepFi/GaussianRBM.m
6,288
utf_8
f7b69160ff574b93d8b31c90140241cb
%{ =========================================================================== Code provided by Yichuan (Charlie) Tang http://www.cs.toronto.edu/~tang Permission is granted for anyone to copy, use, modify, or distribute this program and accompanying programs and documents for any purpose, provided this copyright noti...
github
mars920314/DeepFi-master
read_bf_file.m
.m
DeepFi-master/DeepFi/read_bf_file.m
2,577
utf_8
3046107c2e85bb02155fda059099b086
%READ_BF_FILE Reads in a file of beamforming feedback logs. % This version uses the *C* version of read_bfee, compiled with % MATLAB's MEX utility. % % (c) 2008-2011 Daniel Halperin <dhalperi@cs.washington.edu> % function ret = read_bf_file(filename) %% Input check error(nargchk(1,1,nargin)); %% Open file f = fope...
github
mars920314/DeepFi-master
dbinv.m
.m
DeepFi-master/DeepFi/dbinv.m
145
utf_8
f3e0b99630ef3ad7fcc8ca3ac3daade3
%DBINV Convert from decibels. % % (c) 2008-2011 Daniel Halperin <dhalperi@cs.washington.edu> % function ret = dbinv(x) ret = 10.^(x/10); end
github
mars920314/DeepFi-master
get_scaled_csi.m
.m
DeepFi-master/Deep Belief Networks/get_scaled_csi.m
1,842
utf_8
25f6ee30c68e10fbfaaeff35624ab758
%GET_SCALED_CSI Converts a CSI struct to a channel matrix H. % % (c) 2008-2011 Daniel Halperin <dhalperi@cs.washington.edu> % function ret = get_scaled_csi(csi_st) % Pull out CSI csi = csi_st.csi; % Calculate the scale factor between normalized CSI and RSSI (mW) csi_sq = csi .* conj(csi); csi_pwr =...
github
mars920314/DeepFi-master
get_total_rss.m
.m
DeepFi-master/Deep Belief Networks/get_total_rss.m
592
utf_8
9f75c5f068248c64a969d4b65b5aa054
%GET_TOTAL_RSS Calculates the Received Signal Strength (RSS) in dBm from % a CSI struct. % % (c) 2011 Daniel Halperin <dhalperi@cs.washington.edu> % function ret = get_total_rss(csi_st) error(nargchk(1,1,nargin)); % Careful here: rssis could be zero rssi_mag = 0; if csi_st.rssi_a ~= 0 rssi_mag ...
github
mars920314/DeepFi-master
CG_MNIST.m
.m
DeepFi-master/Deep Belief Networks/CG_MNIST.m
2,727
utf_8
4679a67a7470f0d5835c1cad7f2d0896
% Version 1.000 % % Code provided by Ruslan Salakhutdinov and Geoff Hinton % % Permission is granted for anyone to copy, use, modify, or distribute this % program and accompanying programs and documents for any purpose, provided % this copyright notice is retained and prominently displayed, along with % a note saying t...
github
mars920314/DeepFi-master
CG_CLASSIFY.m
.m
DeepFi-master/Deep Belief Networks/CG_CLASSIFY.m
1,853
utf_8
6ed770942ea0c0f3a0f53cfe675bb5ff
% Version 1.000 % % Code provided by Ruslan Salakhutdinov and Geoff Hinton % % Permission is granted for anyone to copy, use, modify, or distribute this % program and accompanying programs and documents for any purpose, provided % this copyright notice is retained and prominently displayed, along with % a note saying t...
github
mars920314/DeepFi-master
read_bf_file.m
.m
DeepFi-master/Deep Belief Networks/read_bf_file.m
2,577
utf_8
3046107c2e85bb02155fda059099b086
%READ_BF_FILE Reads in a file of beamforming feedback logs. % This version uses the *C* version of read_bfee, compiled with % MATLAB's MEX utility. % % (c) 2008-2011 Daniel Halperin <dhalperi@cs.washington.edu> % function ret = read_bf_file(filename) %% Input check error(nargchk(1,1,nargin)); %% Open file f = fope...
github
mars920314/DeepFi-master
mnistdisp.m
.m
DeepFi-master/Deep Belief Networks/mnistdisp.m
1,084
utf_8
fe0cdd3b44b770d51322d5c6e9f4fd91
% Version 1.000 % % Code provided by Ruslan Salakhutdinov and Geoff Hinton % % Permission is granted for anyone to copy, use, modify, or distribute this % program and accompanying programs and documents for any purpose, provided % this copyright notice is retained and prominently displayed, along with % a note saying t...
github
mars920314/DeepFi-master
dbinv.m
.m
DeepFi-master/Deep Belief Networks/dbinv.m
145
utf_8
f3e0b99630ef3ad7fcc8ca3ac3daade3
%DBINV Convert from decibels. % % (c) 2008-2011 Daniel Halperin <dhalperi@cs.washington.edu> % function ret = dbinv(x) ret = 10.^(x/10); end
github
mars920314/DeepFi-master
CG_CLASSIFY_INIT.m
.m
DeepFi-master/Deep Belief Networks/CG_CLASSIFY_INIT.m
1,136
utf_8
22b98fdbaa2f63132f19a95e73c35d22
% Version 1.000 % % Code provided by Ruslan Salakhutdinov and Geoff Hinton % % Permission is granted for anyone to copy, use, modify, or distribute this % program and accompanying programs and documents for any purpose, provided % this copyright notice is retained and prominently displayed, along with % a note saying t...
github
mars920314/DeepFi-master
mnistdisp.m
.m
DeepFi-master/Restricted Boltzmann Machines/mnistdisp.m
1,136
utf_8
bdf11055312aa60255e74937dde95073
% Version 1.000 % % Code provided by Ruslan Salakhutdinov and Geoff Hinton % % Permission is granted for anyone to copy, use, modify, or distribute this % program and accompanying programs and documents for any purpose, provided % this copyright notice is retained and prominently displayed, along with % a note saying t...
github
kenders2000/BlindRT-master
Choose_signal.m
.m
BlindRT-master/Choose_signal.m
4,495
utf_8
183a22623d5b7fc61d871fbe054c864a
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % This function is used to extracted the exponentional % damping continuous segments of the speech signal % Input: % x_E ------ The envelope of the speech signal % Fs ------ The sampling frequency % Best_s_num ------ The n...
github
jeffreyvarner/CHEME-2880-S15-MAB-MODEL-master
ObjectiveFunction.m
.m
CHEME-2880-S15-MAB-MODEL-master/ObjectiveFunction.m
2,561
utf_8
7924a9bf5cef8c3bb102e08f442bdd85
% ------------------------------------------------------------------------------------- % % Copyright (c) 2015 Varnerlab, % School of Chemical and Biomolecular Engineering, % Cornell University, Ithaca NY 14853 USA. % % Permission is hereby granted, free of charge, to any person obtaining a copy % of this software a...
github
jeffreyvarner/CHEME-2880-S15-MAB-MODEL-master
BalanceEquations.m
.m
CHEME-2880-S15-MAB-MODEL-master/BalanceEquations.m
3,601
utf_8
6d44da49dc612f725d9eb588cfcd0550
% ------------------------------------------------------------------------------------- % % Copyright (c) 2015 Varnerlab, % School of Chemical and Biomolecular Engineering, % Cornell University, Ithaca NY 14853 USA. % % Permission is hereby granted, free of charge, to any person obtaining a copy % of this software a...
github
jeffreyvarner/CHEME-2880-S15-MAB-MODEL-master
SolveBalanceEquations.m
.m
CHEME-2880-S15-MAB-MODEL-master/SolveBalanceEquations.m
2,248
utf_8
43e238bdd2feb4f4a7fb74b1f33dafb9
% ------------------------------------------------------------------------------------- % % Copyright (c) 2015 Varnerlab, % School of Chemical and Biomolecular Engineering, % Cornell University, Ithaca NY 14853 USA. % % Permission is hereby granted, free of charge, to any person obtaining a copy % of this software a...
github
Guokr1991/ultratrack-master
do_dyna_scans.m
.m
ultratrack-master/do_dyna_scans.m
9,979
utf_8
9f6b063e42f91063198fc6484b96e5ef
function do_dyna_scans(PHANTOM_FILE,OUTPUT_FILE,PARAMS); % % do_dyna_scans(PHANTOM_FILE,OUTPUT_FILE,PARAMS); % % Function for doing ARFI scans with the URI/Field toolkit % % 11/11/04 Stephen McAleavey, U. Rochester BME % % % PHANTOM_FILE Filename for phantom files - will look for % everything w/ %03d number appende...
github
feelus-disk/_programming-master
func.m
.m
_programming-master/lang_matlab/old_progs/func.m
758
utf_8
077cbbc6496a897be632929794464c7d
function func global R L C global w0 alpha wc C=1e-6; L=5; ww=[]; R=100:50:500; w0=(L.*C).^(-0.5); alpha=R./(2*L); wc=(w0.^2-alpha.^2).^0.5; hold on; for i=1:length(R) data=[R(i) alpha(i) wc(i) ]; w=400:0.1:500; Rw=(w.*L-(w.*C).^(-1)).^2 + R(i).^2; plot(w,Rw); ...
github
charmgil/CTBN-master
maxsum_forest.m
.m
CTBN-master/CTBN/maxsum_forest.m
7,004
utf_8
980db79dbcfdfbfd1e2998b3fdab8ed7
% maxsum_forest: returns the joint assignment with the highest probability % (wrapper for maxsum_tree) function [ assn logprob ] = maxsum_forest( T ) % options is_verbose = false; % init n_nodes = size(T, 2); % traverse + examine T lookup = nan(n_nodes, 1); % node# -> cell_index lookup table max_node_i = -1; for i...
github
charmgil/CTBN-master
MAP_prediction_sw.m
.m
CTBN-master/CTBN/MAP_prediction_sw.m
1,988
utf_8
84ed46516d4964c380e2fbca12d8feba
% This is an implmentation of the prediction algorithm presented in [Batal, Hong, Hauskrecht 2013] % I. Batal, C. Hong, and M. Hauskrecht. % An efficient probabilistic framework for multi-dimensional classification. % CIKM 2013, Burlingame, CA, USA. October 2013. function [ Y_pred Y_log_prob] = MAP_p...
github
charmgil/CTBN-master
compute_crossvalidation_loglikelihood_sw.m
.m
CTBN-master/CTBN/compute_crossvalidation_loglikelihood_sw.m
3,049
utf_8
2d5014062a6cab6a7dd5c8cae212e9b7
%compute the likelihood of LR which learns from X to Y on the %Crossvalidation splits in indices function [ LL ] = compute_crossvalidation_loglikelihood_sw( X, Y, Y_parent, indices, k) %save time learn_cost=false; for i=1:k index_validation = find(indices==i); index_train = find(indices~=i); ...
github
charmgil/CTBN-master
learn_output_tree_sw.m
.m
CTBN-master/CTBN/learn_output_tree_sw.m
2,046
utf_8
1390f813fdd387b0db245bc6c53b0161
% This is an implmentation of the prediction algorithm presented in [Batal, Hong, Hauskrecht 2013] % I. Batal, C. Hong, and M. Hauskrecht. % An efficient probabilistic framework for multi-dimensional classification. % CIKM 2013, Burlingame, CA, USA. October 2013. function [ T ] = learn_output_tree_sw...
github
charmgil/CTBN-master
compute_crossvalidation_loglikelihood.m
.m
CTBN-master/CTBN/compute_crossvalidation_loglikelihood.m
663
utf_8
3019a9546545b61b77ef32b451676760
%compute the likelihood of LR which learns from X to Y on the %Crossvalidation splits in indices function [ LL ] = compute_crossvalidation_loglikelihood( X, Y, indices, k) %save time learn_cost=false; for i=1:k index_validation = find(indices==i); index_train = find(indices~=i); Y_train=Y(i...
github
charmgil/CTBN-master
evaluate_probability.m
.m
CTBN-master/auxiliary/evaluate_probability.m
435
utf_8
0599afdbb2864440511af7489ab72b01
%T is the tree (orgnaized in breadth-first fashion), Y is the assignment to compute it probability function [ log_prob ] = evaluate_probability( T, Y ) log_prob=0; for i=1:length(T) y_val=Y(T{i}.node); if(isempty(T{i}.parent)) log_prob=log_prob+T{i}.log_potential(y_val+1); else y_...
github
charmgil/CTBN-master
generate_all_combinations.m
.m
CTBN-master/auxiliary/generate_all_combinations.m
1,507
utf_8
9b165b84e11bf0864539fccd261a26ea
%all binary combinations of size n function [ C ] = generate_all_combinations( Y ) d=size(Y,2); if(d==1) C=0:length(unique(Y(:,1)))-1; end if(d==2) S1=0:length(unique(Y(:,1)))-1; S2=0:length(unique(Y(:,2)))-1; sets = {S1, S2}; [x y] = ndgrid(sets{:}); C = [x(:) y(:...
github
charmgil/CTBN-master
check_directed_cycle.m
.m
CTBN-master/auxiliary/check_directed_cycle.m
563
utf_8
460dbeedcb5df54aab99fb3d38ab18fa
%check if node "from" can be reached from node "to": meaning there is a %cycle function [ err ] = check_directed_cycle( T, to, from) %do a BFS starting from node to, if we encounter node from, then there is a %cycle err=false; [ idx ] = search_tree( to, T ); %BFS list=T{idx}.children; while(~isempty(li...
github
charmgil/CTBN-master
getMeasuresMLC.m
.m
CTBN-master/auxiliary/getMeasuresMLC.m
2,227
utf_8
dd33394f227c1796fb947ba10bb2ec74
%Y: true labels, Y_pred: predicted labels, Y_log_prob: log probability of the true class %according to the model function [ obj ] = getMeasuresMLC( Y, Y_pred, Y_log_prob ) [N d] = size(Y); %% Compute Exact Matching rate and Hamming cnt = 0; cnt2 = 0; for i=1:N y = Y(i,:); y_pred = Y_pred(...
github
charmgil/CTBN-master
search_tree.m
.m
CTBN-master/auxiliary/search_tree.m
226
utf_8
33125937d299af06a3c6c659ef044bd8
%search the tree for node n, return -1 if not found function [ idx ] = search_tree( n, T ) %search the tree for the node idx=-1; for i=1:length(T) if(T{i}.node==n) idx=i; break; end end
github
charmgil/CTBN-master
LR_predict.m
.m
CTBN-master/auxiliary/LR_predict.m
451
utf_8
0e66bf576a329d141e2062eafae1ffe6
%return P(y=1|x,w) function [ P ] = LR_predict( w,X ) n=size(X,1); if size(w,1) == 1 for i=1:n x=X(i,:); z=dot(w,[1 x]); P(i)=1.0 ./ (1.0 + exp(-z)); end else % for multi-class for i=1:n for m = 1:size(w,1) x=X(i,:); z(m)=exp(do...
github
charmgil/CTBN-master
LR_likelihood.m
.m
CTBN-master/auxiliary/LR_likelihood.m
644
utf_8
7c3302cf219343ab08fec002a51c8db4
%compute the likelihood of Y under probabilities P %P(i) is Prob(Y(i)=1) function [ LL ] = LR_likelihood( P, Y ) [r,c] = size(P); if min(r,c) == 1 || min(r,c) == 2 %LogLikelihood LL=0; n=length(Y); for i=1:n if(Y(i)==1) LL=LL+log(P(i)); else ...
github
charmgil/CTBN-master
LR_train.m
.m
CTBN-master/auxiliary/LR_train.m
2,726
utf_8
19db0adbf6bdd4b0d6ca983b94b1085a
%learn_cost is a boolean variable, if false, do not optimize over for %learning the cost, use the standard 1 cost (save time) function [ weights ] = LR_train( X, Y, varargin ) global LR_implementation; k=length(unique(Y))-1; if isequal(LR_implementation,'weighted_liblinear') if(nargin<3) fprint...
github
horosproject/horosplugins-master
FAWebPostQuery.m
.m
horosplugins-master/MIRC Teaching File/FAWebPostQuery.m
12,199
utf_8
39900b69e48a1a1a20cf292ef410cd53
// // FAWebPostQuery.m // TeachingFile // // Created by Lance Pysher on 3/8/07. // Copyright 2007 __MyCompanyName__. All rights reserved. // #import "FAWebPostQuery.h" #import "httpFlattening.h" #define READ_SIZE 1024 NSString * const FAWebPostAlreadyPosted = @"FAWebPostAlreadyPosted";...
github
sbargoti/matlab-code-master
bin_save.m
.m
matlab-code-master/SuchetTrunkDetection/LoadData/bin_save.m
5,910
utf_8
002e9877ce4fbb4ca66a4fdb593ba53a
%bin_save Save data to headerless binary file (as used by comma). % data = bin_save(DATA,FILENAME,FORMAT) saves data to file with raw data % types specified by the format string. % % DATA The matrix of data to save to the file. % that will contain the raw...
github
sbargoti/matlab-code-master
bin_load.m
.m
matlab-code-master/SuchetTrunkDetection/LoadData/bin_load.m
5,821
utf_8
2622ec00c6dd17901dff405b483948ff
%bin_load Load headerless binary data (as used by comma) into workspace. % data = bin_load(FILENAME,FORMAT) loads the variables from a file into a % double-precision array, with raw data types specified by the format % string. % % FILENAME The string file name for the file % ...
github
sbargoti/matlab-code-master
v2struct.m
.m
matlab-code-master/SuchetTrunkDetection/LoadData/v2struct.m
16,311
utf_8
77b042ae8b342c50880cf0e543b7bd27
%% v2struct % v2struct Pack/Unpack Variables to/from a scalar structure. function varargout = v2struct(varargin) %% Description % v2struct has dual functionality in packing & unpacking variables into structures and % vice versa, according to the syntax and inputs. % % Function features: % * Pack...
github
sbargoti/matlab-code-master
SplitVStructure.m
.m
matlab-code-master/SuchetTrunkDetection/SegmentPointCloud/SplitVStructure.m
8,929
utf_8
c2d98c6e1466081cd017ecc26cd3c849
function [frontFacePC,pcIdx] = SplitVStructure(points3D) % function frontFacePC = SplitVStructure(PC) % Given a point cloud post ground removal, separate out the V structure disp('Splitting the V Structure'); PC = points3D; % Cut off the top 20% of the point cloud - gets rid of the roof % Cut the roof from the ex...
github
sbargoti/matlab-code-master
RealignRowV2.m
.m
matlab-code-master/SuchetTrunkDetection/SegmentPointCloud/RealignRowV2.m
5,551
utf_8
23c19f57d9363d6cb7ac235d143281da
function [AlignedPC,PCIdx] = RealiginRowV2(x,y,z,row_type) % Similar to RealignRow but takes in data rather than importing within % itself % Within AlignMajorPlane we are also separating two rows from each other % (may need to look into this while working on i-structures) % Rotate Data along dominant axes % Rot...
github
sbargoti/matlab-code-master
RealignRow.m
.m
matlab-code-master/SuchetTrunkDetection/SegmentPointCloud/RealignRow.m
4,960
utf_8
0ee7e8fc0cd15e9ba4af982b74705531
function [AlignedPC,PCIdx,OriginalPC,originalPCTime] = RealignRow(CSVFileName) % Import data [Time,r,b,e,x,y,z,ref,scan] = ImportSickCSV(CSVFileName); p = findstr(CSVFileName,'SickRow'); [originalPCTime,r,b,e,x2,y2,z2,ref,scan] = ImportSickCSV([CSVFileName(1:p+6),'Z',CSVFileName(p+7:end)]); OriginalPC = [x2,y2,z...
github
sbargoti/matlab-code-master
trunkSegmentationPart2Working.m
.m
matlab-code-master/SuchetTrunkDetection/TrunkDetection/trunkSegmentationPart2Working.m
8,395
utf_8
305839fd982f244ef83cc908a3db00c8
% Second part of script containing trunk detection using images % By this time, the mapping has been done in linux and the images have been % classified using calvins code function trunkSegmentationPart2(dataPath,modelPath,row_type) % clear all; close all; clc; %% Load data from face segmentation % parentFolder...
github
sbargoti/matlab-code-master
trunkSegmentationPart2.m
.m
matlab-code-master/SuchetTrunkDetection/TrunkDetection/trunkSegmentationPart2.m
11,109
utf_8
d410693da05838d57ec74d4db01315ad
% Second part of script containing trunk detection using images % By this time, the mapping has been done in linux and the images have been % classified using calvins code function trunkSegmentationPart2(dataPath,modelPath,row_type) % clear all; close all; clc; %% Load data from face segmentation % parentFolder...
github
sbargoti/matlab-code-master
trunkSegmentationPart1.m
.m
matlab-code-master/SuchetTrunkDetection/TrunkDetection/trunkSegmentationPart1.m
2,839
utf_8
537b7b146d6a07964e4d7430d6b60409
% Main function for trunk detection using images % In its current form, it jumps between linux scripts and matlab functions % clear all; close all; clc; function trunkSegmentationPart1(dataPath,row_number,row_type) %% Load point cloud data - both original and rotated/flattened [preprocessing done in linux] % paren...
github
sbargoti/matlab-code-master
HoughLineFit.m
.m
matlab-code-master/SuchetTrunkDetection/Observations/HoughLineFit.m
3,559
utf_8
d147d3de93ab65f6a08be69163a81070
function [linePos, lineEnds, lineLength, lineAngles, linePointsIdx] = HoughLineFit(points2D,row_type) % function [linePos, lineEnds, lineLength, lineAngles, linePointsIdx] = HoughLinesFit(points2D) % Given a 2d point cloud, fit lines using the matlab build in hough % transform function. disp('Applying Hough Transf...
github
sbargoti/matlab-code-master
iso2seconds.m
.m
matlab-code-master/SuchetTrunkDetection/Observations/iso2seconds.m
487
utf_8
cfca2cec2fd79e5049e213e732aa4dc4
% ISO2SECONDS Convert format of time from iso string to seconds since epoch % % time_as_seconds_since_epoch = ISO2SECONDS( time_as_iso_string ) converts % between these two formats % % Example % ------- % seconds2iso(1399970753.498385) % seconds2iso(1.399970753498385e+009) % % See also: seconds2iso % % ...
github
sbargoti/matlab-code-master
seconds2iso.m
.m
matlab-code-master/SuchetTrunkDetection/Observations/seconds2iso.m
483
utf_8
ea7aaff165b79d8fc349219083a7da3d
% SECONDS2ISO Convert format of time from seconds since epoch to iso string % % time_as_iso_string = SECONDS2ISO( time_as_seconds_since_epoch ) converts % between these two formats % % Example % ------- % iso2seconds('20140513T084553.498385') % % See also: iso2seconds % % author James Underwood function ...
github
sbargoti/matlab-code-master
ModHoughLines.m
.m
matlab-code-master/SuchetTrunkDetection/Observations/ModHoughLines.m
7,655
utf_8
aca61e68b8f3b9ea15a64f6b35c0adb4
function lines = ModHoughLines(IMAGE,points2D,imageRes,theta,rho,peaks,fillgap,minlength) %HOUGHLINES Extract line segments based on Hough transform. % LINES = HOUGHLINES(BW, THETA, RHO, PEAKS, points2D) extracts line segments % in the image BW associated with particular bins in a Hough % transform. THETA a...
github
sbargoti/matlab-code-master
fitplane.m
.m
matlab-code-master/SuchetTrunkDetection/ModelFitting/fitplane.m
1,753
utf_8
1e714564feeab6c8851f300c0745ec90
% FITPLANE - solves coefficients of plane fitted to 3 or more points % % Usage: B = fitplane(XYZ) % % Where: XYZ - 3xNpts array of xyz coordinates to fit plane to. % If Npts is greater than 3 a least squares solution % is generated. % % Returns: B - 4x1 array of plane coe...
github
sbargoti/matlab-code-master
iscolinear.m
.m
matlab-code-master/SuchetTrunkDetection/ModelFitting/iscolinear.m
2,380
utf_8
b433c5fb9ce61e016fa92db1b88cefb9
% ISCOLINEAR - are 3 points colinear % % Usage: r = iscolinear(p1, p2, p3, flag) % % Arguments: % p1, p2, p3 - Points in 2D or 3D. % flag - An optional parameter set to 'h' or 'homog' % indicating that p1, p2, p3 are homogneeous % coordinates with arb...
github
sbargoti/matlab-code-master
ransac.m
.m
matlab-code-master/SuchetTrunkDetection/ModelFitting/ransac.m
10,115
utf_8
135d524e5b93f4d89ad73333ba730226
% RANSAC - Robustly fits a model to data with the RANSAC algorithm % % Usage: % % [M, inliers] = ransac(x, fittingfn, distfn, degenfn s, t, feedback, ... % maxDataTrials, maxTrials) % % Arguments: % x - Data sets to which we are seeking to fit a model M % It is...
github
sbargoti/matlab-code-master
ransacfitplane.m
.m
matlab-code-master/SuchetTrunkDetection/ModelFitting/ransacfitplane.m
4,390
utf_8
68eaec53eaf67316fc1bd60520104cc0
% RANSACFITPLANE - fits plane to 3D array of points using RANSAC % % Usage [B, P, inliers] = ransacfitplane(XYZ, t, feedback) % % This function uses the RANSAC algorithm to robustly fit a plane % to a set of 3D data points. % % Arguments: % XYZ - 3xNpts array of xyz coordinates to fit plane to. % ...
github
sbargoti/matlab-code-master
vl_compile.m
.m
matlab-code-master/vlfeat-0.9.20/toolbox/vl_compile.m
5,060
utf_8
978f5189bb9b2a16db3368891f79aaa6
function vl_compile(compiler) % VL_COMPILE Compile VLFeat MEX files % VL_COMPILE() uses MEX() to compile VLFeat MEX files. This command % works only under Windows and is used to re-build problematic % binaries. The preferred method of compiling VLFeat on both UNIX % and Windows is through the provided Makefile...
github
sbargoti/matlab-code-master
vl_noprefix.m
.m
matlab-code-master/vlfeat-0.9.20/toolbox/vl_noprefix.m
1,875
utf_8
97d8755f0ba139ac1304bc423d3d86d3
function vl_noprefix % VL_NOPREFIX Create a prefix-less version of VLFeat commands % VL_NOPREFIX() creats prefix-less stubs for VLFeat functions % (e.g. SIFT for VL_SIFT). This function is seldom used as the stubs % are included in the VLFeat binary distribution anyways. Moreover, % on UNIX platforms, the stub...
github
sbargoti/matlab-code-master
vl_pegasos.m
.m
matlab-code-master/vlfeat-0.9.20/toolbox/misc/vl_pegasos.m
2,837
utf_8
d5e0915c439ece94eb5597a07090b67d
% VL_PEGASOS [deprecated] % VL_PEGASOS is deprecated. Please use VL_SVMTRAIN() instead. function [w b info] = vl_pegasos(X,Y,LAMBDA, varargin) % Verbose not supported if (sum(strcmpi('Verbose',varargin))) varargin(find(strcmpi('Verbose',varargin),1))=[]; fprintf('Option VERBOSE is no longer supported.\n'); en...
github
sbargoti/matlab-code-master
vl_svmpegasos.m
.m
matlab-code-master/vlfeat-0.9.20/toolbox/misc/vl_svmpegasos.m
1,178
utf_8
009c2a2b87a375d529ed1a4dbe3af59f
% VL_SVMPEGASOS [deprecated] % VL_SVMPEGASOS is deprecated. Please use VL_SVMTRAIN() instead. function [w b info] = vl_svmpegasos(DATA,LAMBDA, varargin) % Verbose not supported if (sum(strcmpi('Verbose',varargin))) varargin(find(strcmpi('Verbose',varargin),1))=[]; fprintf('Option VERBOSE is no longer suppor...
github
sbargoti/matlab-code-master
vl_override.m
.m
matlab-code-master/vlfeat-0.9.20/toolbox/misc/vl_override.m
4,654
utf_8
e233d2ecaeb68f56034a976060c594c5
function config = vl_override(config,update,varargin) % VL_OVERRIDE Override structure subset % CONFIG = VL_OVERRIDE(CONFIG, UPDATE) copies recursively the fileds % of the structure UPDATE to the corresponding fields of the % struture CONFIG. % % Usually CONFIG is interpreted as a list of paramters with their ...
github
sbargoti/matlab-code-master
vl_quickvis.m
.m
matlab-code-master/vlfeat-0.9.20/toolbox/quickshift/vl_quickvis.m
3,696
utf_8
27f199dad4c5b9c192a5dd3abc59f9da
function [Iedge dists map gaps] = vl_quickvis(I, ratio, kernelsize, maxdist, maxcuts) % VL_QUICKVIS Create an edge image from a Quickshift segmentation. % IEDGE = VL_QUICKVIS(I, RATIO, KERNELSIZE, MAXDIST, MAXCUTS) creates an edge % stability image from a Quickshift segmentation. RATIO controls the tradeoff % bet...
github
sbargoti/matlab-code-master
vl_demo_aib.m
.m
matlab-code-master/vlfeat-0.9.20/toolbox/demo/vl_demo_aib.m
2,928
utf_8
590c6db09451ea608d87bfd094662cac
function vl_demo_aib % VL_DEMO_AIB Test Agglomerative Information Bottleneck (AIB) D = 4 ; K = 20 ; randn('state',0) ; rand('state',0) ; X1 = randn(2,300) ; X1(1,:) = X1(1,:) + 2 ; X2 = randn(2,300) ; X2(1,:) = X2(1,:) - 2 ; X3 = randn(2,300) ; X3(2,:) = X3(2,:) + 2 ; figure(1) ; clf ; hold on ; vl_plotframe(X...
github
sbargoti/matlab-code-master
vl_demo_alldist.m
.m
matlab-code-master/vlfeat-0.9.20/toolbox/demo/vl_demo_alldist.m
5,460
utf_8
6d008a64d93445b9d7199b55d58db7eb
function vl_demo_alldist % numRepetitions = 3 ; numDimensions = 1000 ; numSamplesRange = [300] ; settingsRange = {{'alldist2', 'double', 'l2', }, ... {'alldist', 'double', 'l2', 'nosimd'}, ... {'alldist', 'double', 'l2' }, ... {'alldist2', 's...
github
sbargoti/matlab-code-master
vl_demo_ikmeans.m
.m
matlab-code-master/vlfeat-0.9.20/toolbox/demo/vl_demo_ikmeans.m
774
utf_8
17ff0bb7259d390fb4f91ea937ba7de0
function vl_demo_ikmeans() % VL_DEMO_IKMEANS numData = 10000 ; dimension = 2 ; data = uint8(255*rand(dimension,numData)) ; numClusters = 3^3 ; [centers, assignments] = vl_ikmeans(data, numClusters); figure(1) ; clf ; axis off ; plotClusters(data, centers, assignments) ; vl_demo_print('ikmeans_2d',0.6); [tree, assig...
github
sbargoti/matlab-code-master
vl_demo_svm.m
.m
matlab-code-master/vlfeat-0.9.20/toolbox/demo/vl_demo_svm.m
1,235
utf_8
7cf6b3504e4fc2cbd10ff3fec6e331a7
% VL_DEMO_SVM Demo: SVM: 2D linear learning function vl_demo_svm y=[];X=[]; % Load training data X and their labels y load('vl_demo_svm_data.mat') Xp = X(:,y==1); Xn = X(:,y==-1); figure plot(Xn(1,:),Xn(2,:),'*r') hold on plot(Xp(1,:),Xp(2,:),'*b') axis equal ; vl_demo_print('svm_training') ; % Parameters lambda =...
github
sbargoti/matlab-code-master
vl_demo_kdtree_sift.m
.m
matlab-code-master/vlfeat-0.9.20/toolbox/demo/vl_demo_kdtree_sift.m
6,832
utf_8
e676f80ac330a351f0110533c6ebba89
function vl_demo_kdtree_sift % VL_DEMO_KDTREE_SIFT % Demonstrates the use of a kd-tree forest to match SIFT % features. If FLANN is present, this function runs a comparison % against it. % AUTORIGHS rand('state',0) ; randn('state',0); do_median = 0 ; do_mean = 1 ; % try to setup flann if ~exist('flann_search'...
github
sbargoti/matlab-code-master
vl_impattern.m
.m
matlab-code-master/vlfeat-0.9.20/toolbox/imop/vl_impattern.m
6,876
utf_8
1716a4d107f0186be3d11c647bc628ce
function im = vl_impattern(varargin) % VL_IMPATTERN Generate an image from a stock pattern % IM=VLPATTERN(NAME) returns an instance of the specified % pattern. These stock patterns are useful for testing algoirthms. % % All generated patterns are returned as an image of class % DOUBLE. Both gray-scale and colou...
github
sbargoti/matlab-code-master
vl_tpsu.m
.m
matlab-code-master/vlfeat-0.9.20/toolbox/imop/vl_tpsu.m
1,755
utf_8
09f36e1a707c069b375eb2817d0e5f13
function [U,dU,delta]=vl_tpsu(X,Y) % VL_TPSU Compute the U matrix of a thin-plate spline transformation % U=VL_TPSU(X,Y) returns the matrix % % [ U(|X(:,1) - Y(:,1)|) ... U(|X(:,1) - Y(:,N)|) ] % [ ] % [ U(|X(:,M) - Y(:,1)|) ... U(|X(:,M) - Y(:,N)|) ] % % where X...
github
sbargoti/matlab-code-master
vl_xyz2lab.m
.m
matlab-code-master/vlfeat-0.9.20/toolbox/imop/vl_xyz2lab.m
1,570
utf_8
09f95a6f9ae19c22486ec1157357f0e3
function J=vl_xyz2lab(I,il) % VL_XYZ2LAB Convert XYZ color space to LAB % J = VL_XYZ2LAB(I) converts the image from XYZ format to LAB format. % % VL_XYZ2LAB(I,IL) uses one of the illuminants A, B, C, E, D50, D55, % D65, D75, D93. The default illuminatn is E. % % See also: VL_XYZ2LUV(), VL_HELP(). % Copyright ...
github
sbargoti/matlab-code-master
vl_test_gmm.m
.m
matlab-code-master/vlfeat-0.9.20/toolbox/xtest/vl_test_gmm.m
1,332
utf_8
76782cae6c98781c6c38d4cbf5549d94
function results = vl_test_gmm(varargin) % VL_TEST_GMM % Copyright (C) 2007-12 Andrea Vedaldi and Brian Fulkerson. % All rights reserved. % % This file is part of the VLFeat library and is made available under % the terms of the BSD license (see the COPYING file). vl_test_init ; end function s = setup() randn('st...
github
sbargoti/matlab-code-master
vl_test_twister.m
.m
matlab-code-master/vlfeat-0.9.20/toolbox/xtest/vl_test_twister.m
1,251
utf_8
2bfb5a30cbd6df6ac80c66b73f8646da
function results = vl_test_twister(varargin) % VL_TEST_TWISTER vl_test_init ; function test_illegal_args() vl_assert_exception(@() vl_twister(-1), 'vl:invalidArgument') ; vl_assert_exception(@() vl_twister(1, -1), 'vl:invalidArgument') ; vl_assert_exception(@() vl_twister([1, -1]), 'vl:invalidArgument') ; function te...
github
sbargoti/matlab-code-master
vl_test_kdtree.m
.m
matlab-code-master/vlfeat-0.9.20/toolbox/xtest/vl_test_kdtree.m
2,449
utf_8
9d7ad2b435a88c22084b38e5eb5f9eb9
function results = vl_test_kdtree(varargin) % VL_TEST_KDTREE vl_test_init ; function s = setup() randn('state',0) ; s.X = single(randn(10, 1000)) ; s.Q = single(randn(10, 10)) ; function test_nearest(s) for tmethod = {'median', 'mean'} for type = {@single, @double} conv = type{1} ; tmethod = char(tmethod) ;...
github
sbargoti/matlab-code-master
vl_test_imwbackward.m
.m
matlab-code-master/vlfeat-0.9.20/toolbox/xtest/vl_test_imwbackward.m
514
utf_8
33baa0784c8f6f785a2951d7f1b49199
function results = vl_test_imwbackward(varargin) % VL_TEST_IMWBACKWARD vl_test_init ; function s = setup() s.I = im2double(imread(fullfile(vl_root,'data','spots.jpg'))) ; function test_identity(s) xr = 1:size(s.I,2) ; yr = 1:size(s.I,1) ; [x,y] = meshgrid(xr,yr) ; vl_assert_almost_equal(s.I, vl_imwbackward(xr,yr,s.I,...
github
sbargoti/matlab-code-master
vl_test_alphanum.m
.m
matlab-code-master/vlfeat-0.9.20/toolbox/xtest/vl_test_alphanum.m
1,624
utf_8
2da2b768c2d0f86d699b8f31614aa424
function results = vl_test_alphanum(varargin) % VL_TEST_ALPHANUM vl_test_init ; function s = setup() s.strings = ... {'1000X Radonius Maximus','10X Radonius','200X Radonius','20X Radonius','20X Radonius Prime','30X Radonius','40X Radonius','Allegia 50 Clasteron','Allegia 500 Clasteron','Allegia 50B Clasteron','Al...
github
sbargoti/matlab-code-master
vl_test_printsize.m
.m
matlab-code-master/vlfeat-0.9.20/toolbox/xtest/vl_test_printsize.m
1,447
utf_8
0f0b6437c648b7a2e1310900262bd765
function results = vl_test_printsize(varargin) % VL_TEST_PRINTSIZE vl_test_init ; function s = setup() s.fig = figure(1) ; s.usletter = [8.5, 11] ; % inches s.a4 = [8.26772, 11.6929] ; clf(s.fig) ; plot(1:10) ; function teardown(s) close(s.fig) ; function test_basic(s) for sigma = [1 0.5 0.2] vl_printsize(s.fig, s...
github
sbargoti/matlab-code-master
vl_test_cummax.m
.m
matlab-code-master/vlfeat-0.9.20/toolbox/xtest/vl_test_cummax.m
838
utf_8
5e98ee1681d4823f32ecc4feaa218611
function results = vl_test_cummax(varargin) % VL_TEST_CUMMAX vl_test_init ; function test_basic() vl_assert_almost_equal(... vl_cummax(1), 1) ; vl_assert_almost_equal(... vl_cummax([1 2 3 4], 2), [1 2 3 4]) ; function test_multidim() a = [1 2 3 4 3 2 1] ; b = [1 2 3 4 4 4 4] ; for k=1:6 dims = ones(1,6) ; dim...
github
sbargoti/matlab-code-master
vl_test_imintegral.m
.m
matlab-code-master/vlfeat-0.9.20/toolbox/xtest/vl_test_imintegral.m
1,429
utf_8
4750f04ab0ac9fc4f55df2c8583e5498
function results = vl_test_imintegral(varargin) % VL_TEST_IMINTEGRAL vl_test_init ; function state = setup() state.I = ones(5,6) ; state.correct = [ 1 2 3 4 5 6 ; 2 4 6 8 10 12 ; 3 6 9 12 15 18 ; 4 8 12 ...
github
sbargoti/matlab-code-master
vl_test_sift.m
.m
matlab-code-master/vlfeat-0.9.20/toolbox/xtest/vl_test_sift.m
1,318
utf_8
806c61f9db9f2ebb1d649c9bfcf3dc0a
function results = vl_test_sift(varargin) % VL_TEST_SIFT vl_test_init ; function s = setup() s.I = im2single(imread(fullfile(vl_root,'data','box.pgm'))) ; [s.ubc.f, s.ubc.d] = ... vl_ubcread(fullfile(vl_root,'data','box.sift')) ; function test_ubc_descriptor(s) err = [] ; [f, d] = vl_sift(s.I,... ...
github
sbargoti/matlab-code-master
vl_test_binsum.m
.m
matlab-code-master/vlfeat-0.9.20/toolbox/xtest/vl_test_binsum.m
1,377
utf_8
f07f0f29ba6afe0111c967ab0b353a9d
function results = vl_test_binsum(varargin) % VL_TEST_BINSUM vl_test_init ; function test_three_args() vl_assert_almost_equal(... vl_binsum([0 0], 1, 2), [0 1]) ; vl_assert_almost_equal(... vl_binsum([1 7], -1, 1), [0 7]) ; vl_assert_almost_equal(... vl_binsum([1 7], -1, [1 2 2 2 2 2 2 2]), [0 0]) ; function te...
github
sbargoti/matlab-code-master
vl_test_lbp.m
.m
matlab-code-master/vlfeat-0.9.20/toolbox/xtest/vl_test_lbp.m
892
utf_8
a79c0ce0c85e25c0b1657f3a0b499538
function results = vl_test_lbp(varargin) % VL_TEST_TWISTER vl_test_init ; function test_unfiorm_lbps(s) % enumerate the 56 uniform lbps q = 0 ; for i=0:7 for j=1:7 I = zeros(3) ; p = mod(s.pixels - i + 8, 8) + 1 ; I(p <= j) = 1 ; f = vl_lbp(single(I), 3) ; q = q + 1 ; vl_assert_equal(find(f...
github
sbargoti/matlab-code-master
vl_test_colsubset.m
.m
matlab-code-master/vlfeat-0.9.20/toolbox/xtest/vl_test_colsubset.m
828
utf_8
be0c080007445b36333b863326fb0f15
function results = vl_test_colsubset(varargin) % VL_TEST_COLSUBSET vl_test_init ; function s = setup() s.x = [5 2 3 6 4 7 1 9 8 0] ; function test_beginning(s) vl_assert_equal(1:5, vl_colsubset(1:10, 5, 'beginning')) ; vl_assert_equal(1:5, vl_colsubset(1:10, .5, 'beginning')) ; function test_ending(s) vl_assert_equa...
github
sbargoti/matlab-code-master
vl_test_alldist.m
.m
matlab-code-master/vlfeat-0.9.20/toolbox/xtest/vl_test_alldist.m
2,373
utf_8
9ea1a36c97fe715dfa2b8693876808ff
function results = vl_test_alldist(varargin) % VL_TEST_ALLDIST vl_test_init ; function s = setup() vl_twister('state', 0) ; s.X = 3.1 * vl_twister(10,10) ; s.Y = 4.7 * vl_twister(10,7) ; function test_null_args(s) vl_assert_equal(... vl_alldist(zeros(15,12), zeros(15,0), 'kl2'), ... zeros(12,0)) ; vl_assert_equa...
github
sbargoti/matlab-code-master
vl_test_ihashsum.m
.m
matlab-code-master/vlfeat-0.9.20/toolbox/xtest/vl_test_ihashsum.m
581
utf_8
edc283062469af62056b0782b171f5fc
function results = vl_test_ihashsum(varargin) % VL_TEST_IHASHSUM vl_test_init ; function s = setup() rand('state',0) ; s.data = uint8(round(16*rand(2,100))) ; sel = find(all(s.data==0)) ; s.data(1,sel)=1 ; function test_hash(s) D = size(s.data,1) ; K = 5 ; h = zeros(1,K,'uint32') ; id = zeros(D,K,'uint8'); next = zer...
github
sbargoti/matlab-code-master
vl_test_grad.m
.m
matlab-code-master/vlfeat-0.9.20/toolbox/xtest/vl_test_grad.m
434
utf_8
4d03eb33a6a4f68659f868da95930ffb
function results = vl_test_grad(varargin) % VL_TEST_GRAD vl_test_init ; function s = setup() s.I = rand(150,253) ; s.I_small = rand(2,2) ; function test_equiv(s) vl_assert_equal(gradient(s.I), vl_grad(s.I)) ; function test_equiv_small(s) vl_assert_equal(gradient(s.I_small), vl_grad(s.I_small)) ; function test_equiv...
github
sbargoti/matlab-code-master
vl_test_whistc.m
.m
matlab-code-master/vlfeat-0.9.20/toolbox/xtest/vl_test_whistc.m
1,384
utf_8
81c446d35c82957659840ab2a579ec2c
function results = vl_test_whistc(varargin) % VL_TEST_WHISTC vl_test_init ; function test_acc() x = ones(1, 10) ; e = 1 ; o = 1:10 ; vl_assert_equal(vl_whistc(x, o, e), 55) ; function test_basic() x = 1:10 ; e = 1:10 ; o = ones(1, 10) ; vl_assert_equal(histc(x, e), vl_whistc(x, o, e)) ; x = linspace(-1,11,100) ; o =...
github
sbargoti/matlab-code-master
vl_test_roc.m
.m
matlab-code-master/vlfeat-0.9.20/toolbox/xtest/vl_test_roc.m
1,019
utf_8
9b2ae71c9dc3eda0fc54c65d55054d0c
function results = vl_test_roc(varargin) % VL_TEST_ROC vl_test_init ; function s = setup() s.scores0 = [5 4 3 2 1] ; s.scores1 = [5 3 4 2 1] ; s.labels = [1 1 -1 -1 -1] ; function test_perfect_tptn(s) [tpr,tnr] = vl_roc(s.labels,s.scores0) ; vl_assert_almost_equal(tpr, [0 1 2 2 2 2] / 2) ; vl_assert_almost_equal(tnr,...
github
sbargoti/matlab-code-master
vl_test_dsift.m
.m
matlab-code-master/vlfeat-0.9.20/toolbox/xtest/vl_test_dsift.m
2,048
utf_8
fbbfb16d5a21936c1862d9551f657ccc
function results = vl_test_dsift(varargin) % VL_TEST_DSIFT vl_test_init ; function s = setup() I = im2double(imread(fullfile(vl_root,'data','spots.jpg'))) ; s.I = rgb2gray(single(I)) ; function test_fast_slow(s) binSize = 4 ; % bin size in pixels magnif = 3 ; % bin size / keypoint scale scale = binSize...
github
sbargoti/matlab-code-master
vl_test_alldist2.m
.m
matlab-code-master/vlfeat-0.9.20/toolbox/xtest/vl_test_alldist2.m
2,284
utf_8
89a787e3d83516653ae8d99c808b9d67
function results = vl_test_alldist2(varargin) % VL_TEST_ALLDIST vl_test_init ; % TODO: test integer classes function s = setup() vl_twister('state', 0) ; s.X = 3.1 * vl_twister(10,10) ; s.Y = 4.7 * vl_twister(10,7) ; function test_null_args(s) vl_assert_equal(... vl_alldist2(zeros(15,12), zeros(15,0), 'kl2'), ... ...