hammerspoon2-docs
    Preparing search index...

    Class HSOCRResult

    The result of a text recognition operation on an image. An HSOCRResult is returned by hs.ocr.recognizeText() and bundles the full recognized text together with an array of per-region observations, each carrying its own confidence score and bounding box.

    Index

    Constructors

    Properties

    Constructors

    Properties

    observations: HSOCRObservation[]

    The individual text observations that make up this result. Each entry in the array is an HSOCRObservation with its own text, confidence, and bounds properties. Observations are returned in the order Vision produced them (typically top-to-bottom, left-to-right, but this is image-dependent).

    text: string

    The full recognized text from the image, with each observation's text joined by newlines in the order Vision returned them. Use this when you only need the raw text and don't care about bounding boxes or per-region confidence scores.

    typeName: string

    The Swift type name, for JavaScript introspection.