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 | BerkeleyLab/Global-Feedback-Simulator-master | bbf_config.m | .m | Global-Feedback-Simulator-master/source/test_dc_matrix/bbf_config.m | 4,463 | utf_8 | d4baa419e424af376c59e4de216e3f0d | % Beam-based Feedback Parameters Configuration
% Jack Olivieri - LBNL: February 2012
%%% measurements %%%
% 1st row -> Energy deviations
% 2nd row -> Bunch length deviations
% 3rd row -> time deviations
% 4th row -> relative energy spread
% more rows? maybe in the future
% columns -> input signal to dc matrix
% element... |
github | Sharmarajnish/Numerical_Methods-master | pdex1.m | .m | Numerical_Methods-master/PDEPE_EXAMPLE_MFILES/pdex1.m | 917 | utf_8 | 7fea5946a7d5d31713510ca1adf73e9c | function pdex1
m = 0;
x = linspace(0,1,21);
t = linspace(0,2,101);
sol = pdepe(m,@pdex1pde,@pdex1ic,@pdex1bc,x,t);
% Extract the first solution component as u.
u = sol(:,:,1);
% A surface plot is often a good way to study a solution.
surf(x,t,u)
title('Numerical solution computed with 21 mesh point... |
github | Sharmarajnish/Numerical_Methods-master | pdex5.m | .m | Numerical_Methods-master/PDEPE_EXAMPLE_MFILES/pdex5.m | 3,544 | utf_8 | 31df15f1a3ea8e5643c0e1fee30961e4 | function pdex5
%PDEX5 Example 5 for PDEPE
% This example is a mathematical model of the first steps of tumour-related
% angiogenesis [1]. The PDEs are
%
% Dn/Dt = D(d*Dn/Dx - a*n*Dc/Dx)/Dx + s*r*n*(N - n)
% Dc/Dt = D(Dc/Dx)/Dx + s*(n/(n+1) - c)
%
% In the form expected by PDEPE, the equations... |
github | Sharmarajnish/Numerical_Methods-master | pdeads.m | .m | Numerical_Methods-master/PDEPE_EXAMPLE_MFILES/pdeads.m | 1,309 | utf_8 | 2902689f297879efa5269684d005f2cd | function [t,x,u1,u2]=pdeads;
m = 0; % because we are dealing with a slab geometry
x = linspace(0,1,21); % 21 discrete points dx=0.05
t = linspace(0,1,101); % 101 discrete points dt=.01
sol = pdepe(m,@pdeadspde,@pdeadsic,@pdeadsbc,x,t);
u1 = sol(:,:,1);
u2 = sol(:,:,2);
figure
surf(x,t,u1)
title('u1(x,t)'... |
github | Sharmarajnish/Numerical_Methods-master | pdeNu.m | .m | Numerical_Methods-master/PDEPE_EXAMPLE_MFILES/pdeNu.m | 1,415 | utf_8 | 886b8e2de4f2d2473483d96b752e3b66 | function [x,t,u]=pdeNu;
m = 1;
x = linspace(0,1,21);
t = linspace(0,1,101);
sol = pdepe(m,@pdeNupde,@pdeNuic,@pdeNubc,x,t);
% Extract the first solution component as u.
%u=sol(:,:,1);
u = [zeros(1,21); sol(2:end,:,1)];
% A surface plot is often a good way to study a solution.
surf(x,t,u)
title('Nu... |
github | Sharmarajnish/Numerical_Methods-master | pdex4.m | .m | Numerical_Methods-master/PDEPE_EXAMPLE_MFILES/pdex4.m | 1,120 | utf_8 | 6626e34a67bb3e7be76424e4a97b9dfd | function pdex4
m = 0;
x = [0 0.005 0.01 0.05 0.1 0.2 0.5 0.7 0.9 0.95 0.99 0.995 1];
t = [0 0.005 0.01 0.05 0.1 0.5 1 1.5 2];
sol = pdepe(m,@pdex4pde,@pdex4ic,@pdex4bc,x,t);
u1 = sol(:,:,1);
u2 = sol(:,:,2);
figure
surf(x,t,u1)
title('u1(x,t)')
xlabel('Distance x')
ylabel('Time t')
figure
surf(x,t,u2... |
github | HeYijia/OpenVehicleVision-master | im2vanishingpoint.m | .m | OpenVehicleVision-master/my_vehicle_vision_util/im2vanishingpoint.m | 2,564 | utf_8 | 16b69a697b3af2bc7e9477b77e140022 | function [pointVP, vx, vy] = im2vanishingpoint(im1, im2)
% im2vanishingpoint(imread('dataset\dataset4\sequence\04562.jpg'),imread('dataset\dataset4\sequence\04563.jpg'));
% im2vanishingpoint(imread('dataset\dataset4\sequence\04564.jpg'),imread('dataset\dataset4\sequence\04565.jpg'));
% folder = 'D:\Users\zqying\Do... |
github | HeYijia/OpenVehicleVision-master | test.m | .m | OpenVehicleVision-master/my_vehicle_vision_util/+rgb2ii/test.m | 2,755 | utf_8 | 689fcae0ffd75bf71bed40783e0cf80f | function test()
% GetInvariantImage
% compare_ii_methods
compare_ours_and_others
% test_ours
% show_proj_table
end
function compare_ii_methods()
inputImage = ImCtrl(@imread, FilePick());
alpha = Slider([0 1], 'Value', 0.2);
will2014 = ImCtrl(@rgb2ii.maddern2014, inputImage, alpha); % .53
alvarez2011 = Im... |
github | HeYijia/OpenVehicleVision-master | test.m | .m | OpenVehicleVision-master/my_vehicle_vision_util/+grad/test.m | 1,641 | utf_8 | c08b13f2c272ea5c1da6bad43e879778 | function test()
% GetInvariantImage
compare_ours_and_others
% test_ours
end
function compare_ours_and_others()
inputImage = ImCtrl(@imread, FilePick());
%% GetInvariantImage
angle = Slider([1 180]);
tipus = Checkbox('norm');
regularize = Checkbox('Discard outliers', 'Value', 1);
InvariantImage = ImCt... |
github | HeYijia/OpenVehicleVision-master | roadDetectionViaBird.m | .m | OpenVehicleVision-master/main/roadDetectionViaBird.m | 8,257 | utf_8 | 3648d78f7ddcf6502795a5b363dea0c7 | function info = roadDetectionViaBird(RawImg, info)
% ROADDETECTIONVIABIRD display road detection result of the image.
% Based on the static road scene image, the algorithm extract two road
% boundaries and middle lane-marking using straight line model.
%
% This code is the implementation of the approach proposed i... |
github | HeYijia/OpenVehicleVision-master | roadDetection.m | .m | OpenVehicleVision-master/main/roadDetection.m | 7,212 | utf_8 | b1ec966576493a64aca1d3a43c72de89 | function h = roadDetection(FILENAME)
% ROADDETECTION display road detection result of the image file
% specified by the string FILENAME.
% Based on the static road scene image, the algorithm extract two road
% boundaries and middle lane-marking using straight line model.
%
% This code is the implementation of t... |
github | HeYijia/OpenVehicleVision-master | GetInvariantEx_code.m | .m | OpenVehicleVision-master/thirdparty/GetInvariant/GetInvariantEx_code.m | 2,445 | utf_8 | 85bf206d85d6bf29064fda8ce13ee6a9 | function inv = GetInvariantEx(inputImage,angle,tipus)
%inv = GetInvariantEx(inputImage,angle,tipus)
%
%Computes the invariant image given a RGB image.
%
%
%Road Detection based on Illuminant Invariance
%J.M. Alvarez, A. Lopez
%IEEE ITS, 2011
%
%Combining Appearance, Priors and Context for Road Detection
%J.M. Alvarez, ... |
github | HeYijia/OpenVehicleVision-master | adaptcluster_kmeans.m | .m | OpenVehicleVision-master/thirdparty/adaptcluster_kmeans/adaptcluster_kmeans.m | 4,790 | utf_8 | 710b9eaae8fa6dcb28751eecea74f382 | function [lb,center] = adaptcluster_kmeans(im)
% This code is written to implement kmeans clustering for segmenting any
% Gray or Color image. There is no requirement to mention the number of cluster for
% clustering.
% IM - is input image to be clustered.
% LB - is labeled image (Clustered Image).
% CENTER - ... |
github | HeYijia/OpenVehicleVision-master | uTest_GetFullPath.m | .m | OpenVehicleVision-master/thirdparty/GetFullPath_17Jan2013/uTest_GetFullPath.m | 15,264 | utf_8 | d1bcad0c01f1adbbf61ef98c0c224e91 | function uTest_GetFullPath(doSpeed) %#ok<INUSD>
% Automatic test: GetFullPath
% This is a routine for automatic testing. It is not needed for processing and
% can be deleted or moved to a folder, where it does not bother.
%
% uTest_GetFullPath(doSpeed)
% INPUT:
% doSpeed: Optional logical flag to trigger time consum... |
github | HeYijia/OpenVehicleVision-master | figures_in_mm_paper.m | .m | OpenVehicleVision-master/my_tmp_util/figures_in_mm_paper.m | 4,822 | utf_8 | d0cb47ac855c661278d7d61b951ac5f5 | function figures_in_mm_paper
%% Roma Dataset
roma = { ...
'%datasets\roma\LRAlargeur26032003\IMG01070.jpg' ...
'%datasets\roma\LRAlargeur26032003\IMG00946.jpg' ...
'%datasets\roma\LRAlargeur26032003\IMG00579.jpg' ...
'%datasets\roma\BDXD54\IMG00002.jpg' ...
'%datasets\roma\BDXD54\IMG00030.jpg... |
github | HeYijia/OpenVehicleVision-master | test_roma.m | .m | OpenVehicleVision-master/my_tmp_util/test_roma.m | 1,382 | utf_8 | 29fd6cc94f6b811c25e8ca58ccb3aa91 | % This code
function test_roma(imgFile)
if nargin < 1
% imgFile = '%datasets\roma\BDXD54\IMG00002.jpg';
imgFile = '%datasets\roma\RouenN8IRC052310\IMG01339.jpg';
end
%% Lane marking filters
% <row> - an image row
% <s> - pixel size of lane-marking
% Note:
% 1. since no image padding done in S... |
github | HeYijia/OpenVehicleVision-master | ii_based_on_linear_assumption.m | .m | OpenVehicleVision-master/my_tmp_util/mm2016/ii_based_on_linear_assumption.m | 3,790 | utf_8 | 298fcfc2ee60d03296d6c28067b324b8 | function [ ] = ii_based_on_linear_assumption(inputImage)
% ii_based_on_linear_assumption(imread('%datasets\roma\BDXD54\IMG00002.jpg'))
if nargin<1
% inputImage = imread('%datasets\roma\BDXD54\IMG00002.jpg');
% inputImage = imread('%datasets\KITTI\data_road\training\image_2\um_000023.png');
%% Figure in pape... |
github | HeYijia/OpenVehicleVision-master | test_on_kitti.m | .m | OpenVehicleVision-master/my_tmp_util/mm2016/test_on_kitti.m | 1,315 | utf_8 | cbe0ca0d450a4373400b45fc949fe7d1 | function [ output_args ] = test_on_kitti( )
%TEST_ON_KITTI Summary of this function goes here
% Detailed explanation goes here
% tune;return
test_road_area_detection(@(rgb)ii_help_seg(rgb,1.5,600,1000));
% 1.1029,770.6248,353.3528
% 0.5,688.3749,432.6322
end
function res = ii_help_seg(rgb, sigma, k, min)
%... |
github | HeYijia/OpenVehicleVision-master | imshowlight.m | .m | OpenVehicleVision-master/my_img_util/imshowlight.m | 2,156 | utf_8 | b7b162c237027b6b6784ceb7d105be81 | function imshowlight(Raw, method)
%IMSHOWLIGHT extract the light feature of a image.
% USAGE:
% normal case
% IMSHOWLIGHT('pictures/lanemarking/light_sbs_vertical_www.jpg');
% IMSHOWLIGHT('pictures/lanemarking/light_highway_sbs.jpg');
% IMSHOWLIGHT('pictures/lanemarking/light_highway_sbs.jpg', 'entropythresh'... |
github | HeYijia/OpenVehicleVision-master | road_detection_via_ii.m | .m | OpenVehicleVision-master/codegen/road_detection_via_ii.m | 2,224 | utf_8 | 4d7bf0334d1fd3e5b93bb6da8b8cdcaf | function roadFace = road_detection_via_ii(rawImg, ii_method, ii_params, debug)
if nargin < 4
debug = false;
end
% please do ROI selection before calling road_detection_via_ii
% 1000 10
% 480 4
szFilter = [8 8]; %[8 8]; %ones([1 2])*ceil(nCol/10);
% otsu is very unstable when there are sky (very high gr... |
github | HeYijia/OpenVehicleVision-master | maxfig.m | .m | OpenVehicleVision-master/my_exp_util/maxfig.m | 2,269 | utf_8 | 087ab170faee38bbd2194fb072c32118 | function maxfig(arg1)
%MAXFIG Maximize figure.
%
% MAXFIG(H) maximizes the window with handle H.
% MAXFIG, by itself, maximizes the current figure window.
%
% MAXFIG('name') maximizes the named window.
%
% MAXFIG ALL maximizes all the open figure windows.
%
% Copyright 2015 Zhenqiang YING. [... |
github | HeYijia/OpenVehicleVision-master | slidevar.m | .m | OpenVehicleVision-master/my_exp_util/slidevar.m | 1,033 | utf_8 | c896c61a9ecef49ddef0f04d907a2923 | function h=slidevar(varname,span)
%SLIDEVAR controlling a variable with a slidebar
% http://www.mathworks.com/matlabcentral/newsreader/view_thread/28286
% Example
% var = 80;
% h=slidevar('var',[10 100]);
if nargin==2
h = figure('pos',[300 300 300 80],...
'menubar','none',...
'number... |
github | xternalz/caffe-master | classification_demo.m | .m | 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 | Haoran-S/SNMF-master | ploynomialroot.m | .m | SNMF-master/ploynomialroot.m | 635 | utf_8 | f8baff07f6c30877e671dc846f976904 | function xopt = ploynomialroot(a,b)
delta = 4*a^3+27*b^2;
if delta <=0
r = 2*sqrt(-a/3);
theta = atan2(sqrt(-delta/108),-b/2)/3;
ymax=0; xopt =0;
for k = 0:2:4
x = r*cos(theta+((k*pi)/3));
if x >=0
y = x^4/4+a*x^2/2+b*x;
if y < ymax
ymax... |
github | Haoran-S/SNMF-master | symnmf_newton.m | .m | SNMF-master/symnmf_newton.m | 7,201 | utf_8 | ef8f1de899f67c1e95b9016f432c56fa | function [H, iter, obj,objvalue, grad_vec, time_vec] = symnmf_newton(A,H0, k, params,maxiter, maxtime)
%SYMNMF_NEWTON Newton-like algorithm for Symmetric NMF (SymNMF)
% [H, iter, obj] = symnmf_newton(A, k, params) optimizes
% the following formulation:
%
% min_H f(H) = ||A - HH'||_F^2 subject to H >= 0
%
% wher... |
github | Haoran-S/SNMF-master | nnlsm_blockpivot.m | .m | SNMF-master/nnlsm_blockpivot.m | 7,134 | utf_8 | 7718d5759b6429a3a09b09022e775772 | % Nonnegativity Constrained Least Squares with Multiple Righthand Sides
% using Block Principal Pivoting method
%
% This software solves the following problem: given A and B, find X such that
% minimize || AX-B ||_F^2 where X>=0 elementwise.
%
% Reference:
% Jingu Kim and Haesun Park, Toward Fas... |
github | dorahermes/Paper_Hermes_2010_JNeuroMeth-master | ctmr.m | .m | Paper_Hermes_2010_JNeuroMeth-master/ctmr.m | 32,726 | utf_8 | ee03888e565f55c291a7533646bbdba3 | function varargout = ctmr(varargin)
% CTMR M-file for ctmr.fig
% CTMR, by itself, creates a new CTMR or raises the existing
% singleton*.
%
% H = CTMR returns the handle to a new CTMR or the handle to
% the existing singleton*.
%
% CTMR('CALLBACK',hObject,eventData,handles,...) calls the local
... |
github | dorahermes/Paper_Hermes_2010_JNeuroMeth-master | load_dicom_series.m | .m | Paper_Hermes_2010_JNeuroMeth-master/external/freesurfer/load_dicom_series.m | 3,255 | utf_8 | b60aa048f680fe00980380c850cd4dd3 | function [vol, M, tmpdcminfo, mr_parms] = load_dicom_series(seriesno,dcmdir,dcmfile)
% [vol, M, dcminfo] = load_dicom_series(seriesno,<dcmdir>,<dcmfile>)
%
% Reads in a dicom series given:
% 1. The series number and directory, or
% 2. A dicom file from the desired series
%
% If the series number is given but no dcmdi... |
github | dorahermes/Paper_Hermes_2010_JNeuroMeth-master | cc_cut_dir_afd.m | .m | Paper_Hermes_2010_JNeuroMeth-master/external/freesurfer/cc_cut_dir_afd.m | 8,948 | utf_8 | 0f0f00b54724b5bc6d70ccbae4d0bf2b | function [ddr, ddl, Isubj]=cc_cut_dir_adf(dirname, th_pval)
% For each subject in the directory "dirname":
% Computes the Dice coefficients measuring the overlap
% of the WM volume in right and left hemispheres to check
% if the corpus_callosum is correctly located.
%
% Uses the p values
%
%
% cc_cut_dir_afd.m
%... |
github | dorahermes/Paper_Hermes_2010_JNeuroMeth-master | ribbon_afd.m | .m | Paper_Hermes_2010_JNeuroMeth-master/external/freesurfer/ribbon_afd.m | 7,593 | utf_8 | 105801cd74c8eed1c807b10f37842421 | function [Dice]=ribbon_adf(subject, th_pval)
% For each subject "subject":
% Computes the Dice coefficients measuring the overlap of the
% Cortical Ribbon volume computed
% 1- from the subcortical labeling
% 2- as the space between the white and the pial surface
%
% Uses the pvalues, tr... |
github | dorahermes/Paper_Hermes_2010_JNeuroMeth-master | subcortical_labeling_afd.m | .m | Paper_Hermes_2010_JNeuroMeth-master/external/freesurfer/subcortical_labeling_afd.m | 4,804 | utf_8 | 9c621c12c9503b2b135eb577c0a81f59 | function [y]=check_ROI(SubjectDir,th_pval)
%
% For one subject: check if the size of 20 ROIs is within the normal range
% The 20 following ROIs are checked: Left-Lateral-Ventricle Right-Lateral-Ventricle
% Left-Hippocampus Right-Hippocampus Left-Thalamus-Proper Right-Thalamus-Proper
% Left-Caudate Right-Cauda... |
github | dorahermes/Paper_Hermes_2010_JNeuroMeth-master | unwarp_resample.m | .m | Paper_Hermes_2010_JNeuroMeth-master/external/freesurfer/unwarp_resample.m | 11,180 | utf_8 | 4f62076f2cdf3422888c26deabf1142b | function [imvol_out, M_out] = unwarp_resample(imvol,M,imvol_out_size,M_out,Mdc,unwarpflag,Jacobianflag,plotflag,interp_method,inflag,thruflag,gradfilename)
%
% In this file:
%
% unwarp_resample - from AD's unwarp_and_resample_vol
% proj, jdproj - for projecting out e.g. throughplane component of
% displ... |
github | dorahermes/Paper_Hermes_2010_JNeuroMeth-master | cortical_labeling_afd_txt.m | .m | Paper_Hermes_2010_JNeuroMeth-master/external/freesurfer/cortical_labeling_afd_txt.m | 7,062 | utf_8 | 1e9fedefb4b79b1cb80f9931181ecff1 | function [A_lh, A_rh]=cortical_label_adf(subject, p_val)
% Computes the area of the different cortical labels
% and compare them to the normal range
% Uses p_value to detect the abnormal areas
% Uses the lh/rh.parc.txt files
%
%
% cortical_labeling_afd_txt.m
%
% Original Author: Laurence Wastiaux
% CVS Revision Info... |
github | dorahermes/Paper_Hermes_2010_JNeuroMeth-master | cc_cut_afd.m | .m | Paper_Hermes_2010_JNeuroMeth-master/external/freesurfer/cc_cut_afd.m | 7,765 | utf_8 | 353c06ba9788caae3dfc98e3b8e9b9b8 | function [dr,dl]=cc_cut_adf(subject, name,th_pval)
% For each subject "subject":
% Computes the Dice coefficients measuring the overlap
% of the WM volume in right and left hemispheres to check
% if the corpus_callosum is correctly located.
%
% Uses .lta transform and p values
%
%
% cc_cut_afd.m
%
% O... |
github | dorahermes/Paper_Hermes_2010_JNeuroMeth-master | load_dicom_fl.m | .m | Paper_Hermes_2010_JNeuroMeth-master/external/freesurfer/load_dicom_fl.m | 5,467 | utf_8 | efaa1cd90a63c6f97c1a432ae0784c87 | function [vol, M, dcminfo, mr_parms] = load_dicom_fl(flist)
% [vol, M, dcminfo, mr_parms] = load_dicom_fl(flist)
%
% Loads a volume from the dicom files in flist.
%
% The volume dimensions are arranged such that the
% readout dimension is first, followed by the phase-encode,
% followed by the slices (this is not implem... |
github | dorahermes/Paper_Hermes_2010_JNeuroMeth-master | convert_unwarp_resample.m | .m | Paper_Hermes_2010_JNeuroMeth-master/external/freesurfer/convert_unwarp_resample.m | 13,982 | utf_8 | a2759cd5b258cb5b88b8a6086835f230 | function convert_unwarp_resample(infile,series,outfile,corfovflag,unwarpflag,jacflag,interp_method,user_gradwarpfile,called_by_script)
%
%% convert_unwarp_resample.m contains:
% convert_unwarp_resample()
% load_dicom_and_stuff()
% mdc()
% header2map(), type2map(), map2manuf() refer to TABLE = GRADWARPPATH/table.mat
%
... |
github | dorahermes/Paper_Hermes_2010_JNeuroMeth-master | talairaching_dir_afd.m | .m | Paper_Hermes_2010_JNeuroMeth-master/external/freesurfer/talairaching_dir_afd.m | 5,712 | utf_8 | 583571aad74bc6c6e5cf998815a7891a | function [probas, Isubj,nf]=taldir(dirname, th_pval, DirTable)
%
% Computes the probability of the Talairach transform matrices
% of all the subjects found in the directory "dirname".
% Uses the mean vector and covariance matrix obtained with talairachin_table.m from
% the data set (default data set: /space/... |
github | dorahermes/Paper_Hermes_2010_JNeuroMeth-master | talairaching_afd.m | .m | Paper_Hermes_2010_JNeuroMeth-master/external/freesurfer/talairaching_afd.m | 4,437 | utf_8 | 9c33512f5396ed541ae81d98f7f92488 | function [proba, pinf]=talmat(filename, th_pval, DirTable)
%
% Computes the probability of the Talairach transform matrix
% 'filename/mri/transforms/talairach.xfm'.
% Uses the mean vector and covariance matrix obtained with talairachin_table.m from
% the data set (default data set: /space/neo/2/recon/buck... |
github | dorahermes/Paper_Hermes_2010_JNeuroMeth-master | surf_registration_afd.m | .m | Paper_Hermes_2010_JNeuroMeth-master/external/freesurfer/surf_registration_afd.m | 4,846 | utf_8 | c243515fe07fa094dc4a23afd21ed444 | function [prv ] = surf_registration_adf(subject, th_pval)
%% Tests the overall surface based registration %%
%
%
% surf_registration_afd.m
%
% Original Author: Laurence Wastiaux
% CVS Revision Info:
% $Author: nicks $
% $Date: 2011/03/02 00:04:13 $
% $Revision: 1.3 $
%
% Copyright © 2011 The General Hospita... |
github | dorahermes/Paper_Hermes_2010_JNeuroMeth-master | read_patch.m | .m | Paper_Hermes_2010_JNeuroMeth-master/external/freesurfer/read_patch.m | 1,252 | utf_8 | 7efcc2b807fc0828c0e9f19532d0152f | %
% read_patch.m
%
% Original Author: Bruce Fischl
% CVS Revision Info:
% $Author: fischl $
% $Date: 2011/07/19 20:35:44 $
% $Revision: 1.4 $
%
% Copyright © 2011 The General Hospital Corporation (Boston, MA) "MGH"
%
% Terms and conditions for use, reproduction, distribution and contribution
% are found in the... |
github | dorahermes/Paper_Hermes_2010_JNeuroMeth-master | irepifitvol.m | .m | Paper_Hermes_2010_JNeuroMeth-master/external/freesurfer/irepifitvol.m | 8,321 | utf_8 | 38e16d839100c4dc4580032bab8dac65 | function r = irepifitvol(varargin)
version = '$Id: irepifitvol.m,v 1.2 2016/04/11 03:19:06 greve Exp $';
r = 1;
cmdargs.involfile = '';
cmdargs.maskfile = '';
cmdargs.configfile = '';
cmdargs.outdir = '';
cmdargs.skip = 7;
cmdargs.nacqexclude = 0;
cmdargs.nminexclude = 0;
cmdargs.ndummies = 10;
cmdargs.ROFlip = 65; %... |
github | dorahermes/Paper_Hermes_2010_JNeuroMeth-master | pons_cut_dir_afd.m | .m | Paper_Hermes_2010_JNeuroMeth-master/external/freesurfer/pons_cut_dir_afd.m | 4,448 | utf_8 | e4689904ebbbc4bcb996de64d47fe0b0 | function [D, Isubj]=pons_cut_dir_adf(dirname,th_pval)
% For all the subjects in the directory "dirname":
% Computes the Dice coefficients D=2Nab/Na+Nb
% where:
% Na is the volume of the Cerebellum obtrained trough the volume-based labeling
% Nb is the volume "filled" ... |
github | dorahermes/Paper_Hermes_2010_JNeuroMeth-master | cortical_labeling_dir_afd_txt.m | .m | Paper_Hermes_2010_JNeuroMeth-master/external/freesurfer/cortical_labeling_dir_afd_txt.m | 8,189 | utf_8 | be59e2988dcabd90486cd46037961f7c | function [Dl, Dr,I]=cortical_label_dir_adf(dirname, p_val)
% Computes the area of the different cortical labels
% and compare them to the normal range for all the
% subjects in directory "dirname"
% Uses the p_values to detect the abnormal structures
% Uses the lh/rh.parc.txt files
%
%
% cortical_labeling_dir_afd_t... |
github | dorahermes/Paper_Hermes_2010_JNeuroMeth-master | talairaching_stats.m | .m | Paper_Hermes_2010_JNeuroMeth-master/external/freesurfer/talairaching_stats.m | 2,681 | utf_8 | 2befe06f104a7992177b4c7e89ab4cb2 | function [D,mu,sigma]=talairach_stats_correct(dirname, outdir)
%
% Computes the mean and covariance matrix from a training set
%
% By default, the 3 translation parameters are not considered
% -> mu is a 1x9 vector and sigma a 9x9 matrix
%
% talairaching_stats.m
%
% Original Author: Laurence Wastiaux
% CVS Revi... |
github | dorahermes/Paper_Hermes_2010_JNeuroMeth-master | pons_cut_afd.m | .m | Paper_Hermes_2010_JNeuroMeth-master/external/freesurfer/pons_cut_afd.m | 3,884 | utf_8 | b657b76d8eb7daf12c020e3b698a8426 | function [D]=pons_cut_adf(subject, th_pval)
% For the subject "subject": computes the Dice coefficient D=2*Nab/(Na+Nb)
% Na is the volume of the Cerebellum+Brain-stem obtrained trough the volume-based labeling
% Nb is the volume "filled" obtained from the surface-based stream
% Nab is the volume of th... |
github | dorahermes/Paper_Hermes_2010_JNeuroMeth-master | subcortical_labeling_dir_afd.m | .m | Paper_Hermes_2010_JNeuroMeth-master/external/freesurfer/subcortical_labeling_dir_afd.m | 6,044 | utf_8 | 4be83c3fdfb548ae429ea7e468aa7d42 | function [Dvol,I]=check_ROI_dir(Dirname, th_pval)
%
% For all the subjects in a directory:
% check if the size of 20 ROIs is within the normal range
% The 20 following ROIs are checked: Left-Lateral-Ventricle Right-Lateral-Ventricle
% Left-Hippocampus Right-Hippocampus Left-Thalamus-Prop... |
github | dorahermes/Paper_Hermes_2010_JNeuroMeth-master | ribbon_dir_afd.m | .m | Paper_Hermes_2010_JNeuroMeth-master/external/freesurfer/ribbon_dir_afd.m | 8,832 | utf_8 | 789f78215045139f2b61108eb6adfa33 | function [D, Isubj]=ribbon_dir_adf(dirname, th_pval)
% For each subject in the directory "dirname":
% Computes the Dice coefficients measuring the overlap of the
% Cortical Ribbon volume computed
% 1- from the subcortical labeling
% 2- as the space between the white and the pial surface
%
%... |
github | dorahermes/Paper_Hermes_2010_JNeuroMeth-master | SStat_CoxStratPH.m | .m | Paper_Hermes_2010_JNeuroMeth-master/external/freesurfer/Survival/univariate/SStat_CoxStratPH.m | 7,582 | utf_8 | ad13fe06bf40753c234855978090dab9 | function [stats,st] = SStat_CoxStratPH(X,z,d,t,e)
% [stats,st] = SStat_CoxPH(X,z,d,t,e)
%
% Parameter estimation for the Stratified Cox proportional hazards model.
% Survival time ties are handled using Efron's method.
%
% Input
% X: Design Matrix with the time-independent covariates. (mxp, m # of
% subjects, p # of ... |
github | dorahermes/Paper_Hermes_2010_JNeuroMeth-master | SStat_CoxPH.m | .m | Paper_Hermes_2010_JNeuroMeth-master/external/freesurfer/Survival/univariate/SStat_CoxPH.m | 6,746 | utf_8 | 5490e944e0be32d4db871c6f86fecbc8 | function [stats,st] = SStat_CoxPH(X,d,t,e)
% [stats,st] = SStat_CoxPH(X,d,t,e)
%
% Parameter estimation for the Cox proportional hazards model. Survival
% time ties are handled using Efron's method.
%
% Input
% X: Design Matrix with the time-independent covariates. (mxp, m # of
% subjects, p # of covariates).
% d: Lo... |
github | dorahermes/Paper_Hermes_2010_JNeuroMeth-master | SStat_CoxExt.m | .m | Paper_Hermes_2010_JNeuroMeth-master/external/freesurfer/Survival/univariate/SStat_CoxExt.m | 5,799 | utf_8 | bd3f89172697bda551c1be9d0cc0513a | function [stats,st] = SStat_CoxExt(sID_ext,X_ext,d_ext,t_ext,e)
% [stats,st] = SStat_CoxExt(sID_ext,X_ext,d_ext,t_ext,e)
%
% Parameter estimation for the extended Cox model. This function uses as
% input the output of SStat_X_ext but with X_ext having new time-dependent
% columns added by the user (eg. the product of ... |
github | dorahermes/Paper_Hermes_2010_JNeuroMeth-master | SStat_mass_CoxExt.m | .m | Paper_Hermes_2010_JNeuroMeth-master/external/freesurfer/Survival/mass_univariate/SStat_mass_CoxExt.m | 7,078 | utf_8 | e2dc2f3280b38666155d01685954b47e | function [stats,st] = SStat_mass_CoxExt(sID_ext,X_ext,d_ext,t_ext,Y,maskvtx,prs,e)
% [stats,st] = SStat_mass_CoxExt(sID_ext,X_ext,d_ext,t_ext,Y,maskvtx,prs,e)
%
% Vertex/voxel-wise parameter estimation for the extended Cox model. This
% function uses as input the output of SStat_X_ext but with X_ext having
% new time... |
github | dorahermes/Paper_Hermes_2010_JNeuroMeth-master | SStat_mass_CoxStratPH.m | .m | Paper_Hermes_2010_JNeuroMeth-master/external/freesurfer/Survival/mass_univariate/SStat_mass_CoxStratPH.m | 9,085 | utf_8 | 67266c2d106280a63cc7d030cb76b818 | function [stats,st] = SStat_mass_CoxStratPH(X,z,d,t,Y,maskvtx,prs,e)
% [stats,st] = SStat_mass_CoxStratPH(X,z,d,t,Y,maskvtx,prs,e)
%
% Vertex/voxel-wise parameter estimation for the Stratified Cox proportional
% hazards model. Survival time ties are handled using Efron's method.
%
% Input
% X: Design Matrix with the t... |
github | dorahermes/Paper_Hermes_2010_JNeuroMeth-master | SStat_mass_CoxPH.m | .m | Paper_Hermes_2010_JNeuroMeth-master/external/freesurfer/Survival/mass_univariate/SStat_mass_CoxPH.m | 8,224 | utf_8 | a82d56dc4511de63190ad7b9769554da | function [stats,st] = SStat_mass_CoxPH(X,d,t,Y,maskvtx,prs,e)
% [stats,st] = SStat_mass_CoxPH(X,d,t,Y,maskvtx,prs,e)
%
% Vertex/voxel-wise parameter estimation for the Cox proportional hazards
% model. Survival time ties are handled using Efron's method.
%
% Input
% X: Design Matrix with the time-independent covariat... |
github | dorahermes/Paper_Hermes_2010_JNeuroMeth-master | lme_LR.m | .m | Paper_Hermes_2010_JNeuroMeth-master/external/freesurfer/lme/univariate/lme_LR.m | 3,698 | utf_8 | a131299549ea23e1b7a5d085e5ca33d6 | function lrstats = lme_LR(lrmlfull,lrmlred,q)
% lrstats = lme_LR(lrmlfull,lrmlred,q)
%
% Likelihood ratio test for the random effects. It can be used to test if a
% model with q+1 random effects is significantly better than a model with q
% random effects.
%
% Input
% lrmlfull: Maximum value for the restricted log-like... |
github | dorahermes/Paper_Hermes_2010_JNeuroMeth-master | geodesic_convert_surface_points.m | .m | Paper_Hermes_2010_JNeuroMeth-master/external/freesurfer/lme/geodesic/geodesic_convert_surface_points.m | 1,236 | utf_8 | ee64cc7d0c65a7cc46b3542177ca936b | %internal geodesic function
%conversion between C++ and matlab surface point representation
% Danil Kirsanov, 09/2007
function q = geodesic_convert_surface_points(p)
if isempty(p)
q = [];
return;
end;
point_types = {'vertex', 'edge', 'face'};
if ~isa(p,'numeric') %convert from matlab to ... |
github | dorahermes/Paper_Hermes_2010_JNeuroMeth-master | geodesic_delete.m | .m | Paper_Hermes_2010_JNeuroMeth-master/external/freesurfer/lme/geodesic/geodesic_delete.m | 793 | utf_8 | fad9450fe8bc877a9f46b519f83ad508 | % delete mesh, algorithm, or everything at once
% Danil Kirsanov, 09/2007
function object = geodesic_delete(object)
global geodesic_library;
if ~libisloaded(geodesic_library) %everything is already cleared
object = [];
return;
end
if nargin == 0 % the simplest way to delete everyth... |
github | dorahermes/Paper_Hermes_2010_JNeuroMeth-master | geodesic_distance_and_source.m | .m | Paper_Hermes_2010_JNeuroMeth-master/external/freesurfer/lme/geodesic/geodesic_distance_and_source.m | 1,085 | utf_8 | 791b8b168e6f0497db041c1e46ee7f10 | %finds best source and distance to the best source
% if distance is negative, the best source cannot be found (for example, because the propagation was stopped before it reached this point)
% Danil Kirsanov, 09/2007
function [source_id, distance] = geodesic_best_source(algorithm, destination)
global geodesic_l... |
github | dorahermes/Paper_Hermes_2010_JNeuroMeth-master | create_flat_triangular_mesh.m | .m | Paper_Hermes_2010_JNeuroMeth-master/external/freesurfer/lme/geodesic/create_flat_triangular_mesh.m | 859 | utf_8 | 6348e2ebbdc6c1a1cf36676bfa63aede | %good mesh to catch possible bugs in geodesic algorithms
%Copyright (c) 2007 Danil Kirsanov
function [p,tri] = create_flat_triangular_mesh(step, smoothness)
x = -1:step:1;
y = x;
N_p = length(x)*length(y); %regular grid
p = zeros(N_p,3);
N_t = (length(x)-1)*(length(y)-1)*2; %two trian... |
github | dorahermes/Paper_Hermes_2010_JNeuroMeth-master | create_subdivision_pattern.m | .m | Paper_Hermes_2010_JNeuroMeth-master/external/freesurfer/lme/geodesic/create_subdivision_pattern.m | 999 | utf_8 | 63e73d01411a263f051cff9cba4570bb | %regular subdivision pattern of a triangle
%used in drawing approximate equidistant lines in example5.m
%Copyright (c) 2007 Danil Kirsanov
function [weights,tri] = create_subdivision_pattern(level) %"level" is the number of additional vertices per edge
step = 1/(level + 1);
N = level + 2; ... |
github | dorahermes/Paper_Hermes_2010_JNeuroMeth-master | create_hedgehog_mesh.m | .m | Paper_Hermes_2010_JNeuroMeth-master/external/freesurfer/lme/geodesic/create_hedgehog_mesh.m | 745 | utf_8 | 1d51edcdb91cd8c04dd02d88d04b56ab | %"smoothness" should be specified between 0(smooth, convex mesh) and 1 (a lot of sharp features)
%"waist" should be between 0 and 1; 0 means spherical mesh
function [p,tri] = create_hedgehog_mesh(N, smoothness, waist)
p = rand(N,3) - 0.5;
for i=1:N;
p(i,:) = p(i,:)/norm(p(i,:));
end;
tri = convhulln(p); ... |
github | dorahermes/Paper_Hermes_2010_JNeuroMeth-master | lme_mass_RgGrow.m | .m | Paper_Hermes_2010_JNeuroMeth-master/external/freesurfer/lme/mass_univariate/lme_mass_RgGrow.m | 10,658 | utf_8 | 6682fbad3394632613566ba8b858ea5d | function [Regions,RgMeans] = lme_mass_RgGrow(SphSurf,Re,Theta,maskvtx,nst,prc)
% [Regions,RgMeans] = lme_mass_RgGrow(SphSurf,Re,Theta,maskvtx,nst,prc)
%
% This function implements a region growing algorithm along the spherical
% surface to find homogeneous regions comprising locations with similar
% covariance compo... |
github | dorahermes/Paper_Hermes_2010_JNeuroMeth-master | lme_mass_fit.m | .m | Paper_Hermes_2010_JNeuroMeth-master/external/freesurfer/lme/mass_univariate/lme_mass_fit.m | 8,732 | utf_8 | fa13918d68751c3be9703208ee8ef15c | function [stats,st] = lme_mass_fit(X,Xcols,Xrows,Zcols,Y,ni,prs,e)
% [stats,st] = lme_mass_fit(X,Xcols,Xrows,Zcols,Y,ni,prs,e)
%
% Location-wise linear mixed-effects estimation. Allows to have different
% models across locations (this is useful when there are either missing
% values at some locations or the number o... |
github | dorahermes/Paper_Hermes_2010_JNeuroMeth-master | AdjMtx.m | .m | Paper_Hermes_2010_JNeuroMeth-master/external/freesurfer/lme/mass_univariate/AdjMtx.m | 2,038 | utf_8 | 5ca39c629f90b25717eddeb2b6344c8f | function [AdjM,cn] = AdjMtx(Surf,maskvtx)
% AdjM = AdjMtx(Surf,maskvtx)
%
% This function finds the adjacent vertices for all vertices along the
% surface.
%
% Input
% Surf: Surface. It is a structure with Surf.tri = t x 3 matrix of triangle
% indices, 1-based, t=#triangles and Surf.coord = 3 x nv matrix of
% coord... |
github | dorahermes/Paper_Hermes_2010_JNeuroMeth-master | lme_mass_RgFSfit.m | .m | Paper_Hermes_2010_JNeuroMeth-master/external/freesurfer/lme/mass_univariate/lme_mass_RgFSfit.m | 7,435 | utf_8 | c3afa18463f0bf2b79591786384e86f6 | function [stats,st,a,b] = lme_mass_RgFSfit(X,Zcols,Y,ni,Dist,model,prs,e)
% [stats,st,a,b] = lme_mass_RgFSfit(X,Zcols,Y,ni,Dist,model,prs,e)
%
% Linear mixed-effects estimation by the Fisher scoring algorithm for a
% whole region.
%
% Input
% X: Ordered (according to time for each subject) design matrix (nmxp, nm
% t... |
github | dorahermes/Paper_Hermes_2010_JNeuroMeth-master | lme_RgFSfit.m | .m | Paper_Hermes_2010_JNeuroMeth-master/external/freesurfer/lme/mass_univariate/lme_RgFSfit.m | 6,996 | utf_8 | d1a01faa362f2e074329c0266218c316 | function [stats,st,a,b] = lme_RgFSfit(X,Zcols,Y,ni,Theta0,Dist,model,e)
% [stats,st,a,b] = lme_RgFSfit(X,Zcols,Y,ni,Theta0,Dist,model,e)
%
% Linear mixed-effects estimation by the Fisher scoring algorithm for a
% whole region. This function is intended to only be called from other
% functions to perform region-wise m... |
github | dorahermes/Paper_Hermes_2010_JNeuroMeth-master | lme_mass_FDR2.m | .m | Paper_Hermes_2010_JNeuroMeth-master/external/freesurfer/lme/mass_univariate/lme_mass_FDR2.m | 2,729 | utf_8 | e4502f9e96c5715150a4d5d514d36929 | function [detvtx,sided_pval,pth,m0] = lme_mass_FDR2(pval,sgn,maskvtx,rate,tail)
% [detvtx,sided_pval,pth,m0] = lme_mass_FDR2(pval,maskvtx,rate,tail)
%
% Two-stage FDR approach to achieve tighter control of the FDR. This
% procedure is more powerful than the original FDR procedure implemented in
% lme_mass_FDR.
%
% Inpu... |
github | dorahermes/Paper_Hermes_2010_JNeuroMeth-master | lme_mass_fit_Rgw.m | .m | Paper_Hermes_2010_JNeuroMeth-master/external/freesurfer/lme/mass_univariate/lme_mass_fit_Rgw.m | 9,634 | utf_8 | 971b470b93a50bb9d79f346383694920 | function [stats,st] = lme_mass_fit_Rgw(X,Zcols,Y,ni,Th0,Rgs,Surf,fname,...
Dtype,sptm,prs,e)
% [stats,st] = lme_mass_fit_Rgw(X,Zcols,Y,ni,Th0,Rgs,Surf,fname,Dtype,sptm,prs,e)
%
% Region-wise linear mi... |
github | Varsha177/SeqK-means_Princeton-master | seq_kmeans_princeton.m | .m | SeqK-means_Princeton-master/seq_kmeans_princeton.m | 3,863 | utf_8 | e0e005581b16c5223448d22126c56b68 |
function n = seq_kmeans_princeton(new_n)
tic
%update the count for the clusters
n = new_n;
% flag = 0;
%dlmread('Varsha_overwritten.csv',',');
%load Varsha_overwritten.csv;
%fid = fopen('Varsha_overwritten.txt','r');
%data_point = textscan(fid,'%f');
%data_point = textread('Varsha_overwritten.csv', '', 'delimiter', ... |
github | Varsha177/SeqK-means_Princeton-master | oscsend.m | .m | SeqK-means_Princeton-master/oscsend.m | 2,888 | utf_8 | 5b6a4cc8e74ede8419d1fed94f382159 | function oscsend(u,path,varargin)
% Sends a Open Sound Control (OSC) message through a UDP connection
%
% oscsend(u,path)
% oscsend(u,path,types,arg1,arg2,...)
% oscsedn(u,path,types,[args])
%
% u = UDP object with open connection.
% path = path-string
% types = string with types of arguments,
% supported:... |
github | shadercoder/jgt-code-master | save_eigendata_interior.m | .m | jgt-code-master/Volume_12/Number_3/Lacewell2007/matlab/save_eigendata_interior.m | 1,010 | utf_8 | 20fef659ebbe40f116fc0e8531d00d21 | function save_eigendata_interior(filename, N)
% SAVE_EIGENDATA_INTERIOR(filename, N)
% Save eigenvalues and coefficient matrices to a file, for interior
% EVS with valences 3 thru N.
cols = 3;
formatstring = '%1.16g, %1.16g, %1.16g,\n';
fid = fopen(filename, 'w');
for n = 3:N
p = 2*n;
[A,Abar] = subdmatrixin... |
github | shadercoder/jgt-code-master | subdeig.m | .m | jgt-code-master/Volume_12/Number_3/Lacewell2007/matlab/subdeig.m | 2,009 | utf_8 | 5bf4b5904195b261e954220f2aca9f48 | function [T,J] = subdeig(A, n)
% [T,J] = SUBDEIG(A)
% Returns the Jordan Normal Form [T,J] of subd matrix A such that
% A = T*J*inv(T)
% For valences 3,7,11,... J is diagonal; for other valences
% J contains a single '1' on the superdiagonal
pinvtol = 10e-8;
k = size(A,1);
s = 2*n;
S = A(1:s, 1:s);
[U0, Sigma] = eig(... |
github | shadercoder/jgt-code-master | save_eigendata.m | .m | jgt-code-master/Volume_12/Number_3/Lacewell2007/matlab/save_eigendata.m | 2,053 | utf_8 | f91ae471550270241e8f1b8d00c5523d | function save_eigendata(filename, N)
% SAVE_EIGENDATA(filename, N)
% Save eigenvalues and coefficient matrices to a file, for boundary
% EVS with valences 2 thru N.
cols = 3;
formatstring = '%1.16g, %1.16g, %1.16g,\n';
fid = fopen(filename, 'w');
% first save W1 for 3 cases (that's all we need):
printW1(fid, 'inv... |
github | shadercoder/jgt-code-master | subdmatrix.m | .m | jgt-code-master/Volume_12/Number_3/Lacewell2007/matlab/subdmatrix.m | 3,386 | utf_8 | 1b49708d70ba84ab269892b5197398e8 | function [A,Abar] = subdmatrix(n, f)
% SUBDMATRIX(n, f)
% build the subdivision matrix and extended matrix for a boundary EV
% of valence n
% f is a face index starting at zero (the left boundary) and preceding ccw,
% with f < floor(n/2)
if (f >= floor(n/2))
error('subdmatrix: face index f must be < %d for valenc... |
github | coin-or/Csdp-master | convertf.m | .m | Csdp-master/matlab/convertf.m | 1,437 | utf_8 | 0b4046d80e4b28167468bb63068caa95 | %
% [A,b,c,K]=convertf(A,b,c,K)
%
% converts free variables in a SeDuMi problem into nonnegative LP variables.
%
function [A,b,c,K]=convertf(A,b,c,K)
%
% Get the number of constraints.
%
m=length(b);
%
% Deal with the following special case. If A is transposed, transpose
% it again so that it is of the right size.
%... |
github | coin-or/Csdp-master | writesol.m | .m | Csdp-master/matlab/writesol.m | 3,575 | utf_8 | e245a284dfdefabd7a7a9b7163424941 | %
% writesol(fname,x,y,z,K)
%
% Writes out a solution file in the format used by CSDP and
% readsol.
%
% fname File name to read solution from.
% x,y,z Solution.
% K structure of the matrices.
%
%
%
function ret=writesol(fname,x,y,z,K);
%
% First, eliminate special cases that we don't handle.
%
... |
github | coin-or/Csdp-master | csdp.m | .m | Csdp-master/matlab/csdp.m | 5,713 | utf_8 | 66161621e8a96d05cb376fadf12c3fbc | %
% [x,y,z,info]=csdp(At,b,c,K,pars,x0,y0,z0)
%
% Uses CSDP to solve a problem in SeDuMi format.
%
% Input:
% At, b, c, K SDP problem in SeDuMi format.
% pars CSDP parameters (optional parameter.)
% x0,y0,z0 Optional starting point.
%
% Output:
%
% x, y, z ... |
github | coin-or/Csdp-master | readsol.m | .m | Csdp-master/matlab/readsol.m | 3,697 | utf_8 | 7cc7c4a3b5b9c3b9a8645680844adcbb | %
% [x,y,z]=readsol(fname,K,m)
%
% fname File name to read solution from.
% K structure of the matrices.
% m size of y vector.
%
% Modified 7/15/04, for greater MATLAB acceleration.
%
function [x,y,z]=readsol(fname,K,m)
%
% First, eliminate special cases that we don't handle.
%
%
% Check fo... |
github | coin-or/Csdp-master | writesdpa.m | .m | Csdp-master/matlab/writesdpa.m | 7,494 | utf_8 | 128632b186fa038c250c2d82b5472a06 | % This function takes a problem in SeDuMi MATLAB format and writes it out
% in SDPA sparse format.
%
% Usage:
%
% ret=writesdpa(fname,A,b,c,K,pars)
%
% fname Name of SDPA file, in quotes
% A,b,c,K Problem in SeDuMi form
% pars Optional parameters.
% ... |
github | coin-or/Csdp-master | readsdpa.m | .m | Csdp-master/matlab/readsdpa.m | 3,745 | utf_8 | b7bd08811993a5787c1123a01a1e685c | %
% [At,b,c,K]=readsdpa(fname)
%
% Reads in a problem in SDPA sparse format, and returns it in SeDuMi
% format.
%
% 7/20/07 Modified to handle comments and other cruft in the SDPA
% file. In particular,
%
% 1. Initial comment lines beginning with " or * are ignored.
% 2. In the first three lines, any extraneou... |
github | yalesong/tvsum-master | solve_knapsack.m | .m | tvsum-master/matlab/solve_knapsack.m | 1,140 | utf_8 | 257846f6cb1c91f72b5abef95a043961 | %{
Yahoo! TVSum50 Dataset.
- Function to solve the 0/1 Knapsack problem
%}
function [ out ] = solve_knapsack( frame_scores, segments, portion )
%SOLVE_KNAPSACK Summary of this function goes here
n_shots = size(segments,1);
shot_scores = zeros(n_shots,1);
for i = 1:n_shots,
range = segments(i,1):mi... |
github | yalesong/tvsum-master | knapsack.m | .m | tvsum-master/matlab/knapsack/knapsack.m | 2,506 | utf_8 | b22daea7f25cc2a73485c5ed575a1b2e | %KNAPSACK Solves the 0-1 knapsack problem for positive integer weights
%
% [BEST AMOUNT] = KNAPSACK(WEIGHTS, VALUES, CONSTRAINT)
%
% WEIGHTS : The weight of every item (1-by-N)
% VALUES : The value of every item (1-by-N)
% CONSTRAINT : The weight constraint of the knapsack (scalar... |
github | hkust-vgd/ElasticReconstruction-master | mrWriteInfo.m | .m | ElasticReconstruction-master/Matlab_Toolbox/Core/mrWriteInfo.m | 1,133 | utf_8 | 6e9dc90d771d0db0ccf0df37289d8959 | function mrWriteInfo( info, filename )
fid = fopen( filename, 'w' );
for i = 1 : size( info, 2 )
mrWriteInfoStruct( fid, info( i ).info, info( i ).mat );
end
fclose( fid );
%disp( [ num2str( size( info, 2 ) ), ' matrices have been written.' ] );
end
function mrWriteInfoStruct( fid, x, m )
... |
github | hkust-vgd/ElasticReconstruction-master | mrEvaluateRegistration.m | .m | ElasticReconstruction-master/Matlab_Toolbox/Core/mrEvaluateRegistration.m | 1,648 | utf_8 | 8a3a6f7c5b35d88a578a7fd397c1c672 | function [ recall, precision ] = mrEvaluateRegistration( result, gt, gt_info, err2 )
if ~exist( 'err2', 'var' )
err2 = 0.04;
end
num = gt( 1 ).info( 3 );
mask = zeros( 1, num * num );
gt_num = 0;
for i = 1 : size( gt, 2 )
if ( gt( i ).info( 2 ) - gt( i ).info( 1 ) > 1 )
... |
github | hkust-vgd/ElasticReconstruction-master | mrEvaluateTrajectory.m | .m | ElasticReconstruction-master/Matlab_Toolbox/Core/mrEvaluateTrajectory.m | 1,758 | utf_8 | 87a0fe8944b5a63a2ed82140a683068a | function [ rmse, trans ] = mrEvaluateTraj( traj_et, traj_gt )
gt_n = size( traj_gt, 2 );
et_n = size( traj_et, 2 );
if (gt_n ~= et_n)
fprintf('WARNING: There are Lost Frames!\n');
fprintf('ground truth traj : %d frames\n', gt_n);
fprintf('estimated traj : %d frames\n', et_n);
... |
github | hkust-vgd/ElasticReconstruction-master | mrWriteLog.m | .m | ElasticReconstruction-master/Matlab_Toolbox/Core/mrWriteLog.m | 710 | utf_8 | bdfdbae7f827e1afe7de17f17816b724 | function mrWriteLog( traj, filename )
fid = fopen( filename, 'w' );
for i = 1 : size( traj, 2 )
mrWriteLogStruct( fid, traj( i ).info, traj( i ).trans );
end
fclose( fid );
%disp( [ num2str( size( traj, 2 ) ), ' frames have been written.' ] );
end
function mrWriteLogStruct( fid, x, m )
... |
github | hkust-vgd/ElasticReconstruction-master | pclviewer.m | .m | ElasticReconstruction-master/Matlab_Toolbox/External/matpcl/pclviewer.m | 1,291 | utf_8 | f58f1e96b93686f38351e26b2c2db93f | %PCLVIEWER View a point cloud using PCL
%
% PCLVIEWER(P) writes the point cloud P (MxN) to a temporary file and invokes
% the PCL point cloud viewer for fast display and visualization. The columns of P
% represent the 3D points.
%
% If M=3 then the rows are x, y, z.
% If M=6 then the rows are x, y, z, R, G, B where R,... |
github | hkust-vgd/ElasticReconstruction-master | loadpcd.m | .m | ElasticReconstruction-master/Matlab_Toolbox/External/matpcl/loadpcd.m | 8,446 | utf_8 | 9ca2d26237c905d4aa1ccc9abd7bcbf4 | %LOADPCD Load a point cloud from a PCD format file
%
% P = LOADPCD(FNAME) is a set of points loaded from the PCD format
% file FNAME.
%
% For an unorganized point cloud the columns of P represent the 3D points,
% and the rows are: x, y, z, r, g, b, a depending on the FIELDS in the file.
%
% For an organized point clo... |
github | hkust-vgd/ElasticReconstruction-master | lzfd.m | .m | ElasticReconstruction-master/Matlab_Toolbox/External/matpcl/lzfd.m | 2,169 | utf_8 | 1280ce0a291d2c9d98b06a4673a98535 | %LZFD LZF decompression
%
% OUT = LZFD(IN) is the decompressed version of the uint8 array IN.
%
% OUT = LZFD(IN, LEN) as above but sets the internal working buffer to length
% LEN which should exceed the expected uncompressed data size.
%
% Notes::
% - LZF is an algorithm that is efficient and gives reasonable compres... |
github | hkust-vgd/ElasticReconstruction-master | lspcd.m | .m | ElasticReconstruction-master/Matlab_Toolbox/External/matpcl/lspcd.m | 2,071 | utf_8 | e67de9778584a673b9569720ea4c72f9 | %LSPCD List attributes of PCD format files
%
% LSPCD() list the attributes of all .PCD files in the current folder.
%
% LSPCD(FILESPEC) as above but list only files that match FILESPEC which
% might contain a directory name and/or a wildcard.
%
%
% See also pclviewer, loadpcd.
%
% Copyright (C) 2013, by Peter I. Corke... |
github | hkust-vgd/ElasticReconstruction-master | savepcd.m | .m | ElasticReconstruction-master/Matlab_Toolbox/External/matpcl/savepcd.m | 4,547 | utf_8 | b6fc9de72f9c31f773ed98eb76072db1 | %SAVEPCD Write a point cloud to file in PCD format
%
% SAVEPCD(FNAME, P) writes the point cloud P to the file FNAME as an
% as a PCD format file.
%
% SAVEPCD(FNAME, P, 'binary') as above but save in binary format. Default
% is ascii format.
%
% If P is a 2-dimensional matrix (MxN) then the columns of P represent the
%... |
github | saivemu/DiCELab_16_storage_required-master | load_data.m | .m | DiCELab_16_storage_required-master/load_data.m | 778 | utf_8 | aa3bf394d7447954c3fa1e9cdc8c9ff7 | %% Import data from spreadsheet
% Script for importing data from the following spreadsheet:
%
% Workbook: /home/vemu/Downloads/WindData 2014 - Mean.xlsx
% Worksheet: January-June
%
% To extend the code for use with different selected data or a different
% spreadsheet, generate a function instead of a script.
fun... |
github | AlexanderBakerChris/matlab-levelset-master | mean_curvature_flow_operator.m | .m | matlab-levelset-master/Examples3D/Curvature flow/mean_curvature_flow_operator.m | 697 | utf_8 | fb9a924ac221b21f49a1fd9937924d91 | %% Level set operator defining a PDE for mean curvature flow
% Implements the level set PDE for mean curvature flow used in the example:
% <curvature_flows.html curvature_flows.m>
function [dphi_dt,dt] = mean_curvature_flow_operator(ls, varargin)
% Assume that the alpha parameter is passed as an argument
alpha = vara... |
github | AlexanderBakerChris/matlab-levelset-master | min_curvature_flow_operator.m | .m | matlab-levelset-master/Examples3D/Curvature flow/min_curvature_flow_operator.m | 718 | utf_8 | 6172a5c83332c364569e2f08e190be61 | %% Level set operator defining a PDE for min curvature flow
% Implements the level set PDE for min curvature flow (curve shortening
% flow) used in the example:
% <curvature_flows.html curvature_flows.m>
function [dphi_dt,dt] = min_curvature_flow_operator(ls, varargin)
% Assume that the alpha parameter is passed as a... |
github | AlexanderBakerChris/matlab-levelset-master | speed_normal3D.m | .m | matlab-levelset-master/Examples3D/Motion in normal direction/speed_normal3D.m | 701 | utf_8 | 554c39102b6059b9e5d78f605f1662c2 | %% Level set operator defining a PDE for motion in normal direction
% Implements the level set PDE for dilation used in the example:
% <dilation3D.html dilation3D.m>
function [dphi_dt,dt] = speed_normal3D(ls, varargin)
% Assume that the speed is passed as argument
F = varargin{1};
if isscalar(F) % expand if given as ... |
github | AlexanderBakerChris/matlab-levelset-master | advect3D_operator.m | .m | matlab-levelset-master/Examples3D/Advection/advect3D_operator.m | 1,280 | utf_8 | cf6ef092676ddfa5eb24a5c54a046330 | %% Level set operator defining a PDE for advection
% Implements the level set PDE for advection used in the example:
% <advect3D.html advect3D.m>
function [dphi_dt,dt] = advect3D_operator(ls, varargin)
% Assume that the components of the external vector field is passed as two
% arguments
Fx = varargin{1};
Fy = varar... |
github | AlexanderBakerChris/matlab-levelset-master | curvature_flow_operator.m | .m | matlab-levelset-master/Examples2D/Curvature flow/curvature_flow_operator.m | 658 | utf_8 | ab5c48543a20579c988000830ead7e1b | %% Level set operator defining a PDE for curvature flow
% Implements the level set PDE for curvature flow used in the example:
% <curvature_flow.html curvature_flow.m>
function [dphi_dt,dt] = curvature_flow_operator(ls, varargin)
% Assume that the alpha parameter is passed as an argument
alpha = varargin{1};
% Deter... |
github | AlexanderBakerChris/matlab-levelset-master | speed_normal.m | .m | matlab-levelset-master/Examples2D/Motion in normal direction/speed_normal.m | 709 | utf_8 | 2d09695586ad9ceff54d4e2b1986ed8f | %% Level set operator defining a PDE for motion in normal direction
% Implements the level set PDE for dilation/erosion used in the example:
% <erosion_dilation.html erosion_dilation.m>
function [dphi_dt,dt] = speed_normal(ls, varargin)
% Assume that the speed is passed as argument
F = varargin{1};
if isscalar(F) % e... |
github | AlexanderBakerChris/matlab-levelset-master | minimal_variance_operator.m | .m | matlab-levelset-master/Examples2D/Minimal variance/minimal_variance_operator.m | 1,524 | utf_8 | 43049a97c2f6296eaf0775b65ebb7956 | %% Level set operator defining a PDE for minimal variance
% Implements the level set PDE for minimal variance used in the example:
% <minimal_variance.html minimal_variance.m>
function [dphi_dt,dt] = minimal_variance_operator(ls, varargin)
% Assume that the target image is passed as the first argument
A = double(vara... |
github | AlexanderBakerChris/matlab-levelset-master | advect2D_operator.m | .m | matlab-levelset-master/Examples2D/Advection/advect2D_operator.m | 1,039 | utf_8 | fefa59056a326bd1c999c7b482a41c1b | %% Level set operator defining a PDE for advection
% Implements the level set PDE for advection used in the example:
% <advect2D.html advect2D.m>
function [dphi_dt,dt] = advect2D_operator(ls, varargin)
% Assume that the components of the external vector field is passed as two
% arguments
Fx = varargin{1};
Fy = varar... |
github | AlexanderBakerChris/matlab-levelset-master | propagate_special_rprop.m | .m | matlab-levelset-master/@levelset2D/propagate_special_rprop.m | 5,994 | utf_8 | 05b0870c6186e661fef7725cc99375e2 | function [ls, curv_sum] = propagate_rprop(ls, time, LR_MAX, LR_MIN, LR_0, top, first_time, operator, varargin)
acc_factor = 1.2; %Constant
dec_factor = 0.5; %Constant
% 1, 0.05, 5, 4, 0 works well (L)
% 1, 0.05, 5, 2, 2 works well, better? (L)
% 1, 0.4 , 2, 2, 2 works ok (retina)
alpha = 1;
beta = 0.4; %Gradien... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.