锁定ARKIT的FPS

发布于 2025-02-06 08:28:02 字数 495 浏览 0 评论 0 原文

我想从 arkit view( arscnview )中拍摄快照,每秒次30次,并且由于CPU使用情况非常重要,因此我尝试不使用计时器 displayLink ,然后在 session(_ session:arsession:didupdate frax:arframe)中运行“拍摄图像”功能。 但是它通常以60 fps的速度运行,然后在一段时间后达到30 fps。 因此,我尝试将其锁定在30 fps上

sceneView.preferredFramesPerSecond = 30

,但看起来它不起作用,并且仍在60 fps中进行。有什么方法可以一直锁定30 fps(30 ps或更低)。如果没有,我们可以在第一个1-2秒内找到其FPS,以修改其上的图像函数基础(在30 fps中以每个帧运行或在60 fps中的每2帧中运行),

谢谢这么多

I want to take an snapshot from ARKit view (ARSCNView) 30 times per sec, and since the CPU usage is so important in my case, I try to not use Timer or displaylink and instead run the taking image function inside session(_ session: ARSession, didUpdate frame: ARFrame) .
But it normally run in 60 fps and then come to 30 fps after a while.
So I try to lock it on 30 fps

sceneView.preferredFramesPerSecond = 30

But looks like it's not working and it is still doing it in 60 fps. Is there any way to lock it on 30 fps all the time ( 30 ps or lower ). If not, there is any way that we can find out its fps in the first 1-2 sec to modify the taking image function base on it ( run in every frame in 30 fps or run in every 2 frame in 60 fps)

Thank you so much

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

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

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文