Share via


OcrLine 類別

定義

代表 OCR 引擎所辨識的單行文字,並傳回為 OcrResult的一部分。

public ref class OcrLine sealed
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
class OcrLine final
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
public sealed class OcrLine
Public NotInheritable Class OcrLine
繼承
Object Platform::Object IInspectable OcrLine
屬性

Windows 需求

裝置系列
Windows 10 (已於 10.0.10240.0 - for Xbox, see UWP features that aren't yet supported on Xbox 引進)
API contract
Windows.Foundation.UniversalApiContract (已於 v1.0 引進)

備註

當您呼叫OcrEngine類別的RecognizeAsync方法時,此方法會傳回OcrResult物件。 OcrResult包含OcrLine物件的集合,您可以透過OcrResultLines屬性存取這些物件。 每個OcrLine物件都包含一組 OcrWord物件,您可以透過每個OcrLineWords屬性來存取這些物件。

屬性

Text

取得已辨識行的文字。

Words

取得 OcrWord 物件的集合,代表 RecognizeAsync 方法在目前文字行中偵測到的字組。

適用於