Bug 21526

Summary: CIDetectorOptions only has face detection property for accuracy
Product: iOS Reporter: Mike Bluestein <mike.bluestein>
Component: Xamarin.iOS.dllAssignee: Bugzilla <bugzilla>
Status: CONFIRMED ---    
Severity: enhancement CC: mono-bugs+monotouch, prashant.cholachagudd, rolf, sebastien
Priority: ---    
Version: XI 10.12 (d15-3)   
Target Milestone: Future Cycle (TBD)   
Hardware: Macintosh   
OS: Mac OS   
Tags: ac Is this bug a regression?: No
Last known good build:
Attachments: CIDetector sample using a rectangle detector

Description Mike Bluestein 2014-07-22 17:01:56 UTC
Created attachment 7461 [details]
CIDetector sample using a rectangle detector

When creating a CIDetector, you pass in a CIDetectorOptions instance.

CIDetector now includes QR code and rectangle detectors in iOS 8. However, CIDetectorOptions has an Accuracy property of enum type FaceDetectorAccuracy, but nothing for QR codes or Rectangles (or a more generic name). 

Therefore currently the code would look like this on our side:

            var options = new CIDetectorOptions {
                Accuracy = FaceDetectorAccuracy.High

            var detector = CIDetector.CreateRectangleDetector (context, options);

where the FaceDetectorAccuracy is used even though it's for a rectangle detector. Other than the naming mismatch I'm not sure if the Accuracy as written above is actually setting the CIDetectorAccuracy internally or if it's a no-op.

I attached a small sample you can use to try it out. For the simple test image included in the project it works but even small changes to the image result in no features being detected.
Comment 1 Sebastien Pouliot 2014-07-25 15:54:20 UTC
High and Low maps to CIDetectorAccuracyHigh and CIDetectorAccuracyLow respectively, i.e. it should not be limited to the face detection (or a no-op). At least it's not documented that way [1].

So it looks like we selected a bad name, and we can likely obsolete it and add a more general one.

[1] https://developer.apple.com/library/mac/documentation/CoreImage/Reference/CIDetector_Ref/Reference/Reference.html
Comment 2 Prashant [MSFT] 2017-07-26 10:22:07 UTC
Thanks so much for taking the time to submit this report! 

I can confirm using the latest Xamarin.iOS The CIDetectorOptions.Accuracy still uses the `FaceDetectorAccuracy` enum

Marking this report as CONFIRMED.