2017-11-29 7 views
0

Androidのカメラ エミュレータからテキストを読み込んでいますが、Android搭載端末では機能しません。ここでGoogle Mobile Vision TextRecognizerが端末で動作しない

、TextRecognizerがfalseを返したアプリケーションは、2つの異なるデバイス LG-Androidのバージョン7.0上で実行することはできませんデバイスのためのすべての権限がまだ開いている、私のアプリケーションは

protected override void OnCreate(Bundle bundle) 
     { 
      base.OnCreate(bundle); 
      // Set our view from the "main" layout resource 
      SetContentView(Resource.Layout.Main); 

      cameraView = FindViewById<SurfaceView>(Resource.Id.surface_view); 
      textView=FindViewById<TextView>(Resource.Id.text_view); 


      TextRecognizer textRecognizer=new TextRecognizer.Builder(ApplicationContext).Build(); 
      if (!textRecognizer.IsOperational) 
      { 
       Log.Error("Error","Hata var"); 

      } 
      else 
      { 
       cameraSource = new CameraSource.Builder(ApplicationContext, textRecognizer) 
        .SetFacing(CameraFacing.Back) 
        .SetRequestedPreviewSize(1280, 1024) 
        .SetRequestedFps(2.0f) 
        .SetAutoFocusEnabled(true) 
        .Build(); 

       cameraView.Holder.AddCallback(this); 
       textRecognizer.SetProcessor(this); 
      } 
     } 

を実行し続けません Samsung-Androidバージョン4.2.1

お願いします。

答えて

0

TextRecognizerインスタンスにOCRプロセッサを作成/設定することは決してありません。これを実行すると、Google Playサービスでは、正しいモデルがまだ利用できない場合は、正しいモデルを端末にダウンロードすることもできます。

textRecognizer.SetProcessor(new OcrDetectorProcessor(_GraphicOverlay)); 

あなたはDetector.Processorをサブクラス化しReceiveDetections(オーバーライド)メソッドを実装する必要があります。

再:https://developers.google.com/android/reference/com/google/android/gms/vision/Detector

+0

私はあなたが は私が この例では、正しく 働いていたこの例を、次に言うことを知るには十分ではないよhttps://www.youtube.com/watch?v=3aRlYjSQPc8 –

関連する問題