Recognize text in the image at the given file path.
Returns a Promise that resolves with an HSOCRResult containing all
recognized text and per-region observations. The image must exist on
disk; URLs and data buffers are not supported.
Recognition is performed on a background thread; the main thread is
not blocked during the operation.
"accurate" uses a larger neural network for better results;
"fast" trades accuracy for speed.
Observations whose confidence is below this threshold are excluded
from result.observations (and therefore from result.text).
Hints Vision toward specific languages. Use supportedLanguages() to
enumerate the available codes for the current device.
When true, Vision selects recognition languages automatically.
Overrides languages when set.
Recognize text in the image at the given file path. Returns a Promise that resolves with an
HSOCRResultcontaining all recognized text and per-region observations. The image must exist on disk; URLs and data buffers are not supported. Recognition is performed on a background thread; the main thread is not blocked during the operation."accurate"uses a larger neural network for better results;"fast"trades accuracy for speed. Observations whoseconfidenceis below this threshold are excluded fromresult.observations(and therefore fromresult.text). Hints Vision toward specific languages. UsesupportedLanguages()to enumerate the available codes for the current device. Whentrue, Vision selects recognition languages automatically. Overrideslanguageswhen set.