gpt4 book ai didi

java - 像素周围点云(不是点或平面)上的 HotTest-wing

转载 作者:行者123 更新时间:2023-12-02 04:38:10 27 4
gpt4 key购买 nike

我想找到点云中距离屏幕上的像素更近的所有点。就像围绕该像素进行光线转换并返回点云点(而不是 arccore 跟踪的点/平面对象)。

我尝试过使用Frame.hitTest(xPx,yPx),但这只适用于跟踪点,不适用于点云点,因此结果非常有限。需要像素周围的所有点云点(例如将半径为“r”的光束从该像素转换到点云中)

    if (pointCloudIdsArray.length > 0) {
for (int i = 0; i < pointCloudIdsArray.length; i++) {
String idString = Integer.toString(pointCloudIdsArray[i]);
float xMeters = pointCloudArray[i * 4];
float yMeters = pointCloudArray[i * 4 + 1];
float zMeters = pointCloudArray[i * 4 + 2];
float confidenceoTo1 = pointCloudArray[i * 4 + 3];
double distanceFromCamera = Math.sqrt(xMeters * xMeters + yMeters * yMeters + zMeters * zMeters);
if (distanceFromCamera > farthestPoint) {
farthestPoint = distanceFromCamera;
}
}

我有来自框架的点云世界坐标。需要找到距离当前屏幕上的像素更近的。请指教。

最佳答案

我找到了这个问题的答案。 arore sceneform 的 Camera 对象很容易做到这一点:

public Vector3 worldToScreenPoint (Vector3 point)

关于java - 像素周围点云(不是点或平面)上的 HotTest-wing,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56538866/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com