@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 a mistake:
A value of type 'AVCapturePhotoSettings' does not have a member of 'AvailablePreviewPhotoPixelFormat'.
I am using Xcode 9 beta.
source
share