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 | lpuettmann/software-testing-example-matlab-master | test_add_one.m | .m | software-testing-example-matlab-master/test_add_one.m | 1,442 | utf_8 | 3bbbfb4aab7fa70b6ebf037a0b62dac0 | function tests = test_add_one
tests = functiontests(localfunctions);
end
function test_normal1(testCase)
x = 1;
actSol = add_one(x);
expSol = 2;
verifyEqual(testCase, actSol, expSol)
end
function test_normal_pi(testCase)
x = pi;
actSol = add_one(x);
expSol = pi + 1;
... |
github | snsun/cgmm_mvdr-master | outProdND.m | .m | cgmm_mvdr-master/outProdND.m | 417 | utf_8 | 194da96a3b73c917274e3558be15c3eb | % given an ND tensor of size DxN1xN2xN3.., compute the outer product of the
% first dimension independently to return DxDxN1xN2xN3...
%
function output = outProdND(data)
[D,N1,N2,N3] = size(data);
A = reshape(data,D, N1*N2*N3);
% B = permute(bsxfun(@times, A, conj(permute(A,[3 2 1]))), [1 3 2]); % slower
B = bsxfun(... |
github | snsun/cgmm_mvdr-master | mvdr.m | .m | cgmm_mvdr-master/mvdr.m | 824 | utf_8 | e9482c7111ceb311c9b0483e6eefd439 | %% Author Sining Sun (NWPU)
% snsun@nwpu-aslp.org
function enspec = mvdr( ffts, Rn, d )
%MVDR is used to do MVDR beamforming;
% ffts: M*T*F multi-channel spectrum
% Rn: M*M*F covariance matrix.
% M is channels number,
% F is frequency bin number
% d: M*F steering vector
% enspec: Tenhanced spe... |
github | nabusch/Elektro-Pipe-master | prep04_rejectICs.m | .m | Elektro-Pipe-master/prep04_rejectICs.m | 13,812 | iso_8859_1 | 053d5c0897d598d4071374701080c21b | function [EEG] = prep04_rejectICs(EP)
%PREP04_REJECTICS detects artifactual ICs and rejects them
%
% This function is a complete rewrite of the old prep04. As of March 20,
% 2020, I highly recommend using this function, as it integrates four
% approaches of detecting ICs in a streamlined manner:
% 1. simple cor... |
github | nabusch/Elektro-Pipe-master | prep01_preproc.m | .m | Elektro-Pipe-master/prep01_preproc.m | 4,094 | iso_8859_1 | dea7b83a4b7e7e3195644bebf3db68cb | function [] = prep01_preproc(EP)
%
% wm: THIS FUNCTION STILL NEEDS A PROPER DOCUMENTATION!
% (c) Niko Busch & Wanja Mössing (contact: niko.busch@gmail.com)
%
% This program is free software: you can redistribute it and/or modify
% it under the terms of the GNU General Public License as published by
% the Free Softw... |
github | nabusch/Elektro-Pipe-master | get_design_trials.m | .m | Elektro-Pipe-master/design_functions/get_design_trials.m | 5,492 | utf_8 | ac582f96b3f464bddddcaf97b9aff112 | function [condinfo] = get_design_trials(EEG, EP, DINFO)
% Helper function that returns for a given EEG set file trial indices
% corresponding to each of the conditions of a design.
%%
% Loop across all conditions.
for icondition = 1:length(DINFO.design_matrix)
if ~isfield(EP, 'verbose')
EP.verbose = ... |
github | nabusch/Elektro-Pipe-master | elektro_prepconfigure.m | .m | Elektro-Pipe-master/management_functions/elektro_prepconfigure.m | 28,889 | utf_8 | a6df41b8bb13873eb3db1f622a8814a7 | function [CFG] = elektro_prepconfigure()
% guided GUI to create a config file
%
% This function is supposed to make it easier for users to create a
% configuration for use with the elektro-pipe
% Simply call ELEKTRO_PREPCONFIGURE() and answer the questions.
CFG = struct();
%% general setup
CFG.dir_main = qtext('main_... |
github | nabusch/Elektro-Pipe-master | elektro_dependencies.m | .m | Elektro-Pipe-master/management_functions/elektro_dependencies.m | 3,795 | utf_8 | 1500ac77eac5abb71fcd1cca460bd31b | function [] = elektro_dependencies()
%ELEKTRO_DEPENDENCIES checks ElektroPipe's Dependencies
% This function is intended as a straight-forward check at the beginning
% of each run of Elektro-Pipe to avoid compatibility issues.
%
% author: Wanja Moessing, moessing@wwu.de, September 2019
% Copyright (C) 2019- Wanja M... |
github | nabusch/Elektro-Pipe-master | eeg_detrend.m | .m | Elektro-Pipe-master/EPfunctions/eeg_detrend.m | 1,393 | utf_8 | a8ede665a694b2b37cb1abddd94dc3ca | % eeg_detrend() - Remove linear trends from epochs
%
% Usage:
% >> EEG = eeg_detrend(EEG);
%
% Inputs:
% EEG - EEGLAB EEG structure
%
% Output:
% EEG - EEGLAB EEG structure
%
% Author: Andreas Widmann, University of Leipzig, 2006
%1234567890123456789012345678901234567890123456789012345678901234567890... |
github | nabusch/Elektro-Pipe-master | chnb.m | .m | Elektro-Pipe-master/EPfunctions/chnb.m | 5,416 | utf_8 | 200f10ede1a08b83b526a68acdd6528c | function [nb,channame,strnames] = chnb(channame, varargin)
% chnb() - return channel number corresponding to channel names in an EEG
% structure
%
% Usage:
% >> [nb] = chnb(channameornb);
% >> [nb,names] = chnb(channameornb,...);
% >> [nb,names,strnames] = chnb(channameornb,.... |
github | nabusch/Elektro-Pipe-master | pop_selectiveinterp.m | .m | Elektro-Pipe-master/EPfunctions/pop_selectiveinterp.m | 3,275 | utf_8 | 90a646d11fa2606765ee09a4626def15 | function varargout = pop_selectiveinterp(EEG, varargin)
% [EEG, com] = pop_selectiveinterp(EEG)
% interpolate electrodes selected in EEG.reject.rejmanualE
%
% EEG = pop_selectiveinterp(EEG,rej)
% EEG = pop_selectiveinterp(EEG,elec, trials, ...)
%
% Perform a selective interpolation of certain electrodes on certain tri... |
github | nabusch/Elektro-Pipe-master | future_dev_mypop_selectcomps.m | .m | Elektro-Pipe-master/EPfunctions/future_dev_mypop_selectcomps.m | 9,944 | utf_8 | 987f52cd850b4672e56a5ddf829d29cc | function [EEG, com] = mypop_selectcomps( EEG, compnum, fig, selfcall );
% mypop_selectcomps() -
% WM 03-2020 : Just like pop_selectcomps, but adjusted for usage in the
% elektro-pipe, together vie viewcomp
%
%
% Display components with button to vizualize their
% properties and label them for rejectio... |
github | nabusch/Elektro-Pipe-master | pop_topochansel.m | .m | Elektro-Pipe-master/EPfunctions/pop_topochansel.m | 8,096 | utf_8 | 3f5b1922fe79281fe9c868660ed79ee5 | % pop_topochansel() - pop up a topographic interface to select channels
%
% Pops up a topographic interface to select multiple channels with the
% mouse. Click a polygon around the electrodes you wish to select. Right
% click to finish.
%
% Usage:
% >> [chanlist] = pop_topochansel(chanlocs,selection);
%
% Inputs:
% ... |
github | nabusch/Elektro-Pipe-master | elektro_channelinterpolater.m | .m | Elektro-Pipe-master/preproc_subfunctions/elektro_channelinterpolater.m | 6,940 | iso_8859_1 | 32178812339bc61a4070db9e362dd2d7 | function [EEG] = elektro_channelinterpolater(EEG, cfg, EP, id_idx)
% wm: THIS FUNCTION STILL NEEDS A PROPER DOCUMENTATION!
%
% note: the functions used for detection are part of clean_rawdata. As
% such, they're supposed to work on rawdata. In fact, running them on
% re-referenced data provides very different results.
... |
github | nabusch/Elektro-Pipe-master | elektro_cleanrawdata.m | .m | Elektro-Pipe-master/preproc_subfunctions/elektro_cleanrawdata.m | 5,762 | iso_8859_1 | aa2e17584cf839093fa227e832033181 | function [EEG, EP] = elektro_cleanrawdata(EEG, CFG, EP, id_idx)
%
% wm: THIS FUNCTION STILL NEEDS A PROPER DOCUMENTATION!
% (c) Niko Busch & Wanja Mössing
% (contact: niko.busch@gmail.com, w.a.moessing@gmail.com)
%
% This program is free software: you can redistribute it and/or modify
% it under the terms of the GNU... |
github | nabusch/Elektro-Pipe-master | elektro_cleanline.m | .m | Elektro-Pipe-master/preproc_subfunctions/elektro_cleanline.m | 4,185 | iso_8859_1 | 715af45323187543803f72835cf1282c | function [EEG, CONTEEG] = elektro_cleanline(EEG, cfg, CONTEEG, skip_epoch_eeg)
%
% wm: THIS FUNCTION STILL NEEDS A PROPER DOCUMENTATION!
% skip_epoch_eeg = boolean, if true, will only process CONTEEG (use
% anything as EEG input, will be returned as is)
% (c) Niko Busch & Wanja Mössing
% (contact: niko.busch@gmail.com... |
github | shiwangi27/deep_learning_cosmology-master | l2ls_learn_basis_dual.m | .m | deep_learning_cosmology-master/scene-sparse-master/fast_sc/code/l2ls_learn_basis_dual.m | 2,282 | utf_8 | d943b19c90e15814748d824984151253 | function B = l2ls_learn_basis_dual(X, S, l2norm, Binit)
% Learning basis using Lagrange dual (with basis normalization)
%
% This code solves the following problem:
%
% minimize_B 0.5*||X - B*S||^2
% subject to ||B(:,j)||_2 <= l2norm, forall j=1...size(S,1)
%
% The detail of the algorithm is described in the... |
github | shiwangi27/deep_learning_cosmology-master | l1ls_featuresign.m | .m | deep_learning_cosmology-master/scene-sparse-master/fast_sc/code/l1ls_featuresign.m | 7,079 | utf_8 | ed309362051a25e0af5d34273d25f81e | function Xout = l1ls_featuresign (A, Y, gamma, Xinit)
% The feature-sign search algorithm
% L1-regularized least squares problem solver
%
% This code solves the following problem:
%
% minimize_s 0.5*||y - A*x||^2 + gamma*||x||_1
%
% The detail of the algorithm is described in the following paper:
% 'Efficient Spar... |
github | shiwangi27/deep_learning_cosmology-master | sparse_coding.m | .m | deep_learning_cosmology-master/scene-sparse-master/fast_sc/code/sparse_coding.m | 7,263 | utf_8 | 7e86eff45132381b2b55c6cca5ec72d7 | function [B S stat] = sparse_coding(X_total, num_bases, beta, sparsity_func, epsilon, num_iters, batch_size, fname_save, pars, Binit, resample_size)
% Fast sparse coding algorithms
%
% minimize_B,S 0.5*||X - B*S||^2 + beta*sum(abs(S(:)))
% subject to ||B(:,j)||_2 <= l2norm, forall j=1...size(S,1)
%
% The det... |
github | shiwangi27/deep_learning_cosmology-master | scene_sparse.m | .m | deep_learning_cosmology-master/scene-sparse-master/experiments/scene_sparse.m | 940 | utf_8 | 36c069ccd3234161319397b5128483f2 | %This script will do the scene sparse algorithm
function [err] = scene_sparse(path)
disp('Starting Execution')
addpath('../fast_sc/code/')
%Input paths
if nargin <1
path='/clusterfs/cortex/scratch/shiry/scene-sparse/man_made';
end
%Load data
load(path)
%Initiatlize Parameters for SC
X_orig = X_man_made;
num_ba... |
github | lenck/ddet-master | setup.m | .m | ddet-master/setup.m | 1,130 | utf_8 | 9dd239ba2d2c9d0e079fb419cba9bc64 | function setup()
% SETUP Setup the environment
% Copyright (C) 2016 Karel Lenc.
% All rights reserved.
%
% Tishis file is part of the VLFeat library and is made available under
% the terms of the BSD license (see the COPYING file).
% Setup VLFeat, if not in path
if ~exist('vl_covdet', 'file')
utls.provision('vlfeat... |
github | lenck/ddet-master | provision.m | .m | ddet-master/+utls/provision.m | 1,926 | utf_8 | 30139cf4dba0f3cb4a91c26f7b188bc5 | function downloaded = provision( url_file, tgt_dir)
% PROVISION Provision a binary file from an archive
% PROVISION(URL_FILE, TGT_DIR) Downloads and unpacks the archive from
% URL_FILE to TGT_DIR folder, if not already done.
%
% Uses an empty file:
% TGT_DIR/.URL_FILE_NAME.done
% as an indicator that the f... |
github | sychaichangkun/Coursera-Tasks-master | submit.m | .m | Coursera-Tasks-master/machine learning/machine-learning-ex1/ex1/submit.m | 1,876 | utf_8 | 8d1c467b830a89c187c05b121cb8fbfd | function submit()
addpath('./lib');
conf.assignmentSlug = 'linear-regression';
conf.itemName = 'Linear Regression with Multiple Variables';
conf.partArrays = { ...
{ ...
'1', ...
{ 'warmUpExercise.m' }, ...
'Warm-up Exercise', ...
}, ...
{ ...
'2', ...
{ 'computeCost.m... |
github | sychaichangkun/Coursera-Tasks-master | submitWithConfiguration.m | .m | Coursera-Tasks-master/machine learning/machine-learning-ex1/ex1/lib/submitWithConfiguration.m | 3,734 | utf_8 | 84d9a81848f6d00a7aff4f79bdbb6049 | function submitWithConfiguration(conf)
addpath('./lib/jsonlab');
parts = parts(conf);
fprintf('== Submitting solutions | %s...\n', conf.itemName);
tokenFile = 'token.mat';
if exist(tokenFile, 'file')
load(tokenFile);
[email token] = promptToken(email, token, tokenFile);
else
[email token] = p... |
github | sychaichangkun/Coursera-Tasks-master | savejson.m | .m | Coursera-Tasks-master/machine learning/machine-learning-ex1/ex1/lib/jsonlab/savejson.m | 17,462 | utf_8 | 861b534fc35ffe982b53ca3ca83143bf | function json=savejson(rootname,obj,varargin)
%
% json=savejson(rootname,obj,filename)
% or
% json=savejson(rootname,obj,opt)
% json=savejson(rootname,obj,'param1',value1,'param2',value2,...)
%
% convert a MATLAB object (cell, struct or array) into a JSON (JavaScript
% Object Notation) string
%
% author: Qianqian Fa... |
github | sychaichangkun/Coursera-Tasks-master | loadjson.m | .m | Coursera-Tasks-master/machine learning/machine-learning-ex1/ex1/lib/jsonlab/loadjson.m | 18,732 | ibm852 | ab98cf173af2d50bbe8da4d6db252a20 | function data = loadjson(fname,varargin)
%
% data=loadjson(fname,opt)
% or
% data=loadjson(fname,'param1',value1,'param2',value2,...)
%
% parse a JSON (JavaScript Object Notation) file or string
%
% authors:Qianqian Fang (fangq<at> nmr.mgh.harvard.edu)
% created on 2011/09/09, including previous works from
%
% ... |
github | sychaichangkun/Coursera-Tasks-master | loadubjson.m | .m | Coursera-Tasks-master/machine learning/machine-learning-ex1/ex1/lib/jsonlab/loadubjson.m | 15,574 | utf_8 | 5974e78e71b81b1e0f76123784b951a4 | function data = loadubjson(fname,varargin)
%
% data=loadubjson(fname,opt)
% or
% data=loadubjson(fname,'param1',value1,'param2',value2,...)
%
% parse a JSON (JavaScript Object Notation) file or string
%
% authors:Qianqian Fang (fangq<at> nmr.mgh.harvard.edu)
% created on 2013/08/01
%
% $Id: loadubjson.m 460 2015-01-... |
github | sychaichangkun/Coursera-Tasks-master | saveubjson.m | .m | Coursera-Tasks-master/machine learning/machine-learning-ex1/ex1/lib/jsonlab/saveubjson.m | 16,123 | utf_8 | 61d4f51010aedbf97753396f5d2d9ec0 | function json=saveubjson(rootname,obj,varargin)
%
% json=saveubjson(rootname,obj,filename)
% or
% json=saveubjson(rootname,obj,opt)
% json=saveubjson(rootname,obj,'param1',value1,'param2',value2,...)
%
% convert a MATLAB object (cell, struct or array) into a Universal
% Binary JSON (UBJSON) binary string
%
% author... |
github | zmmachar/bkt-video-master | loadData.m | .m | bkt-video-master/data_pipeline/analysis/loadData.m | 2,196 | utf_8 | 4bf677e4bd3a25492fe8a27933b60eb1 | function [withResourceFormattedData, noResourceFormattedData, oneResourceFormattedData, exercises] = loadData(filename, threshold, subpartThreshold)
disp('Loading data...')
allData = load(filename);
fprintf('Filtering for exercises with more than %d events...\n', threshold);
[exercises, perExerciseTrac... |
github | zmmachar/bkt-video-master | getPartitions.m | .m | bkt-video-master/data_pipeline/analysis/getPartitions.m | 1,480 | utf_8 | 36eeea2217af880698f229edc5721af8 | function partitions = getPartitions( data, numPartitions)
%GETPARTITIONS Returns array of 'starts' indices to use for training data
% Detailed explanation goes here
numberOfExercises = size(data, 1);
partitions = cell(numberOfExercises, 1);
counter = 0;
for i =1:numberOfExercises
internalCoun... |
github | zmmachar/bkt-video-master | grabPartition.m | .m | bkt-video-master/data_pipeline/analysis/grabPartition.m | 769 | utf_8 | aa1adfae5f32547e95a18735c4bf70cc |
function filteredData = grabPartition(data, startIdx)
starts = data.starts(startIdx);
lengths = data.lengths(startIdx);
resourceCounts = data.resourceCounts(startIdx);
dataIdx = zeros(size(data.data, 2), 1);
newStarts = zeros(1, length(starts));
newStarts(1) = 1;
for i=1:size(starts, 2)
... |
github | zmmachar/bkt-video-master | getStudentBoundriesWithIds.m | .m | bkt-video-master/data_pipeline/analysis/+parsing/getStudentBoundriesWithIds.m | 1,055 | utf_8 | 92486879807c6edcfda51f0c663537f7 | %%assuming ordered by student
function [lengths, starts, ids] = getStudentBoundries(rawData)
studentIds = rawData(:, 1);
numStudents = size(unique(studentIds));
starts = zeros(1, numStudents(1));
lengths = zeros(1, numStudents(1));
ids = zeros(1, numStudents(1));
currentStudent = NaN;
curren... |
github | zmmachar/bkt-video-master | getStudentBoundries.m | .m | bkt-video-master/data_pipeline/analysis/+parsing/getStudentBoundries.m | 960 | utf_8 | 42c171f9d063dfd9fed66b6356c22b37 | %%assuming ordered by student
function [lengths, starts] = getStudentBoundries(rawData)
studentIds = rawData(:, 1);
numStudents = size(unique(studentIds));
starts = zeros(1, numStudents(1));
lengths = zeros(1, numStudents(1));
currentStudent = NaN;
currentStudentIndex = 0;
for i = 1:size(stu... |
github | zmmachar/bkt-video-master | predict_and_compare_pctCorrect.m | .m | bkt-video-master/data_pipeline/analysis/+fit/predict_and_compare_pctCorrect.m | 2,912 | utf_8 | 44a4741353fd238008be0ecef7695f66 | function [tot, rmse, count, perAttemptError, byResourceError, byLengthError, pctC] = predict_and_compare_pctCorrect(model,data, threshold)
% returns the proportion of incorrect predictions
import fit.*
predicted_correct_ans_probs = zeros(size(data.data,2));
predicted_correct_ans_probs(:) = mean(sum(data.data,1)-1);
p... |
github | zmmachar/bkt-video-master | predict_and_compare.m | .m | bkt-video-master/data_pipeline/analysis/+fit/predict_and_compare.m | 2,859 | utf_8 | 01623723fcbd0f66407872a941291473 | function [tot, rmse, count, perAttemptError, byResourceError, byLengthError] = predict_and_compare(model,data, threshold)
% returns the proportion of incorrect predictions
import fit.*
predicted_correct_ans_probs = predict_onestep(model,data);
rmse = 0;
tot = 0;
numResources = 0;
count = 0;
predictionError = zeros(1,... |
github | zmmachar/bkt-video-master | getSuperlativeNModels.m | .m | bkt-video-master/data_pipeline/analysis/+analysis/getSuperlativeNModels.m | 2,075 | utf_8 | db642c7345d76fb8cc1c340cb6d9b1d8 | function [ superlativeModelReference ] = getSuperlativeNModels(direction, n, ...
noMeanErr, expMeanErr, noResourceResults, expResourceResults, exerciseRef)
%GETTOPTHREEMODELS Summary of this function goes here
% Detailed explanation goes here
deltas = noMeanErr - expMeanErr;
ordered = sort(deltas, 1, dire... |
github | zmmachar/bkt-video-master | getMeanErr.m | .m | bkt-video-master/data_pipeline/analysis/+analysis/getMeanErr.m | 328 | utf_8 | b217ebdfdb365b298befef20a71560c9 | %Convenience function to combine the five fold results
function [ meanErr ] = getMeanErr( fiveFoldResults )
%GETMEANERR Summary of this function goes here
% Detailed explanation goes here
meanErr = mean([fiveFoldResults{1} fiveFoldResults{2} fiveFoldResults{3}...
fiveFoldResults{4} fiveFoldResults{5}], 2)... |
github | zmmachar/bkt-video-master | getMeanErr_extra.m | .m | bkt-video-master/data_pipeline/analysis/+analysis/getMeanErr_extra.m | 638 | utf_8 | 4c5ed109a4a671495275e8572eca2209 | %convenience function to combine the five fold results, for RMSE
function [ meanErr ] = getMeanErr_extra( fiveFoldResults )
%GETMEANERR Summary of this function goes here
% Detailed explanation goes here
%fiveFoldResults = cellfun(@(x) sqrt(x(:,1)./x(:,2)), fiveFoldResults, 'UniformOutput', false);
container =... |
github | kanster/moped-master | sfm_alignment_gui.m | .m | moped-master/moped2/modeling/sfm_alignment_gui.m | 23,461 | utf_8 | 2aa817bb74184ad10cc425ce7b6a9d5c | function varargout = sfm_alignment_gui(varargin)
% SFM_ALIGNMENT_GUI - Align a model with a predefined shape
%
% Usage: sfm_alignment_gui(model);
% sfm_alignment_gui(model, mesh);
%
% Input:
% model - SFM model you with to scale, rotate or translate
% mesh - Structure that contains mesh.x, me... |
github | kanster/moped-master | getCameraPos.m | .m | moped-master/moped2/modeling/getCameraPos.m | 3,045 | utf_8 | b2f17045d9e4a26b93e7d290c8806cd3 | function cam_pose = getCameraPos(pts2D, pts3D, K, init_R, init_T)
% GETCAMERAPOS - Find camera position from a set of 2D-3D correspondences.
%
% Usage: getCameraPos(pts2D, pts3D, K, init_R, init_T);
%
% Input:
% pts2D - 2-by-N array of 2D positions (in pixels)
% pts3D - 3-by-N array of 3D positions (in world co... |
github | kanster/moped-master | sift.m | .m | moped-master/moped2/modeling/sift.m | 2,606 | utf_8 | 17ee2c4e4870f31fca50f58f536b27af | % SIFT - This function reads an image and returns its SIFT keypoints.
%
% Usage: [image, descriptors, locs] = sift(imageFile)
%
% Input parameters:
% imageFile: the file name for the image.
%
% Returned:
% image: the image array in double format
% descriptors: a K-by-128 matrix, where each row gives a... |
github | kanster/moped-master | sfm_export_xml.m | .m | moped-master/moped2/modeling/sfm_export_xml.m | 5,267 | utf_8 | f61795559ee740c7a13dbd4fe06ad34d | function sfm_export_xml (filename, model, full_export, wt_append)
% SFM_EXPORT_MODEL - Export SFM model to file in XML format
%
% Usage: sfm_export_xml(filename, model, full_export, 'w')
%
% Input:
% filename - Text file to write to.
% model - SFM model to be exported.
% full_export - Export EVERYTHING from a... |
github | kanster/moped-master | sfm_bundler_book.m | .m | moped-master/moped2/modeling/sfm_bundler_book.m | 3,111 | utf_8 | d703df5f9b361980110b01ab174bac5f | function model = sfm_bundler_book(name, front_image_file, back_image_file, ...
spine_image_file, real_size, output_file)
% SFM_BUNDLER_BOOK - Create SFM model using 3 planar images
%
% Usage: model = sfm_bundler_book(name, front_image, back_iamge, spine_image,
% real_size, output_file)
%
% Input:
%... |
github | kanster/moped-master | projectPts.m | .m | moped-master/moped2/modeling/projectPts.m | 3,394 | utf_8 | 5b421de587e2a4433f1475bfd5cca929 | function [pts2D in_front] = projectPts(varargin)
% PROJECTPTS - Use the perspective projection to map pts in 3D to 2D.
% Function to use in SFM to jointly optimize the camera poses and 3D
% points. If you are using this function along with Levenberg-Marquardt
% optimization, you will find the 'alternative usage' ... |
github | kanster/moped-master | sfm_alignment_gui.m | .m | moped-master/moped3d/modeling/sfm_alignment_gui.m | 23,461 | utf_8 | 2aa817bb74184ad10cc425ce7b6a9d5c | function varargout = sfm_alignment_gui(varargin)
% SFM_ALIGNMENT_GUI - Align a model with a predefined shape
%
% Usage: sfm_alignment_gui(model);
% sfm_alignment_gui(model, mesh);
%
% Input:
% model - SFM model you with to scale, rotate or translate
% mesh - Structure that contains mesh.x, me... |
github | kanster/moped-master | sfm_export_xml.m | .m | moped-master/moped3d/modeling/sfm_export_xml.m | 5,267 | utf_8 | f61795559ee740c7a13dbd4fe06ad34d | function sfm_export_xml (filename, model, full_export, wt_append)
% SFM_EXPORT_MODEL - Export SFM model to file in XML format
%
% Usage: sfm_export_xml(filename, model, full_export, 'w')
%
% Input:
% filename - Text file to write to.
% model - SFM model to be exported.
% full_export - Export EVERYTHING from a... |
github | kanster/moped-master | projectPts.m | .m | moped-master/moped3d/modeling/projectPts.m | 3,394 | utf_8 | 5b421de587e2a4433f1475bfd5cca929 | function [pts2D in_front] = projectPts(varargin)
% PROJECTPTS - Use the perspective projection to map pts in 3D to 2D.
% Function to use in SFM to jointly optimize the camera poses and 3D
% points. If you are using this function along with Levenberg-Marquardt
% optimization, you will find the 'alternative usage' ... |
github | andyzeng/apc-vision-toolbox-master | pcregrigidGPU.m | .m | apc-vision-toolbox-master/ros-packages/catkin_ws/src/pose_estimation/src/pcregrigidGPU.m | 19,665 | UNKNOWN | 7acd58f84ba0ea7c0ea7314dc6729888 | function [tform, movingReg, rmse] = pcregrigidGPU(moving, fixed, varargin)
% GPU version of Matlab's pcregrigid
% pcregrigid Register two point clouds with ICP algorithm.
% tform = pcregrigid(moving, fixed) returns the rigid transformation
% that registers the moving point cloud with the fixed point cloud. moving a... |
github | andyzeng/apc-vision-toolbox-master | loadjson.m | .m | apc-vision-toolbox-master/rgbd-utils/matlab/external/jsonlab/loadjson.m | 22,559 | ibm852 | 09a85cd74f0d5c9b0eb6ba3396e252d5 | function data = loadjson(fname,varargin)
%
% data=loadjson(fname,opt)
% or
% data=loadjson(fname,'param1',value1,'param2',value2,...)
%
% parse a JSON (JavaScript Object Notation) file or string
%
% authors:Qianqian Fang (fangq<at> nmr.mgh.harvard.edu)
% created on 2011/09/09, including previous works from
%
% ... |
github | andyzeng/apc-vision-toolbox-master | show.m | .m | apc-vision-toolbox-master/rgbd-utils/matlab/external/peter/show.m | 4,944 | utf_8 | e2225be3d05b416c72fc6f1acbde02d0 | % SHOW - Displays an image with the right size and colors and with a title.
%
% Usage:
% h = show(im)
% h = show(im, figNo)
% h = show(im, title)
% h = show(im, figNo, title)
%
% Arguments: im - Either a 2 or 3D array of pixel values or the name
% of an image f... |
github | andyzeng/apc-vision-toolbox-master | nonmaxsuppts.m | .m | apc-vision-toolbox-master/rgbd-utils/matlab/external/peter/nonmaxsuppts.m | 5,086 | utf_8 | 6d711b2f28fd3ea2543d59f3e89139b7 | % NONMAXSUPPTS - Non-maximal suppression for features/corners
%
% Non maxima suppression and thresholding for points generated by a feature
% or corner detector.
%
% Usage: [r,c] = nonmaxsuppts(cim, radius, thresh, im)
% /
% ... |
github | andyzeng/apc-vision-toolbox-master | ransacfitfundmatrix.m | .m | apc-vision-toolbox-master/rgbd-utils/matlab/external/peter/ransacfitfundmatrix.m | 5,544 | utf_8 | b87d72c56902f27c573b6c545f6754ab | % RANSACFITFUNDMATRIX - fits fundamental matrix using RANSAC
%
% Usage: [F, inliers] = ransacfitfundmatrix(x1, x2, t)
%
% Arguments:
% x1 - 2xN or 3xN set of homogeneous points. If the data is
% 2xN it is assumed the homogeneous scale factor is 1.
% x2 - 2xN or 3xN set of homogeneo... |
github | andyzeng/apc-vision-toolbox-master | matrix2quaternion.m | .m | apc-vision-toolbox-master/rgbd-utils/matlab/external/peter/matrix2quaternion.m | 2,010 | utf_8 | ad7a1983aceaa9953be167eddabb22ae | % MATRIX2QUATERNION - Homogeneous matrix to quaternion
%
% Converts 4x4 homogeneous rotation matrix to quaternion
%
% Usage: Q = matrix2quaternion(T)
%
% Argument: T - 4x4 Homogeneous transformation matrix
% Returns: Q - a quaternion in the form [w, xi, yj, zk]
%
% See Also QUATERNION2MATRIX
% Copyright (c) 2008 ... |
github | andyzeng/apc-vision-toolbox-master | harris.m | .m | apc-vision-toolbox-master/rgbd-utils/matlab/external/peter/harris.m | 4,707 | utf_8 | 9123c3c21835dfa4d233abe149d6620d | % HARRIS - Harris corner detector
%
% Usage: cim = harris(im, sigma)
% [cim, r, c] = harris(im, sigma, thresh, radius, disp)
% [cim, r, c, rsubp, csubp] = harris(im, sigma, thresh, radius, disp)
%
% Arguments:
% im - image to be processed.
% sigma - standard... |
github | andyzeng/apc-vision-toolbox-master | hnormalise.m | .m | apc-vision-toolbox-master/rgbd-utils/matlab/external/peter/hnormalise.m | 1,010 | utf_8 | 5c1ed3ba361fa6f28b1517af1924af40 | % HNORMALISE - Normalises array of homogeneous coordinates to a scale of 1
%
% Usage: nx = hnormalise(x)
%
% Argument:
% x - an Nxnpts array of homogeneous coordinates.
%
% Returns:
% nx - an Nxnpts array of homogeneous coordinates rescaled so
% that the scale values nx(N,:) are all 1.
%
... |
github | andyzeng/apc-vision-toolbox-master | homography2d.m | .m | apc-vision-toolbox-master/rgbd-utils/matlab/external/peter/homography2d.m | 2,406 | utf_8 | 6b7055a627ffb3f6658b1f7f7dc1e4c4 | % HOMOGRAPHY2D - computes 2D homography
%
% Usage: H = homography2d(x1, x2)
% H = homography2d(x)
%
% Arguments:
% x1 - 3xN set of homogeneous points
% x2 - 3xN set of homogeneous points such that x1<->x2
%
% x - If a single argument is supplied it is assumed that it
%... |
github | andyzeng/apc-vision-toolbox-master | iscolinear.m | .m | apc-vision-toolbox-master/rgbd-utils/matlab/external/peter/iscolinear.m | 2,318 | utf_8 | 65025b7413f8f6b4cb16dd1689a5900f | % ISCOLINEAR - are 3 points colinear
%
% Usage: r = iscolinear(p1, p2, p3, flag)
%
% Arguments:
% p1, p2, p3 - Points in 2D or 3D.
% flag - An optional parameter set to 'h' or 'homog'
% indicating that p1, p2, p3 are homogneeous
% coordinates with arbitrary s... |
github | andyzeng/apc-vision-toolbox-master | monofilt.m | .m | apc-vision-toolbox-master/rgbd-utils/matlab/external/peter/monofilt.m | 6,435 | utf_8 | 07ef46eb32d19a4d79e9ec304c6cb2d3 | % MONOFILT - Apply monogenic filters to an image to obtain 2D analytic signal
%
% Implementation of Felsberg's monogenic filters
%
% Usage: [f, h1f, h2f, A, theta, psi] = ...
% monofilt(im, nscale, minWaveLength, mult, sigmaOnf, orientWrap)
% 3 4 2 0.65 ... |
github | andyzeng/apc-vision-toolbox-master | ransacfithomography.m | .m | apc-vision-toolbox-master/rgbd-utils/matlab/external/peter/ransacfithomography.m | 4,920 | utf_8 | d479d49f7c8e8689283005bcbe340b61 | % RANSACFITHOMOGRAPHY - fits 2D homography using RANSAC
%
% Usage: [H, inliers] = ransacfithomography(x1, x2, t)
%
% Arguments:
% x1 - 2xN or 3xN set of homogeneous points. If the data is
% 2xN it is assumed the homogeneous scale factor is 1.
% x2 - 2xN or 3xN set of homogeneous po... |
github | andyzeng/apc-vision-toolbox-master | fundmatrix.m | .m | apc-vision-toolbox-master/rgbd-utils/matlab/external/peter/fundmatrix.m | 3,961 | utf_8 | 250dfa8051640daab30229f35667f4d6 | % FUNDMATRIX - computes fundamental matrix from 8 or more points
%
% Function computes the fundamental matrix from 8 or more matching points in
% a stereo pair of images. The normalised 8 point algorithm given by
% Hartley and Zisserman p265 is used. To achieve accurate results it is
% recommended that 12 or more poi... |
github | andyzeng/apc-vision-toolbox-master | hline.m | .m | apc-vision-toolbox-master/rgbd-utils/matlab/external/peter/hline.m | 1,584 | utf_8 | 7887599478d2ebb7e50fdef565f8f3f5 | % HLINE - Plot 2D lines defined in homogeneous coordinates.
%
% Function for ploting 2D homogeneous lines defined by 2 points
% or a line defined by a single homogeneous vector
%
% Usage: hline(p1,p2) where p1 and p2 are 2D homogeneous points.
% hline(p1,p2,'colour_name') 'black' 'red' 'white' etc
% ... |
github | andyzeng/apc-vision-toolbox-master | ransac.m | .m | apc-vision-toolbox-master/rgbd-utils/matlab/external/peter/ransac.m | 9,570 | utf_8 | 2bbf309b3b356a83d8e06baa521861f5 | % RANSAC - Robustly fits a model to data with the RANSAC algorithm
%
% Usage:
%
% [M, inliers] = ransac(x, fittingfn, distfn, degenfn s, t, feedback, ...
% maxDataTrials, maxTrials)
%
% Arguments:
% x - Data sets to which we are seeking to fit a model M
% It is assumed ... |
github | andyzeng/apc-vision-toolbox-master | gaussfilt.m | .m | apc-vision-toolbox-master/rgbd-utils/matlab/external/peter/gaussfilt.m | 892 | utf_8 | 266e718eee73f61a8bc07650565a1692 | % GAUSSFILT - Small wrapper function for convenient Gaussian filtering
%
% Usage: smim = gaussfilt(im, sigma)
%
% Arguments: im - Image to be smoothed.
% sigma - Standard deviation of Gaussian filter.
%
% Returns: smim - Smoothed image.
%
% See also: INTEGGAUSSFILT
% Peter Kovesi
% Centre for Explorti... |
github | andyzeng/apc-vision-toolbox-master | derivative5.m | .m | apc-vision-toolbox-master/rgbd-utils/matlab/external/peter/derivative5.m | 4,808 | utf_8 | 989b39a3f681a8cad7375573fa1a7a0f | % DERIVATIVE5 - 5-Tap 1st and 2nd discrete derivatives
%
% This function computes 1st and 2nd derivatives of an image using the 5-tap
% coefficients given by Farid and Simoncelli. The results are significantly
% more accurate than MATLAB's GRADIENT function on edges that are at angles
% other than vertical or horizont... |
github | andyzeng/apc-vision-toolbox-master | quaternion2matrix.m | .m | apc-vision-toolbox-master/rgbd-utils/matlab/external/peter/quaternion2matrix.m | 1,413 | utf_8 | 7296cadf62f6ca9273e726ffd7e19d95 | % QUATERNION2MATRIX - Quaternion to a 4x4 homogeneous transformation matrix
%
% Usage: T = quaternion2matrix(Q)
%
% Argument: Q - a quaternion in the form [w xi yj zk]
% Returns: T - 4x4 Homogeneous rotation matrix
%
% See also MATRIX2QUATERNION, NEWQUATERNION, QUATERNIONROTATE
% Copyright (c) 2008 Peter Kovesi
... |
github | andyzeng/apc-vision-toolbox-master | matchbymonogenicphase.m | .m | apc-vision-toolbox-master/rgbd-utils/matlab/external/peter/matchbymonogenicphase.m | 9,328 | utf_8 | e63225faedcf391fb6411d27d71a208e | % MATCHBYMONOGENICPHASE - match image feature points using monogenic phase data
%
% Function generates putative matches between previously detected
% feature points in two images by looking for points that have minimal
% differences in monogenic phase data within windows surrounding each point.
% Only points that corre... |
github | andyzeng/apc-vision-toolbox-master | normalise2dpts.m | .m | apc-vision-toolbox-master/rgbd-utils/matlab/external/peter/normalise2dpts.m | 2,361 | utf_8 | 2b9d94a3681186006a3fd47a45faf939 | % NORMALISE2DPTS - normalises 2D homogeneous points
%
% Function translates and normalises a set of 2D homogeneous points
% so that their centroid is at the origin and their mean distance from
% the origin is sqrt(2). This process typically improves the
% conditioning of any equations used to solve homographies, fun... |
github | andyzeng/apc-vision-toolbox-master | hcross.m | .m | apc-vision-toolbox-master/rgbd-utils/matlab/external/peter/hcross.m | 919 | utf_8 | dbb3f3d4ef79e25ca3000ea976409e0c | % HCROSS - Homogeneous cross product, result normalised to s = 1.
%
% Function to form cross product between two points, or lines,
% in homogeneous coodinates. The result is normalised to lie
% in the scale = 1 plane.
%
% Usage: c = hcross(a,b)
%
% Copyright (c) 2000-2005 Peter Kovesi
% School of Computer Science & ... |
github | andyzeng/apc-vision-toolbox-master | matchbycorrelation.m | .m | apc-vision-toolbox-master/rgbd-utils/matlab/external/peter/matchbycorrelation.m | 7,076 | utf_8 | 12d7e8d4ad6e140c94444ddc3682d518 | % MATCHBYCORRELATION - match image feature points by correlation
%
% Function generates putative matches between previously detected
% feature points in two images by looking for points that are maximally
% correlated with each other within windows surrounding each point.
% Only points that correlate most strongly with... |
github | andyzeng/apc-vision-toolbox-master | estimateRt.m | .m | apc-vision-toolbox-master/rgbd-utils/matlab/external/sfm/estimateRt.m | 501 | utf_8 | d7ad6f4ea024b18ceb9915fec69b9a71 | % Usage: Rt = estimateRt(x1, x2)
% Rt = estimateRt(x)
%
% Arguments:
% x1, x2 - Two sets of corresponding 3xN set of homogeneous
% points.
%
% x - If a single argument is supplied it is assumed that it
% is in the form x = [x1; x2]
% Returns:
% ... |
github | andyzeng/apc-vision-toolbox-master | ransacfitRt.m | .m | apc-vision-toolbox-master/rgbd-utils/matlab/external/sfm/ransacfitRt.m | 2,778 | utf_8 | 07e66db36ff0d62d460c90f54e34bc7b | % Usage: [Rt, inliers] = ransacfitRt(x1, x2, t)
%
% Arguments:
% x1 - 3xN set of 3D points.
% x2 - 3xN set of 3D points such that x1<->x2.
% t - The distance threshold between data point and the model
% used to decide whether a point is an inlier or not.
%
% Note that it ... |
github | andyzeng/apc-vision-toolbox-master | computeNormalsSquareSupport.m | .m | apc-vision-toolbox-master/rgbd-utils/matlab/external/s-gupta/computeNormalsSquareSupport.m | 4,125 | utf_8 | 8b890476aa3cb04e7c1ff295f21804d4 | function [N b] = computeNormalsSquareSupport(depthImage, missingMask, R, sc, cameraMatrix, superpixels)
% function [N b] = computeNormalsMatlab(depthImage, missingMask, R, sc, cameraMatrix, superpixels)
% Clip out a 2R+1 x 2R+1 window at each point and estimate
% the normal from points within this window. In case ... |
github | wupeng78/weiliu89-caffe-master | classification_demo.m | .m | weiliu89-caffe-master/matlab/demo/classification_demo.m | 5,412 | utf_8 | 8f46deabe6cde287c4759f3bc8b7f819 | function [scores, maxlabel] = classification_demo(im, use_gpu)
% [scores, maxlabel] = classification_demo(im, use_gpu)
%
% Image classification demo using BVLC CaffeNet.
%
% IMPORTANT: before you run this demo, you should download BVLC CaffeNet
% from Model Zoo (http://caffe.berkeleyvision.org/model_zoo.html)
%
% *****... |
github | liangjiecn/Saliency2013-master | genbinarymap.m | .m | Saliency2013-master/genbinarymap.m | 1,003 | utf_8 | 5432b5f50cbd40dd5eaafcc8d09ea5d8 | function rect = genbinarymap(imglabel, salmap)
imx = processing(salmap);
imx = imresize(imx,[size(imglabel,1) size(imglabel,2)]);
stats = regionprops(imx, 'BoundingBox');
rect = stats.BoundingBox;
figure;
imshow(imglabel);
hold on;
rectangle('Position',rect,'EdgeColor','r', 'LineWidth',4);
F = getframe;
imwrite(F.cdat... |
github | liangjiecn/Saliency2013-master | HSI_Saliency.m | .m | Saliency2013-master/HSI_Saliency.m | 11,570 | utf_8 | 4ec1d254e5a3e2db063671a1348b9980 | function [rgb, iCM, cCM, oCM, Sm, HSI_group,HSI_spectralED, HSI_spectralSAD, ...
Sm_HSI_IOC, Sm_HSI_IOG, Sm_HSI_IOE, Sm_HSI_IOA, Sm_HSI_EOG, Sm_HSI_EOA, Sm_HSI_GEA]...
= HSI_Saliency(scene,varargin)
%extract saliency map from hyperspectral data
%input, scene, hyperspectral image in mat format
%outpu... |
github | liangjiecn/Saliency2013-master | Itti_Saliency.m | .m | Saliency2013-master/Itti_Saliency.m | 12,048 | utf_8 | ecf9b4013dbb1ce103d06104713432c2 | function [iCM, cCM, oCM, sm] = Itti_Saliency(img,varargin)
verbose=0;
pictures=0;
% Load image
if verbose
fprintf('Loading %s\n',filename);
end
image=img;
if pictures
ShowImage(1,image,'Image');
end
image=double(image);
% Extract luminance and color channels
if verbose
fprintf('Extracting early channels\... |
github | ignaciorlando/fundus-vessel-segmentation-tbme-master | SaveSegmentations.m | .m | fundus-vessel-segmentation-tbme-master/SaveSegmentations.m | 692 | utf_8 | a19a2435fc18c97668edaac13e6bf99a |
function SaveSegmentations(root, config, results, model, filenames)
if (sum(config.features.pairwise.pairwiseFeatures)==0)
tag = 'up';
else
if (strcmp(config.crfVersion, 'fully-connected'))
tag = 'fccrf';
else
tag = 'lnbcrf';
end
end
... |
github | ignaciorlando/fundus-vessel-segmentation-tbme-master | preprocessing.m | .m | fundus-vessel-segmentation-tbme-master/Preprocessing/preprocessing.m | 900 | utf_8 | b00382411850c284542064931f700860 |
function [I_extended, mask_extended] = preprocessing(I, mask, options)
% preprocessing Preprocess the given image
% I = preprocessing(I, mask, options)
% OUTPUT: I: image preprocessed
% INPUT: I: image (it can be a RGB image)
% mask: a binary mask indicating the FOV
% options: a configuration stru... |
github | ignaciorlando/fundus-vessel-segmentation-tbme-master | getConfiguration_GenericDataset.m | .m | fundus-vessel-segmentation-tbme-master/Configuration/getConfiguration_GenericDataset.m | 4,211 | utf_8 | 3b42b36d3c6875f9bcd32ae94b5b87e3 |
function [config] = getConfiguration_GenericDataset(datasetName, datasetPath, resultsPath, learnC, crfVersion, cValue)
% getConfiguration_GenericDataset Get a generic configuration structure
% [config] = getConfiguration_GenericDataset(datasetName, datasetPath, resultsPath, learnC, crfVersion, cValue)
% data... |
github | ignaciorlando/fundus-vessel-segmentation-tbme-master | completeModelSelection.m | .m | fundus-vessel-segmentation-tbme-master/SOSVM/completeModelSelection.m | 24,551 | utf_8 | 6d757a6f5c601db893e42afbd4e653fc |
function [model, c, qualityOverValidation, config] = completeModelSelection(trainingdata, validationdata, config)
% ---------------------------------------------------------------------
% UNARY FEATURES
% ------------------------------------------------------------------... |
github | ignaciorlando/fundus-vessel-segmentation-tbme-master | sosvmCallback.m | .m | fundus-vessel-segmentation-tbme-master/SOSVM/sosvmCallback.m | 2,228 | utf_8 | 1b11894202384c63524574c812dde6b6 |
function [model, config, state] = sosvmCallback(config, trainingdata)
% sosvmCallback Configure the SOSVM and call it to learn the model
% [model, config, state] = sosvmCallback(config, trainingdata)
% OUTPUT: model: learned model
% config: configuration structure
% state: last state
% INPUT: co... |
github | ignaciorlando/fundus-vessel-segmentation-tbme-master | bundler.m | .m | fundus-vessel-segmentation-tbme-master/SOSVM/bundler.m | 3,470 | utf_8 | 95b697612f643055924648e57f273240 |
function state = bundler(state, a, b, soft)
% BUNDLER
%
% Solves the problem
%
% min_{w,xi} lambda/2 |w|^2 + xi, xi >= b_t - <a_t, w> for t = 1, ..., T
%
% Optionally, it also enforces additional hard constraints
%
% <a_p,w> >= b_p, p = 1, ..., P
%
% The algorithm uses the dual to do so. Introducing L... |
github | ignaciorlando/fundus-vessel-segmentation-tbme-master | sosvm.m | .m | fundus-vessel-segmentation-tbme-master/SOSVM/sosvm.m | 3,610 | utf_8 | cb080c4980b246f497f94f4960f9281f | function [model, config, state] = sosvm(config, patterns, labels, oldstate)
% sosvm Learn a model using a SOSVM
% [model, config, state] = sosvm(config, patterns, labels, oldstate)
% OUTPUT: model: learned model
% config: configuration structure, updated with learning
% information
% state: last... |
github | ignaciorlando/fundus-vessel-segmentation-tbme-master | encodeTrainingData.m | .m | fundus-vessel-segmentation-tbme-master/SOSVM/Util/encodeTrainingData.m | 1,370 | utf_8 | a7b092f71ed3d13d3f3365227f46b5ad |
function [patterns, labels] = encodeTrainingData(config, trainingdata)
% Preallocate memory for the patterns and labels arrays
patterns = cell(size(trainingdata.unaryFeatures));
labels = cell(size(trainingdata.unaryFeatures));
% For each image in the training set
for i = 1:length(pat... |
github | ignaciorlando/fundus-vessel-segmentation-tbme-master | pairwisePotentials.m | .m | fundus-vessel-segmentation-tbme-master/SOSVM/Util/pairwisePotentials.m | 523 | utf_8 | c8cc09767a3fe95257b89e84d50b0d79 |
function [phi_p] = pairwisePotentials(config, x, y)
% Get the mask
mask = x{2};
% Get the pairwise features
pairwiseFeatures = x{4};
% Get the pairwises using the MEX implementation
phi_p = - pairwisePart(int32(size(mask, 2)), int32(size(mask, 1)), ...
int16(y), (... |
github | ignaciorlando/fundus-vessel-segmentation-tbme-master | getfeatures.m | .m | fundus-vessel-segmentation-tbme-master/SOSVM/Util/getfeatures.m | 471 | utf_8 | 961fd74281adcf38a286316ef3810092 |
function [phi] = getfeatures(x, y)
% Get the feature vectors
X = x{3};
% Compute the unary features
phi_u = zeros(size(X, 1), size(X, 2) * 2);
% Take the Kronecker product of the features with the corresponding
% binary vector, according to the given labeling y
phi_u(y... |
github | ignaciorlando/fundus-vessel-segmentation-tbme-master | constraintCB.m | .m | fundus-vessel-segmentation-tbme-master/SOSVM/Callbacks/constraintCB.m | 2,656 | utf_8 | 48a8eba049ae98261d023c3fb97cf30a |
function [yhat] = constraintCB(config, model, x, y)
% constraintCB Compute the most violated constraint
% [yhat] = constraintCB(config, model, x, y)
% OUTPUT: yhat: estimated labelling
% INPUT: config: configuration structure
% model: learned model
% x: a cell array containing the FOV mask, the un... |
github | ignaciorlando/fundus-vessel-segmentation-tbme-master | featureCB.m | .m | fundus-vessel-segmentation-tbme-master/SOSVM/Callbacks/featureCB.m | 1,309 | utf_8 | a553793709acb16ae4b01d1f42fc2367 |
function [phi] = featureCB(config, x, y)
% featureCB Compute the feature map.
% [phi] = featureCB(config, x, y)
% OUTPUT: phi: feature map
% INPUT: config: configuration structure
% x: cell-array with the training data
% y: cell-array with a labeling.
% Put both the unary and the pairwise... |
github | ignaciorlando/fundus-vessel-segmentation-tbme-master | lossCB.m | .m | fundus-vessel-segmentation-tbme-master/SOSVM/Callbacks/lossCB.m | 286 | utf_8 | 99eefc5b25edcff240b95b26ef2910a7 |
function [delta] = lossCB(param, y, tildey)
% lossCB Compute the loss
% [delta] = lossCB(param, y, tildey)
% OUTPUT: delta: loss
% INPUT: param: parameters
% y: ground truth labelling
% tildey: estimated labelling
delta = length(find(y~=tildey));
end |
github | ignaciorlando/fundus-vessel-segmentation-tbme-master | compareGivenSegmentations.m | .m | fundus-vessel-segmentation-tbme-master/Util/Evaluation/compareGivenSegmentations.m | 2,585 | utf_8 | 82d0ca38817a23cacd396602293fe432 |
function [qualityMeasures, averageQualityMeasures] = compareGivenSegmentations(segmentations, masks, groundtruth)
% compareGivenSegmentation Compare a list of given segmentations with
% respect to the ground truth labellings
% [qualityMeasures, averageQualityMeasures] = compareGivenSegmentations(segmentations, mas... |
github | ignaciorlando/fundus-vessel-segmentation-tbme-master | evaluateOverTestData.m | .m | fundus-vessel-segmentation-tbme-master/Util/Evaluation/evaluateOverTestData.m | 193 | utf_8 | fd20980a30616351181f204b66e45a2e |
function [result] = evaluateOverTestData(param, model, testset)
% Get results
[result.segmentations, result.qualityMeasures] = getBunchSegmentations(param, testset, model);
end |
github | ignaciorlando/fundus-vessel-segmentation-tbme-master | compareSegmentations.m | .m | fundus-vessel-segmentation-tbme-master/Util/Evaluation/compareSegmentations.m | 3,149 | utf_8 | 77c66a0d3ec6f6b961aaac9037d1d609 |
function [qualityMeasures, averageQualityMeasures] = compareSegmentations(segmentationRoot, groundtruthRoot, masksRoot)
% compareSegmentation Compare segmentations
% [qualityMeasures, averageQualityMeasures] = compareSegmentations(segmentationRoot, groundtruthRoot, masksRoot)
% OUTPUT: qualityMeasures: all the qua... |
github | ignaciorlando/fundus-vessel-segmentation-tbme-master | computeAriasQualityMeasure.m | .m | fundus-vessel-segmentation-tbme-master/Util/Evaluation/computeAriasQualityMeasure.m | 1,606 | utf_8 | 0013d514e0bb5d6b77f23ddf87b3b2ca |
function qualityArias = computeAriasQualityMeasure(Sg, S, alpha, beta)
% Sg = reference image, gold standard segmentation
% S = segmentation to evaluate
Sg = logical(Sg);
S = logical(S);
if (nargin < 3)
alpha = 2;
beta = 2;
end
% ***************... |
github | ignaciorlando/fundus-vessel-segmentation-tbme-master | getAverageMeasures.m | .m | fundus-vessel-segmentation-tbme-master/Util/Evaluation/Metrics/getAverageMeasures.m | 547 | utf_8 | a18d5510fca3417f3b5941ca6ddedb61 |
function [averageQualityMeasures] = getAverageMeasures(qualityMeasures)
averageQualityMeasures.se = mean(qualityMeasures.se);
averageQualityMeasures.sp = mean(qualityMeasures.sp);
averageQualityMeasures.acc = mean(qualityMeasures.acc);
averageQualityMeasures.precision = mean(qualityMeasures.... |
github | ignaciorlando/fundus-vessel-segmentation-tbme-master | getQualityMeasures.m | .m | fundus-vessel-segmentation-tbme-master/Util/Evaluation/Metrics/getQualityMeasures.m | 1,328 | utf_8 | 3c45f3ad1a8d612acf5f71a0db29e929 |
function qualityMeasures = getQualityMeasures(yhat, y)
% getQualityMeasures Compute quality measures
% qualityMeasures = getQualityMeasures(yhat, y)
% OUTPUT: qualityMeasures: quality measures
% INPUT: yhat: estimated labelling
% y: ground truth labelling
% Get the confusion matrix
C = confusi... |
github | ignaciorlando/fundus-vessel-segmentation-tbme-master | getAverageMeasures2.m | .m | fundus-vessel-segmentation-tbme-master/Util/Evaluation/Metrics/getAverageMeasures2.m | 2,349 | utf_8 | 6c6b4396e665bf80e4275dd91d5640d6 |
function [averageQualityMeasures] = getAverageMeasures2(qualityMeasures)
% getAverageMeasures2 Compute the average measures
% [averageQualityMeasures] = getAverageMeasures2(qualityMeasures)
% OUTPUT: averageQualityMeasures: average quality measures
% INPUT: qualityMeasures: struct with arrays for each specific qu... |
github | ignaciorlando/fundus-vessel-segmentation-tbme-master | vl_demo_aib.m | .m | fundus-vessel-segmentation-tbme-master/Util/vlfeat/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 | ignaciorlando/fundus-vessel-segmentation-tbme-master | vl_demo_alldist.m | .m | fundus-vessel-segmentation-tbme-master/Util/vlfeat/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 | ignaciorlando/fundus-vessel-segmentation-tbme-master | vl_demo_ikmeans.m | .m | fundus-vessel-segmentation-tbme-master/Util/vlfeat/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 | ignaciorlando/fundus-vessel-segmentation-tbme-master | vl_demo_svm.m | .m | fundus-vessel-segmentation-tbme-master/Util/vlfeat/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 =... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.