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 | sunf71/Matlab-master | vl_test_kdtree.m | .m | Matlab-master/cvpr14_SPHP_code/vlfeat-0.9.14/toolbox/xtest/vl_test_kdtree.m | 2,448 | utf_8 | 66f429ff8286089a34c193d7d3f9f016 | 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 | sunf71/Matlab-master | vl_test_imwbackward.m | .m | Matlab-master/cvpr14_SPHP_code/vlfeat-0.9.14/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 | sunf71/Matlab-master | vl_test_pegasos.m | .m | Matlab-master/cvpr14_SPHP_code/vlfeat-0.9.14/toolbox/xtest/vl_test_pegasos.m | 2,852 | utf_8 | 45a09a3bfefa3facd439fefbb7f1a903 | function results = vl_test_pegasos(varargin)
% VL_TEST_KDTREE
vl_test_init ;
function s = setup()
randn('state',0) ;
s.biasMultiplier = 10 ;
s.lambda = 0.01 ;
Np = 10 ;
Nn = 10 ;
Xp = diag([1 3])*randn(2, Np) ;
Xn = diag([1 3])*randn(2, Nn) ;
Xp(1,:) = Xp(1,:) + 2 + 1 ;
Xn(1,:) = Xn(1,:) - 2 + 1 ;
s.X = [Xp Xn] ;
s... |
github | sunf71/Matlab-master | vl_test_alphanum.m | .m | Matlab-master/cvpr14_SPHP_code/vlfeat-0.9.14/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 | sunf71/Matlab-master | vl_test_imintegral.m | .m | Matlab-master/cvpr14_SPHP_code/vlfeat-0.9.14/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 | sunf71/Matlab-master | vl_test_sift.m | .m | Matlab-master/cvpr14_SPHP_code/vlfeat-0.9.14/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 | sunf71/Matlab-master | vl_test_binsum.m | .m | Matlab-master/cvpr14_SPHP_code/vlfeat-0.9.14/toolbox/xtest/vl_test_binsum.m | 1,301 | utf_8 | 5bbd389cbc4d997e413d809fe4efda6d | 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 | sunf71/Matlab-master | vl_test_lbp.m | .m | Matlab-master/cvpr14_SPHP_code/vlfeat-0.9.14/toolbox/xtest/vl_test_lbp.m | 1,056 | utf_8 | 3b5cca50109af84014e56a4280a3352a | function results = vl_test_lbp(varargin)
% VL_TEST_TWISTER
vl_test_init ;
function test_one_on()
I = {} ;
I{1} = [0 0 0 ; 0 0 1 ; 0 0 0] ;
I{2} = [0 0 0 ; 0 0 0 ; 0 0 1] ;
I{3} = [0 0 0 ; 0 0 0 ; 0 1 0] ;
I{4} = [0 0 0 ; 0 0 0 ; 1 0 0] ;
I{5} = [0 0 0 ; 1 0 0 ; 0 0 0] ;
I{6} = [1 0 0 ; 0 0 0 ; 0 0 0] ;
I{7} = [0 1 0 ;... |
github | sunf71/Matlab-master | vl_test_colsubset.m | .m | Matlab-master/cvpr14_SPHP_code/vlfeat-0.9.14/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 | sunf71/Matlab-master | vl_test_alldist.m | .m | Matlab-master/cvpr14_SPHP_code/vlfeat-0.9.14/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 | sunf71/Matlab-master | vl_test_grad.m | .m | Matlab-master/cvpr14_SPHP_code/vlfeat-0.9.14/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 | sunf71/Matlab-master | vl_test_whistc.m | .m | Matlab-master/cvpr14_SPHP_code/vlfeat-0.9.14/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 | sunf71/Matlab-master | vl_test_dsift.m | .m | Matlab-master/cvpr14_SPHP_code/vlfeat-0.9.14/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 | sunf71/Matlab-master | vl_test_imsmooth.m | .m | Matlab-master/cvpr14_SPHP_code/vlfeat-0.9.14/toolbox/xtest/vl_test_imsmooth.m | 1,837 | utf_8 | 718235242cad61c9804ba5e881c22f59 | function results = vl_test_imsmooth(varargin)
% VL_TEST_IMSMOOTH
vl_test_init ;
function s = setup()
I = im2double(imread(fullfile(vl_root,'data','spots.jpg'))) ;
I = max(min(vl_imdown(I),1),0) ;
s.I = single(I) ;
function test_pad_by_continuity(s)
% Convolving a constant signal padded with continuity does not change... |
github | sunf71/Matlab-master | vl_test_phow.m | .m | Matlab-master/cvpr14_SPHP_code/vlfeat-0.9.14/toolbox/xtest/vl_test_phow.m | 549 | utf_8 | f761a3bb218af855986263c67b2da411 | function results = vl_test_phow(varargin)
% VL_TEST_PHOPW
vl_test_init ;
function s = setup()
s.I = im2double(imread(fullfile(vl_root,'data','spots.jpg'))) ;
s.I = single(s.I) ;
function test_gray(s)
[f,d] = vl_phow(s.I, 'color', 'gray') ;
assert(size(d,1) == 128) ;
function test_rgb(s)
[f,d] = vl_phow(s.I, 'color',... |
github | sunf71/Matlab-master | vl_test_kmeans.m | .m | Matlab-master/cvpr14_SPHP_code/vlfeat-0.9.14/toolbox/xtest/vl_test_kmeans.m | 2,788 | utf_8 | 14374b7dbae832fc3509e02caf00cdf5 | function results = vl_test_kmeans(varargin)
% VL_TEST_KMEANS
% 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 ;
function s = setup()
randn('sta... |
github | sunf71/Matlab-master | vl_test_imarray.m | .m | Matlab-master/cvpr14_SPHP_code/vlfeat-0.9.14/toolbox/xtest/vl_test_imarray.m | 795 | utf_8 | c5e6a5aa8c2e63e248814f5bd89832a8 | function results = vl_test_imarray(varargin)
% VL_TEST_IMARRAY
vl_test_init ;
function test_movie_rgb(s)
A = rand(23,15,3,4) ;
B = vl_imarray(A,'movie',true) ;
function test_movie_indexed(s)
cmap = get(0,'DefaultFigureColormap') ;
A = uint8(size(cmap,1)*rand(23,15,4)) ;
A = min(A,size(cmap,1)-1) ;
B = vl_imarray(A,'m... |
github | sunf71/Matlab-master | vl_test_homkermap.m | .m | Matlab-master/cvpr14_SPHP_code/vlfeat-0.9.14/toolbox/xtest/vl_test_homkermap.m | 1,903 | utf_8 | c157052bf4213793a961bde1f73fb307 | function results = vl_test_homkermap(varargin)
% VL_TEST_HOMKERMAP
vl_test_init ;
function check_ker(ker, n, window, period)
args = {n, ker, 'window', window} ;
if nargin > 3
args = {args{:}, 'period', period} ;
end
x = [-1 -.5 0 .5 1] ;
y = linspace(0,2,100) ;
for conv = {@single, @double}
x = feval(conv{1}, x) ;... |
github | sunf71/Matlab-master | vl_test_slic.m | .m | Matlab-master/cvpr14_SPHP_code/vlfeat-0.9.14/toolbox/xtest/vl_test_slic.m | 229 | utf_8 | 42c827b383cca74cae2540e5da870bbf | function results = vl_test_slic(varargin)
% VL_TEST_SLIC
vl_test_init ;
function s = setup()
s.im = im2single(imread(fullfile(vl_root,'data','a.jpg'))) ;
function test_slic(s)
segmentation = vl_slic(s.im, 10, 0.1, 'verbose') ;
|
github | sunf71/Matlab-master | vl_test_imdisttf.m | .m | Matlab-master/cvpr14_SPHP_code/vlfeat-0.9.14/toolbox/xtest/vl_test_imdisttf.m | 1,885 | utf_8 | ae921197988abeb984cbcdf9eaf80e77 | function results = vl_test_imdisttf(varargin)
% VL_TEST_DISTTF
vl_test_init ;
function test_basic()
for conv = {@single, @double}
conv = conv{1} ;
I = conv([0 0 0 ; 0 -2 0 ; 0 0 0]) ;
D = vl_imdisttf(I);
assert(isequal(D, conv(- [0 1 0 ; 1 2 1 ; 0 1 0]))) ;
I(2,2) = -3 ;
[D,map] = vl_imdisttf(I) ;
asse... |
github | sunf71/Matlab-master | vl_test_argparse.m | .m | Matlab-master/cvpr14_SPHP_code/vlfeat-0.9.14/toolbox/xtest/vl_test_argparse.m | 795 | utf_8 | e72185b27206d0ee1dfdc19fe77a5be6 | function results = vl_test_argparse(varargin)
% VL_TEST_ARGPARSE
vl_test_init ;
function test_basic()
opts.field1 = 1 ;
opts.field2 = 2 ;
opts.field3 = 3 ;
opts_ = opts ;
opts_.field1 = 3 ;
opts_.field2 = 10 ;
opts = vl_argparse(opts, {'field2', 10, 'field1', 3}) ;
assert(isequal(opts, opts_)) ;
opts_.field1 = 9 ;
... |
github | sunf71/Matlab-master | vl_test_binsearch.m | .m | Matlab-master/cvpr14_SPHP_code/vlfeat-0.9.14/toolbox/xtest/vl_test_binsearch.m | 1,339 | utf_8 | 85dc020adce3f228fe7dfb24cf3acc63 | function results = vl_test_binsearch(varargin)
% VL_TEST_BINSEARCH
vl_test_init ;
function test_inf_bins()
x = [-inf -1 0 1 +inf] ;
vl_assert_equal(vl_binsearch([], x), [0 0 0 0 0]) ;
vl_assert_equal(vl_binsearch([-inf 0], x), [1 1 2 2 2]) ;
vl_assert_equal(vl_binsearch([-inf], x), [1 1 1 1 1]) ;
vl_a... |
github | sunf71/Matlab-master | vl_plotframe.m | .m | Matlab-master/cvpr14_SPHP_code/vlfeat-0.9.14/toolbox/plotop/vl_plotframe.m | 5,410 | utf_8 | 8c48bac1c5d80dba361b67cd135103d9 | function h=vl_plotframe(frames,varargin)
% VL_PLOTFRAME Plot feature frame
% VL_PLOTFRAME(FRAME) plots the frames FRAME. Frames are attributed
% image regions (as, for example, extracted by a feature detector). A
% frame is a vector of D=2,3,..,6 real numbers, depending on its
% class. VL_PLOTFRAME() supports the... |
github | sunf71/Matlab-master | vl_roc.m | .m | Matlab-master/cvpr14_SPHP_code/vlfeat-0.9.14/toolbox/plotop/vl_roc.m | 6,848 | utf_8 | 3d7ed746da2d3f389ad56c8e36f006d7 | function [tpr,tnr,info] = vl_roc(labels, scores, varargin)
% VL_ROC Compute ROC curve
% [TP,TN] = VL_ROC(LABELS, SCORES) computes the receiver operating
% characteristic (ROC curve). LABELS are the ground thruth labels (+1
% or -1) and SCORE is the scores assigned to them by a classifier
% (higher scores correspond... |
github | sunf71/Matlab-master | vl_click.m | .m | Matlab-master/cvpr14_SPHP_code/vlfeat-0.9.14/toolbox/plotop/vl_click.m | 2,661 | utf_8 | 6982e869cf80da57fdf68f5ebcd05a86 | function P = vl_click(N,varargin) ;
% VL_CLICK Click a point
% P=VL_CLICK() let the user click a point in the current figure and
% returns its coordinates in P. P is a two dimensiona vectors where
% P(1) is the point X-coordinate and P(2) the point Y-coordinate. The
% user can abort the operation by pressing any k... |
github | sunf71/Matlab-master | vl_ubcread.m | .m | Matlab-master/cvpr14_SPHP_code/vlfeat-0.9.14/toolbox/sift/vl_ubcread.m | 3,015 | utf_8 | e8ddd3ecd87e76b6c738ba153fef050f | function [f,d] = vl_ubcread(file, varargin)
% SIFTREAD Read Lowe's SIFT implementation data files
% [F,D] = VL_UBCREAD(FILE) reads the frames F and the descriptors D
% from FILE in UBC (Lowe's original implementation of SIFT) format
% and returns F and D as defined by VL_SIFT().
%
% VL_UBCREAD(FILE, 'FORMAT', '... |
github | sunf71/Matlab-master | vl_plotsiftdescriptor.m | .m | Matlab-master/cvpr14_SPHP_code/vlfeat-0.9.14/toolbox/sift/vl_plotsiftdescriptor.m | 4,348 | utf_8 | b9a98b0c298fa249fb5fcd1314762b88 | function h=vl_plotsiftdescriptor(d,f,varargin)
% VL_PLOTSIFTDESCRIPTOR Plot SIFT descriptor
% VL_PLOTSIFTDESCRIPTOR(D) plots the SIFT descriptors D, stored as
% columns of the matrix D. D has the same format used by VL_SIFT().
%
% VL_PLOTSIFTDESCRIPTOR(D,F) plots the SIFT descriptors warped to
% the SIFT fram... |
github | sunf71/Matlab-master | vl_test_twister.m | .m | Matlab-master/cvpr14_SPHP_code/vlfeat-0.9.14/toolbox/test/vl_test_twister.m | 1,166 | utf_8 | 1e18a0b343ffe164ec9c941e18575c05 | function vl_test_twister
% VL_TEST_TWISTER
% test seed by scalar
rand('twister',1) ; a = rand ;
vl_twister('state',1) ; b = vl_twister ;
check(a,b,'twister: seed by scalar + VL_TWISTER()') ;
% read state
rand('twister') ; a = rand('twister') ;
vl_twister('state') ; b = vl_twister('state') ;
check(a,b,'twister: read s... |
github | sunf71/Matlab-master | vl_test_imintegral.m | .m | Matlab-master/cvpr14_SPHP_code/vlfeat-0.9.14/toolbox/test/vl_test_imintegral.m | 1,257 | utf_8 | d5ad8d073e99ff451cc1b692da99ec6d | function vl_test_imintegral
I = ones(5,6);
correct = [1 2 3 4 5 6;
2 4 6 8 10 12;
3 6 9 12 15 18;
4 8 12 16 20 24;
5 10 15 20 25 30;];
if ~all(all(slow_imintegral(I) == correct))
fpri... |
github | sunf71/Matlab-master | vl_test_sift.m | .m | Matlab-master/cvpr14_SPHP_code/vlfeat-0.9.14/toolbox/test/vl_test_sift.m | 1,849 | utf_8 | cfae71614a40aebf645eb42102ca53f3 | function vl_test_sift
% VL_TEST_SIFT Test VL_SIFT implementation(s)
I = vl_test_pattern(101);
% run various instances of the code
[a0,b0] = vl_sift(single(I),'verbose','peaktresh',0,'levels',4) ;
[a1,b1] = cmd_sift(I,'--first-octave=0 --peak-tresh=0 --levels=4') ;
[a2,b2] = cmd_sift(I,'--first-octave=0',1) ;
[a3,... |
github | sunf71/Matlab-master | vl_test_binsum.m | .m | Matlab-master/cvpr14_SPHP_code/vlfeat-0.9.14/toolbox/test/vl_test_binsum.m | 1,030 | utf_8 | c69da861d697e8228e243a385f5ba545 | function vl_test_binsum
% VL_TEST_BINSUM Test VL_BINSUM function
testh({[0 0], 1, 2}, [0 1] ) ;
testh({[1 7], -1, 1}, [0 7] ) ;
testh({[1 7], -1, [1 2 2 2 2 2 2 2]}, [0 0] ) ;
testh({eye(3), [1 1 1], [1 2 3], 1 }, 2*eye(3)) ;
testh({eye(3), [1 1 1]', [1 2 3]', 2 }, 2*eye... |
github | sunf71/Matlab-master | vl_test_imsmooth.m | .m | Matlab-master/cvpr14_SPHP_code/vlfeat-0.9.14/toolbox/test/vl_test_imsmooth.m | 1,566 | utf_8 | 27ae6791e4ca852539a031b78ae7a00b | function vl_test_imsmooth
I = im2double(imread('data/spots.jpg')) ;
I = max(min(imresize(I,2),1),0) ;
I = single(I) ;
global fign ;
fign = 1 ;
step = 1 ;
ker = 'gaussian' ;
testmany(I,'triangular',1) ;
testmany(I,'triangular',2) ;
testmany(I,'gaussian',1) ;
testmany(I,'gaussian',2) ;
function testmany(I,ker,step)... |
github | sunf71/Matlab-master | vl_test_hikmeans.m | .m | Matlab-master/cvpr14_SPHP_code/vlfeat-0.9.14/toolbox/test/vl_test_hikmeans.m | 2,037 | utf_8 | f57532e5de667fbe2f6cb9c714f20457 | function vl_test_hikmeans
% VL_TEST_HIKMEANS Test VL_HIKMEANS function
K = 2;
nleaves = 2;
data = uint8(rand(2,100)*255);
[tree,A] = vl_hikmeans(data,K,nleaves,'verbose','verbose');
%keyboard;
K = 3 ;
nleaves = 100 ;
data = uint8(rand(2,1000) * 255) ;
datat = uint8(rand(2,10000)* 255) ;
[... |
github | sunf71/Matlab-master | vl_test_homkmap.m | .m | Matlab-master/cvpr14_SPHP_code/vlfeat-0.9.14/toolbox/test/vl_test_homkmap.m | 1,493 | utf_8 | a78c933efd15a4279e2724ba4441ad76 | function vl_test_homkmap
x = 2.^(-12:.1:0) ;
L = .3 ;
n = 4 ;
V = vl_homkmap(x, n, L, 'kchi2') ;
V_ = featureMap('chi2', n, L, x, 1) ;
V
V_
figure(1) ; clf ;
subplot(1,2,1) ;
semilogx(x,V_','-') ; hold on ;
semilogy(x,V','--') ;
subplot(1,2,2);
plot(x,V_','-') ; hold on ;
plot(x,V','--') ;
function psi = feat... |
github | sunf71/Matlab-master | vl_test_aibhist.m | .m | Matlab-master/cvpr14_SPHP_code/vlfeat-0.9.14/toolbox/test/vl_test_aibhist.m | 2,263 | utf_8 | d46c6fa557ab0d00e465eaedd060add9 | % VL_TEST_AIBHIST
function vl_test_aibhist
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 ;
C = 1:K*K ;
Pcx = zeros(3,K*K) ;
f1 = quantize(X1,D,K) ;
f2 = quantize(X2,D,K) ;... |
github | sunf71/Matlab-master | vl_test_ikmeans.m | .m | Matlab-master/cvpr14_SPHP_code/vlfeat-0.9.14/toolbox/test/vl_test_ikmeans.m | 1,552 | utf_8 | 1d5747a991a0d81ed4f7a2c90cd2a213 | function vl_test_ikmeans
% VL_TEST_IKMEANS Test VL_IKMEANS function
fprintf('test_ikmeans: Testing VL_IKMEANS and IKMEANSPUSH\n')
% -----------------------------------------------------------------------
fprintf('test_ikmeans: Testing Lloyd algorithm\n')
K = 3 ;
data = uint8(rand(2,1000) * 255) ;
datat = ... |
github | sunf71/Matlab-master | phow_caltech101.m | .m | Matlab-master/cvpr14_SPHP_code/vlfeat-0.9.14/apps/phow_caltech101.m | 11,269 | utf_8 | 91ef403a7a3865b32e7a5673350fec49 | function phow_caltech101
% PHOW_CALTECH101 Image classification in the Caltech-101 dataset
% This program demonstrates how to use VLFeat to construct an image
% classifier on the Caltech-101 data. The classifier uses PHOW
% features (dense SIFT), spatial histograms of visual words, and a
% Chi2 SVM. To speedup ... |
github | sunf71/Matlab-master | sift_mosaic.m | .m | Matlab-master/cvpr14_SPHP_code/vlfeat-0.9.14/apps/sift_mosaic.m | 4,621 | utf_8 | 8fa3ad91b401b8f2400fb65944c79712 | function mosaic = sift_mosaic(im1, im2)
% SIFT_MOSAIC Demonstrates matching two images using SIFT and RANSAC
%
% SIFT_MOSAIC demonstrates matching two images based on SIFT
% features and RANSAC and computing their mosaic.
%
% SIFT_MOSAIC by itself runs the algorithm on two standard test
% images. Use SIFT_MOSAI... |
github | sunf71/Matlab-master | homography.m | .m | Matlab-master/homography/homography.m | 46,419 | utf_8 | ea5a2e0f8ec2605040158992f3ea3c24 | function [ h wim1 ] = homography( i1, i2)
% This function estimates 2D-2D plane projective homography between two
% perspective images using Direct Linear Transformation, RANSAC
% and Levenberg Marquardt optimisation.
% The format for calling upon the function is as follows:
%
% [h wim] = homography(im1, im2);
% ... |
github | sunf71/Matlab-master | dlt_test.m | .m | Matlab-master/homography/dlt_test.m | 5,321 | utf_8 | c951e83392abcd9944e45525b7e18897 | function dlt_demo
% This function is another tutorial on how to do computer vision
% type stuff with Octave/Matlab. It shows how to implement
% Hartley and Zisserman's "DLT" algorithm for estimating a homography
% from point correspondences. It also shows how to test an algorithm
% using randomly-generated synthetic... |
github | sunf71/Matlab-master | QC_signatures.m | .m | Matlab-master/QC/QC_signatures.m | 4,365 | utf_8 | f04870a73e5c0cb3b6f451f4b7fa6998 | % [dist]= QC_signatures(PF, QF, PW, QW, F_sim, m)
%
% Computes the Quadratic-Chi (QC) histogram distance between two
% signatures (a convenient representation for sparse histograms).
% QC distances are Quadratic-Form distances with a cross-bin
% chi-squared-like normalization. This normalization reduces the effect of
... |
github | sunf71/Matlab-master | PlotExampleResults.m | .m | Matlab-master/CSH_code_v2/PlotExampleResults.m | 7,200 | utf_8 | 61ae360244ca01264d016e0f908ff366 | % Plot error image of mapping
function [errImg, CSH_MeansRMS] = PlotExampleResults(A,B,CSH_Mapping,width,K_of_KNN,bMask,experimentName,patch_mode,A_patch,B_patch,patch_params,interactive,...
compensateOrientations,winnerOrientations_A,winnerOrientations_B,A_pa... |
github | sunf71/Matlab-master | imshow2.m | .m | Matlab-master/CSH_code_v2/matlab/General/imshow2.m | 828 | utf_8 | d8ed2cbe940d7d5fc6aee62cdc3fde80 | function imshow2(img1,img2,img3,img4,img5,img6,img7,img8,img9,img10)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
[h,w] = FindClosestMultiple(nargin);
H = num2str(h); W = num2str(w);
figure;
handles = [];
sameSize = 1;
for i = 1 : nargin
I = num2str(i);
str = ['h',I,' = subplot(',H,',',W,',',I,'); imshow(im... |
github | sunf71/Matlab-master | imagesc2scaled.m | .m | Matlab-master/CSH_code_v2/matlab/General/imagesc2scaled.m | 1,092 | utf_8 | 941fba2530e77ea26a62a2a34dac8e8a | function imagesc2scaled(img1,img2,img3,img4,img5,img6,img7,img8,img9,img10)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
[h,w] = FindClosestMultiple(nargin);
H = num2str(h); W = num2str(w);
topLimit = 2^30;
bottomLimit = -1^30;
for i = 1 : nargin
I = num2str(i);
str = ['[pctiles_1_99] = prctile(double(i... |
github | sunf71/Matlab-master | imagesc2.m | .m | Matlab-master/CSH_code_v2/matlab/General/imagesc2.m | 1,077 | utf_8 | 7f3f6bdb113bfc6439c8d69d935f10e0 | function imagesc2(img1,img2,img3,img4,img5,img6,img7,img8,img9,img10)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
[h,w] = FindClosestMultiple(nargin);
H = num2str(h); W = num2str(w);
figure;
handles = [];
for i = 1 : nargin
I = num2str(i);
isUint8str = ['strcmp(''uint8'',class(img' I '))'];
isUint8 = e... |
github | sunf71/Matlab-master | processVideoFolder.m | .m | Matlab-master/matlab stats/processVideoFolder.m | 3,759 | utf_8 | 79120533ddcf277ca40dec84dcd8ccab | %THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
%AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
%IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
%DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
%FOR ANY D... |
github | sunf71/Matlab-master | processVideoFolderR.m | .m | Matlab-master/matlab stats/processVideoFolderR.m | 2,901 | utf_8 | 4ef4d5e5ecfdb963c022160c950c2957 | function confusionMatrix = processVideoFolderR(videoPath, binaryFolder)
% A video folder should contain 2 folders ['input', 'groundtruth']
% and the "temporalROI.txt" file to be valid. The choosen method will be
% applied to all the frames specified in \temporalROI.txt
range = readTemporalFile(videoPath)... |
github | sunf71/Matlab-master | Stats.m | .m | Matlab-master/matlab stats/Stats.m | 6,565 | utf_8 | 8ca7db2dbde913fd1f537e735aa8c934 | %THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
%AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
%IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
%DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
%FOR ANY D... |
github | sunf71/Matlab-master | processFolder.m | .m | Matlab-master/matlab stats/processFolder.m | 2,131 | utf_8 | 44bf13dc828b4f524723fe66175509fe | %THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
%AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
%IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
%DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
%FOR ANY D... |
github | sunf71/Matlab-master | filesys.m | .m | Matlab-master/matlab stats/filesys.m | 2,147 | utf_8 | acd9366ceeae88f215bb3da2b5b03a0f | %THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
%AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
%IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
%DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
%FOR ANY D... |
github | sunf71/Matlab-master | view_sp_gui.m | .m | Matlab-master/TSP_2013-06-26/gui/view_sp_gui.m | 22,872 | utf_8 | d445d10558a3e8404519fa0c616098e3 | function varargout = view_sp_gui(varargin)
% VIEW_SP_GUI MATLAB code for view_sp_gui.fig
% VIEW_SP_GUI, by itself, creates a new VIEW_SP_GUI or raises the existing
% singleton*.
%
% H = VIEW_SP_GUI returns the handle to a new VIEW_SP_GUI or the handle to
% the existing singleton*.
%
% VIEW_SP_G... |
github | sunf71/Matlab-master | computeColor.m | .m | Matlab-master/TSP_2013-06-26/util/computeColor.m | 3,142 | utf_8 | a36a650437bc93d4d8ffe079fe712901 | function img = computeColor(u,v)
% computeColor color codes flow field U, V
% According to the c++ source code of Daniel Scharstein
% Contact: schar@middlebury.edu
% Author: Deqing Sun, Department of Computer Science, Brown University
% Contact: dqsun@cs.brown.edu
% $Date: 2007-10-31 21:20:30 (Wed, 31 O... |
github | sunf71/Matlab-master | distinguishable_colors.m | .m | Matlab-master/TSP_2013-06-26/util/distinguishable_colors.m | 5,753 | utf_8 | 57960cf5d13cead2f1e291d1288bccb2 | function colors = distinguishable_colors(n_colors,bg,func)
% DISTINGUISHABLE_COLORS: pick colors that are maximally perceptually distinct
%
% When plotting a set of lines, you may want to distinguish them by color.
% By default, Matlab chooses a small set of colors and cycles among them,
% and so if you have more than ... |
github | sunf71/Matlab-master | computeColor.m | .m | Matlab-master/TSP_2013-06-26/optical_flow_celiu/computeColor.m | 3,142 | utf_8 | a36a650437bc93d4d8ffe079fe712901 | function img = computeColor(u,v)
% computeColor color codes flow field U, V
% According to the c++ source code of Daniel Scharstein
% Contact: schar@middlebury.edu
% Author: Deqing Sun, Department of Computer Science, Brown University
% Contact: dqsun@cs.brown.edu
% $Date: 2007-10-31 21:20:30 (Wed, 31 O... |
github | sunf71/Matlab-master | region_seg.m | .m | Matlab-master/regionbased_seg/regionbased_seg/region_seg.m | 6,207 | utf_8 | 0ae137cc3bd731d2ed0e435a63277aac | % Region Based Active Contour Segmentation
%
% seg = region_seg(I,init_mask,max_its,alpha,display)
%
% Inputs: I 2D image
% init_mask Initialization (1 = foreground, 0 = bg)
% max_its Number of iterations to run segmentation for
% alpha (optional) Weight of smoothing term
%... |
github | vibrationtoolbox/ovtoolbox-master | vtb7_4.m | .m | ovtoolbox-master/inst/vtb7_4.m | 3,859 | utf_8 | bb45830607a9107064a33e3020a9176e | function [z,nf,a,com]=vtb7_4(f,TF,b)
%[z,nf,a,com]=VTB7_4(f,TF) Curve fit to SDOF FRF.
% f is the frequency vector in Hz. It does not have to
% start at 0 Hz.
% TF is the complex transfer function.
% z and nf are the damping ratio and natural frequency (Hz)
% a is the product of the residues of the coordinates the ... |
github | vibrationtoolbox/ovtoolbox-master | vtb7_6.m | .m | ovtoolbox-master/inst/vtb7_6.m | 709 | utf_8 | a5deeea634698039b14fa9f2b93261d8 | function [lambda,phi]=vtb7_6(M,K,n)
% VTB7_6(M,K)
%
% [lambda,phi] = VTB7_6(M,K) produces returns the first eigenvalue
% lambda=(omega^2) and mode shape, phi using the power method.
% Copyright Joseph C. Slater, 7/14/2007
% Shift eigenvalues to allow solution for rigid body modes.
if nargin==2
n=1;
end
shift=1;... |
github | Glavin001/tutorial-haartraining-master | cmutestfacetruth.m | .m | tutorial-haartraining-master/data/CMU-MIT_Face_Test_Set/cmutestfacetruth.m | 2,288 | utf_8 | 0a0f6dd472e7e318fb283a1462edc0c6 | % cmutestfacetruth - a simple script to create a face ground truth text
% from eye, nose, lip potions' ground truth text of CMU Face Test Set
%
% Synopsis
% cmutestfacetruth(dirname, show, fprint)
%
% Input arguments
% (string) dirname directory name ('test' or 'test-low' or 'newtest')
% (bool) [show = fals... |
github | freifeld/fastSCSP-master | load_all_kernels.m | .m | fastSCSP-master/matlab/load_all_kernels.m | 2,752 | utf_8 | f6ea615fd48253071581de1744bc2ff3 | %% load all the kernels here
function [kernel_lab_to_rgb, kernel_rgb_to_lab, kernel_find_border,...
kernel_clear_fields, kernel_sum_by_label, kernel_calculate_mu_and_sigma,...
kernel_clear_fields2, kernel_sum_by_label2, kernel_calculate_mu,...
kernel_update_seg_subset, kernel_get_cartoon]...
= ... |
github | freifeld/fastSCSP-master | init_sp.m | .m | fastSCSP-master/matlab/init_sp.m | 5,955 | utf_8 | 118fefe5c4d19f58d105ea9a05e5e023 | function [sp, params, gpu_helper, option] = init_sp(dimx, dimy, nPixels_in_square_side, i_std)
sp.nPts = dimx * dimy;
sp.dim_s = 2;
sp.dim_i = 3;
sp.dimy = dimy;
sp.dimx = dimx;
%reset(gpuDevice);
sp.threads_per_block = 512;
sp.block =[sp.threads_per_block,1,1];
num_b... |
github | khaledkhairy/SPHARM_Mech-Project-master | ylk_cos_sin_dthetatheta_bosh.m | .m | SPHARM_Mech-Project-master/matlab_code/@sh_basis/ylk_cos_sin_dthetatheta_bosh.m | 1,740 | utf_8 | 8a338e0ec0c0901c6da7bd0b13ac9dc9 | function [Y_TT, P_TT] = ylk_cos_sin_dthetatheta_bosh(p, t, L_max, P_T)
%% Pre-calculate the normalized associated Legendre functions
%% up to L = L_max
gdimp = size(p,2);
gdimt = size(t,1);
if (min(size(p))==1 && max(size(t))==1),
p = p(:);
end
% t = t(:);
% Y_TT = zeros(gdimp,1, (L_max+1)^2);... |
github | khaledkhairy/SPHARM_Mech-Project-master | ylk_cos_sin_dtheta_bosh.m | .m | SPHARM_Mech-Project-master/matlab_code/@sh_basis/ylk_cos_sin_dtheta_bosh.m | 1,739 | utf_8 | f8ba04efa44342b2d389da55c6fcb380 | function [Y_T, P_T] = ylk_cos_sin_dtheta_bosh(p, t, L_max, P)
%% Pre-calculate the normalized theta derivative of associated Legendre functions
%% up to L = L_max
gdimp = length(p);
gdimt = length(t);
if (min(size(p))==1 && max(size(t))==1),
p = p(:);
end
% t = t(:);
% Y_T = zeros(gdimt,1, (L_ma... |
github | khaledkhairy/SPHARM_Mech-Project-master | write_ply.m | .m | SPHARM_Mech-Project-master/matlab_code/@surface_mesh/write_ply.m | 9,531 | utf_8 | ca04749976f0c4f5b4653af6a437ff52 | function write_ply(obj,filename)
vertex = obj.X;
face = obj.F;
if nargin<4
mode = 'ascii';
end
if size(vertex,2)~=3
vertex = vertex';
end
if size(vertex,2)~=3
error('vertex does not have correct format.');
end
if size(face,2)~=3
face = face';
end
if size(face,2)~=3
error('... |
github | khaledkhairy/SPHARM_Mech-Project-master | plot_slice_y_outer.m | .m | SPHARM_Mech-Project-master/matlab_code/@surface_mesh/plot_slice_y_outer.m | 14,283 | utf_8 | becca244a658f74c78be3980907fb6ce | function [X_in X_out F] = plot_slice_y_outer(obj, d, yval, cflag)
%% plot the sliced object
if nargin ==1, d = 1;yval = 0;cflag = 1;end
X = obj.X;
F = obj.F;
centers = [];
if nargin <4, cflag = 0;end
Fs = F;
if abs(cflag) == 1,
colordef black;
h = figure('Color', [0 0 0]);
set(h,'InvertHardcopy',... |
github | khaledkhairy/SPHARM_Mech-Project-master | optimize_on_sphere.m | .m | SPHARM_Mech-Project-master/matlab_code/@surface_mesh/optimize_on_sphere.m | 6,157 | utf_8 | 3d888d67f4d10d2b05fb597a0d564b4b | function obj = optimize_on_sphere(obj)
% optimize the t,p coordinates for mapping a surface mesh to the sphere
% We use a large scale algorithm in matlab's optimization toolbox
global itercount
% define initial quantities
X = obj.X;
F = obj.F;
t = obj.t;
p = obj.p;
Xo = [t(:);p(:)];
nvert = length(obj.X);
% ... |
github | khaledkhairy/SPHARM_Mech-Project-master | write_movie.m | .m | SPHARM_Mech-Project-master/matlab_code/@surface_mesh/write_movie.m | 3,806 | utf_8 | 5f2b1a243180c7b178c06e242ea0bfda | function write_movie(obj, nframes, filename)
%%% takes a surface mesh and rotates it in a figure recording the intermediate frames
%%% Output is an mpeg movie and two sets of movie frames in subdirectories ./tifs and ./jpgs
% Author: Khaled Khairy, January 2009
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
if nargi... |
github | khaledkhairy/SPHARM_Mech-Project-master | plot_field_alt_01.m | .m | SPHARM_Mech-Project-master/matlab_code/@shp_surface/plot_field_alt_01.m | 4,685 | utf_8 | 85d769bd669f29baa09bfbab868acbbd | function [X C sf Y1 Y2] = plot_field(obj, nico, nsf, subflag, Y1, Y2)
% subflag =1 means we use icosahedron subdivision
% subflag =0 means uniform random points (nico is used as dim in this case
% nsf can be the index of the required existing field
% or a sh_surface object
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%... |
github | khaledkhairy/SPHARM_Mech-Project-master | nocs2bosh.m | .m | SPHARM_Mech-Project-master/matlab_code/@shp_surface/nocs2bosh.m | 1,005 | utf_8 | f4778e76fd160d7ac978acbfd814d376 | function S_tr = nocs2bosh(S)
%%% convert the "new" CLKs to the old ones
%%% nocs2cs stands for conversion from coefficients that were calculated
%%% whithout the use of the Condon-Shortly phase factor to coefficients
%%% with. The conversion is necessary for compliance with the
%%% derivatives of the basis functio... |
github | khaledkhairy/SPHARM_Mech-Project-master | nocs2cs.m | .m | SPHARM_Mech-Project-master/matlab_code/@shp_surface/nocs2cs.m | 1,117 | utf_8 | 55fcb22eef04044c33af4006cdbf9c71 | function S_tr = nocs2cs(S)
%%% convert the "new" CLKs to the old ones
%%% nocs2cs stands for conversion from coefficients that were calculated
%%% whithout the use of the Condon-Shortly phase factor to coefficients
%%% with. The conversion is necessary for compliance with the
%%% derivatives of the basis functions... |
github | khaledkhairy/SPHARM_Mech-Project-master | plot_field.m | .m | SPHARM_Mech-Project-master/matlab_code/@shp_surface/plot_field.m | 4,736 | utf_8 | d3004f42f391d076b2d3b32e58ca7894 | function [X C sf Y1 Y2] = plot_field(obj, nico, nsf, subflag, Y1, Y2)
% subflag =1 means we use icosahedron subdivision
% subflag =0 means uniform random points (nico is used as dim in this case
% nsf can be the index of the required existing field
% or a sh_surface object
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%... |
github | khaledkhairy/SPHARM_Mech-Project-master | cs2nocs.m | .m | SPHARM_Mech-Project-master/matlab_code/@shp_surface/cs2nocs.m | 1,286 | utf_8 | dafbfbe798cb55bc6243c6743bce9d82 | function S_tr = cs2nocs(S)
%%% convert the "old" CLKs to the new ones
%%% cs2nocs stands for conversion from coefficients that were calculated
%%% whith the use of the Condon-Shortly phase factor to coefficients
%%% without. The conversion is necessary for compliance with the
%%% derivatives of the basis functions... |
github | khaledkhairy/SPHARM_Mech-Project-master | plot_shps.m | .m | SPHARM_Mech-Project-master/matlab_code/@shp_surface/plot_shps.m | 2,918 | utf_8 | 63903be96122f93c45160026cd2f6f33 | function [X C] = plot_shps(obj, nico, option)
%
% USAGE: S is n x m where n is the number of shapes and m is dimension
% along which the coefficients are stored (i.e. 3 x that for each
% coordinate).
% option: 'red' 'blue' 'volume' 'area' 'random'
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%... |
github | khaledkhairy/SPHARM_Mech-Project-master | r_inv.m | .m | SPHARM_Mech-Project-master/matlab_code/@shp_surface/r_inv.m | 11,118 | utf_8 | 3a468a74d90daf1012810f338dc4716a | function obj = r_inv(obj)
%%% Calculate the Euler angles a,b,g needed for a rotational invariant shape description of X_o shape.
%%% Uses:
%%% get_xyz_clks, rotate_x_shp, rotate_z_shp,
%%% parametric_rotation_objective
%%% Author: Khaled Khairy
%%% To do: Compare this (slow) method with Brechbueh... |
github | khaledkhairy/SPHARM_Mech-Project-master | plot_pretty_H.m | .m | SPHARM_Mech-Project-master/matlab_code/@shp_surface/plot_pretty_H.m | 12,944 | utf_8 | 5bab22d44e782f9161187b759d797b4c | function [X C t p Y1] = plot_pretty_H(obj, nico, option,Y1)
%
% USAGE: S is n x m where n is the number of shapes and m is dimension
% along which the coefficients are stored (i.e. 3 x that for each
% coordinate).
% option: 'red' 'blue' 'volume' 'area' 'random'
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%... |
github | khaledkhairy/SPHARM_Mech-Project-master | bosh2nocs.m | .m | SPHARM_Mech-Project-master/matlab_code/@shp_surface/bosh2nocs.m | 1,167 | utf_8 | 3e8ec1868745f56567293b329ab6ed84 | function S_tr = bosh2nocs(S)
%%% convert the "new" CLKs to the old ones
%%% nocs2cs stands for conversion from coefficients that were calculated
%%% whithout the use of the Condon-Shortly phase factor to coefficients
%%% with. The conversion is necessary for compliance with the
%%% derivatives of the basis functio... |
github | khaledkhairy/SPHARM_Mech-Project-master | plot_pretty.m | .m | SPHARM_Mech-Project-master/matlab_code/@shp_surface/plot_pretty.m | 3,318 | utf_8 | 1828db9dead5db7c16ae37ee8561cd75 | function [X C t p] = plot_pretty(obj, nico, option)
%
% USAGE: S is n x m where n is the number of shapes and m is dimension
% along which the coefficients are stored (i.e. 3 x that for each
% coordinate).
% option: 'red' 'blue' 'volume' 'area' 'random'
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%... |
github | khaledkhairy/SPHARM_Mech-Project-master | self_intersection.m | .m | SPHARM_Mech-Project-master/matlab_code/@shp_surface/self_intersection.m | 8,871 | utf_8 | 7e29dfcefd60e4302191fab1983493db | function [res TP] = self_intersection(obj, nico, TP)
%% detect self-intersection based on intersection of triangles (Moeller method)
%% run with two arguments to generate a database
%% run with three to use an existing TP
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
if nargin == 1, nico = 3;end
res = 1; % defa... |
github | khaledkhairy/SPHARM_Mech-Project-master | get_mesh.m | .m | SPHARM_Mech-Project-master/matlab_code/@shp_surface/get_mesh.m | 2,788 | utf_8 | 726b73855dc4af6ca3f4a83e0fa4e457 | function [XF X C Y_LK_out t p] = get_mesh(obj, nico, Y_LK_in, C)
%
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
persistent Y_LK
if nargin == 1, nico = 3;end
obj = obj.update;
%% using subdivisions of icosahedron
%if nico > 6, nico = 6; disp(['Icosahedron subdivision: ' num2str(nico)]);... |
github | jlack1987/MPC_Momentum_OneLegBalance-master | generateComHeightDynamics.m | .m | MPC_Momentum_OneLegBalance-master/generateComHeightDynamics.m | 1,163 | utf_8 | 7a103e7d3aed573eefe3b5313774a016 | function dynamics = generateComHeightDynamics(dynamics,constants)
doConstantComHeight = true;
if(doConstantComHeight)
% Constant COM Height Trajectory
z = ones(constants.N+1,1)*constants.initialCenterOfMassHeight;
zddot = zeros(constants.N+1,1);
else
z = zeros(constants.N+1,1);
zddot = zeros(constants.... |
github | jlack1987/MPC_Momentum_OneLegBalance-master | computeCost.m | .m | MPC_Momentum_OneLegBalance-master/computeCost.m | 1,128 | utf_8 | 592920f5c03c87d703d1750b0565f748 |
function [H,f] = computeCost(dynamics,gait,constants)
uSize = size(dynamics.PcopU,2);
eyeCmpDotU = zeros(uSize,uSize);
eyeLddotU = zeros(uSize,uSize);
for i = 1:uSize
if(mod(i,2)==0)
eyeCmpDotU(i,i) = 1;
else
eyeLddotU(i,i) = 1;
end
end
Hfcn = @(LdotU,PcopU,a,b,c,d) ...
eye(size(LdotU,... |
github | jlack1987/MPC_Momentum_OneLegBalance-master | make_plots.m | .m | MPC_Momentum_OneLegBalance-master/make_plots.m | 3,076 | utf_8 | e1959adeeb76afd8905f61308bbe1123 | function make_plots(robot,gait,dynamics,constants)
f1=figure(1);clf
set(f1,'Position',[100,100,800,500]);
plotFeet(robot,gait);
plotCOPs(gait);
plot3(gait.comX,gait.comY,dynamics.z,'-r','LineWidth',3);
hold on
plot3(gait.copX,gait.copY,zeros(size(gait.copX)),'-b','LineWidth',3);
hold on
plot3(gait.cmpX,gait.cmpY,zeros... |
github | twotreeszf/shadowsocks-iOS-master | PTPacServer.m | .m | shadowsocks-iOS-master/ShadowWeb/PacServer/PTPacServer.m | 2,562 | utf_8 | c1a3a3b44e7a852d9cc820bb97a92831 | //
// PacServer.m
// PrettyTunnel
//
// Created by zhang fan on 14/12/2.
//
//
#import "PTPacServer.h"
#import "ErrorCheck.h"
#import "../../GCDWebServer/Core/GCDWebServer.h"
#import "../../GCDWebServer/Core/GCDWebServerConnection.h"
#import "../../GCDWebServer/Responses/GCDWebServerDataResponse.h"
#import "../../G... |
github | guglu/ppf-matching-master | PPF3DDetector.m | .m | ppf-matching-master/ppf/PPF3DDetector.m | 22,433 | utf_8 | f18dde5d21ddb238b348ac55e94bbe70 | classdef PPF3DDetector < handle
% PPF3DDetector The detector class
% The detector is first initialized, then trained on particular model
% using method trainModel. The detection is performed by passing the
% scene to the method match.
properties (SetAccess = private)
samplingRe... |
github | guglu/ppf-matching-master | avg_quaternion_markley.m | .m | ppf-matching-master/ppf/avg_quaternion_markley.m | 568 | utf_8 | 41cfe843f400f6a228f81e99ec34629c |
% by Tolga Birdal
% Q is an Mx4 matrix of quaternions. Qavg is the average quaternion
% Based on
% Markley, F. Landis, Yang Cheng, John Lucas Crassidis, and Yaakov Oshman.
% "Averaging quaternions." Journal of Guidance, Control, and Dynamics 30,
% no. 4 (2007): 1193-1197.
function [Qavg]=avg_quaternion_markley(Q)
... |
github | guglu/ppf-matching-master | pc2img.m | .m | ppf-matching-master/ppf/pc2img.m | 6,082 | utf_8 | 8bebd0336afee45cb814ed1c89c76167 | function pc2img(filename,scene, model, varargin)
% project scene and model into the image file
%
% left half of the image is the scene, the right half of the image is model
% in detected pose
%
% if fourth argument provided, voters are also plotted
% reference points are depicted in red, paired points in green
% "dark... |
github | guglu/ppf-matching-master | loadPLY.m | .m | ppf-matching-master/ppf/loadPLY.m | 2,101 | utf_8 | 12d0fc19c22b34babc421f2be901d179 | function mesh = loadPLY(fileName, skipNormals)
% load point cloud from the ply file
if nargin > 1
skipNormals = true;
else
skipNormals = false;
end
fid = fopen(fileName,'r');
tline = fgets(fid);
vertex=0;
cols=0;
vertexEntered = false;
if skipNormals
expectedIndexes = zeros(1,3);
else
expectedIndex... |
github | CVML/mcg-master | build.m | .m | mcg-master/benchmark/build.m | 2,588 | utf_8 | 4796fe7c4162fc657ecc16895e3cd7a3 | % ------------------------------------------------------------------------
% Copyright (C)
% Universitat Politecnica de Catalunya BarcelonaTech (UPC) - Spain
% University of California Berkeley (UCB) - USA
%
% Jordi Pont-Tuset <jordi.pont@upc.edu>
% Pablo Arbelaez <arbelaez@berkeley.edu>
% June 2014
% ---------... |
github | CVML/mcg-master | root_dir.m | .m | mcg-master/benchmark/root_dir.m | 882 | utf_8 | f31fb7e3e1ed235a2081cf64b1b81b9e | % ------------------------------------------------------------------------
% Copyright (C)
% Universitat Politecnica de Catalunya BarcelonaTech (UPC) - Spain
% University of California Berkeley (UCB) - USA
%
% Jordi Pont-Tuset <jordi.pont@upc.edu>
% Pablo Arbelaez <arbelaez@berkeley.edu>
% June 2014
% ---------... |
github | CVML/mcg-master | get_image.m | .m | mcg-master/benchmark/datasets/get_image.m | 2,012 | utf_8 | 55847758162f1062daf7cd0e3976d038 | % ------------------------------------------------------------------------
% Copyright (C)
% Universitat Politecnica de Catalunya BarcelonaTech (UPC) - Spain
% University of California Berkeley (UCB) - USA
%
% Jordi Pont-Tuset <jordi.pont@upc.edu>
% Pablo Arbelaez <arbelaez@berkeley.edu>
% June 2014
% ---------... |
github | CVML/mcg-master | database_ids.m | .m | mcg-master/benchmark/datasets/database_ids.m | 972 | utf_8 | e0364e977e88995d1760a588f94e3bb9 | % ------------------------------------------------------------------------
% Copyright (C)
% Universitat Politecnica de Catalunya BarcelonaTech (UPC) - Spain
% University of California Berkeley (UCB) - USA
%
% Jordi Pont-Tuset <jordi.pont@upc.edu>
% Pablo Arbelaez <arbelaez@berkeley.edu>
% June 2014
% ---------... |
github | CVML/mcg-master | database_root_dir.m | .m | mcg-master/benchmark/datasets/database_root_dir.m | 1,190 | utf_8 | 3f95f4cb84c0565d2ecf8700ad262392 | % ------------------------------------------------------------------------
% Copyright (C)
% Universitat Politecnica de Catalunya BarcelonaTech (UPC) - Spain
% University of California Berkeley (UCB) - USA
%
% Jordi Pont-Tuset <jordi.pont@upc.edu>
% Pablo Arbelaez <arbelaez@berkeley.edu>
% June 2014
% ---------... |
github | CVML/mcg-master | get_ground_truth.m | .m | mcg-master/benchmark/datasets/get_ground_truth.m | 4,502 | utf_8 | 8d9696fbd47ef8cf1fce38f12714a0bd | % ------------------------------------------------------------------------
% Copyright (C)
% Universitat Politecnica de Catalunya BarcelonaTech (UPC) - Spain
% University of California Berkeley (UCB) - USA
%
% Jordi Pont-Tuset <jordi.pont@upc.edu>
% Pablo Arbelaez <arbelaez@berkeley.edu>
% June 2014
% ---------... |
github | CVML/mcg-master | eval_parallel.m | .m | mcg-master/benchmark/src/segmented/eval_parallel.m | 2,551 | utf_8 | f1c8a142b96896ce696838c308c56c5f | % ------------------------------------------------------------------------
% Copyright (C)
% Universitat Politecnica de Catalunya BarcelonaTech (UPC) - Spain
% University of California Berkeley (UCB) - USA
%
% Jordi Pont-Tuset <jordi.pont@upc.edu>
% Pablo Arbelaez <arbelaez@berkeley.edu>
% June 2014
% ---------... |
github | CVML/mcg-master | eval_one.m | .m | mcg-master/benchmark/src/segmented/eval_one.m | 2,949 | utf_8 | 41359f06b29ab4ae9409f314b5167457 |
function [jaccards,inters,false_pos,false_neg,true_areas] = eval_one(proposals, ground_truth)
n_objs = length(ground_truth.masks);
% Store true_areas
true_areas = zeros(n_objs,1);
for kk=1:n_objs
true_areas(kk) = sum(ground_truth.masks{kk}(:));
end
% Which type of result are we eval... |
github | CVML/mcg-master | eval_proposals.m | .m | mcg-master/benchmark/src/segmented/eval_proposals.m | 5,651 | utf_8 | 8162d096475b209f13abd9b9258e6ec8 | % ------------------------------------------------------------------------
% Copyright (C)
% Universitat Politecnica de Catalunya BarcelonaTech (UPC) - Spain
% University of California Berkeley (UCB) - USA
%
% Jordi Pont-Tuset <jordi.pont@upc.edu>
% Pablo Arbelaez <arbelaez@berkeley.edu>
% June 2014
% ---------... |
github | CVML/mcg-master | eval_boxes_parallel.m | .m | mcg-master/benchmark/src/boxes/eval_boxes_parallel.m | 4,110 | utf_8 | 27f551e7e340692d64f444db157a3aba | % ------------------------------------------------------------------------
% Copyright (C)
% Universitat Politecnica de Catalunya BarcelonaTech (UPC) - Spain
% University of California Berkeley (UCB) - USA
%
% Jordi Pont-Tuset <jordi.pont@upc.edu>
% Pablo Arbelaez <arbelaez@berkeley.edu>
% June 2014
% ---------... |
github | CVML/mcg-master | eval_boxes.m | .m | mcg-master/benchmark/src/boxes/eval_boxes.m | 3,367 | utf_8 | 5b81b91ebad1c1c99f553b26e29af2cc | % ------------------------------------------------------------------------
% Copyright (C)
% Universitat Politecnica de Catalunya BarcelonaTech (UPC) - Spain
% University of California Berkeley (UCB) - USA
%
% Jordi Pont-Tuset <jordi.pont@upc.edu>
% Pablo Arbelaez <arbelaez@berkeley.edu>
% June 2014
% ---------... |
github | CVML/mcg-master | labels2boxes.m | .m | mcg-master/benchmark/src/boxes/labels2boxes.m | 1,327 | utf_8 | 5f88e7664f04b50897f52dc5eda236d5 | % ------------------------------------------------------------------------
% Copyright (C)
% Universitat Politecnica de Catalunya BarcelonaTech (UPC) - Spain
% University of California Berkeley (UCB) - USA
%
% Jordi Pont-Tuset <jordi.pont@upc.edu>
% Pablo Arbelaez <arbelaez@berkeley.edu>
% June 2014
% ---------... |
github | CVML/mcg-master | write_boxes_to_file.m | .m | mcg-master/benchmark/src/aux/write_boxes_to_file.m | 1,270 | utf_8 | 50744aa7a28b20142a2cb2d9d6ce63a5 | % ------------------------------------------------------------------------
% Copyright (C)
% Universitat Politecnica de Catalunya BarcelonaTech (UPC) - Spain
% University of California Berkeley (UCB) - USA
%
% Jordi Pont-Tuset <jordi.pont@upc.edu>
% Pablo Arbelaez <arbelaez@berkeley.edu>
% June 2014
% ---------... |
github | CVML/mcg-master | write_to_file.m | .m | mcg-master/benchmark/src/aux/write_to_file.m | 1,336 | utf_8 | 79f2a8aab720a2e21b8a7288daf76106 | % ------------------------------------------------------------------------
% Copyright (C)
% Universitat Politecnica de Catalunya BarcelonaTech (UPC) - Spain
% University of California Berkeley (UCB) - USA
%
% Jordi Pont-Tuset <jordi.pont@upc.edu>
% Pablo Arbelaez <arbelaez@berkeley.edu>
% June 2014
% ---------... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.