MBCDetectionRecognizerRunnerViewControllerDelegate

@protocol MBCDetectionRecognizerRunnerViewControllerDelegate <NSObject>

Protocol for obtaining detection results

  • Called when Scanning library finishes detection of objects. Detection cycle happens before recognition cycle and it attempts to find the location of specific object on an image. Since detection and recognition are two separate events, it is possible for detection to be successful while recognition can fail (not vice versa).

    NOTE: This method is called on background processing thread. Make sure that you dispatch all your UI API calls to main thread.

    Returned MBCDisplayableQuadDetection object.

    Declaration

    Objective-C

    - (void)recognizerRunnerViewController:
                (nonnull UIViewController<MBCRecognizerRunnerViewController> *)
                    recognizerRunnerViewController
        didFinishDetectionWithDisplayableQuad:
            (nonnull MBCDisplayableQuadDetection *)displayableQuad;

    Swift

    optional func recognizerRunnerViewController(_ recognizerRunnerViewController: Any!, didFinishDetectionWithDisplayableQuad displayableQuad: MBCDisplayableQuadDetection)

    Parameters

    recognizerRunnerViewController

    scanningViewController recognizer runner view controller responsible for scanning

    displayableQuad

    displayable quad object detection containing information of detection (i.e. location)

  • Called when Scanning library finishes detection of objects. Detection cycle happens before recognition cycle and it attempts to find the location of specific object on an image. Since detection and recognition are two separate events, it is possible for detection to be successful while recognition can fail (not vice versa).

    NOTE: This method is called on background processing thread. Make sure that you dispatch all your UI API calls to main thread.

    Returned MBCDisplayablePointsDetection object.

    Declaration

    Objective-C

    - (void)recognizerRunnerViewController:
                (nonnull UIViewController<MBCRecognizerRunnerViewController> *)
                    recognizerRunnerViewController
        didFinishDetectionWithDisplayablePoints:
            (nonnull MBCDisplayablePointsDetection *)displayablePoints;

    Swift

    optional func recognizerRunnerViewController(_ recognizerRunnerViewController: Any!, didFinishDetectionWithDisplayablePoints displayablePoints: MBCDisplayablePointsDetection)

    Parameters

    recognizerRunnerViewController

    scanningViewController recognizer runner view controller responsible for scanning

    displayablePoints

    points object detection containing information of detection (i.e. location)

  • Called when Scanning library fails to detect any object with any of the currently active recognizers.

    NOTE: This method is called on background processing thread. Make sure that you dispatch all your UI API calls to main thread.

    Declaration

    Objective-C

    - (void)recognizerRunnerViewControllerDidFailDetection:
        (nonnull UIViewController<MBCRecognizerRunnerViewController> *)
            recognizerRunnerViewController;

    Swift

    optional func recognizerRunnerViewControllerDidFailDetection(_ recognizerRunnerViewController: Any!)

    Parameters

    recognizerRunnerViewController

    Recognizer runner object responsible for scanning