如何使用ARKIT跟踪快速移动的对象?

发布于 2025-01-20 20:26:08 字数 880 浏览 6 评论 0原文

我正在尝试在 iOS 上使用 Swift、SwiftUi 并使用 ARKit 和 RealityKit 构建一个应用程序。我希望该应用程序能够:

  1. 检测足球
  2. 检测足球球门
  3. 跟踪射门时球的轨迹
  4. 检测球何时/是否击中/传球球门

使用 ARKit 检测球和球门效果很好。然而,在运动中保持跟踪球是非常不可靠的。当球快速移动时,ARKit 根本无法检测到球。

我尝试使用以下教程来实现Apple Visions VNDetectTrajectoriesRequest,https://developer.apple.com/documentation/vision/identifying_trajectories_in_video,只要我不使用ARKit,它就可以工作。 DetectTrajectory 需要 CMSampleBuffer,而 ARKit 只返回 PixelBuffer,我无法解决这个问题并使其顺利工作(我尝试将 Pixelbuffer 转换为 CMSampleBuffer,但这导致应用程序速度太慢,实时无法使用) )。即使我让它工作,它也不能解决我关于检测足球何时击中球门的问题。为此,我相信使用深度/ARkit 是必要的。

有没有人有一个快速跟踪的解决方案使用 ARKit 移动物体?

我快要放弃了,但我在 Youtube 上发现这个人正在使用 ARKit 检测球轨迹,https://www.youtube.com/watch?v=B4yfp1UmM5s。我已经写信给他,但到目前为止还没有收到回复。我已经尝试解决这个问题一个多星期了,但我找不到解决方案。请互联网,帮助我!

I am trying to build an app on iOS in Swift, SwiftUi and using ARKit and RealityKit. I want the app to:

  1. detect a soccer ball
  2. detect a soccer goal
  3. track the trajectory of the ball when shot at goal
  4. detect when/if the ball hits/passes the goal

To detect the ball and goal using ARKit is working fine. However, to keep tracking the ball when in movement is very unreliable. And when its moving fast, ARKit fails to detect the ball at all.

I have tried to implement Apple Visions VNDetectTrajectoriesRequest using the following tutorial,https://developer.apple.com/documentation/vision/identifying_trajectories_in_video, which works as long as I am NOT using ARKit.
DetectTrajectory needs a CMSampleBuffer, and ARKit only returns a PixelBuffer and I wasn't able to solve this issue and get it to work smoothly (I tried converting the pixelbuffer to CMSampleBuffer, but that resulted in the app being SO slow it was useless in realtime). And even if I get this to work it wouldn't solve my issue regarding detecting when the soccer hits the goal.. For that I believe that using depth/ARkit is necessary..

Does anyone have a solution for tracking A FAST MOVING OBJECT USING ARKIT?

I am close to giving up, but I have found this guy on Youtube that is detecting a balls trajectory using ARKit, https://www.youtube.com/watch?v=B4yfp1UmM5s. I have written to him but received no reply this far. Have been trying to solve this for over a week but I can't find a solution. Please internet, help me!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

何以畏孤独 2025-01-27 20:26:08

我认为这样的任务对于 2022 年的 iOS 设备来说是不可能的。

首先,我们假设足球的平均速度是 12 m/s,ARKit 和 Vision 以 60 fps 跟踪它。显然,任何以 12 m/s 速度移动的物体都很难以该帧速率进行定性跟踪。即使 MoCap 系统也至少使用 120 fps 来跟踪慢得多的运动。

其次,5秒内球大约移动了60米的距离。这是一个相当大的距离(用于检测/识别),在该距离内,像足球这样的小物体将无法被识别,特别是因为它在飞行过程中也会旋转。

I think that such a mission is impossible for iOS device in 2022.

Firstly, let's assume the average speed of a soccer ball is 12 m/s, and ARKit and Vision track it at 60 fps. Any object moving at 12 m/s is difficult to qualitatively track at that frame rate, it's obvious. Even MoCap systems use at least 120 fps for tracking of much slower movements.

Secondly, in 5 seconds the ball approximately covers a distance of 60 meters. This is a fairly large distance (for detection/recognition) at which such a small object as a soccer ball will be unrecognizable, especially since it also spins during flight.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文