跳轉到主要內容
這個方法可讓您執行模式訓練。此方法會將新的「字元圖像 — 字元本身」配對新增至指定模式。

語法

C++

HRESULT TrainUserPattern(
  BSTR                       FileName,
  ITrainingImagesCollection* TrainingImages,
  BSTR                       CharacterOrLigature,
  int                        Flags,
  TextTypeEnum               TextType
);

C#

void TrainUserPattern(
  string                   FileName,
  ITrainingImagesCollection TrainingImages,
  string                   CharacterOrLigature,
  int                      Flags,
  TextTypeEnum             TextType
);

Visual Basic .NET

Sub TrainUserPattern( _
  FileName As String, _
  TrainingImages As ITrainingImagesCollection, _
  CharacterOrLigature As String, _
  Flags As Integer, _
  TextType As TextTypeEnum _
)

參數

FileName [in] 此變數指定 user 模式 檔案的路徑。 TrainingImages [in] 此變數是指用來儲存字元影像集合的 TrainingImagesCollection 物件。 CharacterOrLigature [in] 此變數指定由該影像集合表示的字元。 Flags [in] 此參數包含以位元 OR 組合而成且帶有 UPTF_ 前綴的旗標,用於指定字元屬性。 TextType [in] 此參數使用 TextTypeEnum 列舉常數來指定該字元的文字類型。

傳回值

此方法沒有特定的傳回值,而是會傳回 ABBYY FineReader Engine 函式的標準傳回值

另請參閱

Engine 透過訓練進行辨識