getting the image from the given (x , y, z) coordinates and the RGB values...

3 visualizaciones (últimos 30 días)
I have an excel sheet containing the (x,y,z) coordinates and RGB values of a cylindrical object. I have to find a method to visualize the complete scan of the cylindrical object using the (x,y,z) coordinates and the RGB values..any suggestions???

Respuestas (2)

ramakrishna bathini
ramakrishna bathini el 14 de Feb. de 2011
ply
format ascii 1.0
comment Created By NextEngine ScanStudio
element vertex 59115
property float x
property float y
property float z
property uchar red
property uchar green
property uchar blue
element face 95216
property list uchar int vertex_indices
end_header
0.000000 0.000000 0.000000 3 1 2
-18.863741 -92.029701 13.614387 129 126 117
-18.998341 -92.818878 13.444517 135 128 118
-18.590004 -92.631859 13.973493 134 127 117
-18.744694 -93.426620 13.768112 113 108 102
-18.334249 -93.253525 14.307983 122 117 111
-18.423294 -91.885246 14.125358 129 126 117
-18.296009 -91.132355 14.340027 125 125 117
-18.227312 -90.328476 14.459743 143 139 127
-18.169962 -92.522598 14.508581 128 127 109
-17.996819 -91.854973 14.680487 123 119 108
-17.865927 -91.340729 14.919821 130 126 114
-17.930870 -90.837242 14.866018 120 119 114
-17.936970 -89.988739 14.838840 127 125 112
-17.870956 -93.138756 14.821781 120 115 109
-17.695745 -92.464470 15.036329 114 111 106
-17.560673 -91.829483 15.278341 116 110 98
-17.460785 -91.129379 15.439266 114 112 100
-17.635191 -90.383430 15.183870 118 116 104
this is the sample data in the excel sheet..

Walter Roberson
Walter Roberson el 14 de Feb. de 2011
First, textscan() or dlmread() the data skipping all of the header information. textscan would make it easier.
Then as an approximation to the surface, scatter3() the x y z coordinates with some fixed marker size and with the color matrix set to be the array of RGB values rescaled to [0 1] (i.e., divided by 256)
scatter3() will get you a cloud rather than a surface. There are a number of methods to get to a surface, such as delauny() and trisurf() or some newer functions that aren't in the version I'm using (2008b)
  2 comentarios
ramakrishna bathini
ramakrishna bathini el 14 de Feb. de 2011
Thanks for your reply..textscan() got the all data into a variable...i have gone through scatter3(), delaunay(),trisurf() docs..but couldn't comeup with a solution on how to use those functions..can u please explain a bit more abt displaying part...
Walter Roberson
Walter Roberson el 14 de Feb. de 2011
For example, if you had vectors x, y, z, r, g, b, each representing one column of the input, then:
ballsize = 10;
scatter3(x, y, z, ballsize, [r, g, b]./255 )

Iniciar sesión para comentar.

Categorías

Más información sobre Point Cloud Processing en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by