3D Point Cloud to Binary Matrix

12 visualizaciones (últimos 30 días)
Carolyn
Carolyn el 16 de Mayo de 2018
Respondida: Carolyn el 17 de Mayo de 2018
I have a 3D point cloud and I want to take slices of this field in the z direction and convert all the slices to a binary matrix. So basically, I want to turn a point cloud into a binary volume. I'm currently working on a function to first slice the image for a given interval, then converting that slice into a binary map, but I'm having trouble converting the coordinates to binary. Any suggestions?

Respuesta aceptada

Carolyn
Carolyn el 17 de Mayo de 2018
In case anyone ever needs it:
slice_bw = zeros(pix, pix);
for n = 1:length(in1(:,1))
xy = in1(n,:);
slice_bw(xy(1),xy(2)) = 1;
end
Create a matrix of zeros that is the dimension you want. in1 is my data in xy coordinate form. You iterate through your data to find the location in the zero matrix that corresponds to the coordinates and if the coordinate exists, the location in the matrix is set to 1.

Más respuestas (0)

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