Post

Replies

Boosts

Views

Activity

Reply to Object Capture With only manual capturing
I tried to initialize session with bellow. //MARK: Initialize Camera private func initializeCamera() { print("Initialize Camera") currentCamera = AVCaptureDevice.default(.builtInLiDARDepthCamera, for: .depthData, position: .back) currentSession = AVCaptureSession() currentSession.sessionPreset = .photo do { let cameraInput = try AVCaptureDeviceInput(device: currentCamera) currentSession.addInput(cameraInput) } catch { fatalError() } let videoOutput = AVCaptureVideoDataOutput() videoOutput.setSampleBufferDelegate(self, queue: currentDataOutputQueue) videoOutput.videoSettings = [kCVPixelBufferPixelFormatTypeKey as String: kCVPixelFormatType_32BGRA] currentSession.addOutput(videoOutput) let depthOutput = AVCaptureDepthDataOutput() depthOutput.setDelegate(self, callbackQueue: currentDataOutputQueue) depthOutput.isFilteringEnabled = true currentSession.addOutput(depthOutput) currentPhotoOutput = AVCapturePhotoOutput() currentSession.addOutput(currentPhotoOutput) currentPhotoOutput.isDepthDataDeliveryEnabled = true }
Sep ’23