What do you get as return ? nil or wrong rectangleFeatures ?
In case running on iPhone with iOS 15 & trying to detect an envelope with mentioned aspect ratio, I'm getting an empty array of CIRectangleFeature (Expected to receive a CIRectangleFeature array with one element which represents the detected envelope)
Where do you specify the aspect ratio ?
The fix I have tried is the following:
let rectangleDetector = CIDetector(ofType: CIDetectorTypeRectangle, context: CIContext(options: nil), options: [CIDetectorAccuracy: CIDetectorAccuracyHigh, CIDetectorAspectRatio: 2.0, CIDetectorMinFeatureSize: 0])
I have removed it from the method when I found that it doesn't solve the mentioned issue.
Topic:
App & System Services
SubTopic:
Core OS
Tags: