Bug 21526 - CIDetectorOptions only has face detection property for accuracy
Summary: CIDetectorOptions only has face detection property for accuracy
Status: CONFIRMED
Alias: None
Product: iOS
Classification: Xamarin
Component: Xamarin.iOS.dll (show other bugs)
Version: XI 10.12 (d15-3)
Hardware: Macintosh Mac OS
: --- enhancement
Target Milestone: Future Cycle (TBD)
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2014-07-22 17:01 UTC by Mike Bluestein
Modified: 2017-08-01 13:17 UTC (History)
4 users (show)

See Also:
Tags: ac
Is this bug a regression?: No
Last known good build:


Attachments
CIDetector sample using a rectangle detector (8.74 KB, application/zip)
2014-07-22 17:01 UTC, Mike Bluestein
Details

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 10.12.0.14 The CIDetectorOptions.Accuracy still uses the `FaceDetectorAccuracy` enum

Marking this report as CONFIRMED.

Note You need to log in before you can comment on or make changes to this bug.