public static CIDetector CreateFaceDetector(CIContext context, bool highAccuracy) { // TypeFace is the only detector supported now using (var options = NSDictionary.FromObjectsAndKeys (new NSObject [] { highAccuracy ? AccuracyHigh : AccuracyLow }, new NSObject [] { Accuracy })) return FromType (TypeFace, context, options); }
public static CIDetector CreateFaceDetector(CIContext context, FaceDetectorAccuracy? accuracy = null, float? minFeatureSize = null, bool? trackingEnabled = null) { CIDetectorOptions dopt = new CIDetectorOptions () { Accuracy = accuracy, MinFeatureSize = minFeatureSize, TrackingEnabled = trackingEnabled }; using (var options = dopt.ToDictionary ()) return FromType (TypeFace, context, options); }
public static CIDetector CreateFaceDetector(CIContext context, bool highAccuracy, float minFeatureSize) { // MinFeatureSize exists only in iOS6+, before this the field is null (and would throw if used) if (MinFeatureSize == null) return CreateFaceDetector (context, highAccuracy); // TypeFace is the only detector supported now using (var options = NSDictionary.FromObjectsAndKeys (new NSObject [] { highAccuracy ? AccuracyHigh : AccuracyLow, new NSNumber (minFeatureSize) }, new NSObject [] { Accuracy, MinFeatureSize, })) return FromType (TypeFace, context, options); }
public static CIDetector CreateRectangleDetector(CIContext context, CIDetectorOptions detectorOptions) { using (var options = detectorOptions == null ? null : detectorOptions.ToDictionary ()) return FromType (TypeRectangle, context, options); }
public static CIDetector CreateTextDetector(CIContext context, CIDetectorOptions detectorOptions) { using (var options = detectorOptions == null ? null : detectorOptions.ToDictionary()) return(FromType(TypeText, context, options)); }