How to create a vector from a random point cloud?
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
Martha
el 12 de Mzo. de 2014
Editada: per isakson
el 12 de Mzo. de 2014
Hi, I have a point cloud in coordinates 'x' and 'y'. x<4794x588> and y<4794x588>. In general the shape of the point cloud is a square, and the 0,0 coordinate is at the centre, but the points do not follow a perfect orthogonal grid. I want to create a vertical vector based on the points of the point cloud by selecting all the points closer to the 0 in 'x' axis and with different 'y' from bottom to top of the point cloud. None of the points coincide with a perfect 0 coordinate in the 'x' axis.
I'll appreciate very much any help.
Thank you, Regards, Martha
0 comentarios
Respuesta aceptada
dpb
el 12 de Mzo. de 2014
nC=size(x,2); % number columns for convenience
B=5; % assumed deadband about center containing the minimum distance point
c1=fix(nC/2); % midpoint
[~,ix]=min(abs(x(:,[c1-B:c1+B])),2); % location of the minimum in the strip
xMin=x(:,c1+ix); % minimum x from the full array
NB: Aircode; untested. 1) Check for any "off-by-one" errors in the indices. 2) Adjust the deadband size as appropriate depending on how far from mid could be (of course, could just use the whole thing but the idea here is to minimize the size over which the min operation has to work)
0 comentarios
Más respuestas (1)
per isakson
el 12 de Mzo. de 2014
Editada: per isakson
el 12 de Mzo. de 2014
In the File Exchange see
- 2D Histogram Calculation, by Laszlo Balkay and run its example.
- and more hits for hist2
0 comentarios
Ver también
Categorías
Más información sobre Point Cloud Processing en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!