PxBundledOcrData Class

@interface PxBundledOcrData : NSObject

Resolves the directory of OCR data that ships bundled inside the SDK, so text-orientation detection works offline on a fresh install with no network download.

Overview

The SDK bundles the Tesseract OSD (orientation and script detection) model in encrypted form. On first use it is decrypted into a writable directory owned by the SDK; the resolver returns that directory, which can be passed straight to PxTextDetector’s initialiser. Subsequent calls return the cached directory without re-decrypting.

The first-run decrypt processes ~10 MB and must not run on the main thread — use osdDirectoryWithCompletion: from UI code, or call osdDirectoryWithError: from a background thread.

Type Methods

NameSummary
osdDirectoryWithCompletion:Resolves the directory containing the bundled OSD data, decrypting it on first use off the main thread. The completion runs on an arbitrary queue.
osdDirectoryWithError:Resolves the directory containing the bundled OSD data (osd.traineddata), decrypting it on first use. Synchronous.

Relationships

Inherits From

  • NSObject
Top