-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDiffusionMap3dOrientations.m
30 lines (26 loc) · 1.04 KB
/
DiffusionMap3dOrientations.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
function []=DiffusionMap3dOrientations(args)
%Initialization
close all force;
clc;
if (~exist('args'))
clear all;
args = struct('nRot1D', 6, 'k', 150, 'Epsilon', 0.7, 'aPrioriFlag', 1);
end
save '../../artifacts/args.mat' args -text;
%Whether to use known rotation matrices to estimate c(9,9)
%aPrioriFlag=args.aPrioriFlag; %1
[Axis, Images] = RotatedImages(args.nRot1D);
[S2, N] = DistanceMatrix(Images, args.k);
clear Images;
disp(['k=' num2str(args.k)]);
save '../../artifacts/S2.mat' S2 -text;
save '../../artifacts/N.mat' N -text;
Rotation_Axis=importdata('../../artifacts/Axis.mat');
[Ps, Lambda, c0, c] = CalculateDiffusion(S2, N, Rotation_Axis, args.k,args.Epsilon,args.aPrioriFlag);
disp(['k=' num2str(args.k) ', Epsilon=' num2str(args.Epsilon)]);
save '../../artifacts/Ps.mat' Ps -text;
save '../../artifacts/Lambda.mat' Lambda -text;
save '../../artifacts/c0.mat' c0 -text;
save '../../artifacts/c.mat' c -text;
PlotResults(Ps,Lambda,Rotation_Axis)
end