MLKitObjectDetectionCommon 框架参考

类型定义

以下类型定义可在全局范围内使用。

  • @enum ObjectDetectorMode 对象检测器模式。

    声明

    Swift

    struct ObjectDetectorMode : _ObjectiveCBridgeable, Hashable, Equatable, _SwiftNewtypeWrapper, RawRepresentable
  • 包含检测到的对象的数组的块,如果出现错误,则为 nil

    声明

    Swift

    typealias ObjectDetectionCallback = ([MLKObject]?, Error?) -> Void

    参数

    objects

    在图片中检测到的对象数组;如果出现错误,则返回 nil

    error

    错误或 nil