MLKitObjectDetectionCommon 框架参考
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
MLKCommonObjectDetectorOptions
@interface MLKCommonObjectDetectorOptions : NSObject
所有类型的对象检测器共用的通用配置。
-
指示是否启用了对象分类功能。默认值为 false
。
声明
Objective-C
@property (nonatomic) BOOL shouldEnableClassification;
-
指示检测器是否应返回图片或帧中所有检测到的对象。
如果设置为 false
,则检测器仅返回检测到的最显眼的对象。默认值为 false
。
声明
Objective-C
@property (nonatomic) BOOL shouldEnableMultipleObjects;
-
-
声明
Objective-C
- (nonnull instancetype)init;
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2024-09-20。
[[["易于理解","easyToUnderstand","thumb-up"],["解决了我的问题","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["没有我需要的信息","missingTheInformationINeed","thumb-down"],["太复杂/步骤太多","tooComplicatedTooManySteps","thumb-down"],["内容需要更新","outOfDate","thumb-down"],["翻译问题","translationIssue","thumb-down"],["示例/代码问题","samplesCodeIssue","thumb-down"],["其他","otherDown","thumb-down"]],["最后更新时间 (UTC):2024-09-20。"],[[["MLKCommonObjectDetectorOptions provides configuration settings for object detection tasks, impacting classification, multiple object detection, and detector mode."],["By default, object classification is disabled, and the detector returns only the most prominent object, operating in stream mode."],["Developers can enable classification and multiple object detection and choose between different detector modes using properties like shouldEnableClassification, shouldEnableMultipleObjects, and detectorMode."],["Direct initialization using -init is unavailable; instead, utilize class methods provided by subclasses to create instances of MLKCommonObjectDetectorOptions."]]],["`MLKCommonObjectDetectorOptions` configures object detectors, offering properties to customize their behavior. `shouldEnableClassification` (default: `false`) enables object classification. `shouldEnableMultipleObjects` (default: `false`) controls whether all or only the most prominent object is returned. `detectorMode` (default: `.stream`) defines the detector's operational mode. The standard initializer `init` is unavailable; subclasses' class methods should be used instead.\n"]]