IOcrManagerGetOcrEngineT Method |
Namespace: EdaIntegrationContract.OCR
T GetOcrEngine<T>() where T : class, IOcrEngine
using EdaIntegrationContract; using EdaIntegrationContract.Case; using EdaIntegrationContract.OCR; using EdaIntegrationContract.OCR.Expervision; class Sample { public static void Main() { var edaIntegration = new EdaIntegration().ConnectToExplore(); ICase edaCase = edaIntegration.Cases.OpenCaseByName("Case 1"); // Set OCR case properties IOcrProperties ocrProps = theCase.OCR.Properties; ocrProps.MaxOcrAgents = 4; ocrProps.QueueForOcrDuringAnalysis = true; ocrProps.AnalysisOcrFileTypes = theCase.OCR.GetValidOcrFileTypes(); theCase.OCR.UpdateProperties(); // Specify which OCR engine to use IExpervisionOcrEngine ocrEng = theCase.OCR.GetOcrEngine<IExpervisionOcrEngine>(); ocrEng.Language = ExpervisionLanguage.English; ocrEng.AutoDeskew = true; ocrEng.AutoRotate = ExpervisionAutoRotateSetting.AlwaysOn; theCase.OCR.SetActiveOcrEngine(ocrEng); } }