How to mapp a 3D point cloud on 2D plane

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)

Matt J
Matt J on 24 Nov 2014
Edited: Matt J on 24 Nov 2014
If column vectors u and v are an orthogonal basis for your plane,
newpoints = Cloud3D*[u,v];

5 Comments

Struct03
Struct03 on 24 Nov 2014
Edited: Struct03 on 24 Nov 2014
I dont get it clearly. I have a matrix 'A' with 3D point cloud ( A - 1000x3), and matrix 'B' (B= zeros(4000)), but I don't have a specific equation of plane (i dont know how to describe it). When I use 'view' function. I set it as [1,0,0].
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;
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?
Hi Penny,
You would do,
newpoints = A*uv*uv.';
Got it Matt. Thank you very much.

Sign in to comment.

Asked:

on 24 Nov 2014

Commented:

on 11 Dec 2017

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!