Skip to content

Commit

Permalink
fully documented all matlab functions with comments
Browse files Browse the repository at this point in the history
  • Loading branch information
TeunHuijben committed Dec 4, 2020
1 parent 9be4dc7 commit b5cbe60
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 22 deletions.
7 changes: 1 addition & 6 deletions matlab_functions/alignClasses.m
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,7 @@
% Output:
% superParticle_class: the resulting fused particle
%
% NOTE:
% First, the function concatenates all the particles as they are.
% Then, each particle is extracted from the stack and registered to
% the rest. This is done until all particles are registered to the
% rest. Once done, the whole process is iterated iter times.

%
% (C) Copyright 2017 QI Group
% All rights reserved Faculty of Applied Physics
% Delft University of Technology
Expand Down
6 changes: 2 additions & 4 deletions matlab_functions/all2all_class.m
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
% all2all performs all 2 all registration for a given set of particles
% all2all_class performs all2all registration for a given set of particles
%
% SYNOPSIS:
% all2all(Particles, outdir, scale)
% all2all_class(Particles, scale)
%
% INPUT
% Particles
% Cell arrays of particles with localization in the point field and
% squared uncertainties in the sigma field.
% outdir
% Output directory where rows of all2all matrix are stored
% scale
% scale parameter for gmm registration
%
Expand Down
4 changes: 2 additions & 2 deletions matlab_functions/one2all_class.m
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
% superParticle
%
% NOTE:
% This function is essentially equivalent to 'one2allm, but without
% This function is essentially equivalent to 'one2all.m', but without
% saving the outputFirst, the function concatenates all the particles
% as they are. Then, each particle is extracted from the stack and
% registered to the rest. This is done until all particles are
Expand All @@ -34,7 +34,7 @@
%
% Teun Huijben, Dec 2020.

function [superParticle, MT,Particles] = one2all_class(Particles, iter, oldM, scale)
function [superParticle, MT, Particles] = one2all_class(Particles, iter, oldM, scale)

disp('Bootstapping is started !');
initParticle.points = [];
Expand Down
13 changes: 3 additions & 10 deletions matlab_functions/outlier_removal_class.m
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,15 @@
% Cell array of particles of size 1xN
% Results
% Structure outputted by all2all_class
% members
% Cell array where each cell contains a vector with the indices
% of the images that belong to one class
%
% Output:
% initAlginedParticles: the aligned particles after outlier removal
% M_new: Transformation parameters (rotation+translation), a 4x4xN
% matrix where N is the number of particles.
%
% NOTE:
%
%
% (C) Copyright 2017 QI Group
% All rights reserved Faculty of Applied Physics
Expand All @@ -33,20 +34,12 @@
disp('Lie-algebraic averaging started !');
path_matlab = genpath('Optimization');
addpath(path_matlab)
% cvx_solver mosek;
% cvx_solver

% initialization
RM = zeros(4,4,1);
I = zeros(2,1);
iter = 1;

% load all2all registration matrix rows from file
% allRows = dir(all2all_dir);
% allNames = {allRows(~[allRows.isdir]).name};
% allNames = natsortfiles(allNames);
% nRows = numel(allNames);

% stack all relative motion parameteres in RM
for j=1:size(Results,1)

Expand Down

0 comments on commit b5cbe60

Please sign in to comment.