Go-ICP
Go-ICP copied to clipboard
Scaling of original point clouds
I am a little confused about the scaling part:
Make sure both model and data points are normalized to fit in [-1,1]3 prior to running
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?)
X_cap := (X - mean_colwise( X ) ) / max_colwise( X ) - min_colwise( X )
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, #0K