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 | jjjjfrench/UW-UIOPS-master | read_binary_SEA.m | .m | UW-UIOPS-master/read_binary/read_binary_SEA.m | 12,340 | utf_8 | 3d7e92cc325973ca7580749e35bbeb78 | function read_binary_SEA(infilename,outfilename)
%% Function to decompress SEA raw files
% Need to double check the file format and code for each probes
% This only works for MC3E filed campaign
% * July 11, 2016, Created this new interface function, Wei Wu
starpos = find(infilename == '*',1,'last');
nWierdTotal = 0... |
github | jjjjfrench/UW-UIOPS-master | write2d.m | .m | UW-UIOPS-master/read_binary/@cip/write2d.m | 6,333 | utf_8 | 5a49ac1e4c6920239f612e1cb8ee14a1 | function write2d(obj,filebase)
% WRITE2D - Convert an unpacked CIP file to RAF/OAP format
%
% write2d(obj,filebase)
% obj - CIP class object
% filebase - the base of the file name
% if not specified, use the first eight characters of cipfile
% (YYYYMMMDD)
if nargin < 2
fbase = obj.cipfile{1};
fbas... |
github | jjjjfrench/UW-UIOPS-master | cip_obj_to_netcdf.m | .m | UW-UIOPS-master/read_binary/@cip/cip_obj_to_netcdf.m | 3,981 | utf_8 | 14c826715464ee56bafdb86f9aafde8e | function cip_obj_to_netcdf(obj, outfile)
% Read the CIP csv data
[timestamp,csvtas, dt] = obj.ciptas(obj.cipdir, obj.csvfile);
timestamp = timestamp - datenum(dt); %Get just datenum format of corresponding sod referenced from first day
csvsod = timestamp*86400.; %Convert to seconds from date number format
% The pr... |
github | jjjjfrench/UW-UIOPS-master | calc_sa_randombins.m | .m | UW-UIOPS-master/size_dist/calc_sa_randombins.m | 1,543 | utf_8 | cb8c10040d091f0b4de96c6092c55177 | % Calculate image sample area assuming Heymsfield and Parish (1978)
% bins_mid - mid-point of each bins in doide number
% res - photodiode resolution, bin width in microns
% armdst - distance between probe arms in millimeters
% num_diodes - number of photodiodes (does not need to equal number of bins)
% SAme... |
github | jjjjfrench/UW-UIOPS-master | sizeDist.m | .m | UW-UIOPS-master/size_dist/sizeDist.m | 94,194 | utf_8 | 8a37ee7097c7ff455f57007b112dcf12 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Derive the area and size distribution for entire-in particles
% Include the IWC calculation
% Include the effective radius
% Created by Will Wu, 09/18/2013
%
% **************************
% *** Modification Notes ***
... |
github | jjjjfrench/UW-UIOPS-master | single_vt.m | .m | UW-UIOPS-master/size_dist/single_vt.m | 1,440 | utf_8 | 6d3b5eb59b4c5ec6a86a3aa87c2bead2 | %% Returns terminal velocity for a single particle
% Both options to calculate the terminal velocity
% Default is to use the Heymsfield and Westbrook (2010) method,
% but you can also choose to to use Mitchel (1996)
% Created by Will Wu, 2014/01/15
% - Mass and Diameter uses metric system
% - Pressure use hPa
% ... |
github | jjjjfrench/UW-UIOPS-master | dropsize.m | .m | UW-UIOPS-master/img_processing/dropsize.m | 10,889 | utf_8 | eb28935658e58b45634f6c09cbd7a712 | function [center_in,axis_ratio,diameter_circle_fit,diameter_horiz_chord,diameter_vert_chord,diameter_horiz_mean, diameter_spheroid]=...
dropsize(max_horizontal_length,max_vertical_length,image_area,largest_edge_touching,...
smallest_edge_touching,diode_size,corrected_horizontal_diode_size,number_diodes_in_array... |
github | jjjjfrench/UW-UIOPS-master | ParticlePerimeter.m | .m | UW-UIOPS-master/img_processing/ParticlePerimeter.m | 572 | utf_8 | a4d9612a610598df7fa2589693967992 | % Get the single particle perimeter
%
% Inputs:
% image_buffer - n x photodiodes/8 raw image buffer without timestamps
% Outputs:
% Perimeter
%
% * Created by Wei Wu, July 4th, 2014
function [pperimeter] = ParticlePerimeter(image_buffer)
[m, n] = size(image_buffer);
pperimeter = 0;
c1=[49*ones(1,n+2... |
github | jjjjfrench/UW-UIOPS-master | holroyd.m | .m | UW-UIOPS-master/img_processing/holroyd.m | 8,020 | utf_8 | fcd3dc3dbe5ec078354af14eacdcc6a4 | % holroyd - identified particle habit according to Holroyd (1987)
% inputs:
% handles - handles structure outlined in run_img_processing.m
% image_buffer - n x photodiodes/8 raw image buffer without timestamps
% outputs:
% holroyd_habit - habit code as listed below
% 5/15/2017 -- it was discovered that certai... |
github | jjjjfrench/UW-UIOPS-master | calculate_reject_unified.m | .m | UW-UIOPS-master/img_processing/calculate_reject_unified.m | 20,696 | utf_8 | 4438b2dee44f70bdd279914cf9ee9ec0 | function [p_length,width,area,longest_y,max_top,max_bottom,touching_edge,reject_status,is_hollow,percent_shadow_area,part_z,size_factor,area_hole_ratio,handles]=calculate_reject_unified(image_buffer,handles,habit)
% /* RETURN CODE */
% /* 0 = not rejected ... |
github | safdarne/TRGMC-master | sc.m | .m | TRGMC-master/sc.m | 38,505 | utf_8 | 7f1b3d24c919310f72c1f507ef09f0c6 | function I = sc(I, varargin)
%SC Display/output truecolor images with a range of colormaps
%
% Examples:
% sc(image)
% sc(image, limits)
% sc(image, map)
% sc(image, limits, map)
% sc(image, map, limits)
% sc(..., col1, mask1, col2, mask2,...)
% out = sc(...)
% sc
%
% Generates a truecolor... |
github | lacerbi/psybayes-master | psybayes.m | .m | psybayes-master/psybayes.m | 13,615 | utf_8 | e1b407be358f4d890c3e46384174af9e | function [xnext,psy,output] = psybayes(psy,method,vars,xi,yi)
%PSYBAYES Bayesian adaptive estimation of psychometric function.
%
% PSYBAYES implements Kontsevich and Tyler's (1999) Bayesian adaptive
% method PSI for estimation of parameters of the psychometric function via
% maximization of information gain (includ... |
github | lacerbi/psybayes-master | psybayes_joint.m | .m | psybayes-master/psybayes_joint.m | 16,283 | utf_8 | fe389c953ab293ff15d881ee2ef89326 | function [xnext,psy,output] = psybayes_joint(psy,method,vars,xi,yi,ci)
%PSYBAYES_JOINT Joint Bayesian adaptive estimation of psychometric functions.
%
% PSYBAYES implements Kontsevich and Tyler's (1999) Bayesian adaptive
% method PSI for estimation of parameters of the psychometric function via
% maximization of in... |
github | lacerbi/psybayes-master | psyinit.m | .m | psybayes-master/private/psyinit.m | 6,800 | utf_8 | e24bc831e0a692754ae68ce3049c887e | function [psy,Nfuns] = psyinit(psyinfo,Ncnd)
%PSYINIT Initialize PSY struct.
% Total number of conditions (one by default)
if nargin < 2 || isempty(Ncnd); Ncnd = 1; end
psy = [];
psy.ntrial = 0; % Trial number
psy.data = []; % Record of data
if ~isfield(psyinfo,'psychofun'); psyinfo.psychofun = []; end
if ... |
github | xizou/NIPGD-master | call_abq.m | .m | NIPGD-master/call_abq.m | 2,729 | utf_8 | 2de73aa53534fe0047a5251b466dc19d | function [Ut] = call_abq(E1_tilde,E2_tilde,F_star)
%CALL_ABQ Calling Abaqus to solve K_star*U=F_star.
% Load parameters for stiffness matrix scaling.
% Works only for 3D mesh.
% SYNOPOSIS: Ut = call_abq(E1_tilde,E2_tilde,F_star);
% INPUT: E1_title : First parameter value, scalar
% E2_title : Secon... |
github | wireapp/onepassword-app-extension-master | OnePasswordExtension.m | .m | onepassword-app-extension-master/OnePasswordExtension.m | 41,868 | utf_8 | ad5b44a4da8cc02db0488a7b92fb7a0a | //
// 1Password Extension
//
// Lovingly handcrafted by Dave Teare, Michael Fey, Rad Azzouz, and Roustem Karimov.
// Copyright (c) 2014 AgileBits. All rights reserved.
//
#import "OnePasswordExtension.h"
// Version
#define VERSION_NUMBER @(182)
static NSString *const AppExtensionVersionNumberKey = @"version_number... |
github | emeb/iceRadio-master | freq_plot.m | .m | iceRadio-master/FPGA/rxadc_2/matlab/freq_plot.m | 251 | utf_8 | 729973cd5669dfbd3253d8c24f17293e | % freq_plot.m - frequency plot
% E. Brombaugh 08-03-16
function freq_plot(x, Fs, title_str)
sz = length(x);
f = Fs * (((0:sz-1)/sz)-0.5);
plot(f, 20*log10(abs(fftshift(fft(x)/sz))));
grid on;
title(title_str);
xlabel('Freq');
ylabel('dB');
end
|
github | AlanRace/SpectralAnalysis-master | SpectralAnalysis.m | .m | SpectralAnalysis-master/SpectralAnalysis.m | 918 | utf_8 | aebd04ed17adf1448eaf6128668b3095 | %% SpectralAnalysis
% Spectral Imaging analysis software
function spectralAnalysis = SpectralAnalysis()
% Get location of current m-file
if(isdeployed())
disp('Initialising MATLAB, please wait...');
path = ctfroot();
disp(path);
else
path = fileparts(mfilename('fullpath'));
% Ensure all folder... |
github | AlanRace/SpectralAnalysis-master | parseRegionOfInterestList.m | .m | SpectralAnalysis-master/src/gui/MOOGL/util/parseRegionOfInterestList.m | 980 | utf_8 | 24027c8c7e4b292c2b1717cf1a06eeb6 | function regionOfInterestList = parseRegionOfInterestList(filename)
% parseClusterGroupList Convert XML file to a MATLAB structure.
try
tree = xmlread(filename);
catch
error('Failed to read XML file %s.',filename);
end
% Recurse over child nodes. This could run into problems
% with very deeply nested trees.
tr... |
github | AlanRace/SpectralAnalysis-master | parseRegionOfInterestElement.m | .m | SpectralAnalysis-master/src/gui/MOOGL/util/parseRegionOfInterestElement.m | 1,660 | utf_8 | f6ea11108991760769565360ccd5d7a8 | function regionOfInterest = parseRegionOfInterestElement(regionOfInterestNode)
width = str2num(regionOfInterestNode.getAttributes().getNamedItem('width').getValue());
height = str2num(regionOfInterestNode.getAttributes().getNamedItem('height').getValue());
regionOfInterest = RegionOfInterest(width, height)... |
github | AlanRace/SpectralAnalysis-master | generateFastPreprocessingWorkflow.m | .m | SpectralAnalysis-master/src/util/generateFastPreprocessingWorkflow.m | 3,410 | utf_8 | 62867ff2c6a8d4bf25c62ceb33c072de | % Returns empty variable if there is no fast preprocessing workflow
% available
function fastPreprocessingWorkflow = generateFastPreprocessingWorkflow(workflow)
if(~canUseJSpectralAnalysis())
fastPreprocessingWorkflow = [];
return;
end
fastPreprocessingWorkflow = com.alanmrace.JSpectralAnalysis.PreprocessingW... |
github | AlanRace/SpectralAnalysis-master | colouriseData.m | .m | SpectralAnalysis-master/src/util/colouriseData.m | 5,789 | utf_8 | 71f28f2156cba34801adb011c541cd56 | % colourScale 'r' (red), 'g' (green), 'b' (blue), 'y' (yellow), 'm'
% (magenta), 'c' (cyan), 'h' hot, 'p' pink
function [image, maxValue, minValue] = colouriseData(data, positiveScaleColour, negativeScaleColour, quant)
numBits = 2^16;
image = zeros(size(data, 1), size(data, 2), 3, 'uint16');
if(nargin < 4)
minVa... |
github | AlanRace/SpectralAnalysis-master | normaliseRGBChannels.m | .m | SpectralAnalysis-master/src/util/normaliseRGBChannels.m | 450 | utf_8 | caee37c051e3b53b5fe6fd8ab260ee2c | % Normalise RGB channels individually to their min/max values
function normalised = normaliseRGBChannels(rgb)
normalised = (rgb(:, :, 1) - min(min(rgb(:, :, 1)))) ./ (max(max(rgb(:, :, 1))) - min(min(rgb(:, :, 1))));
normalised(:, :, 2) = (rgb(:, :, 2) - min(min(rgb(:, :, 2)))) ./ (max(max(rgb(:, :, 2))) - min(min(rgb... |
github | AlanRace/SpectralAnalysis-master | mip_plsa.m | .m | SpectralAnalysis-master/src/processing/postprocessing/mip_plsa/mip_plsa.m | 2,545 | utf_8 | a33a2f153f46631f3f3e40b96b2f620a | % function that performs a probabilistic latent semantic analysis of the
% input data matrix
%
% input
%
% X SxC matrix with C variables (channels) and S
% observations (spectra), i.e. each row consists of
% one observation
% numComponents decompose the data into... |
github | AlanRace/SpectralAnalysis-master | mip_calculateAICcTrace.m | .m | SpectralAnalysis-master/src/processing/postprocessing/mip_plsa/mip_calculateAICcTrace.m | 1,124 | utf_8 | bf4341f53191bed7c71966a4d481e809 | % Function that calculates the AICc-trace from a given likelihood vector
% and the data
%
% input
%
% X SxC matrix with C variables (channels) and S
% observations (spectra), i.e. each row consists of
% one observation
% mzVector vector with m/z-positions (o... |
github | AlanRace/SpectralAnalysis-master | mip_showPLSAResults.m | .m | SpectralAnalysis-master/src/processing/postprocessing/mip_plsa/mip_showPLSAResults.m | 1,534 | utf_8 | 209115723076781acbdb50dc817f8e10 | % function that plots the pLSA results
%
% input
%
% ts TxS matrix with C variables (channels) and T
% tissue types - i.e. the matrix holding the abundance
% maps for the T tissue types
% ct CxT matrix of pure, characteristic spectra
% xyPos ... |
github | AlanRace/SpectralAnalysis-master | mip_plotSparsity.m | .m | SpectralAnalysis-master/src/processing/postprocessing/mip_plsa/mip_plotSparsity.m | 1,819 | utf_8 | 08f2c12c944a7ec0129c9c73aea3ce13 | % function that claculates the sparsity of the mixture vectors of the
% decomposition result
%
% input
%
% X SxC matrix with C variables (channels) and S
% observations (spectra), i.e. each row consists of
% one observation
% mzVector vector with m/z-positio... |
github | AlanRace/SpectralAnalysis-master | mip_pickPeaksSimple.m | .m | SpectralAnalysis-master/src/processing/postprocessing/mip_plsa/mip_pickPeaksSimple.m | 5,453 | utf_8 | 668c9ea20d0bf52ad12272c0aeccca20 | % Function that performs feature extraction by peak-picking
%
% input
%
% X SxC matrix with C variables (channels) and S
% observations (spectra), i.e. each row consists of
% one observation
% mzVector vector with m/z-positions (of dimension Cx1)
% ppThresho... |
github | AlanRace/SpectralAnalysis-master | mip_simpleNoiseEstimation.m | .m | SpectralAnalysis-master/src/processing/postprocessing/mip_plsa/mip_simpleNoiseEstimation.m | 1,757 | utf_8 | 65d1d1ba797641d35f16b1beff966a1e | % Function that estimates the noise in the data by first smoothing the data
% (spatially) and then taking the median of the residual sum of squares
%
% input
%
% X SxC matrix with C variables (channels) and S
% observations (spectra), i.e. each row consists of
% one ... |
github | qintonguav/TheiaSfM-master | flann_search.m | .m | TheiaSfM-master/libraries/flann/src/matlab/flann_search.m | 3,564 | utf_8 | 7dfb2eee171a6fef9aa4adec527e3145 | %Copyright 2008-2009 Marius Muja (mariusm@cs.ubc.ca). All rights reserved.
%Copyright 2008-2009 David G. Lowe (lowe@cs.ubc.ca). All rights reserved.
%
%THE BSD LICENSE
%
%Redistribution and use in source and binary forms, with or without
%modification, are permitted provided that the following conditions
%are met:
%
... |
github | qintonguav/TheiaSfM-master | flann_load_index.m | .m | TheiaSfM-master/libraries/flann/src/matlab/flann_load_index.m | 1,578 | utf_8 | f9bcc41fd5972c5c987d6a4d41bdc796 | %Copyright 2008-2009 Marius Muja (mariusm@cs.ubc.ca). All rights reserved.
%Copyright 2008-2009 David G. Lowe (lowe@cs.ubc.ca). All rights reserved.
%
%THE BSD LICENSE
%
%Redistribution and use in source and binary forms, with or without
%modification, are permitted provided that the following conditions
%are met:
%
... |
github | qintonguav/TheiaSfM-master | test_flann.m | .m | TheiaSfM-master/libraries/flann/src/matlab/test_flann.m | 10,328 | utf_8 | 151c22994b0192f8a071649ad26fbc6b | %Copyright 2008-2009 Marius Muja (mariusm@cs.ubc.ca). All rights reserved.
%Copyright 2008-2009 David G. Lowe (lowe@cs.ubc.ca). All rights reserved.
%
%THE BSD LICENSE
%
%Redistribution and use in source and binary forms, with or without
%modification, are permitted provided that the following conditions
%are met:
%
... |
github | qintonguav/TheiaSfM-master | flann_free_index.m | .m | TheiaSfM-master/libraries/flann/src/matlab/flann_free_index.m | 1,614 | utf_8 | 5d719d8d60539b6c90bee08d01e458b5 | %Copyright 2008-2009 Marius Muja (mariusm@cs.ubc.ca). All rights reserved.
%Copyright 2008-2009 David G. Lowe (lowe@cs.ubc.ca). All rights reserved.
%
%THE BSD LICENSE
%
%Redistribution and use in source and binary forms, with or without
%modification, are permitted provided that the following conditions
%are met:
%
... |
github | qintonguav/TheiaSfM-master | flann_save_index.m | .m | TheiaSfM-master/libraries/flann/src/matlab/flann_save_index.m | 1,563 | utf_8 | 5a44d911827fba5422041529b3c01cf6 | %Copyright 2008-2009 Marius Muja (mariusm@cs.ubc.ca). All rights reserved.
%Copyright 2008-2009 David G. Lowe (lowe@cs.ubc.ca). All rights reserved.
%
%THE BSD LICENSE
%
%Redistribution and use in source and binary forms, with or without
%modification, are permitted provided that the following conditions
%are met:
%
... |
github | qintonguav/TheiaSfM-master | flann_set_distance_type.m | .m | TheiaSfM-master/libraries/flann/src/matlab/flann_set_distance_type.m | 1,914 | utf_8 | a62dd85add564e04c01aefeb65083f5d | %Copyright 2008-2009 Marius Muja (mariusm@cs.ubc.ca). All rights reserved.
%Copyright 2008-2009 David G. Lowe (lowe@cs.ubc.ca). All rights reserved.
%
%THE BSD LICENSE
%
%Redistribution and use in source and binary forms, with or without
%modification, are permitted provided that the following conditions
%are met:
%
... |
github | qintonguav/TheiaSfM-master | flann_build_index.m | .m | TheiaSfM-master/libraries/flann/src/matlab/flann_build_index.m | 2,299 | utf_8 | f4cdee51a1c9616f205dcc814c943903 | function [index, params, speedup] = flann_build_index(dataset, build_params)
%FLANN_BUILD_INDEX Builds an index for fast approximate nearest neighbors search
%
% [index, params, speedup] = flann_build_index(dataset, build_params) - Constructs the
% index from the provided 'dataset' and (optionally) computes the optima... |
github | ShaoqingRen/py-faster-rcnn-master | voc_eval.m | .m | py-faster-rcnn-master/lib/datasets/VOCdevkit-matlab-wrapper/voc_eval.m | 1,332 | utf_8 | 3ee1d5373b091ae4ab79d26ab657c962 | function res = voc_eval(path, comp_id, test_set, output_dir)
VOCopts = get_voc_opts(path);
VOCopts.testset = test_set;
for i = 1:length(VOCopts.classes)
cls = VOCopts.classes{i};
res(i) = voc_eval_cls(cls, VOCopts, comp_id, output_dir);
end
fprintf('\n~~~~~~~~~~~~~~~~~~~~\n');
fprintf('Results:\n');
aps = [res(:... |
github | stanchiang/constellation-master | colamd_test.m | .m | constellation-master/masteringopencv2012/Chapter4_StructureFromMotion/3rdparty/SSBA-4.0/COLAMD/MATLAB/colamd_test.m | 11,737 | utf_8 | 1bbab37469571534db129da1e1531e5b | function colamd_test
%COLAMD_TEST test colamd2 and symamd2
% Example:
% colamd_test
%
% COLAMD and SYMAMD testing function. Here we try to give colamd2 and symamd2
% every possible type of matrix and erroneous input that they may encounter.
% We want either a valid permutation returned or we want them to fail
% gra... |
github | wupeng78/Weakly-Supervised-Object-Localization-with-Progressive-Domain-Adaptation-CVPR-2016--master | train_classes_20x1_smooth_lsvm_topK_bagmine_greedycover.m | .m | Weakly-Supervised-Object-Localization-with-Progressive-Domain-Adaptation-CVPR-2016--master/mil/train_classes_20x1_smooth_lsvm_topK_bagmine_greedycover.m | 10,648 | utf_8 | 46680d10d8be797f27b215d668e6f8db | % AUTORIGHTS
% ---------------------------------------------------------
% Copyright (c) 2014, Hyun Oh Song
% Copyright (c) 2016, Dong Li
%
% This file is part of the WSL code and is available
% under the terms of the MIT License provided in
% LICENSE. Please retain this notice and LICENSE if you use
% this file (o... |
github | wupeng78/Weakly-Supervised-Object-Localization-with-Progressive-Domain-Adaptation-CVPR-2016--master | mil_classes_20x1_smooth_lsvm_topK_bagmine_greedycover.m | .m | Weakly-Supervised-Object-Localization-with-Progressive-Domain-Adaptation-CVPR-2016--master/mil/mil_classes_20x1_smooth_lsvm_topK_bagmine_greedycover.m | 1,751 | utf_8 | aacd7807398aff902c0c072fe03e899c | % AUTORIGHTS
% ---------------------------------------------------------
% Copyright (c) 2014, Hyun Oh Song
% Copyright (c) 2016, Dong Li
%
% This file is part of the WSL code and is available
% under the terms of the MIT License provided in
% LICENSE. Please retain this notice and LICENSE if you use
% this file (o... |
github | wupeng78/Weakly-Supervised-Object-Localization-with-Progressive-Domain-Adaptation-CVPR-2016--master | slslvm_cost_smoothhinge_bagmine.m | .m | Weakly-Supervised-Object-Localization-with-Progressive-Domain-Adaptation-CVPR-2016--master/mil/slslvm_cost_smoothhinge_bagmine.m | 2,278 | utf_8 | 512e2dca70ed62e8a7a98c2911d7a827 | function [cost, grad] = slslvm_cost_smoothhinge_bagmine(...
w, pos_X, neg_X, ...
pos_averaging_matrix, pos_cum_bag_idx, ...
neg_averaging_matrix, neg_cum_bag_idx,...
num_pos, num_neg, ...
y, pweighted_y, C, mu, pweight, sharpness, bias_mult... |
github | wupeng78/Weakly-Supervised-Object-Localization-with-Progressive-Domain-Adaptation-CVPR-2016--master | train_classes_20x1_smooth_greedycover.m | .m | Weakly-Supervised-Object-Localization-with-Progressive-Domain-Adaptation-CVPR-2016--master/mil/train_classes_20x1_smooth_greedycover.m | 23,127 | utf_8 | 792a583169dbd9446982eba59c5a3e55 | % AUTORIGHTS
% ---------------------------------------------------------
% Copyright (c) 2014, Hyun Oh Song
% Copyright (c) 2016, Dong Li
%
% This file is part of the WSL code and is available
% under the terms of the MIT License provided in
% LICENSE. Please retain this notice and LICENSE if you use
% this file (o... |
github | wupeng78/Weakly-Supervised-Object-Localization-with-Progressive-Domain-Adaptation-CVPR-2016--master | mil_region_mining.m | .m | Weakly-Supervised-Object-Localization-with-Progressive-Domain-Adaptation-CVPR-2016--master/mil/mil_region_mining.m | 1,747 | utf_8 | d9bb95ab7af5b035eab795bcce50bdb1 | % AUTORIGHTS
% ---------------------------------------------------------
% Copyright (c) 2014, Hyun Oh Song
% Copyright (c) 2016, Dong Li
%
% This file is part of the WSL code and is available
% under the terms of the MIT License provided in
% LICENSE. Please retain this notice and LICENSE if you use
% this file (o... |
github | wupeng78/Weakly-Supervised-Object-Localization-with-Progressive-Domain-Adaptation-CVPR-2016--master | voc_config.m | .m | Weakly-Supervised-Object-Localization-with-Progressive-Domain-Adaptation-CVPR-2016--master/mil/voc_config.m | 8,999 | utf_8 | bb032cdaaab5bcbaf83b6f30937a6ed1 | % AUTORIGHTS
% ---------------------------------------------------------
% Copyright (c) 2011-2012, Ross Girshick
% Copyright (c) 2016, Dong Li
%
% This file is part of the WSL code and is available
% under the terms of the MIT License provided in
% LICENSE. Please retain this notice and LICENSE if you use
% this f... |
github | wupeng78/Weakly-Supervised-Object-Localization-with-Progressive-Domain-Adaptation-CVPR-2016--master | WolfeLineSearch.m | .m | Weakly-Supervised-Object-Localization-with-Progressive-Domain-Adaptation-CVPR-2016--master/mil/minFunc_2012/minFunc/WolfeLineSearch.m | 10,590 | utf_8 | f962bc5ae0a1e9f80202a9aaab106dab | function [t,f_new,g_new,funEvals,H] = WolfeLineSearch(...
x,t,d,f,g,gtd,c1,c2,LS_interp,LS_multi,maxLS,progTol,debug,doPlot,saveHessianComp,funObj,varargin)
%
% Bracketing Line Search to Satisfy Wolfe Conditions
%
% Inputs:
% x: starting location
% t: initial step size
% d: descent direction
% f: function v... |
github | wupeng78/Weakly-Supervised-Object-Localization-with-Progressive-Domain-Adaptation-CVPR-2016--master | minFunc_processInputOptions.m | .m | Weakly-Supervised-Object-Localization-with-Progressive-Domain-Adaptation-CVPR-2016--master/mil/minFunc_2012/minFunc/minFunc_processInputOptions.m | 4,103 | utf_8 | 8822581c3541eabe5ce7c7927a57c9ab |
function [verbose,verboseI,debug,doPlot,maxFunEvals,maxIter,optTol,progTol,method,...
corrections,c1,c2,LS_init,cgSolve,qnUpdate,cgUpdate,initialHessType,...
HessianModify,Fref,useComplex,numDiff,LS_saveHessianComp,...
Damped,HvFunc,bbType,cycle,...
HessianIter,outputFcn,useMex,useNegCurv,precFunc... |
github | wupeng78/Weakly-Supervised-Object-Localization-with-Progressive-Domain-Adaptation-CVPR-2016--master | receptive_field_size.m | .m | Weakly-Supervised-Object-Localization-with-Progressive-Domain-Adaptation-CVPR-2016--master/utils/receptive_field_size.m | 1,020 | utf_8 | f0d7016ce44f2dabfba5a3864e6ce202 | function out = receptive_field_size()
% conv1 11 55x55
% conv2 27 55x55
% pool2 35 27x27
% conv3 51 27x27
% pool3 67 13x13
% conv4 99 13x13
% conv5 131 13x13
% pool5 163 6x6
out = ...
pool3_to_conv3(...
conv4_to_pool3(...
conv5_to_conv4(...
pool5_to_conv5(1))));
return
out = ...
co... |
github | wupeng78/Weakly-Supervised-Object-Localization-with-Progressive-Domain-Adaptation-CVPR-2016--master | test_2010_from_2012.m | .m | Weakly-Supervised-Object-Localization-with-Progressive-Domain-Adaptation-CVPR-2016--master/utils/test_2010_from_2012.m | 1,163 | utf_8 | 4fd6b5864d38807aaadcc7d98084912b | function test_2010_from_2012()
year = '2010';
testset = 'test';
VOCdevkit2012 = './datasets/VOCdevkit2012';
VOCdevkit2010 = './datasets/VOCdevkit2010';
imdb_2012 = imdb_from_voc(VOCdevkit2012, 'test', '2012');
image_ids_2010 = get_2010_test_image_ids();
detrespath_2010 = '/work4/rbg/VOC2010/VOCdevkit/results/VOC201... |
github | wupeng78/Weakly-Supervised-Object-Localization-with-Progressive-Domain-Adaptation-CVPR-2016--master | hdf5_dir_to_mat_dir.m | .m | Weakly-Supervised-Object-Localization-with-Progressive-Domain-Adaptation-CVPR-2016--master/utils/hdf5_dir_to_mat_dir.m | 1,283 | utf_8 | 8dcb8efe79353e8cfcc85cce60383323 | function [] = hdf5_dir_to_mat_dir(hdf5_dir_path, mat_dir_path, quiet, skip_done)
assert(logical(exist(hdf5_dir_path, 'dir')));
if ~exist('quiet', 'var')
quiet = false;
end
if ~exist('skip_done', 'var')
skip_done = true;
end
if ~exist(mat_dir_path, 'dir')
mkdir(mat_dir_path);
end
files = dir(sprintf('%s/*.... |
github | wupeng78/Weakly-Supervised-Object-Localization-with-Progressive-Domain-Adaptation-CVPR-2016--master | prepare_batch.m | .m | Weakly-Supervised-Object-Localization-with-Progressive-Domain-Adaptation-CVPR-2016--master/caffe-wsl/matlab/caffe/prepare_batch.m | 1,298 | utf_8 | 68088231982895c248aef25b4886eab0 | % ------------------------------------------------------------------------
function images = prepare_batch(image_files,IMAGE_MEAN,batch_size)
% ------------------------------------------------------------------------
if nargin < 2
d = load('ilsvrc_2012_mean');
IMAGE_MEAN = d.image_mean;
end
num_images = length... |
github | wupeng78/Weakly-Supervised-Object-Localization-with-Progressive-Domain-Adaptation-CVPR-2016--master | matcaffe_demo_vgg.m | .m | Weakly-Supervised-Object-Localization-with-Progressive-Domain-Adaptation-CVPR-2016--master/caffe-wsl/matlab/caffe/matcaffe_demo_vgg.m | 3,036 | utf_8 | f836eefad26027ac1be6e24421b59543 | function scores = matcaffe_demo_vgg(im, use_gpu, model_def_file, model_file, mean_file)
% scores = matcaffe_demo_vgg(im, use_gpu, model_def_file, model_file, mean_file)
%
% Demo of the matlab wrapper using the networks described in the BMVC-2014 paper "Return of the Devil in the Details: Delving Deep into Convolutional... |
github | wupeng78/Weakly-Supervised-Object-Localization-with-Progressive-Domain-Adaptation-CVPR-2016--master | matcaffe_demo.m | .m | Weakly-Supervised-Object-Localization-with-Progressive-Domain-Adaptation-CVPR-2016--master/caffe-wsl/matlab/caffe/matcaffe_demo.m | 3,344 | utf_8 | 669622769508a684210d164ac749a614 | function [scores, maxlabel] = matcaffe_demo(im, use_gpu)
% scores = matcaffe_demo(im, use_gpu)
%
% Demo of the matlab wrapper using the ILSVRC network.
%
% input
% im color image as uint8 HxWx3
% use_gpu 1 to use the GPU, 0 to use the CPU
%
% output
% scores 1000-dimensional ILSVRC score vector
%
% You m... |
github | wupeng78/Weakly-Supervised-Object-Localization-with-Progressive-Domain-Adaptation-CVPR-2016--master | matcaffe_demo_vgg_mean_pix.m | .m | Weakly-Supervised-Object-Localization-with-Progressive-Domain-Adaptation-CVPR-2016--master/caffe-wsl/matlab/caffe/matcaffe_demo_vgg_mean_pix.m | 3,069 | utf_8 | 04b831d0f205ef0932c4f3cfa930d6f9 | function scores = matcaffe_demo_vgg_mean_pix(im, use_gpu, model_def_file, model_file)
% scores = matcaffe_demo_vgg(im, use_gpu, model_def_file, model_file)
%
% Demo of the matlab wrapper based on the networks used for the "VGG" entry
% in the ILSVRC-2014 competition and described in the tech. report
% "Very Deep Convo... |
github | wupeng78/Weakly-Supervised-Object-Localization-with-Progressive-Domain-Adaptation-CVPR-2016--master | voc_eval.m | .m | Weakly-Supervised-Object-Localization-with-Progressive-Domain-Adaptation-CVPR-2016--master/lib/datasets/VOCdevkit-matlab-wrapper/voc_eval.m | 1,389 | utf_8 | fd77d0da53b2585aa65e0da5edc5fe33 | function res = voc_eval(path, comp_id, test_set, output_dir, rm_res)
VOCopts = get_voc_opts(path);
VOCopts.testset = test_set;
for i = 1:length(VOCopts.classes)
cls = VOCopts.classes{i};
res(i) = voc_eval_cls(cls, VOCopts, comp_id, output_dir, rm_res);
end
fprintf('\n~~~~~~~~~~~~~~~~~~~~\n');
fprintf('Results:\n... |
github | wupeng78/Weakly-Supervised-Object-Localization-with-Progressive-Domain-Adaptation-CVPR-2016--master | roidb_from_voc.m | .m | Weakly-Supervised-Object-Localization-with-Progressive-Domain-Adaptation-CVPR-2016--master/imdb/roidb_from_voc.m | 2,742 | utf_8 | 425a3d818c40cd19ef2879df05341668 | function roidb = roidb_from_voc(imdb)
% roidb = roidb_from_voc(imdb)
% Builds an regions of interest database from imdb image
% database.
%
% Inspired by Andrea Vedaldi's MKL imdb and roidb code.
% AUTORIGHTS
% ---------------------------------------------------------
% Copyright (c) 2014, Ross Girshick
% Copyri... |
github | wupeng78/Weakly-Supervised-Object-Localization-with-Progressive-Domain-Adaptation-CVPR-2016--master | show_detections.m | .m | Weakly-Supervised-Object-Localization-with-Progressive-Domain-Adaptation-CVPR-2016--master/vis/show_detections.m | 1,339 | utf_8 | 0d424d6872284605347fe243ed9fdf30 | function show_detections(model, split, year)
conf = voc_config('pascal.year', year);
dataset.year = year;
dataset.trainset = split;
dataset.image_ids = textread(sprintf(conf.pascal.VOCopts.imgsetpath, split), '%s');
show_det(model, dataset, conf);
% --------------------------------------------------------------------... |
github | wupeng78/Weakly-Supervised-Object-Localization-with-Progressive-Domain-Adaptation-CVPR-2016--master | show_latent_choice.m | .m | Weakly-Supervised-Object-Localization-with-Progressive-Domain-Adaptation-CVPR-2016--master/vis/show_latent_choice.m | 1,567 | utf_8 | d4b8095cd404d6cccc29fc7061ae06b7 | function show_latent_choice(model, trainset, year)
conf = voc_config('pascal.year', year);
dataset.year = year;
dataset.trainset = trainset;
dataset.image_ids = textread(sprintf(conf.pascal.VOCopts.imgsetpath, trainset), '%s');
[ids, cls_label] = textread(sprintf(conf.pascal.VOCopts.imgsetpath, [model.class '_' train... |
github | wupeng78/Weakly-Supervised-Object-Localization-with-Progressive-Domain-Adaptation-CVPR-2016--master | sample_correlated_pairs.m | .m | Weakly-Supervised-Object-Localization-with-Progressive-Domain-Adaptation-CVPR-2016--master/vis/sample_correlated_pairs.m | 1,226 | utf_8 | 21fba006b038c35f8dce14cedae004b7 | function feature_pairs = sample_correlated_pairs(S, N)
ovM = get_overlap_matrix();
feature_pairs = zeros(0, 3);
for i = 1:N
while true
u1 = randi(size(S,1));
pos1 = mod(u1-1, 36)+1;
ov = ovM(pos1,:);
ok = repmat((ov < 1/3), [1 256]);
ok(u1-pos1+1:u1-pos1+36) = 0;
row = S(u1, :);
row(~ok)... |
github | wupeng78/Weakly-Supervised-Object-Localization-with-Progressive-Domain-Adaptation-CVPR-2016--master | pick_feature_pair.m | .m | Weakly-Supervised-Object-Localization-with-Progressive-Domain-Adaptation-CVPR-2016--master/vis/pick_feature_pair.m | 1,089 | utf_8 | bee9f65c9d04ab2cb76538687f40bacc | function feature_pairs = pick_feature_pair(model, N)
ovM = get_overlap_matrix();
feature_pairs = zeros(0, 2);
[~, w_ord] = sort(model.w, 'descend');
for i = 1:N
u1 = w_ord(i);
pos1 = mod(u1-1, 36)+1;
ov = ovM(pos1,:);
ok = repmat((ov < 1/3), [1 256]);
ok(u1-pos1+1:u1-pos1+36) = 0;
w = model.w... |
github | wupeng78/Weakly-Supervised-Object-Localization-with-Progressive-Domain-Adaptation-CVPR-2016--master | viewerrors.m | .m | Weakly-Supervised-Object-Localization-with-Progressive-Domain-Adaptation-CVPR-2016--master/vis/viewerrors.m | 10,275 | utf_8 | 984e38a9624546fc0ba466aed666d8cf | function ap = viewerrors(model, boxes, testset, year, saveim)
% For visualizing mistakes on a validation set
% AUTORIGHTS
% -------------------------------------------------------
% Copyright (C) 2009-2012 Ross Girshick
%
% This file is part of the voc-releaseX code
% (http://people.cs.uchicago.edu/~rbg/latent/)
% an... |
github | wupeng78/Weakly-Supervised-Object-Localization-with-Progressive-Domain-Adaptation-CVPR-2016--master | vis_crops.m | .m | Weakly-Supervised-Object-Localization-with-Progressive-Domain-Adaptation-CVPR-2016--master/vis/vis_crops.m | 2,193 | utf_8 | a32583168a0ca9cc94afbeca8755a8b4 | function vis_crops(imdb)
opts.net_file = './data/caffe_nets/finetune_voc_2007_trainval_iter_70k';
opts.net_def_file = './model-defs/rcnn_batch_256_output_pool5.prototxt';
% load the region of interest database
roidb = imdb.roidb_func(imdb);
rcnn_model = rcnn_create_model(opts.net_def_file, opts.net_file);
rcnn_m... |
github | wupeng78/Weakly-Supervised-Object-Localization-with-Progressive-Domain-Adaptation-CVPR-2016--master | pool5_explorer.m | .m | Weakly-Supervised-Object-Localization-with-Progressive-Domain-Adaptation-CVPR-2016--master/vis/pool5-explorer/pool5_explorer.m | 6,690 | utf_8 | a1c8558f0e1f3580833ccc05c8629d9e | function pool5_explorer(imdb, cache_name)
% AUTORIGHTS
% ---------------------------------------------------------
% Copyright (c) 2014, Ross Girshick
%
% This file is part of the R-CNN code and is available
% under the terms of the Simplified BSD License provided in
% LICENSE. Please retain this notice and LICENSE ... |
github | wupeng78/Weakly-Supervised-Object-Localization-with-Progressive-Domain-Adaptation-CVPR-2016--master | cache_fc8_features.m | .m | Weakly-Supervised-Object-Localization-with-Progressive-Domain-Adaptation-CVPR-2016--master/features/cache_fc8_features.m | 2,355 | utf_8 | 6260d287c993b2ffddd3e8818e88c87f | % AUTORIGHTS
% ---------------------------------------------------------
% Copyright (c) 2014, Ross Girshick
% Copyright (c) 2016, Dong Li
%
% This file is part of the WSL code and is available
% under the terms of the MIT License provided in
% LICENSE. Please retain this notice and LICENSE if you use
% this file (... |
github | wupeng78/Weakly-Supervised-Object-Localization-with-Progressive-Domain-Adaptation-CVPR-2016--master | cache_bb_features.m | .m | Weakly-Supervised-Object-Localization-with-Progressive-Domain-Adaptation-CVPR-2016--master/features/cache_bb_features.m | 1,193 | utf_8 | 2d2afacf8926b9d190c11871368e83be | % AUTORIGHTS
% ---------------------------------------------------------
% Copyright (c) 2014, Ross Girshick
% Copyright (c) 2016, Dong Li
%
% This file is part of the WSL code and is available
% under the terms of the MIT License provided in
% LICENSE. Please retain this notice and LICENSE if you use
% this file (... |
github | wupeng78/Weakly-Supervised-Object-Localization-with-Progressive-Domain-Adaptation-CVPR-2016--master | extract_regions.m | .m | Weakly-Supervised-Object-Localization-with-Progressive-Domain-Adaptation-CVPR-2016--master/features/extract_regions.m | 1,980 | utf_8 | d08caf471fa445373bc5508454f8ae42 | % AUTORIGHTS
% ---------------------------------------------------------
% Copyright (c) 2014, Ross Girshick
% Copyright (c) 2016, Dong Li
%
% This file is part of the WSL code and is available
% under the terms of the MIT License provided in
% LICENSE. Please retain this notice and LICENSE if you use
% this file (... |
github | wupeng78/Weakly-Supervised-Object-Localization-with-Progressive-Domain-Adaptation-CVPR-2016--master | extract_region_in.m | .m | Weakly-Supervised-Object-Localization-with-Progressive-Domain-Adaptation-CVPR-2016--master/features/extract_region_in.m | 917 | utf_8 | 7a3cd9d842a57d3d621b53c741a46786 | % AUTORIGHTS
% ---------------------------------------------------------
% Copyright (c) 2016, Dong Li
%
% This file is part of the WSL code and is available
% under the terms of the MIT License provided in
% LICENSE. Please retain this notice and LICENSE if you use
% this file (or any portion of it) in your projec... |
github | wupeng78/Weakly-Supervised-Object-Localization-with-Progressive-Domain-Adaptation-CVPR-2016--master | cache_fc7_features.m | .m | Weakly-Supervised-Object-Localization-with-Progressive-Domain-Adaptation-CVPR-2016--master/features/cache_fc7_features.m | 2,983 | utf_8 | 31c412dffc553f13a6e43e95aceed71e | % AUTORIGHTS
% ---------------------------------------------------------
% Copyright (c) 2014, Ross Girshick
% Copyright (c) 2016, Dong Li
%
% This file is part of the WSL code and is available
% under the terms of the MIT License provided in
% LICENSE. Please retain this notice and LICENSE if you use
% this file (... |
github | wupeng78/Weakly-Supervised-Object-Localization-with-Progressive-Domain-Adaptation-CVPR-2016--master | extract_region_out.m | .m | Weakly-Supervised-Object-Localization-with-Progressive-Domain-Adaptation-CVPR-2016--master/features/extract_region_out.m | 747 | utf_8 | 545ca74e438fdb1087702203fa974a19 | % AUTORIGHTS
% ---------------------------------------------------------
% Copyright (c) 2016, Dong Li
%
% This file is part of the WSL code and is available
% under the terms of the MIT License provided in
% LICENSE. Please retain this notice and LICENSE if you use
% this file (or any portion of it) in your projec... |
github | wupeng78/Weakly-Supervised-Object-Localization-with-Progressive-Domain-Adaptation-CVPR-2016--master | preprocess.m | .m | Weakly-Supervised-Object-Localization-with-Progressive-Domain-Adaptation-CVPR-2016--master/features/preprocess.m | 778 | utf_8 | 8d861cb5445de961ec1a8bef66e0b94e | % AUTORIGHTS
% ---------------------------------------------------------
% Copyright (c) 2016, Dong Li
%
% This file is part of the WSL code and is available
% under the terms of the MIT License provided in
% LICENSE. Please retain this notice and LICENSE if you use
% this file (or any portion of it) in your projec... |
github | dswinters/ocean-tools-master | parse_adcp.m | .m | ocean-tools-master/parse_adcp.m | 15,543 | utf_8 | c2a0b235190fbf1326886e90c35aebdd | %% parse_adcp.m
%
% Usage
% adcp = parse_adcp(files)
% adcp = parse_adcp(files, parse_nuc_timestamps)
% adcp = parse_adcp(... , 'progress', uiprogressdlg)
%
% Inputs
% - dat_or_file
% This can be a filename, cell array of filenames, the output of MATLAB's
% "dir" command, or an array of binary data.
%
% Optio... |
github | dswinters/ocean-tools-master | parse_nortek_adcp.m | .m | ocean-tools-master/parse_nortek_adcp.m | 7,066 | utf_8 | de4db43d3ea5aa8e29593f0305f1b9b4 | function adcp = parse_nortek_adcp(dat_or_file,varargin)
%% Parse optional inputs
p = inputParser;
addOptional(p,'parse_cpu_time',false,@(x) islogical(x))
addParameter(p,'progress',struct(),@(x) isa(x,'matlab.ui.dialog.ProgressDialog'));
parse(p,varargin{:});
progress = p.Results.progress;
parse_cpu_time = p.Results.pa... |
github | dswinters/ocean-tools-master | prep_nbeam_solutions.m | .m | ocean-tools-master/prep_nbeam_solutions.m | 7,147 | utf_8 | 186f39b257f30f102581a5fd81a9994b | %% prep_nbeam_solutions.m
% Usage: adcp = prep_nbeam_solutions(adcp)
%
% Description:
% Fill in NaN-masked beam velocity data with data from other beams. Uses the
% Sentinel V's 5th beam to solve for missing beam data with the assumption that
% towards-transducer velocity as estimated by each beam pair and as mea... |
github | dswinters/ocean-tools-master | parse_imu.m | .m | ocean-tools-master/parse_imu.m | 21,036 | utf_8 | beb6d505c404508dccfd47bc6a791920 | %% parse_imu.m
%
% Usage
% imu = parse_imu(dat_or_file)
% imu = parse_imu(dat_or_file, parse_nuc_timestamps)
% imu = parse_imu(... , 'progress', uiprogressdlg)
%
% Inputs
% - dat_or_file
% This can be a filename, cell array of filenames, the output of MATLAB's
% "dir" command, or an array of binary data.
%
% ... |
github | dswinters/ocean-tools-master | parse_gps.m | .m | ocean-tools-master/parse_gps.m | 9,096 | utf_8 | e30546642c7a5557b3113647b61ad60f | %% parse_gps.m
%
% Usage
% gps = parse_gps(files)
% gps = parse_gps(... , 'progress', uiprogressdlg)
%
% Inputs
% - f_in
% This can be a filename, cell array of filenames, the output of MATLAB's
% "dir" command.
%
% Name-value pair arguments
% - 'progress'
% Specify a UI progress dialog handle to update it wi... |
github | dswinters/ocean-tools-master | gps_ltln2vel.m | .m | ocean-tools-master/gps_ltln2vel.m | 1,422 | utf_8 | 73c9a76ae21cd1dbc32b55367a3a3a3c | %% nav_ltln2vel.m
% Usage: nav_ltln2vel(lt,ln,dn)
% Description: Convert the lat and lon measurements in LT and
% LN to an xy grid centered at the mean location.
% Create a timeseries of x&y velocity based on the
% timestamps in DN.
% Inputs: lt - latitude (degrees north)
% ... |
github | ku-ya/OccGridMap_Matlab-master | EISM.m | .m | OccGridMap_Matlab-master/2D_matlab/EISM.m | 1,516 | utf_8 | e6809e72d3f66308b6a75a0e63021ad2 | % 1 beam case for exact inverse sensor model occGrid
% parameters
function ogmap = EISM(ogmap,range,free,X_t,param)
% L = 1; % world size
% dx = param.resol; % grid size
% sigma = param.sigma; % sensor
% create measurements and pose
%%
% nz = length(free);
% idx = zeros(1,nz); idz = idx;
% for j = 1:nz
% get reduced ma... |
github | ku-ya/OccGridMap_Matlab-master | AISM.m | .m | OccGridMap_Matlab-master/2D_matlab/AISM.m | 1,237 | utf_8 | dfc47527f8755a13591a7d99023fb78a | % 1 beam case for exact inverse sensor model occGrid
% parameters
function ogmap = AISM(ogmap,range,free,X_t,param)
% L = 1; % world size
% dx = param.resol; % grid size
% create measurements and pose
%%
% nz = length(free);
% idx = zeros(1,nz); idz = idx;
% for j = 1:nz
% get reduced map
% [~, idx(j)] = min(abs(m_... |
github | ku-ya/OccGridMap_Matlab-master | occGridMapping.m | .m | OccGridMap_Matlab-master/2D_matlab/occGridMapping.m | 4,508 | utf_8 | c3f68f15f6ecc50d8492c7712ca01ca8 | % Robotics: Estimation and Learning
% WEEK 3
%
% Complete this function following the instruction.
function [myMap, H, IG]= occGridMapping(ranges, scanAngles, pose, param)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%5
% Parameters
%
% % the number of grids for 1 meter.
myResol = param.resol;
% % the initial map size in pixels... |
github | ku-ya/OccGridMap_Matlab-master | occGridMapping.m | .m | OccGridMap_Matlab-master/1D_matlab/occGridMapping.m | 770 | utf_8 | ea8449de0c55ed97267c2b91ee9e47e2 | % 1D case for exact inverse sensor model occGrid
function myMap = occGridMapping(ranges, scanAngles, pose, param)
%%
% Parameters
%
% % the number of grids for 1 meter.
% myResol = param.resol;
% % the initial map size in pixels
% myMap = zeros(param.size);
% % the origin of the map in pixels
% myorigin = param.origin... |
github | zhangaigh/rovio-standalone-master | loadCalibrationCamToCam.m | .m | rovio-standalone-master/tools/kitti_tool/loadCalibrationCamToCam.m | 1,894 | utf_8 | 88db832a2338f205ea36b1a9f6231aed | function calib = loadCalibrationCamToCam(filename)
% open file
fid = fopen(filename,'r');
if fid<0
calib = [];
return;
end
% read corner distance
calib.cornerdist = readVariable(fid,'corner_dist',1,1);
% read all cameras (maximum: 100)
for cam=1:100
% read variables
S_ = readVariable(fid,['S_' num2s... |
github | zhangaigh/rovio-standalone-master | loadCalibrationRigid.m | .m | rovio-standalone-master/tools/kitti_tool/loadCalibrationRigid.m | 855 | utf_8 | 9148661cd7335b41dace4f57bd25b3a4 | function Tr = loadCalibrationRigid(filename)
% open file
fid = fopen(filename,'r');
if fid<0
error(['ERROR: Could not load: ' filename]);
end
% read calibration
R = readVariable(fid,'R',3,3);
T = readVariable(fid,'T',3,1);
Tr = [R T;0 0 0 1];
% close file
fclose(fid);
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%... |
github | skovnats/madmm-master | procXYmnp21_n_pairwise.m | .m | madmm-master/functional_maps_L21norm/procXYmnp21_n_pairwise.m | 7,338 | utf_8 | 63dc2bbfce6e5091a94b8628539da790 | function [X cXY nnr nns rrho times]=procXYmnp21_n_pairwise(FourCoeffs,mu,Ps,X0,niter,initer)
% Computes the solution of
% min_{Xi'Xi=I} for i=1:n-1 for j=i+1:n
% mu*| FourCoeffs{i}*Xi-FourCoeffs{j}*Xj |_2,1 }
% end end
% + for i=1:n
% + (|off(Xi'*Ps{i}*Xi)|^2
% end
%
%
% Method: MADMM with fixed number of iterations
%... |
github | skovnats/madmm-master | d_shape.m | .m | madmm-master/functional_maps_L21norm/help_functions/d_shape.m | 1,489 | utf_8 | 101bd876cf423a57e4af57e52beeaa64 | function [d] = d_shape(shape, src_idx)
if ismac
d=d_shape2(shape,src_idx);
else
num_vert = length(shape.X);
src = repmat(Inf, num_vert, 1);
src(src_idx) = 0;
d = fastmarch(shape.TRIV, shape.X, shape.Y, shape.Z, double(src), set_options('mode', 'single'));
% d = fastmarchmex('init', int32... |
github | skovnats/madmm-master | args2struct.m | .m | madmm-master/functional_maps_L21norm/help_functions/args2struct.m | 510 | utf_8 | 961ec8b35e883660b8b208bf814011dd | % Convert argument pairs to a structure
function S = args2struct(varargin)
% No inputs, return empty structure
if isempty(varargin), S = struct(); return; end
if length(varargin) == 1 && isempty(varargin{1}), S = struct(); return; end
% Need pairs of inputs
if mod(length(varargin),2)==1
error('number of arguments... |
github | skovnats/madmm-master | dsh.m | .m | madmm-master/functional_maps_L21norm/help_functions/dsh.m | 3,071 | utf_8 | 21a9744f4519ebab630e1b0e49935922 | % script for dispalying shape
function [] = dsh( varargin )
% input:
%{
{1} - title
{2} - if save
%}
vector = false;
flag = true;
name = [];
switch nargin
case 1
shape = varargin{ 1 };
case 2
shape = varargin{ 1 };
tname = varargin{ 2 };
if isn... |
github | skovnats/madmm-master | dstcalc.m | .m | madmm-master/functional_maps_L21norm/help_functions/dstcalc.m | 3,459 | utf_8 | 7e2aa60336c6d4919af9f2637029f662 | function [varargout] = dstcalc(method, varargin)
% functioon does distance calculations
% inputs:
% s = dstcalc( 'init', 'diffusion', shape, t, opt );
% d = dstcalc( 'compute', s, sample, shape );
switch lower(method)
case 'init'
type = varargin{1};
s = init_distance(type, varargin(... |
github | skovnats/madmm-master | parseOpt.m | .m | madmm-master/functional_maps_L21norm/help_functions/parseOpt.m | 985 | utf_8 | 7ea99e27df68a53e6b0a2c74ff21cf17 | % Construct options structure with a template
% S can be varargin or struct
% D are the default values struct
function T = parseOpt(D,varargin)
if length(varargin) == 1 && isstruct(varargin{1})
S = varargin{1};
else
S = args2struct(varargin{:});
end
T = D; % copy the template
if isempty(S)
return;
e... |
github | skovnats/madmm-master | fastmarch.m | .m | madmm-master/functional_maps_L21norm/help_functions/fastmarch.m | 3,803 | utf_8 | ea85445d2c05290379ec7e62b3832ac8 | % fastmarch Fast marching algorithm for geodesic distance approximation
%
% Usage:
%
% D = fastmarch(TRIV, X, Y, Z, [src], [opt])
% D = fastmarch(surface, [src], [opt])
%
% Description:
%
% Computes the geodesic distances on a triangulated surfaces using
% the fast marching algorithm. The algorithm... |
github | skovnats/madmm-master | gencols.m | .m | madmm-master/functional_maps_L21norm/help_functions/gencols.m | 5,738 | utf_8 | 497e10b44a80cff59db8f7c18b5a9608 | function colors = gencols(n_colors,bg,func)
% DISTINGUISHABLE_COLORS: pick colors that are maximally perceptually distinct
%
% When plotting a set of lines, you may want to distinguish them by color.
% By default, Matlab chooses a small set of colors and cycles among them,
% and so if you have more than a few lines the... |
github | skovnats/madmm-master | calcP2PFromC.m | .m | madmm-master/functional_maps_L21norm/help_functions/calcP2PFromC.m | 4,024 | utf_8 | 55d56d20cf41bd21297a7e68997ee6c7 | %
% Finds the point to point correspondence between shape1 and shape2
% from C, so that
% C * basis1 ~ basis2(:, shape1toshape2)
% C' * basis2 ~ basis1(:, shape2toshape1)
% Author Jonathan Pokrass
function [shape1toshape2, shape2toshape1, refinedC] = ...
calcP2PFromC(shape1, shape2, C, basis1, basis2, vararg... |
github | skovnats/madmm-master | GeneralKimEval_final.m | .m | madmm-master/functional_maps_L21norm/help_functions/GeneralKimEval_final.m | 1,707 | utf_8 | 2c841d575fe0f89c210b00506b342eca | function [deviation,distribution,x] = GeneralKimEval_final( shape1, shape2, AX, AY, T12, L12gr )
% Generalized Kim's curve evaluation
% d(i\in X) = \sum_{j=1}^{|Y|} d(j,gr(i)) * t_i(j)/sum_s(t_i(s)) * 1/sqrt(A(Y))
% X->1, Y->2, gr(i)-ground-truth corresponding point of point i,
% t_i(j)-function corresponding to de... |
github | skovnats/madmm-master | ann.m | .m | madmm-master/functional_maps_L21norm/help_functions/ann/ann.m | 6,187 | utf_8 | ab7233e7b917418ec6656b2d926c2ce4 | function varargout = ann(method, varargin)
%error(nargchk(3, inf, nargin));
% some predicates
is_normal_matrix = @(x) isnumeric(x) && ndims(x) == 2 && isreal(x) && ~issparse(x);
is_posint_scalar = @(x) isnumeric(x) && isscalar(x) && x == fix(x) && x > 0;
is_switch = @(x) islogical(x) && isscalar(x);
is_float_... |
github | skovnats/madmm-master | calcVoronoiRegsCircCent.m | .m | madmm-master/functional_maps_L21norm/help_functions/laplacian/calcVoronoiRegsCircCent.m | 2,497 | utf_8 | b33c6683c5fafa8ead79d9436c30477f | function [VorRegsVertices] = calcVoronoiRegsCircCent(Tri, Vertices)
%% Preps.:
A1 = Vertices(Tri(:,1), :);
A2 = Vertices(Tri(:,2), :);
A3 = Vertices(Tri(:,3), :);
a = A1 - A2; % Nx3
b = A3 - A2; % Nx3
c = A1 - A3; % Nx3
M1 = 1/2*(A2 + A3); % Nx3
M2 = 1/2*(A1 + A3); % Nx3
M3 = 1/2*(A2 + A1); ... |
github | skovnats/madmm-master | calcLB.m | .m | madmm-master/functional_maps_L21norm/help_functions/laplacian/calcLB.m | 4,269 | utf_8 | 5d1e4c81097a7b2a73eac18edb6af2d1 | function [M, DiagS] = calcLB(shape)
% The L-B operator matrix is computed by DiagS^-1*M.
% Calculate the weights matrix M
M = calcCotMatrixM1([shape.X, shape.Y, shape.Z], shape.TRIV);
M = -M;
% Calculate the diagonal of matrix S
DiagS = calcVoronoiRegsCircCent(shape.TRIV, [shape.X, shape.Y, shape.Z]);
%%
D... |
github | skovnats/madmm-master | maxcut.m | .m | madmm-master/functional_maps_L21norm/help_functions/manopt/examples/maxcut.m | 12,136 | utf_8 | 7f2745544840a7cd9263ab6e5e7fccf6 | function [x cutvalue cutvalue_upperbound Y] = maxcut(L, r)
% Algorithm to (try to) compute a maximum cut of a graph, via SDP approach.
%
% function x = maxcut(L)
% function [x cutvalue cutvalue_upperbound Y] = maxcut(L, r)
%
% L is the Laplacian matrix describing the graph to cut. The Laplacian of a
% graph is ... |
github | skovnats/madmm-master | maxcut_octave.m | .m | madmm-master/functional_maps_L21norm/help_functions/manopt/examples/maxcut_octave.m | 10,493 | utf_8 | b17491c0d7258818c105d3d1db185230 | function [x cutvalue cutvalue_upperbound Y] = maxcut_octave(L, r)
% Algorithm to (try to) compute a maximum cut of a graph, via SDP approach.
%
% function x = maxcut_octave(L)
% function [x cutvalue cutvalue_upperbound Y] = maxcut_octave(L, r)
%
% See examples/maxcut.m for help about the math behind this example... |
github | skovnats/madmm-master | sparse_pca.m | .m | madmm-master/functional_maps_L21norm/help_functions/manopt/examples/sparse_pca.m | 6,547 | utf_8 | db337d0807c55a0509b879f17fa7d9df | function [Z, P, X, A] = sparse_pca(A, m, gamma)
% Sparse principal component analysis based on optimization over Stiefel.
%
% [Z, P, X] = sparse_pca(A, m, gamma)
%
% We consider sparse PCA applied to a data matrix A of size pxn, where p is
% the number of samples (observations) and n is the number of variables
%... |
github | skovnats/madmm-master | grassmannfactory.m | .m | madmm-master/functional_maps_L21norm/help_functions/manopt/manopt/manifolds/grassmann/grassmannfactory.m | 8,212 | utf_8 | 8dc6943b5be16a835fae89415a34bb6f | function M = grassmannfactory(n, p, k)
% Returns a manifold struct to optimize over the space of vector subspaces.
%
% function M = grassmannfactory(n, p)
% function M = grassmannfactory(n, p, k)
%
% Grassmann manifold: each point on this manifold is a collection of k
% vector subspaces of dimension p embedded i... |
github | skovnats/madmm-master | elliptopefactory.m | .m | madmm-master/functional_maps_L21norm/help_functions/manopt/manopt/manifolds/symfixedrank/elliptopefactory.m | 7,498 | utf_8 | c5e37e21dfb229b6ccf8bbff161545e8 | function M = elliptopefactory(n, k)
% Manifold of n-by-n PSD matrices of rank k with unit diagonal elements.
%
% function M = elliptopefactory(n, k)
%
% The geometry is based on the paper,
% M. Journee, P.-A. Absil, F. Bach and R. Sepulchre,
% "Low-Rank Optimization on the Cone of Positive Semidefinite Matrices"... |
github | skovnats/madmm-master | spectrahedronfactory.m | .m | madmm-master/functional_maps_L21norm/help_functions/manopt/manopt/manifolds/symfixedrank/spectrahedronfactory.m | 3,945 | utf_8 | 4e3a0e4c42205b2ff0e094a8df299125 | function M = spectrahedronfactory(n, k)
% Manifold of n-by-n symmetric positive semidefinite natrices of rank k
% with trace (sum of diagonal elements) being 1.
%
% function M = spectrahedronfactory(n, k)
%
% The goemetry is based on the paper,
% M. Journee, P.-A. Absil, F. Bach and R. Sepulchre,
% "Low-Rank Op... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.