/// <summary> /// Runs the OCR on the specified file /// This method is not thread safe. For invokes from multiple threads use the Async method. /// </summary> /// <param name="imagePath"></param> /// <thre /// <returns></returns> public OcrResult GetOcrResult(string imagePath) { powershell.Commands.Clear(); powershell.AddCommand("Get-Text-OCR").AddParameter("Path", imagePath); var result = powershell.Invoke(); var firstResult = OcrResult.FromDynamic(result[0] as dynamic); return(firstResult); }