How is CIDetectorMinFeatureSize supposed to be used when setting up a CIDetector for either face or rectangle recognition? The description at Apple does not tell me anything:
A key used to specify the minimum size that the detector will recognize as a feature.
The value for this key is an NSNumber object ranging from 0.0 through 1.0 that represents a fraction of the minor dimension of the image.
The documentation says it ranges from 0.0 to 1.0 and then I look at the WWDC slides of session 514 and they set the value to "100"...?
It is as much a secret to me as the (undocumented?) CIDetectorAspectRatio.
Let's say I'm trying to detect an A4 paper sheet which is 30cm x 21cm and has an aspect ratio of 1.4 - what would I set for the two keys?
CIDetectorAspectRatio is used by CIRectangleDetector to constrain the search. In your example, the value of the CIDetectorAspectRatio key should be @(1.43).
The CIDetectorMinFeatureSize is also used to constrain the search. Only a rectangles greater than the specified fraction of the input image size will be returned
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With