title: How to load image to android and resize
body: <p>I am trying to load an image in a mat and resize it with the below code</p>
  
  <pre><code>        Mat temp1= new Mat();
          int[] train_responses = null;
          Mat temp2 = new Mat();
          Mat temp3 = new Mat();
          Mat train_samples = new Mat();
          for (int ii = 0; ii &lt; 10; ii++){            
              temp1 = Highgui.imread("/mnt/sdcard/images/train/" + ii + ".png");
              Imgproc.resize(temp1, temp2, new Size(30,20));  
          }
  </code></pre>
  
  <p>but the code crashes with the following log</p>
  
  <pre><code>opencv error assertion failed (ssize.area() &gt; 0) in void cv::resize....
  </code></pre>
  
  <p>Where am I wrong?</p>