Skip to content
This repository has been archived by the owner on Aug 3, 2022. It is now read-only.

swift 4. further enhancement #16

Open
burkaslarry opened this issue Oct 27, 2017 · 1 comment
Open

swift 4. further enhancement #16

burkaslarry opened this issue Oct 27, 2017 · 1 comment

Comments

@burkaslarry
Copy link

There has a completion handler on AVCaptureStillImageOutput.jpegStillImageNSDataRepresentation and stated as
// completion(image!, self.biggestRectangle(SobrCameraView.highAccuracyRectangleDetector?.features(in: enhancedImage) as! [CIRectangleFeature]))
When it goes to be rewritten as
func capture(_ captureOutput: AVCapturePhotoOutput, didFinishProcessingPhotoSampleBuffer photoSampleBuffer: CMSampleBuffer?, previewPhotoSampleBuffer: CMSampleBuffer?, resolvedSettings: AVCaptureResolvedPhotoSettings, bracketSettings: AVCaptureBracketedStillImageSettings?, error: NSError?) {

How can the completion handler be created instead ?

..

@burkaslarry
Copy link
Author

As going on writing completion handler , it is quite clumsy and generating error about expecting type before ->

captureImage ( (image: image! as UIImage, feature: self.biggestRectangle(SobrCameraView.highAccuracyRectangleDetector?.features(in: enhancedImage) as! [CIRectangleFeature])) -> () )

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant