How to extract only selected text fields from image with OCR in android [on hold]











up vote
0
down vote

favorite












Am new to android programming i have developed one application in which i need to extract text from image/scanned image etc. i achieved that using Google OCR api below is the sample code.



In my case i want to extract only name, email,mobile, address etc, how can i achieve that can anyone please look into it and also is it possible to extract telugu language text?



Here is my sample code.



This code is for getting text from image using OCR.



@Override
public boolean onOptionsItemSelected(MenuItem item) {
switch (item.getItemId()) {
case R.id.actionCamera:
OCRCapture.Builder(this)
.setUseFlash(false)
.setAutoFocus(true)
.buildWithRequestCode(CAMERA_SCAN_TEXT);
break;
case R.id.actionPhoto:
if (hasPermission()) {
pickImage();
} else {
getPermission();
}
break;
}
return super.onOptionsItemSelected(item);
}


And this code is to display the extracted text on ActivityResult:



@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
super.onActivityResult(requestCode, resultCode, data);
if (data != null) {
if (requestCode == CAMERA_SCAN_TEXT) {
if (resultCode == CommonStatusCodes.SUCCESS) {
textView.setText(data.getStringExtra(TextBlockObject));
}
} else if (requestCode == LOAD_IMAGE_RESULTS) {
Uri pickedImage = data.getData();
String text = OCRCapture.Builder(this).getTextFromUri(pickedImage);
textView.setText(text);
}
}
}









share|improve this question













