Open mpkuse opened 4 years ago
Here you go:
% src == model; tgt == data
% Center to origin
src = src - mean(src, 1);
tgt = tgt - mean(tgt, 1);
% Normalize data
combo = [src; tgt];
combo = rescale(combo,[-1 -1 -1], [1 1 1]);
% Get back normalized Source and Target
src = combo(1:size(src, 1), :);
tgt = combo(size(src, 1) + 1:end, :);
The exact idea here is that your point clouds need to be within the 1x1x1 dimension bounds for the algorithm to work correctly. So find the maximum bounds of is in x, y, or z and scale it to be within 1 and other dimensions scale proportionally. I guess @vma1996 is doing the exact thing via the given code example. Close the issue of it solves our answers your problem.
Regards,
I am a little confused about the scaling part:
I have two point clouds lets call it X (3xN) and Y (3xM). There are in general floats. What is the exact scaling I need to do? Also, do I need to scale the result of go-ICP back (inverse scaling?)