Inquiries about the difference between isTracked in ARWorldConfiguration and ARImageConfiguration(ARKit)

Hello.

I now implement video display from image detection. I'm worried there.

I'm looking for this movement of ARImageTrackingConfiguration.

2019-11-28 17:45:00.645012+0900 arkitVideo[6100:3600050] Metal GPU Frame Capture Enabled 
2019-11-28 17:45:00.645430+0900 arkitVideo[6100:3600050] Metal API Validation Enabled 
####### isTracked= true 
####### isTracked= true 
####### isTracked= true 
####### isTracked= true 
####### isTracked= true 
####### isTracked= true 
####### isTracked= false

However, ARWorldTrackingConfiguration will be like this.

2019-11-28 17:52:19.918561+0900 arkitVideo[6201:3602382] Metal GPU Frame Capture Enabled
2019-11-28 17:52:19.918803+0900 arkitVideo[6201:3602382] Metal API Validation Enabled
####### isTracked= true
####### isTracked= false
####### isTracked= true
####### isTracked= false
####### isTracked= true
####### isTracked= false

I want to get movement like ARImageTrackingConfiguration with ARWorldTrackingConfiguration.

Because we want to detect both floor and image recognition with ARWorldTrackingConfiguration.

I have attached the code.

import UIKit
import SceneKit
import ARKit

class ViewController: UIViewController, ARSCNViewDelegate {

    @IBOutlet var sceneView: ARSCNView!
    
    override func viewDidLoad() {
        super.viewDidLoad()
        
        // Set the view's delegate
        sceneView.delegate = self
    }
    
    override func viewWillAppear(_ animated: Bool) {
        super.viewWillAppear(animated)
        
        let configuration = ARWorldTrackingConfiguration()
        
//        let configuration = ARImageTrackingConfiguration()
        
        if let trackedImages = ARReferenceImage.referenceImages(inGroupNamed: "AR Resources", bundle: nil) {
            configuration.detectionImages = trackedImages
//            configuration.trackingImages = trackedImages
        }

        sceneView.session.run(configuration)
    }
    
    func renderer(_ renderer: SCNSceneRenderer, didAdd node: SCNNode, for anchor: ARAnchor) {
//        guard let imageAnchor = anchor as? ARImageAnchor else {
//            return
//        }
    }
    func renderer(_ renderer: SCNSceneRenderer, didUpdate node: SCNNode, for anchor: ARAnchor) {
        guard let imageAnchor = anchor as? ARImageAnchor else {fatalError()}
        print("####### isTracked= \(imageAnchor.isTracked)")
        if imageAnchor.isTracked{

        }else{

        }
    }
}

Please give me a reply.

I haven't worked on image detection with ARKit in a little while, but as I remember, ARImageTrackingConfiguration is used for actively tracking an image, for example postcard or something that might move. When you use ARWorldTrackingConfiguration this should be reserved for images that will be static in the scene, and you can rely on them to only exist at one location (for example, a poster).



The benefit of using ARWorldTrackingConfiguration over ARImageTrackingConfiguration is that ARKit will search for the image less often by assuming that it isn't moving, only the camera is. This will mean you can get away with more complex scenes, wheras ARImageTrackingConfiguration will be wanting to use the CPU as many frames as it can.

What is the videoFormat for each of your configurations?

Inquiries about the difference between isTracked in ARWorldConfiguration and ARImageConfiguration(ARKit)
 
 
Q