简体   繁体   English

如何在 numpy 数组中获取不在内部边界框内但在外部边界框之间的所有 3d 点?

[英]How do I get all 3d points in a numpy array that are not within a inner bounding box, but between the outer bounding box?

I have a Numpy array for 3d points in the format (n, 3), where n is the number of points, and column 1 is the x coordinate, column 2, is the y coordinate, and column 3 is the z coordinate.我有一个格式为 (n, 3) 的 3d 点的 Numpy 数组,其中 n 是点数,第 1 列是 x 坐标,第 2 列是 y 坐标,第 3 列是 z 坐标。 How do I get all the point in the outer bounding box, but not in a inner bounding box?如何获得外边界框中的所有点,而不是内边界框中的所有点?

How are the orientations of both boxes?两个盒子的方向如何? Are the axis parallel to x, y, z?轴是否平行于 x、y、z?

In this case it is not so difficult.在这种情况下,它不是那么困难。

  1. Find out if the point is in the x, y, z range of the outher box找出点是否在外框的 x, y, z 范围内
  2. if yes: do the same test for the inner box如果是:对内盒做同样的测试

Just let me know when you need the code当您需要代码时请告诉我

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM