Пример #1
0
        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));
        }
Пример #2
0
 public static CIDetector CreateTextDetector(CIContext context, CIDetectorOptions detectorOptions)
 {
     using (var options = detectorOptions == null ? null : detectorOptions.ToDictionary())
         return(FromType(TypeText, context, options));
 }