-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
500b1a4
commit 03039b5
Showing
291 changed files
with
347,615 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
function [error, Reallignedsource] = SimplifiedICP(target,source) | ||
|
||
% This function rotates, translates and scales a 3D "source" of N*3 size (N points in N rows, 3 collumns for XYZ) | ||
% to fit a similar shaped "target" again of N by 3 size | ||
% | ||
% The output shows the minimized value of dissimilarity measure in "error", the transformed source data set | ||
|
||
if(nargin < 2) | ||
display('require at least 2 arguments'); | ||
end | ||
|
||
%**********---ICP---**************** | ||
% Initially assign high error value | ||
errortemp(1,:) = 100000; | ||
index=2; | ||
iteration = 1; % number of iterations after which loop will terminate | ||
threshold = 0.000001; | ||
% Initial calculation of alignment | ||
[errortemp(index,:),Reallignedsource,transform] = procrustes(target,source); | ||
% applying alignment | ||
source = transform.b*source*transform.T+repmat(transform.c(1,1:3),size(source,1),1); | ||
|
||
% max iterations or error > threshold | ||
while ((errortemp(index-1,:) - errortemp(index,:)) > threshold && iteration < 10) | ||
% display ('inside') | ||
% Update error and again calculate alignment and apply | ||
[errortemp(index+1,:),Reallignedsource,transform] = procrustes(target,source); | ||
source = transform.b*source*transform.T+repmat(transform.c(1,1:3),size(source,1),1); | ||
index=index+1; | ||
iteration =iteration+1; | ||
end | ||
|
||
display ('error') | ||
error = errortemp(index,:) | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
65 73 | ||
66 74 | ||
67 75 | ||
68 76 | ||
69 77 | ||
70 78 | ||
71 79 | ||
72 80 |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
33 1 | ||
34 2 | ||
35 3 | ||
36 4 | ||
37 5 | ||
38 6 | ||
39 7 | ||
40 8 | ||
41 9 | ||
42 10 | ||
43 11 | ||
44 12 | ||
45 13 | ||
46 14 | ||
47 15 | ||
48 16 | ||
49 17 | ||
50 18 | ||
51 19 | ||
52 20 | ||
53 21 | ||
54 22 | ||
55 23 | ||
56 24 | ||
57 25 | ||
58 26 | ||
59 27 | ||
60 28 | ||
61 29 | ||
62 30 | ||
63 31 | ||
64 32 |
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
1 60 | ||
2 61 | ||
3 62 | ||
4 63 | ||
5 64 | ||
6 65 | ||
7 66 | ||
8 67 | ||
9 68 | ||
10 69 | ||
11 70 | ||
12 71 | ||
13 72 | ||
14 73 | ||
15 74 | ||
16 75 | ||
17 76 | ||
18 77 | ||
19 78 | ||
20 79 | ||
21 80 | ||
22 81 | ||
23 82 | ||
24 83 | ||
25 84 | ||
26 85 | ||
27 86 | ||
28 87 | ||
29 88 | ||
30 89 | ||
31 90 | ||
32 91 | ||
33 92 | ||
34 93 | ||
35 94 | ||
36 95 | ||
37 96 | ||
38 97 | ||
39 98 | ||
40 99 | ||
41 100 | ||
42 101 | ||
43 102 | ||
44 103 | ||
45 104 | ||
46 105 | ||
47 106 | ||
48 107 | ||
49 108 | ||
50 109 | ||
51 110 | ||
52 111 | ||
53 112 | ||
54 113 | ||
55 114 | ||
56 115 | ||
57 116 | ||
58 117 | ||
59 118 |
Oops, something went wrong.