title: How to transform vision framework coordinate system into ARKit?
body: <p>I am using ARKit (with SceneKit) to add the virtual object (e.g. ball). I am tracking real world object (e.g. foot) by using Vision framework and receiving its updated position in vision request completion handler method.</p>
  
  <pre><code>let request = VNTrackObjectRequest(detectedObjectObservation: lastObservation, completionHandler: self.handleVisionRequestUpdate)
  </code></pre>
  
  <p>I wants to replace the tracked real world object with virtual (for example replace foot with cube) but I am not sure how to replace the boundingBox rect (which we receive in vision request completion) into scene kit node as coordinate system are different.</p>
  
  <p>below is the code of vision request completion handler:</p>
  
  <pre><code> private func handleVisionRequestUpdate(_ request: VNRequest, error: Error?) {
      // Dispatch to the main queue because we are touching non-atomic, non-thread safe properties of the view controller
      DispatchQueue.main.async {
        // make sure we have an actual result
        guard let newObservation = request.results?.first as? VNDetectedObjectObservation else { return }
  
        // prepare for next loop
        self.lastObservation = newObservation
  
        // check the confidence level before updating the UI
        guard newObservation.confidence &gt;= 0.3 else {
          return
        }
  
        // calculate view rect
        var transformedRect = newObservation.boundingBox
  
       //How to convert transformedRect into AR Coordinate
    self.node.position = SCNVector3Make(?.worldTransform.columns.3.x,
      ?.worldTransform.columns.3.y,
  
      }
    }
  </code></pre>
  
  <p>Please guide me to transfer the coordinate system. </p>