SBSDKMultipleObjectsDetector

@interface SBSDKMultipleObjectsDetector : NSObject

Detects multiple non-overlapping rectangular objects within an image. Like a bunch of business cards.

  • Detects multiple non-overlapping rectangular objects within an image. Like a bunch of business cards.

    Declaration

    Objective-C

    - (nullable NSArray<SBSDKPolygon *> *)detectOnImage:(nonnull UIImage *)image;

    Swift

    func detect(on image: UIImage) -> [SBSDKPolygon]?

    Parameters

    image

    The image on which multiple rectangular objects should be detected.

    Return Value

    An array of detected SBSDKPolygon objects.

  • Detects multiple non-overlapping rectangular objects within a samplebuffer. Like a bunch of business cards.

    Declaration

    Objective-C

    - (nullable NSArray<SBSDKPolygon *> *)
        detectInSampleBuffer:(nonnull CMSampleBufferRef)sampleBufferRef
                 orientation:(AVCaptureVideoOrientation)videoOrientation;

    Swift

    func detect(in sampleBufferRef: CMSampleBuffer, orientation videoOrientation: AVCaptureVideoOrientation) -> [SBSDKPolygon]?

    Parameters

    sampleBufferRef

    The sample buffer on which multiple rectangular objects should be detected.

    videoOrientation

    The video orientation for the given sample buffer.

    Return Value

    An array of detected SBSDKPolygon objects.

  • Detects multiple non-overlapping rectangular objects within a pixel buffer. Like a bunch of business cards.

    Declaration

    Objective-C

    - (nullable NSArray<SBSDKPolygon *> *)
        detectInPixelBuffer:(nonnull CVPixelBufferRef)pixelBufferRef
                orientation:(AVCaptureVideoOrientation)videoOrientation;

    Swift

    func detect(in pixelBufferRef: CVPixelBuffer, orientation videoOrientation: AVCaptureVideoOrientation) -> [SBSDKPolygon]?

    Parameters

    pixelBufferRef

    The pixel buffer on which multiple rectangular objects should be detected.

    videoOrientation

    The video orientation for the given sample buffer.

    Return Value

    An array of detected SBSDKPolygon objects.

  • Defines aspect ratio range. Only objects that are within this range will be detected. The default range is 1:2 - 2:1.;

    Declaration

    Objective-C

    @property (nonatomic, strong, nonnull) SBSDKAspectRatioRange *aspectRatioRange;

    Swift

    var aspectRatioRange: SBSDKAspectRatioRange { get set }