SBSDKTextOrientationRecognizer

@interface SBSDKTextOrientationRecognizer : NSObject

A class, that determines orientation of text on the image. Initialization of this class can be resource-intensive, so in case you want to analyze multiple images, it is better to create instance of SBSDKTextOrientationRecognizer once and use it multiple times.

  • Synchronously recognizes text orientation on the image.

    Declaration

    Objective-C

    - (SBSDKTextOrientation)textOrientationForImage:(UIImage *)image;

    Swift

    func textOrientation(for image: UIImage!) -> SBSDKTextOrientation

    Parameters

    image

    An image to recognize text on it.

    Return Value

    A SBSDKTextOrientation containing the result of the orientation recognition.

  • Synchronously recognizes text orientation on the image.

    Declaration

    Objective-C

    - (SBSDKTextOrientation)textOrientationForImage:(UIImage *)image
                                     withConfidence:(float)requestedConfidence;

    Swift

    func textOrientation(for image: UIImage!, withConfidence requestedConfidence: Float) -> SBSDKTextOrientation

    Parameters

    image

    An image to recognize text on it.

    requestedConfidence

    Minimum confidence level of orientation recognition. A value of 2 is a good quality. If the confidence of recognition will be lower, then confidence parameter, SBSDKTextOrientationLowConfidence will be returned. Setting it to 0 or lower will be the same, as calling getTextOrientationForImage:.

    Return Value

    A SBSDKTextOrientation containing the result of the orientation recognition.