Пример #1
0
		// async method 1
		private async Task<String> GetTextFromImage()
		{
			var tessAPI = new TesseractApi (Application.Context);
			await tessAPI.Init("eng");
			//tessAPI.SetWhitelist ("123456789");
			await tessAPI.SetImage (ImageInfo._file.ToString());
			return tessAPI.Text;
		}
Пример #2
0
 protected override void OnCreate (Bundle bundle)
 {
     base.OnCreate (bundle);
     SetContentView (Resource.Layout.Main);
     _api = new TesseractApi (this);
     _api.Init ("eng");
     SurfaceView cameraSurface = FindViewById<SurfaceView> (Resource.Id.cpPreview);
     ISurfaceHolder holder = cameraSurface.Holder;
     holder.AddCallback (this);
     holder.SetType (SurfaceType.PushBuffers);
 }
Пример #3
0
 private async void TesseractInit()
 {
     _api = new TesseractApi(Android.App.Application.Context, AssetsDeployment.OncePerInitialization);
     await _api.Init("bon");
 }