我想在arkit中拍摄照片,但不想包含3D对象,请问这是怎么回事?
realitykit snapshot(saveToHDR:completion:)在iOS中拍摄当前视图的快照。
arView.snapshot(saveToHDR: false) { (image) in
UIImageWriteToSavedPhotosAlbum(image!, nil, nil, nil)}
你可以使用 ARSession
's currentFrame.capturedImage
为此
if let pixelBuffer = session.currentFrame?.capturedImage {
let image = CIImage(cvImageBuffer: pixelBuffer)
// Save or process the image here
}