How to mapp a 3D point cloud on 2D plane
Show older comments
Hi I have a matrix with 3D point cloud (each column contains coordinate x,y,z). What I want to do is map 3d points onto 2d plane (with specific size of plane i.e. 4000x4000 and according to proper coordinates). In short: I rotate, scale, translate a point cloud, and than I want to map(project)one view from specific direction onto plane. As a result I want to obtain a kind of binary mask of the object. (I think function 'view' which is used to visualisation do something pretty similar) How should i solve this problem? Thank you for all help.
Answers (1)
If column vectors u and v are an orthogonal basis for your plane,
newpoints = Cloud3D*[u,v];
5 Comments
Matt J
on 24 Nov 2014
You need an equation for the plane in order to be able to project onto it. If you are given the plane normal, a basis for the plane can be obtain as
uv=null(normal(:).');
and you can revise my transformation equation above as
newpoints=A*uv;
Penny
on 11 Dec 2017
Hi, Matt. I am also working on mapping a 3D point to a plane. I have found the plan normal and got the basis for the plane. uv is a 3X2 matrix. Thus the newpoints=A*uv is used to get the new coordinates. But the new coordinates is a 1X2 matrix, which means a 2D point. If I want to show this new point as a 3D point, how do I find the other coordinate value?
Matt J
on 11 Dec 2017
Hi Penny,
You would do,
newpoints = A*uv*uv.';
Penny
on 11 Dec 2017
Got it Matt. Thank you very much.
Categories
Find more on Process Point Clouds 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!