示例#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;
		}
 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");
 }