title: where do i need to create a subfolder named “tessdata” inside my sdcard?
body: <p>i have copy pasted a program of tesseract tess-two OCR inside my program and i am getting this error " Data path must contain subfolder tessdata ". I want to know exactly where am i supposed to create this subfolder and how to specify the path in my program , i have followed most of the links which had solutions but not working for me , may be i am following it in a wrong way . I am posting my code here , please suggest me the changes that i have to make. My sdcards location for the images is /storage/sdcard0/... , i am retrieving it with the the help of MediaStore.Images.Media.DATA and my images are getting displayed properly , so suggest me according to my code , it would be of a great help to me.</p>
  
  <pre><code>protected void onActivityResult(int requestCode, int resultCode, Intent data) {
  // TODO Auto-generated method stub
  
  if (requestCode == SELECT_PICTURE &amp;&amp; resultCode == RESULT_OK
          &amp;&amp; null != data) {
  
      Uri selectedImage = data.getData();
      String[] filePathColumn = { MediaStore.Images.Media.DATA
           };
  
      Cursor cursor = getContentResolver().query(selectedImage,
              filePathColumn, null, null, null);
      cursor.moveToFirst();
  
      int columnIndex = cursor.getColumnIndex(filePathColumn[0]);
      String picturePath = cursor.getString(columnIndex);
      cursor.close();
  
      BitmapFactory.Options options = new BitmapFactory.Options();
      options.inPreferredConfig = Bitmap.Config.ARGB_8888;
  
     // File tessdata = new File(picturePath);
      //if (!tessdata.exists() || !tessdata.isDirectory()) {
       //   throw new IllegalArgumentException(
        //          "Data path must contain subfolder tessdata!");
      //}
  
      bitmap = BitmapFactory.decodeFile(picturePath);
      int newWidth = bitmap.getWidth();
      int newHeight = bitmap.getHeight();
  
      while (newWidth &gt; 1200) {
          newWidth = newWidth / 2;
          newHeight = newHeight / 2;
      }
      imageView.setImageBitmap(Bitmap.createScaledBitmap(bitmap,
              newWidth, newHeight, false));
  
      ExifInterface exif = null;
      try {
          exif = new ExifInterface(picturePath);
      } catch (IOException e) {
          // TODO Auto-generated catch block
          e.printStackTrace();
      }
      int exifOrientation = exif.getAttributeInt(
              ExifInterface.TAG_ORIENTATION,
              ExifInterface.ORIENTATION_NORMAL);
  
      int rotate = 0;
  
      switch (exifOrientation) {
      case ExifInterface.ORIENTATION_ROTATE_90:
          rotate = 90;
          break;
      case ExifInterface.ORIENTATION_ROTATE_180:
          rotate = 180;
          break;
      case ExifInterface.ORIENTATION_ROTATE_270:
          rotate = 270;
          break;
      }
  
      if (rotate != 0) {
          int w = bitmap.getWidth();
          int h = bitmap.getHeight();
  
          // Setting pre rotate
          Matrix mtx = new Matrix();
          mtx.preRotate(rotate);
  
          // Rotating Bitmap &amp; convert to ARGB_8888, required by tess
          bitmap = Bitmap.createBitmap(bitmap, 0, 0, w, h, mtx, false);
      }
      bitmap = bitmap.copy(Bitmap.Config.ARGB_8888, true);
  
      TessBaseAPI baseApi = new TessBaseAPI();
  
      baseApi.init(picturePath, "eng");
  
      baseApi.setImage(bitmap);
      String recognizedText = baseApi.getUTF8Text();
      baseApi.end();
  
  }
  </code></pre>
  
  <p>i have created a folder named tesseract_languages and inside i have created a subfolder tessdata , is it wrong ? if it is ? then where do i have to create the subfolder ?, if it is right then how to specify it in my program , please guide me Thanking You.</p>