Quantcast

Projecting points on a plane for obtain an image

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Projecting points on a plane for obtain an image

luca penasa-3
hi everybody,
        I have a cloud of points in 3D space. These points describe with some
approximations a planar surface. I want to project every point on the
best fitting plane, so to reduce my points in a 2D space.
I used the vtkPlane.ProjectPoint function that works fine for the
projection. after the projection i have for every point 3 spatial
coordinates, that define points on the same plane.

i would like to remap my points on a regular matrix (i.e. a classical
image). Is there a way to do that in an efficent way??

 
 
 --
 Caselle da 1GB, trasmetti allegati fino a 3GB e in piu' IMAP, POP3 e SMTP autenticato? GRATIS solo con Email.it http://www.email.it/f
 
 Sponsor:
 Sardegna - Stintino Club Hotel CALA ROSA, 4 stelle. Situato in parco di 4  ettari, dotato dei migliori servizi. dal 24/7 al 31/7 SETTE giorni TUTTO COMPRESO Euro 690
 Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid=10588&d=27-6
_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ

Follow this link to subscribe/unsubscribe:
http://www.vtk.org/mailman/listinfo/vtkusers
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Projecting points on a plane for obtain an image

David Doria-2
On Sun, Jun 27, 2010 at 7:01 AM, Luca Penasa <[hidden email]> wrote:
hi everybody,
       I have a cloud of points in 3D space. These points describe with some
approximations a planar surface. I want to project every point on the
best fitting plane, so to reduce my points in a 2D space.
I used the vtkPlane.ProjectPoint function that works fine for the
projection. after the projection i have for every point 3 spatial
coordinates, that define points on the same plane.

i would like to remap my points on a regular matrix (i.e. a classical
image). Is there a way to do that in an efficent way??


You will have to define a "basis" of your image. To do this, simply pick a point (the origin) and two orthogonal vectors in your plane. Then for each point in your point set:

1) Project the point onto both basis vectors
2) Find the distance of both projected points to the origin
3) Round (or somehow "snap") these values onto an integer value. These are your "pixel coordinates" in the resulting image.

I hope that helps.

David 

_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ

Follow this link to subscribe/unsubscribe:
http://www.vtk.org/mailman/listinfo/vtkusers
Loading...