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 | ajeet-ujjwal/Character-Segmentation-of-Handwritten-Text-master | Line_Segmentation.m | .m | Character-Segmentation-of-Handwritten-Text-master/Line_Segmentation.m | 820 | utf_8 | 5394e183683fb0fb20d38be09673b985 | %LINE SEGMENTATION
function [ Line_Matrix ] = Line_Segmentalion( Binarized_Image )
Column_Count = sum(Binarized_Image,2);
Is_White = Column_Count ~= 0;
Difference = diff(Is_White);
Points_Of_Change = find(Difference);
Number_Of_Lines = length(Points_Of_Change);
Line_Matrix = cell(1, int64(Number_Of_L... |
github | ajeet-ujjwal/Character-Segmentation-of-Handwritten-Text-master | Char_Segmentation.m | .m | Character-Segmentation-of-Handwritten-Text-master/Char_Segmentation.m | 635 | utf_8 | e7f9002a901f9677178a00b12b028c86 | % Function for character segmentation
function []=Char_Segmentation(word,i,j,img)
B =cell2mat(word);
CC=bwconncomp(B);
BW2 = zeros(size(B)); %// Create dummy image for display purposes.
for k = 1:CC.NumObjects %// Loop through each object
BW2 = zeros(size(B))
PixId = CC.PixelIdxList{k}; %// Just simpler to ... |
github | ajeet-ujjwal/Character-Segmentation-of-Handwritten-Text-master | Main.m | .m | Character-Segmentation-of-Handwritten-Text-master/Main.m | 1,236 | utf_8 | 7fc9beb8a6875d0782269a555fbb19bf | % Main function which calls all other functions
function []= Main(img)
Initial_Image = imread(img);
main_folder=strcat(img,'_folder');
mkdir(main_folder);
char_folder=strcat(main_folder,'\char');
mkdir(char_folder);
word_folder=strcat(main_folder,'\word');
mkdir(word_folder);
line_folder=strcat(main_folder,'\l... |
github | rammanouil/NonlinearUnmixingVector-master | tuning_SuUNDU_CG.m | .m | NonlinearUnmixingVector-master/DemoMatlabSyntheticData/tuning_SuUNDU_CG.m | 3,271 | utf_8 | 7b3d3bd6479c20229f700733895b3649 |
function [res, res_bst, par_bst, X_RSuNDU, Z_RSuNDU, F_RSuNDU, t_RSuNDU, residues, K ] = tuning_SuUNDU_CG(lambda_,mu_,par, ...
S,R,V,str,X,F,nitermax,str2)
n1 = length(lambda_);
n2 = length(mu_);
res = cell(1,3);
res{1,1} = zeros(n1,n2); % RMSE_X_Rkhype
res{1,2} = zeros(n1,n2); % RMSE_F_Rkhype
res{1,3} = zeros(n... |
github | rammanouil/NonlinearUnmixingVector-master | NDU_kernel.m | .m | NonlinearUnmixingVector-master/DemoMatlabSyntheticData/NDU_kernel.m | 2,154 | utf_8 | 815a333c3a1d6ba02f862be616b39b5b |
function [X, F, t_ADMM, K] = NDU_kernel(S,R,lambda,mu,rho,nitermax,K)
% 2) initialising
% ----------------
[L, N] = size(S);
P = size(R,2);
A = [ speye(P); ones(1,P)]; % cst. var. % replace last row by zeros to remove sum-to-one
B = [ -speye(P); zeros(1,P)]; % cst. var.
C = [0*speye(P,N); ones(1,N)]; % cst. var... |
github | rammanouil/NonlinearUnmixingVector-master | NDU_kernel_CG.m | .m | NonlinearUnmixingVector-master/DemoMatlabSyntheticData/NDU_kernel_CG.m | 2,104 | utf_8 | 37779476f28dcf5f9073d13617c815d7 |
function [X, F, t_ADMM, K] = NDU_kernel_CG(S,R,lambda,mu,rho,nitermax,K,Eg)
tol_pcg = 1e-4;
nitermax_pcg = 1000;
% 2) initialising
% ----------------
[L, N] = size(S);
P = size(R,2);
A = [ speye(P); ones(1,P)]; % cst. var. % replace last row by zeros to remove sum-to-one
B = [ -speye(P); zeros(1,P)]; % cst. v... |
github | rammanouil/NonlinearUnmixingVector-master | khype3.m | .m | NonlinearUnmixingVector-master/DemoMatlabSyntheticData/khype3.m | 2,014 | utf_8 | e2b11f9d9dc23ead302bf79c74238e27 |
function [a_est, b_est, KM] = khype3(par,ksi,mu,N,r,M)
% ============ Parameters to tune ========================
% Gaussian kernel bandwidth :
% par = 2;
% Regualrization parameter :
% \mu in the paper = 1/C
% C = 100;
% C = 1/mu;
% ============== Scene Parameters =========================
% (see the functio... |
github | rammanouil/NonlinearUnmixingVector-master | conjgrad_NDU.m | .m | NonlinearUnmixingVector-master/DemoMatlabSyntheticData/conjgrad_NDU.m | 1,214 | utf_8 | 7052209662258a08347a17801e3fb6ec |
function [x] = conjgrad_NDU(K,D,E,b,x,lambda,rho,tol,nitermax)
% K,D,lambda,rho,p,zeros(L*N,1),1e-6,100
% here A = I + (1/lambda)KoE + (1/rho)I_NoD
% A*x has three terms : x + vec + vec
L = size(D,1);
N = size(K,1);
% r = b - A*x; % residu
X = reshape(x,L,N);
r = b - ( x + (1/lambda)*vec(E*X*K) + (1/rho)*vec(D... |
github | rammanouil/NonlinearUnmixingVector-master | SuUNDU_Ki_kernel2_CG.m | .m | NonlinearUnmixingVector-master/DemoMatlabSyntheticData/SuUNDU_Ki_kernel2_CG.m | 5,628 | utf_8 | dcaa520096906d9deb118384b15de650 |
function [X, Z, F, t_ADMM, residues, K] = SuUNDU_Ki_kernel2_CG(S,R,lambda,mu,rho,nitermax,tol_pcg,nitermax_pcg,K,Eg,str2)
% 2) initialising
% ----------------
[L, N] = size(S);
P = size(R,2);
A = [ speye(P); ones(1,P)]; % cst. var. % replace last row by zeros to remove sum-to-one
B = [ -speye(P); zeros(1,P)]; % ... |
github | rammanouil/NonlinearUnmixingVector-master | NDU_kernel.m | .m | NonlinearUnmixingVector-master/DemoMatlabRealData/NDU_kernel.m | 2,154 | utf_8 | 815a333c3a1d6ba02f862be616b39b5b |
function [X, F, t_ADMM, K] = NDU_kernel(S,R,lambda,mu,rho,nitermax,K)
% 2) initialising
% ----------------
[L, N] = size(S);
P = size(R,2);
A = [ speye(P); ones(1,P)]; % cst. var. % replace last row by zeros to remove sum-to-one
B = [ -speye(P); zeros(1,P)]; % cst. var.
C = [0*speye(P,N); ones(1,N)]; % cst. var... |
github | rammanouil/NonlinearUnmixingVector-master | khype3.m | .m | NonlinearUnmixingVector-master/DemoMatlabRealData/khype3.m | 2,014 | utf_8 | e2b11f9d9dc23ead302bf79c74238e27 |
function [a_est, b_est, KM] = khype3(par,ksi,mu,N,r,M)
% ============ Parameters to tune ========================
% Gaussian kernel bandwidth :
% par = 2;
% Regualrization parameter :
% \mu in the paper = 1/C
% C = 100;
% C = 1/mu;
% ============== Scene Parameters =========================
% (see the functio... |
github | biswarajkar/sift_image_catg-master | get_bags_of_sifts.m | .m | sift_image_catg-master/code/get_bags_of_sifts.m | 2,769 | utf_8 | 48e497f1c2e3a4bb5a9edc7bb8115d4f | % Starter code referred from code by James Hays and Sam Birch from Brown University
function image_features = get_bags_of_sifts(image_paths)
% The inputs image_paths is an N x 1 cell array of strings where each string
% is an image path on the file system.
% This function assumes that 'vocabulary.mat' exists a... |
github | biswarajkar/sift_image_catg-master | get_image_paths.m | .m | sift_image_catg-master/code/get_image_paths.m | 1,655 | utf_8 | 4d64b30680e58826507a0626d904b201 | % Starter code referred from code by James Hays and Sam Birch for CS 143,
% Brown University
%This function returns cell arrays containing the file path for each train
%and test image, as well as cell arrays with the label of each train and
%test image. By default all four of these arrays will be 1500x1 where eac... |
github | biswarajkar/sift_image_catg-master | nearest_neighbor_classify.m | .m | sift_image_catg-master/code/nearest_neighbor_classify.m | 3,275 | utf_8 | 69318b94c50a8810ac897851b6fe8bcf | % Starter code referred from code by James Hays and Sam Birch from Brown University
%This function will predict the category for every test image by finding
%the training image with most similar features. Instead of 1 nearest
%neighbor, we will vote based on k nearest neighbors which will increase
%performance.
... |
github | biswarajkar/sift_image_catg-master | create_results_webpage.m | .m | sift_image_catg-master/code/create_results_webpage.m | 12,078 | utf_8 | da745046db2ec77d6afac56cbddf6a72 | % Starter code referred from code by James Hays and Sam Birch for CS 143,
% Brown University
% This function creates a webpage (html and images) visualizing the
% classiffication results. This webpage will contain
% (1) A confusion matrix plot
% (2) A table with one row per category, with 3 columns - training
%... |
github | biswarajkar/sift_image_catg-master | build_vocabulary.m | .m | sift_image_catg-master/code/build_vocabulary.m | 3,329 | utf_8 | 42accadf05b00f4db3a29f53ccb8a14b | % Starter code referred from code by James Hays and Sam Birch from Brown University
%This function will sample SIFT descriptors from the training images,
%cluster them with kmeans, and then return the cluster centers.
function vocabulary = build_vocabulary( image_paths, vocab_size )
% The inputs are images,
% ... |
github | biswarajkar/sift_image_catg-master | svm_classify.m | .m | sift_image_catg-master/code/svm_classify.m | 2,405 | utf_8 | e7138cd37638bfc722c8df6de48e82da | % Starter code referred from code by James Hays and Sam Birch from Brown University
%This function will train a linear SVM for every category (i.e. one vs all)
%and then use the learned linear classifiers to predict the category of
%every test image. Every test feature will be evaluated with all 15 SVMs
%and the ... |
github | biswarajkar/sift_image_catg-master | vl_compile.m | .m | sift_image_catg-master/code/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 | biswarajkar/sift_image_catg-master | vl_noprefix.m | .m | sift_image_catg-master/code/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 | biswarajkar/sift_image_catg-master | vl_pegasos.m | .m | sift_image_catg-master/code/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 | biswarajkar/sift_image_catg-master | vl_svmpegasos.m | .m | sift_image_catg-master/code/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 | biswarajkar/sift_image_catg-master | vl_override.m | .m | sift_image_catg-master/code/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 | biswarajkar/sift_image_catg-master | vl_quickvis.m | .m | sift_image_catg-master/code/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 | biswarajkar/sift_image_catg-master | vl_demo_aib.m | .m | sift_image_catg-master/code/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 | biswarajkar/sift_image_catg-master | vl_demo_alldist.m | .m | sift_image_catg-master/code/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 | biswarajkar/sift_image_catg-master | vl_demo_ikmeans.m | .m | sift_image_catg-master/code/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 | biswarajkar/sift_image_catg-master | vl_demo_svm.m | .m | sift_image_catg-master/code/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 | biswarajkar/sift_image_catg-master | vl_demo_kdtree_sift.m | .m | sift_image_catg-master/code/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 | biswarajkar/sift_image_catg-master | vl_impattern.m | .m | sift_image_catg-master/code/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 | biswarajkar/sift_image_catg-master | vl_tpsu.m | .m | sift_image_catg-master/code/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 | biswarajkar/sift_image_catg-master | vl_xyz2lab.m | .m | sift_image_catg-master/code/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 | biswarajkar/sift_image_catg-master | vl_test_gmm.m | .m | sift_image_catg-master/code/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 | biswarajkar/sift_image_catg-master | vl_test_twister.m | .m | sift_image_catg-master/code/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 | biswarajkar/sift_image_catg-master | vl_test_kdtree.m | .m | sift_image_catg-master/code/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 | biswarajkar/sift_image_catg-master | vl_test_imwbackward.m | .m | sift_image_catg-master/code/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 | biswarajkar/sift_image_catg-master | vl_test_alphanum.m | .m | sift_image_catg-master/code/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 | biswarajkar/sift_image_catg-master | vl_test_printsize.m | .m | sift_image_catg-master/code/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 | biswarajkar/sift_image_catg-master | vl_test_colsubset (1).m | .m | sift_image_catg-master/code/vlfeat-0.9.20/toolbox/xtest/vl_test_colsubset (1).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 | biswarajkar/sift_image_catg-master | vl_test_cummax.m | .m | sift_image_catg-master/code/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 | biswarajkar/sift_image_catg-master | vl_test_imintegral.m | .m | sift_image_catg-master/code/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 | biswarajkar/sift_image_catg-master | vl_test_hog (1).m | .m | sift_image_catg-master/code/vlfeat-0.9.20/toolbox/xtest/vl_test_hog (1).m | 1,555 | utf_8 | eed7b2a116d142040587dc9c4eb7cd2e | function results = vl_test_hog(varargin)
% VL_TEST_HOG
vl_test_init ;
function s = setup()
s.im = im2single(vl_impattern('roofs1')) ;
[x,y]= meshgrid(linspace(-1,1,128)) ;
s.round = single(x.^2+y.^2);
s.imSmall = s.im(1:128,1:128,:) ;
s.imSmall = s.im ;
s.imSmallFlipped = s.imSmall(:,end:-1:1,:) ;
function test_basic... |
github | biswarajkar/sift_image_catg-master | vl_test_sift.m | .m | sift_image_catg-master/code/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 | biswarajkar/sift_image_catg-master | vl_test_binsum.m | .m | sift_image_catg-master/code/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 | biswarajkar/sift_image_catg-master | vl_test_lbp.m | .m | sift_image_catg-master/code/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 | biswarajkar/sift_image_catg-master | vl_test_colsubset.m | .m | sift_image_catg-master/code/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 | biswarajkar/sift_image_catg-master | vl_test_alldist.m | .m | sift_image_catg-master/code/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 | biswarajkar/sift_image_catg-master | vl_test_ihashsum.m | .m | sift_image_catg-master/code/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 | biswarajkar/sift_image_catg-master | vl_test_grad.m | .m | sift_image_catg-master/code/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 | biswarajkar/sift_image_catg-master | vl_test_whistc.m | .m | sift_image_catg-master/code/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 | biswarajkar/sift_image_catg-master | vl_test_roc.m | .m | sift_image_catg-master/code/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 | biswarajkar/sift_image_catg-master | vl_test_dsift.m | .m | sift_image_catg-master/code/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 | biswarajkar/sift_image_catg-master | vl_test_alldist2.m | .m | sift_image_catg-master/code/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'), ...
... |
github | biswarajkar/sift_image_catg-master | vl_test_fisher.m | .m | sift_image_catg-master/code/vlfeat-0.9.20/toolbox/xtest/vl_test_fisher.m | 2,097 | utf_8 | c9afd9ab635bd412cbf8be3c2d235f6b | function results = vl_test_fisher(varargin)
% VL_TEST_FISHER
vl_test_init ;
function s = setup()
randn('state',0) ;
dimension = 5 ;
numData = 21 ;
numComponents = 3 ;
s.x = randn(dimension,numData) ;
s.mu = randn(dimension,numComponents) ;
s.sigma2 = ones(dimension,numComponents) ;
s.prior = ones(1,numComponents) ;
s... |
github | biswarajkar/sift_image_catg-master | vl_test_imsmooth.m | .m | sift_image_catg-master/code/vlfeat-0.9.20/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 | biswarajkar/sift_image_catg-master | vl_test_svmtrain.m | .m | sift_image_catg-master/code/vlfeat-0.9.20/toolbox/xtest/vl_test_svmtrain.m | 4,277 | utf_8 | 071b7c66191a22e8236fda16752b27aa | function results = vl_test_svmtrain(varargin)
% VL_TEST_SVMTRAIN
vl_test_init ;
end
function s = setup()
randn('state',0) ;
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.y = [ones(1,Np) ... |
github | biswarajkar/sift_image_catg-master | vl_test_phow.m | .m | sift_image_catg-master/code/vlfeat-0.9.20/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 | biswarajkar/sift_image_catg-master | vl_test_kmeans.m | .m | sift_image_catg-master/code/vlfeat-0.9.20/toolbox/xtest/vl_test_kmeans.m | 3,632 | utf_8 | 0e1d6f4f8101c8982a0e743e0980c65a | 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 | biswarajkar/sift_image_catg-master | vl_test_hikmeans.m | .m | sift_image_catg-master/code/vlfeat-0.9.20/toolbox/xtest/vl_test_hikmeans.m | 463 | utf_8 | dc3b493646e66316184e86ff4e6138ab | function results = vl_test_hikmeans(varargin)
% VL_TEST_IKMEANS
vl_test_init ;
function s = setup()
rand('state',0) ;
s.data = uint8(rand(2,1000) * 255) ;
function test_basic(s)
[tree, assign] = vl_hikmeans(s.data,3,100) ;
assign_ = vl_hikmeanspush(tree, s.data) ;
vl_assert_equal(assign,assign_) ;
function test_elka... |
github | biswarajkar/sift_image_catg-master | vl_test_aib.m | .m | sift_image_catg-master/code/vlfeat-0.9.20/toolbox/xtest/vl_test_aib.m | 1,277 | utf_8 | 78978ae54e7ebe991d136336ba4bf9c6 | function results = vl_test_aib(varargin)
% VL_TEST_AIB
vl_test_init ;
function s = setup()
s = [] ;
function test_basic(s)
Pcx = [.3 .3 0 0
0 0 .2 .2] ;
% This results in the AIB tree
%
% 1 - \
% 5 - \
% 2 - / \
% - 7
% 3 - \ /
% 6 - /
% 4 - /
%
% coded by the map [5 ... |
github | biswarajkar/sift_image_catg-master | vl_test_plotbox.m | .m | sift_image_catg-master/code/vlfeat-0.9.20/toolbox/xtest/vl_test_plotbox.m | 414 | utf_8 | aa06ce4932a213fb933bbede6072b029 | function results = vl_test_plotbox(varargin)
% VL_TEST_PLOTBOX
vl_test_init ;
function test_basic(s)
figure(1) ; clf ;
vl_plotbox([-1 -1 1 1]') ;
xlim([-2 2]) ;
ylim([-2 2]) ;
close(1) ;
function test_multiple(s)
figure(1) ; clf ;
randn('state', 0) ;
vl_plotbox(randn(4,10)) ;
close(1) ;
function test_style(s)
figure... |
github | biswarajkar/sift_image_catg-master | vl_test_imarray.m | .m | sift_image_catg-master/code/vlfeat-0.9.20/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 | biswarajkar/sift_image_catg-master | vl_test_homkermap.m | .m | sift_image_catg-master/code/vlfeat-0.9.20/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 | biswarajkar/sift_image_catg-master | vl_test_slic.m | .m | sift_image_catg-master/code/vlfeat-0.9.20/toolbox/xtest/vl_test_slic.m | 200 | utf_8 | 12a6465e3ef5b4bcfd7303cd8a9229d4 | function results = vl_test_slic(varargin)
% VL_TEST_SLIC
vl_test_init ;
function s = setup()
s.im = im2single(vl_impattern('roofs1')) ;
function test_slic(s)
segmentation = vl_slic(s.im, 10, 0.1) ;
|
github | biswarajkar/sift_image_catg-master | vl_test_ikmeans.m | .m | sift_image_catg-master/code/vlfeat-0.9.20/toolbox/xtest/vl_test_ikmeans.m | 466 | utf_8 | 1ee2f647ac0035ed0d704a0cd615b040 | function results = vl_test_ikmeans(varargin)
% VL_TEST_IKMEANS
vl_test_init ;
function s = setup()
rand('state',0) ;
s.data = uint8(rand(2,1000) * 255) ;
function test_basic(s)
[centers, assign] = vl_ikmeans(s.data,100) ;
assign_ = vl_ikmeanspush(s.data, centers) ;
vl_assert_equal(assign,assign_) ;
function test_elk... |
github | biswarajkar/sift_image_catg-master | vl_test_mser.m | .m | sift_image_catg-master/code/vlfeat-0.9.20/toolbox/xtest/vl_test_mser.m | 242 | utf_8 | 1ad33563b0c86542a2978ee94e0f4a39 | function results = vl_test_mser(varargin)
% VL_TEST_MSER
vl_test_init ;
function s = setup()
s.im = im2uint8(rgb2gray(vl_impattern('roofs1'))) ;
function test_mser(s)
[regions,frames] = vl_mser(s.im) ;
mask = vl_erfill(s.im, regions(1)) ;
|
github | biswarajkar/sift_image_catg-master | vl_test_inthist.m | .m | sift_image_catg-master/code/vlfeat-0.9.20/toolbox/xtest/vl_test_inthist.m | 811 | utf_8 | 459027d0c54d8f197563a02ab66ef45d | function results = vl_test_inthist(varargin)
% VL_TEST_INTHIST
vl_test_init ;
function s = setup()
rand('state',0) ;
s.labels = uint32(8*rand(123, 76, 3)) ;
function test_basic(s)
l = 10 ;
hist = vl_inthist(s.labels, 'numlabels', l) ;
hist_ = inthist_slow(s.labels, l) ;
vl_assert_equal(double(hist),hist_) ;
function... |
github | biswarajkar/sift_image_catg-master | vl_test_imdisttf.m | .m | sift_image_catg-master/code/vlfeat-0.9.20/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 | biswarajkar/sift_image_catg-master | vl_test_vlad.m | .m | sift_image_catg-master/code/vlfeat-0.9.20/toolbox/xtest/vl_test_vlad.m | 1,977 | utf_8 | d3797288d6edb1d445b890db3780c8ce | function results = vl_test_vlad(varargin)
% VL_TEST_VLAD
vl_test_init ;
function s = setup()
randn('state',0) ;
s.x = randn(128,256) ;
s.mu = randn(128,16) ;
assignments = rand(16, 256) ;
s.assignments = bsxfun(@times, assignments, 1 ./ sum(assignments,1)) ;
function test_basic (s)
x = [1, 2, 3] ;
mu = [0, 0, 0] ;
a... |
github | biswarajkar/sift_image_catg-master | vl_test_pr.m | .m | sift_image_catg-master/code/vlfeat-0.9.20/toolbox/xtest/vl_test_pr.m | 3,763 | utf_8 | 4d1da5ccda1a7df2bec35b8f12fdd620 | function results = vl_test_pr(varargin)
% VL_TEST_PR
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)
[rc,pr] = vl_pr(s.labels,s.scores0) ;
vl_assert_almost_equal(pr, [1 1/1 2/2 2/3 2/4 2/5]) ;
vl_assert_almost_equal(rc, ... |
github | biswarajkar/sift_image_catg-master | vl_test_kdtree (1).m | .m | sift_image_catg-master/code/vlfeat-0.9.20/toolbox/xtest/vl_test_kdtree (1).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 | biswarajkar/sift_image_catg-master | vl_test_hog.m | .m | sift_image_catg-master/code/vlfeat-0.9.20/toolbox/xtest/vl_test_hog.m | 1,555 | utf_8 | eed7b2a116d142040587dc9c4eb7cd2e | function results = vl_test_hog(varargin)
% VL_TEST_HOG
vl_test_init ;
function s = setup()
s.im = im2single(vl_impattern('roofs1')) ;
[x,y]= meshgrid(linspace(-1,1,128)) ;
s.round = single(x.^2+y.^2);
s.imSmall = s.im(1:128,1:128,:) ;
s.imSmall = s.im ;
s.imSmallFlipped = s.imSmall(:,end:-1:1,:) ;
function test_basic... |
github | biswarajkar/sift_image_catg-master | vl_test_argparse.m | .m | sift_image_catg-master/code/vlfeat-0.9.20/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 | biswarajkar/sift_image_catg-master | vl_test_liop.m | .m | sift_image_catg-master/code/vlfeat-0.9.20/toolbox/xtest/vl_test_liop.m | 1,023 | utf_8 | a162be369073bed18e61210f44088cf3 | function results = vl_test_liop(varargin)
% VL_TEST_SIFT
vl_test_init ;
function s = setup()
randn('state',0) ;
s.patch = randn(65,'single') ;
xr = -32:32 ;
[x,y] = meshgrid(xr) ;
s.blob = - single(x.^2+y.^2) ;
function test_basic(s)
d = vl_liop(s.patch) ;
function test_blob(s)
% with a blob, all local intensity ord... |
github | biswarajkar/sift_image_catg-master | vl_test_binsearch.m | .m | sift_image_catg-master/code/vlfeat-0.9.20/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 | biswarajkar/sift_image_catg-master | vl_roc.m | .m | sift_image_catg-master/code/vlfeat-0.9.20/toolbox/plotop/vl_roc.m | 10,113 | utf_8 | 22fd8ff455ee62a96ffd94b9074eafeb | function [tpr,tnr,info] = vl_roc(labels, scores, varargin)
%VL_ROC ROC curve.
% [TPR,TNR] = VL_ROC(LABELS, SCORES) computes the Receiver Operating
% Characteristic (ROC) curve [1]. LABELS is a row vector of ground
% truth labels, greater than zero for a positive sample and smaller
% than zero for a negative o... |
github | biswarajkar/sift_image_catg-master | vl_click.m | .m | sift_image_catg-master/code/vlfeat-0.9.20/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 | biswarajkar/sift_image_catg-master | vl_pr.m | .m | sift_image_catg-master/code/vlfeat-0.9.20/toolbox/plotop/vl_pr.m | 9,138 | utf_8 | c7fe6832d2b6b9917896810c52a05479 | function [recall, precision, info] = vl_pr(labels, scores, varargin)
%VL_PR Precision-recall curve.
% [RECALL, PRECISION] = VL_PR(LABELS, SCORES) computes the
% precision-recall (PR) curve. LABELS are the ground truth labels,
% greather than zero for a positive sample and smaller than zero for
% a negative on... |
github | biswarajkar/sift_image_catg-master | vl_ubcread.m | .m | sift_image_catg-master/code/vlfeat-0.9.20/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 | biswarajkar/sift_image_catg-master | vl_frame2oell.m | .m | sift_image_catg-master/code/vlfeat-0.9.20/toolbox/sift/vl_frame2oell.m | 2,806 | utf_8 | c93792632f630743485fa4c2cf12d647 | function eframes = vl_frame2oell(frames)
% VL_FRAMES2OELL Convert a geometric frame to an oriented ellipse
% EFRAME = VL_FRAME2OELL(FRAME) converts the generic FRAME to an
% oriented ellipses EFRAME. FRAME and EFRAME can be matrices, with
% one frame per column.
%
% A frame is either a point, a disc, an orien... |
github | biswarajkar/sift_image_catg-master | vl_plotsiftdescriptor.m | .m | sift_image_catg-master/code/vlfeat-0.9.20/toolbox/sift/vl_plotsiftdescriptor.m | 5,114 | utf_8 | a4e125a8916653f00143b61cceda2f23 | function h=vl_plotsiftdescriptor(d,f,varargin)
% VL_PLOTSIFTDESCRIPTOR Plot SIFT descriptor
% VL_PLOTSIFTDESCRIPTOR(D) plots the SIFT descriptor D. If D is a
% matrix, it plots one descriptor per column. D has the same format
% used by VL_SIFT().
%
% VL_PLOTSIFTDESCRIPTOR(D,F) plots the SIFT descriptors warpe... |
github | biswarajkar/sift_image_catg-master | phow_caltech101.m | .m | sift_image_catg-master/code/vlfeat-0.9.20/apps/phow_caltech101.m | 11,594 | utf_8 | 7f4890a2e6844ca56debbfe23cca64f3 | 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 speedu... |
github | biswarajkar/sift_image_catg-master | sift_mosaic.m | .m | sift_image_catg-master/code/vlfeat-0.9.20/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 | biswarajkar/sift_image_catg-master | encodeImage.m | .m | sift_image_catg-master/code/vlfeat-0.9.20/apps/recognition/encodeImage.m | 5,278 | utf_8 | 5d9dc6161995b8e10366b5649bf4fda4 | function descrs = encodeImage(encoder, im, varargin)
% ENCODEIMAGE Apply an encoder to an image
% DESCRS = ENCODEIMAGE(ENCODER, IM) applies the ENCODER
% to image IM, returning a corresponding code vector PSI.
%
% IM can be an image, the path to an image, or a cell array of
% the same, to operate on multiple ... |
github | biswarajkar/sift_image_catg-master | experiments.m | .m | sift_image_catg-master/code/vlfeat-0.9.20/apps/recognition/experiments.m | 6,905 | utf_8 | 1e4a4911eed4a451b9488b9e6cc9b39c | function experiments()
% EXPERIMENTS Run image classification experiments
% The experimens download a number of benchmark datasets in the
% 'data/' subfolder. Make sure that there are several GBs of
% space available.
%
% By default, experiments run with a lite option turned on. This
% quickly runs all... |
github | biswarajkar/sift_image_catg-master | getDenseSIFT.m | .m | sift_image_catg-master/code/vlfeat-0.9.20/apps/recognition/getDenseSIFT.m | 1,679 | utf_8 | 2059c0a2a4e762226d89121408c6e51c | function features = getDenseSIFT(im, varargin)
% GETDENSESIFT Extract dense SIFT features
% FEATURES = GETDENSESIFT(IM) extract dense SIFT features from
% image IM.
% Author: Andrea Vedaldi
% Copyright (C) 2013 Andrea Vedaldi
% All rights reserved.
%
% This file is part of the VLFeat library and is made availab... |
github | lyapple2008/audioSignalProcess-master | apmtest.m | .m | audioSignalProcess-master/WebRtc_AMP_Port/webrtc/modules/audio_processing/test/apmtest.m | 9,470 | utf_8 | ad72111888b4bb4b7c4605d0bf79d572 | function apmtest(task, testname, filepath, casenumber, legacy)
%APMTEST is a tool to process APM file sets and easily display the output.
% APMTEST(TASK, TESTNAME, CASENUMBER) performs one of several TASKs:
% 'test' Processes the files to produce test output.
% 'list' Prints a list of cases in the test set,... |
github | lyapple2008/audioSignalProcess-master | plot_neteq_delay.m | .m | audioSignalProcess-master/WebRtc_AMP_Port/webrtc/modules/audio_coding/neteq/test/delay_tool/plot_neteq_delay.m | 5,563 | utf_8 | 8b6a66813477863da513b1e6971dbc97 | function [delay_struct, delayvalues] = plot_neteq_delay(delayfile, varargin)
% InfoStruct = plot_neteq_delay(delayfile)
% InfoStruct = plot_neteq_delay(delayfile, 'skipdelay', skip_seconds)
%
% Henrik Lundin, 2006-11-17
% Henrik Lundin, 2011-05-17
%
try
s = parse_delay_file(delayfile);
catch
error(lasterr);
e... |
github | qnn122/Drowsiness_Detection-master | neldermead_error_fcn.m | .m | Drowsiness_Detection-master/fdtool_release/fdtool_release/neldermead_error_fcn.m | 3,011 | utf_8 | bb049372cc0da80fdca71b948ce93472 |
function [xsol , fsol , func_evals] = neldermead_error_fcn(funfcn , x , varargin)
tolx = 10e-6;
tolf = 10e-6;
maxfun = 200;
maxiter = 200;
rho = 1;
chi = 2;
psi = 0.5;
sigma = 0.5;
v0 = x; % Place input guess in th... |
github | qnn122/Drowsiness_Detection-master | gui_number_of_features.m | .m | Drowsiness_Detection-master/fdtool_release/fdtool_release/gui/gui_number_of_features.m | 970 | utf_8 | eeadac584ed70adef5d4c510f04a08c0 |
function parameters = gui_number_of_features(parameters)
pattern = unique(parameters.dictionnary.rect_param(1 , :));
parameters.dictionnary.ny = str2double(get(parameters.gui.database.editbutton1 , 'String'));
parameters.dictionnary.nx ... |
github | qnn122/Drowsiness_Detection-master | classRF_predict.m | .m | Drowsiness_Detection-master/RF_Class_C/classRF_predict.m | 2,166 | utf_8 | 7e026fb9b31f99feae58d36b9cf6c2e0 | %**************************************************************
%* mex interface to Andy Liaw et al.'s C code (used in R package randomForest)
%* Added by Abhishek Jaiantilal ( abhishek.jaiantilal@colorado.edu )
%* License: GPLv2
%* Version: 0.02
%
% Calls Classification Random Forest
% A wrapper matlab file that calls... |
github | qnn122/Drowsiness_Detection-master | compile_windows.m | .m | Drowsiness_Detection-master/RF_Class_C/compile_windows.m | 1,690 | utf_8 | c55dc5ba427737b8d865e90faf998818 | % ********************************************************************
% * mex File compiling code for Random Forest (for linux)
% * mex interface to Andy Liaw et al.'s C code (used in R package randomForest)
% * Added by Abhishek Jaiantilal ( abhishek.jaiantilal@colorado.edu )
% * License: GPLv2
% * Version: 0.02
% **... |
github | qnn122/Drowsiness_Detection-master | classRF_train.m | .m | Drowsiness_Detection-master/RF_Class_C/classRF_train.m | 14,829 | utf_8 | 82a321d0a7c77f33b104acec4394c6ee | %**************************************************************
%* mex interface to Andy Liaw et al.'s C code (used in R package randomForest)
%* Added by Abhishek Jaiantilal ( abhishek.jaiantilal@colorado.edu )
%* License: GPLv2
%* Version: 0.02
%
% Calls Classification Random Forest
% A wrapper matlab file that calls... |
github | qnn122/Drowsiness_Detection-master | compile_linux.m | .m | Drowsiness_Detection-master/RF_Class_C/compile_linux.m | 557 | utf_8 | c21b7b493153f2254a8a2c4d7be848f1 | % ********************************************************************
% * mex File compiling code for Random Forest (for linux)
% * mex interface to Andy Liaw et al.'s C code (used in R package randomForest)
% * Added by Abhishek Jaiantilal ( abhishek.jaiantilal@colorado.edu )
% * License: GPLv2
% * Version: 0.02
% **... |
github | JunkangZhang/UFL-HS-RoadDetection-master | FilterRankingPrior.m | .m | UFL-HS-RoadDetection-master/FilterRankingPrior.m | 523 | utf_8 | 4fa67d224aba73383387bb37c7292473 | %% proj: row*col*channel
function rateIdx = FilterRankingPrior(proj, filter)
dim = size(proj);
if numel(dim)<=2
rateIdx = 1;
return
end
if nargin<=1 || isempty(filter)==true
verticalSum = reshape(sum(proj, 2), dim(1), dim(3));
rateMin = ceil(-dim(1)/2);
filter = rateMin:rateMin+dim(1... |
github | JunkangZhang/UFL-HS-RoadDetection-master | getFilterTh.m | .m | UFL-HS-RoadDetection-master/getFilterTh.m | 701 | utf_8 | 326f5678fcca3ccd98cbb61a45323440 | %%
function filter = getFilterTh(dim, choice)
%%
rrhalf = (dim(1)+1) / 2;
if choice<=3
rr = repmat( ((1:dim(1))'-rrhalf)./rrhalf, 1, dim(2) ); % row filter
else
rr = repmat( ((1:dim(1))'-dim(1))./rrhalf, 1, dim(2) ); % row filter
end
%%
cc = 1:dim(2);
cchalf = (dim(2)+1) / 2;
cc(cc>=cchalf) = dim(2)+1 - cc... |
github | JunkangZhang/UFL-HS-RoadDetection-master | reconstructionPCA.m | .m | UFL-HS-RoadDetection-master/Segmentation/reconstructionPCA.m | 775 | utf_8 | 771e9885de270392c8f620a6766da323 | %% reconstIdx specifies points used to calculate PCA
function reconstError = reconstructionPCA(patch, reconstIdx, retainRatio)
input = patch(reconstIdx,:);
mu = mean(input);
% variance stores eigenvalues
% explained stores percentage of each eigenvalues (sum -> 100), in descending order
% mu is avg of data
% [... |
github | JunkangZhang/UFL-HS-RoadDetection-master | encoder_groupsaliency.m | .m | UFL-HS-RoadDetection-master/UFLkmeans/encoder_groupsaliency.m | 527 | utf_8 | aea6e26ffbc58f34f4f5411f24716efa | %% Group Saliency Coding
function code = encoder_groupsaliency(patch, centroids, knn)
z = CalDistMatL2(patch, centroids);
[zSort, idx] = sort(z, 2, 'ascend');
assign = zeros(size(patch,1), knn);
for k = 1:knn
assign(:,k) = sum(zSort(:,k+1:knn+1), 2) - (knn+1-k)*zSort(:,k);
end
% for k = (knn-1):-1:1
% ... |
github | JunkangZhang/UFL-HS-RoadDetection-master | encoder_saliency.m | .m | UFL-HS-RoadDetection-master/UFLkmeans/encoder_saliency.m | 514 | utf_8 | 1f39e83489789f9c41568a2b6281802c | %% Saliency Coding
function code = encoder_saliency(patch, centroids, knn)
z = CalDistMatL2(patch, centroids);
[zSort, idx] = sort(z, 2, 'ascend');
code = zeros(size(patch,1), size(centroids,1));
for i = 1:size(patch,1)
code(i, idx(i,1)) = (knn-1)*zSort(i,1) / sum(zSort(i, 2:knn)); % CVPR
code(i, idx... |
github | JunkangZhang/UFL-HS-RoadDetection-master | shuffle.m | .m | UFL-HS-RoadDetection-master/UFLkmeans/shuffle.m | 214 | utf_8 | 1c93a6bbe6103ebba3822e82d4d96d58 | %% over the first dim
function patchRand = shuffle(patch, dim)
s = size(patch);
if nargin==1 || dim==1
patchRand = patch(randperm(s(1)),:);
elseif dim==2
patchRand = patch(:, randperm(s(2)));
end
|
github | JunkangZhang/UFL-HS-RoadDetection-master | encoder_groupsaliency2.m | .m | UFL-HS-RoadDetection-master/UFLkmeans/encoder_groupsaliency2.m | 447 | utf_8 | 08f7c695636d7f410f79b424264fda3c | %% Group Saliency Coding
function code = encoder_groupsaliency2(patch, centroids, knn)
z = CalDistMatL2(patch, centroids);
[zSort, idx] = sort(z, 2, 'ascend');
assign = zeros(size(patch,1), knn);
for k = 1:knn
assign(:,k) = sum(zSort(:,k+1:knn+1), 2) - (knn+1-k)*zSort(:,k);
end
code = zeros(size(patch... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.