在arkit中只拍照片不包括3d物体?

问题描述 投票:0回答:1

我想在arkit中拍摄照片,但不想包含3D对象,请问这是怎么回事?

realitykit snapshot(saveToHDR:completion:)在iOS中拍摄当前视图的快照。

arView.snapshot(saveToHDR: false) { (image) in

UIImageWriteToSavedPhotosAlbum(image!, nil, nil, nil)}

On the **right** is a picture of the phone,The **left** hand side is the desired result

arkit snapshot realitykit
1个回答
0
投票

你可以使用 ARSession's currentFrame.capturedImage 为此

if let pixelBuffer = session.currentFrame?.capturedImage {
  let image = CIImage(cvImageBuffer: pixelBuffer)
  // Save or process the image here
}
© www.soinside.com 2019 - 2024. All rights reserved.