2015-10-16 39 views

回答

0

不知道,它是如何在Android上完成的,但這可能有助於即使我使用iOS。有構建階段複製keywords,dictionariespatterns。預先選擇的設置被設置到英文字典/關鍵字上。因此,您可以查看您的項目文件並尋求English.akwEnglish.edc,並將此條目替換爲所需的區域。

此外,您可能會在代碼中搜索ocrConfiguration。這包含識別語言。

+0

你好@Tobias,請幫幫我,我只想檢測這個數字。我在我的代碼中搜索English.edc。我得到這個文件。但是這不是在mac中打開的。請幫助我如何才能更改此文件僅用於號碼檢測。在IOS中 –

0

我沒有在Android sdk上完成它,但Abbyy sdk在每種語言中都是相似的。我會給你和C#例子,我希望你會發現它有用。

你有兩個選擇:

  • 你可以用塊創建佈局:

    FRDocument document = engine.CreateFRDocument(); 
    Rectangle rectangle = new Rectangle(); 
    rectangle.X = 160; 
    rectangle.Y = 42; 
    rectangle.Width = 240; 
    rectangle.Height = 37; 
    CrearBloque(rectangle, "BlockName"); 
    
    private void CrearBloque(Rectangle rectangle, string name) 
    { 
        FREngine.Region region = engineLoader.Engine.CreateRegion(); 
        region.AddRect(
          rectangle.Left, 
          rectangle.Top, 
          rectangle.Width + rectangle.Left, 
          rectangle.Height + rectangle.Top); 
    
        ITextBlock block = document.Pages[0].Layout.Blocks.AddNew(
          BlockTypeEnum.BT_Text, region, -1).GetAsTextBlock(); 
    
        block.Name = name; 
    } 
    
    //And finally you can save your your document's layout: 
    document.Pages[0].Layout.SaveToFile("path_of_the_layout"); 
    
  • 您還可以加載模塊的佈局文件保存:

    document.Pages[0].Layout.LoadFromFile("path_of_the_layout"); 
    

非常重要!

不要忘記使用document.recognize()方法。

千萬不要使用document.Process()