put on hold as too broad by rmtheis, Cindy Meister, Ron Srebro, EdChum, Gerhard Barnard Nov 12 at 11:19


Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.



















    up vote
    0
    down vote

    favorite












    Am new to android programming i have developed one application in which i need to extract text from image/scanned image etc. i achieved that using Google OCR api below is the sample code.



    In my case i want to extract only name, email,mobile, address etc, how can i achieve that can anyone please look into it and also is it possible to extract telugu language text?



    Here is my sample code.



    This code is for getting text from image using OCR.



    @Override
    public boolean onOptionsItemSelected(MenuItem item) {
    switch (item.getItemId()) {
    case R.id.actionCamera:
    OCRCapture.Builder(this)
    .setUseFlash(false)
    .setAutoFocus(true)
    .buildWithRequestCode(CAMERA_SCAN_TEXT);
    break;
    case R.id.actionPhoto:
    if (hasPermission()) {
    pickImage();
    } else {
    getPermission();
    }
    break;
    }
    return super.onOptionsItemSelected(item);
    }


    And this code is to display the extracted text on ActivityResult:



    @Override
    protected void onActivityResult(int requestCode, int resultCode, Intent data) {
    super.onActivityResult(requestCode, resultCode, data);
    if (data != null) {
    if (requestCode == CAMERA_SCAN_TEXT) {
    if (resultCode == CommonStatusCodes.SUCCESS) {
    textView.setText(data.getStringExtra(TextBlockObject));
    }
    } else if (requestCode == LOAD_IMAGE_RESULTS) {
    Uri pickedImage = data.getData();
    String text = OCRCapture.Builder(this).getTextFromUri(pickedImage);
    textView.setText(text);
    }
    }
    }









    share|improve this question













    put on hold as too broad by rmtheis, Cindy Meister, Ron Srebro, EdChum, Gerhard Barnard Nov 12 at 11:19


    Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

















      up vote
      0
      down vote

      favorite









      up vote
      0
      down vote

      favorite











      Am new to android programming i have developed one application in which i need to extract text from image/scanned image etc. i achieved that using Google OCR api below is the sample code.



      In my case i want to extract only name, email,mobile, address etc, how can i achieve that can anyone please look into it and also is it possible to extract telugu language text?



      Here is my sample code.



      This code is for getting text from image using OCR.



      @Override
      public boolean onOptionsItemSelected(MenuItem item) {
      switch (item.getItemId()) {
      case R.id.actionCamera:
      OCRCapture.Builder(this)
      .setUseFlash(false)
      .setAutoFocus(true)
      .buildWithRequestCode(CAMERA_SCAN_TEXT);
      break;
      case R.id.actionPhoto:
      if (hasPermission()) {
      pickImage();
      } else {
      getPermission();
      }
      break;
      }
      return super.onOptionsItemSelected(item);
      }


      And this code is to display the extracted text on ActivityResult:



      @Override
      protected void onActivityResult(int requestCode, int resultCode, Intent data) {
      super.onActivityResult(requestCode, resultCode, data);
      if (data != null) {
      if (requestCode == CAMERA_SCAN_TEXT) {
      if (resultCode == CommonStatusCodes.SUCCESS) {
      textView.setText(data.getStringExtra(TextBlockObject));
      }
      } else if (requestCode == LOAD_IMAGE_RESULTS) {
      Uri pickedImage = data.getData();
      String text = OCRCapture.Builder(this).getTextFromUri(pickedImage);
      textView.setText(text);
      }
      }
      }









      share|improve this question













      Am new to android programming i have developed one application in which i need to extract text from image/scanned image etc. i achieved that using Google OCR api below is the sample code.



      In my case i want to extract only name, email,mobile, address etc, how can i achieve that can anyone please look into it and also is it possible to extract telugu language text?



      Here is my sample code.



      This code is for getting text from image using OCR.



      @Override
      public boolean onOptionsItemSelected(MenuItem item) {
      switch (item.getItemId()) {
      case R.id.actionCamera:
      OCRCapture.Builder(this)
      .setUseFlash(false)
      .setAutoFocus(true)
      .buildWithRequestCode(CAMERA_SCAN_TEXT);
      break;
      case R.id.actionPhoto:
      if (hasPermission()) {
      pickImage();
      } else {
      getPermission();
      }
      break;
      }
      return super.onOptionsItemSelected(item);
      }


      And this code is to display the extracted text on ActivityResult:



      @Override
      protected void onActivityResult(int requestCode, int resultCode, Intent data) {
      super.onActivityResult(requestCode, resultCode, data);
      if (data != null) {
      if (requestCode == CAMERA_SCAN_TEXT) {
      if (resultCode == CommonStatusCodes.SUCCESS) {
      textView.setText(data.getStringExtra(TextBlockObject));
      }
      } else if (requestCode == LOAD_IMAGE_RESULTS) {
      Uri pickedImage = data.getData();
      String text = OCRCapture.Builder(this).getTextFromUri(pickedImage);
      textView.setText(text);
      }
      }
      }






      android ocr image-recognition






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Nov 8 at 10:48









      santosh nani

      297




      297




      put on hold as too broad by rmtheis, Cindy Meister, Ron Srebro, EdChum, Gerhard Barnard Nov 12 at 11:19


      Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.






      put on hold as too broad by rmtheis, Cindy Meister, Ron Srebro, EdChum, Gerhard Barnard Nov 12 at 11:19


      Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.































          active

          oldest

          votes






















          active

          oldest

          votes













          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes

          Popular posts from this blog

          鏡平學校

          ꓛꓣだゔៀៅຸ໢ທຮ໕໒ ,ໂ'໥໓າ໼ឨឲ៵៭ៈゎゔit''䖳𥁄卿' ☨₤₨こゎもょの;ꜹꟚꞖꞵꟅꞛေၦေɯ,ɨɡ𛃵𛁹ޝ޳ޠ޾,ޤޒޯ޾𫝒𫠁သ𛅤チョ'サノބޘދ𛁐ᶿᶇᶀᶋᶠ㨑㽹⻮ꧬ꧹؍۩وَؠ㇕㇃㇪ ㇦㇋㇋ṜẰᵡᴠ 軌ᵕ搜۳ٰޗޮ޷ސޯ𫖾𫅀ल, ꙭ꙰ꚅꙁꚊꞻꝔ꟠Ꝭㄤﺟޱސꧨꧼ꧴ꧯꧽ꧲ꧯ'⽹⽭⾁⿞⼳⽋២៩ញណើꩯꩤ꩸ꩮᶻᶺᶧᶂ𫳲𫪭𬸄𫵰𬖩𬫣𬊉ၲ𛅬㕦䬺𫝌𫝼,,𫟖𫞽ហៅ஫㆔ాఆఅꙒꚞꙍ,Ꙟ꙱エ ,ポテ,フࢰࢯ𫟠𫞶 𫝤𫟠ﺕﹱﻜﻣ𪵕𪭸𪻆𪾩𫔷ġ,ŧآꞪ꟥,ꞔꝻ♚☹⛵𛀌ꬷꭞȄƁƪƬșƦǙǗdžƝǯǧⱦⱰꓕꓢႋ神 ဴ၀க௭எ௫ឫោ ' េㇷㇴㇼ神ㇸㇲㇽㇴㇼㇻㇸ'ㇸㇿㇸㇹㇰㆣꓚꓤ₡₧ ㄨㄟ㄂ㄖㄎ໗ツڒذ₶।ऩछएोञयूटक़कयँृी,冬'𛅢𛅥ㇱㇵㇶ𥄥𦒽𠣧𠊓𧢖𥞘𩔋цѰㄠſtʯʭɿʆʗʍʩɷɛ,əʏダヵㄐㄘR{gỚṖḺờṠṫảḙḭᴮᵏᴘᵀᵷᵕᴜᴏᵾq﮲ﲿﴽﭙ軌ﰬﶚﶧ﫲Ҝжюїкӈㇴffצּ﬘﭅﬈軌'ffistfflſtffतभफɳɰʊɲʎ𛁱𛁖𛁮𛀉 𛂯𛀞నఋŀŲ 𫟲𫠖𫞺ຆຆ ໹້໕໗ๆทԊꧢꧠ꧰ꓱ⿝⼑ŎḬẃẖỐẅ ,ờỰỈỗﮊDžȩꭏꭎꬻ꭮ꬿꭖꭥꭅ㇭神 ⾈ꓵꓑ⺄㄄ㄪㄙㄅㄇstA۵䞽ॶ𫞑𫝄㇉㇇゜軌𩜛𩳠Jﻺ‚Üမ႕ႌႊၐၸဓၞၞၡ៸wyvtᶎᶪᶹစဎ꣡꣰꣢꣤ٗ؋لㇳㇾㇻㇱ㆐㆔,,㆟Ⱶヤマފ޼ޝަݿݞݠݷݐ',ݘ,ݪݙݵ𬝉𬜁𫝨𫞘くせぉて¼óû×ó£…𛅑הㄙくԗԀ5606神45,神796'𪤻𫞧ꓐ㄁ㄘɥɺꓵꓲ3''7034׉ⱦⱠˆ“𫝋ȍ,ꩲ軌꩷ꩶꩧꩫఞ۔فڱێظペサ神ナᴦᵑ47 9238їﻂ䐊䔉㠸﬎ffiﬣ,לּᴷᴦᵛᵽ,ᴨᵤ ᵸᵥᴗᵈꚏꚉꚟ⻆rtǟƴ𬎎

          Why https connections are so slow when debugging (stepping over) in Java?