title: save image directly to specified folder in ascending order of filename
body: <p>Main thing is that I am fresher in JAVA. I got stuck with some code.
  I want to save an image capture by a button directly in a specific folder. up to now I am using a file chooser to save my image
  I want to save image in <code>C:\temp</code> and file name can be image,image1,image2 in ascending order</p>
  
  <pre><code>  int returnVal = jFileChooser1.showSaveDialog(this);
    if (returnVal == JFileChooser.APPROVE_OPTION)   
    {
         File file = jFileChooser1.getSelectedFile();
         Highgui.imwrite(file.getPath(), frame);
  
    } else {
  
         System.out.println("file access cancelled by user.");
  
    }
  </code></pre>