ARSessionDelegate didUpdate image orientation

In ARSessionDelegate's didUpdate function two ipad pro 3. gen 12.9 inch differs in arframe image orientation.


func session(_ session: ARSession, didUpdate frame: ARFrame)

I get the pixelbuffer in this way and create UIImage.

let pixelBuffer = frame.capturedImage

let image = UIImage(pixelBuffer: pixelBuffer)


We have two ipads both running iOS 13.2.3.

The models are like below:

iPad (NTEL2B)

iPad (MTEL2LL)

The MTEL2LL version image is 180 degree rotated. What could be cause?


I use this function to create UIImage from CVPixelBuffer

public convenience init?(pixelBuffer: CVPixelBuffer) {

if let cgImage = CGImage.create(pixelBuffer: pixelBuffer) {

self.init(cgImage: cgImage)

} else {

return nil

}

}

Can you test the value of UIImage.Orientation on both iPad ?

ARSessionDelegate didUpdate image orientation
 
 
Q