• longjie0723

    As you advised, I've tried CIDetectorMinFeatureSize. It works as expected. Dict of parameters seems correct way to set the parameters.

        opt = {'CIDetectorAccuracy': 'CIDetectorAccuracyHigh',
               'CIDetectorMinFeatureSize': 0.2}
        d = CIDetector.detectorOfType_context_options_('CIDetectorTypeFace', None, opt)
        rects = d.featuresInImage_(ci_img)
    

    The face can be detected when the param is small (0.1), not be detected when the param is large (>0.3). (Somehow larger parameters kill pythonista to home screen.)

    I cannot still find the way to read the set option from CIDetector. If you know which API to use, could you show me?

    Thank you so much.

    posted in Pythonista read more
  • longjie0723

    Thanks,

    I have no idea to read back the options from CIDetecotor (or maybe faceCoreDetector in this class), could you tell me how can I read the option after setting?

    And I'll try to set CIDetectorMinFeatureSize later, sounds good to check it!

    My code is in progress, here: https://www.dropbox.com/s/4jdeohur37kzflk/MaskFace.py?dl=0

    Thank you,

    posted in Pythonista read more
  • longjie0723

    Hi,

    I want to specify options to CIDetector. Which is the correct way? (or both incorrect?)

    options = {'CIDetectorAccuracy': 'CIDetectorAccuracyHigh'}
    d = CIDetector.detectorOfType_context_options_('CIDetectorTypeFace', None, options)
    

    or do I need to write as:

    options = NSDictionary.dictionaryWithDictionary_({'CIDetectorAccuracy': 'CIDetectorAccuracyHigh'})
    d = CIDetector.detectorOfType_context_options_('CIDetectorTypeFace', None, options)
    

    Actually both looks working fine, but I cannot know whether the options is actually effective. I cannot tell the detection accuracy is better or not, from the result.

    I'm new to iOS and pythonista, I'm very grad to be advised by experts.

    Thanks,

    posted in Pythonista read more

Internal error.

Oops! Looks like something went wrong!