How to speed up plane detection in ARCore / Sceneform
Asked Answered
D

3

7

The ARCore sceneform sample project "hellosceneform" is cool and works really well.

Problem is the requirement to move the phone around in order to get a surface on which to place anchors. It's too slow.

My application does not require anything to show up on a vertical plane (a wall), but only ever on the floor. Is there anyway I can skip the "move the phone around" step or at least speed it up?

I've tried:

session.getConfig().setPlaneFindingMode(Config.PlaneFindingMode.HORIZONTAL);

Thinking that if I remove the need to look for vertical planes then it would all work faster..... not quite fast enough it seems.

Thanks!

Dative answered 17/9, 2018 at 16:30 Comment(0)
W
5

Unfortunately the framework is limited by (read: enabled by) the computer vision models that it uses to detect planes. The plane discovery controller (i.e. the "move the phone around" step) is a nudge to the user to provide the models with the depth information through the camera that they need to detect those planes. Removing this step won't speed up the process, it'll just leave the user without any instructions.

Without improvements to the core plane detection models I wouldn't expect that there's a way to make this faster. The best that we can do is come up with UX nudges that encourage the user to move the phone laterally more efficiently.

Workmanship answered 15/11, 2018 at 3:45 Comment(0)
N
0

To hide the animation that shows users how they should move their phone use

 arFragment.planeDiscoveryController.hide()
 arFragment.planeDiscoveryController.setInstructionView(null)
Nine answered 3/10, 2018 at 11:14 Comment(0)
F
0

To speed up plane detection in ARCore is quite easy. Here's a code snippet:

class MainActivity : AppCompatActivity() {

    lateinit var arFrag: ArFragment

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_ux)

        arFrag = supportFragmentManager.findFragmentById(R.id.ux_fragment) as ArFragment
        arFrag.planeDiscoveryController.hide()
        arFrag.planeDiscoveryController.setInstructionView(null)
        arFrag.arSceneView.planeRenderer.isEnabled = false
        arFrag.arSceneView.scene.setOnUpdateListener(::onFrame)
    }

    // ........................................................
}

Hope this helps.

Favorable answered 8/4, 2019 at 14:9 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.