OCRTool interface

OCR tool configuration (PP-OCR text detection + recognition).

Signature:

export interface OCRTool

Properties

Property Type Description

aggregation?

AggregationStrategy

(Optional)

boxThreshold?

number

(Optional)

bucketSecs?

number

(Optional)

detThreshold?

number

(Optional)

gate?

Gate

(Optional) Only run this tool while the gate holds (see Gate).

id?

string

(Optional) Instance id (G3): names this instance so gates can reference it and the same tool may appear more than once. Default: the tool name. Must be unique across localAnalysis.

inferEveryMs?

number

(Optional) Minimum media-time between inferences in ms (framerate-invariant). Default 2000. Explicit 0 = every frame.

model?

"pp-ocrv4"

(Optional) Today’s model, named for forward compatibility.

recThreshold?

number

(Optional)

sampleN?

number

(Optional)

tool

"ocr"

windowSecs

number