我想从 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
发布评论