Minimizing Maximum Distance between 3D Point Cloud Data
13 views (last 30 days)
Show older comments
I have what I'll call a "nominal point cloud" and then a "measured point cloud". My goal is that I want to minimize the maximum distance between respective points of EVERY point in the point cloud without moving points in the nominal cloud. I do not want a least-squares type fit that could sacrifice a couple points for the good of the rest of the cloud.
EDIT: Each point cloud contains the exact same amount of points and when transforming the measured point cloud, I need to move every point in relation to one another. i.e. If you move one point in a direction, every point moves in the same direction with the same magnitude.
I believe I could write a brute-force, majorly iterative, code for this process but the way I have in mind would take absolutely forever to run and that's not feasible. Looking for any advice available.
Thank you.
7 Comments
José-Luis
on 4 Jun 2014
Also, if the distance is pairwise (the distance between one point in one cloud to one point in another cloud, not the minimum distance between a point in one cloud and all the points in other clouds) then your problem reduces to optimizing a system of 6 unknowns:
rotation (x, y and z)
translation (x, y and z)
So you need to find the six values that will minimize the distance between a pairs of points. That sounds like a job for fminsearch() and similar functions.
Answers (1)
Matt J
on 4 Jun 2014
Edited: Matt J
on 4 Jun 2014
My goal is that I want to minimize the maximum distance between respective points of EVERY point in the point cloud without moving points in the nominal cloud. I do not want a least-squares type fit that could sacrifice a couple points for the good of the rest of the cloud.
Well, the least squares method that you say you don't want is implemented here
I would do this to at least initialize a search using fminsearch, or better yet, fminimax if you have the Optimization Toolbox. This file may help to parameterize the rototranslation
reg= absor(nominal,measured);
p0=[reg.q(2:3);0;reg.t];
options = optimoptions('fminimax','MinAbsMax',size(nominal,2));
p = fminimax(@(p) objective(p,nominal,measured),[],[],[],[],[],...
[],[],options);
function F=objective(params,nominal,measured)
x1=params(1);
x2=params(2);
x3=sqrt(1-x1^2-x2^2);
theta=params(3);
translation=params(4:6);
Tnominal=AxelRot(nominal,theta,[x1,x2,x3],translation);
F=Tnominal-measured;
4 Comments
Matt J
on 7 Jun 2014
No, I don't do emails, I'm afraid. For one thing, it defeats the purpose of this forum if people move the discussion to private email exchange. The idea is to see the question resolved here so that not only you benefit as the OP, but also other people who might encounter the same problem, as well.
See Also
Categories
Find more on MATLAB Parallel Server Licensing in the Cloud in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!