@objc func launchCoreML() {
let settings = AVCapturePhotoSettings()
let previewPixelType = settings.availablePreviewPhotoPixelFormatTypes.first
let previewFormat = [
kCVPixelBufferPixelFormatTypeKey as String: previewPixelType,
kCVPixelBufferWidthKey as String: 160,
kCVPixelBufferHeightKey as String: 160
] as [String : Any]
settings.previewPhotoFormat = previewFormat
cameraOutput.capturePhoto(with: settings, delegate: self)
}
I have an error saying:
Value of type 'AVCapturePhotoSettings' has no member 'availablePreviewPhotoPixelFormat'.
I'm using the beta version of Xcode 9.
__availablePreviewPhotoPixelFormatTypes
in beta 5. – Usn