private void loadimageButtonActionPerformed(
     java.awt.event.ActionEvent evt) { // GEN-FIRST:event_loadimageButtonActionPerformed
   // TODO add your handling code here:
   if (imageload.equals("")) {
     javax.swing.JOptionPane.showMessageDialog(
         null,
         "Please select an image to load",
         "Invalid Action",
         javax.swing.JOptionPane.INFORMATION_MESSAGE);
   } else if (stopButton.isEnabled() == true) {
     javax.swing.JOptionPane.showMessageDialog(
         null,
         "Please stop the camera before processing an image",
         "Action not allowed",
         javax.swing.JOptionPane.INFORMATION_MESSAGE);
   } else {
     outputTextarea.setText("");
     load = "";
     for (int i = 0; i < filelength; i++) {
       if (imageload.equals(imageFileNames[i].substring(0, imageFileNames[i].lastIndexOf('.')))) {
         load = imageFileNames[i];
         break;
       }
     }
     loadimage = imagedir.concat(load);
     imp.set(loadimage);
     // javax.swing.JOptionPane.showMessageDialog(null, "The image to load is "+loadimage, "Image",
     // javax.swing.JOptionPane.INFORMATION_MESSAGE);
   }
 } // GEN-LAST:event_loadimageButtonActionPerformed
 private void stopButtonActionPerformed(
     java.awt.event.ActionEvent evt) { // GEN-FIRST:event_stopButtonActionPerformed
   // TODO add your handling code here:
   pp.closeDown();
   startButton.setEnabled(true);
   stopButton.setEnabled(false);
   setpanel();
   java.io.File file = new java.io.File("").getAbsoluteFile();
   String name = file.getPath().replace('\\', '/') + '/';
   String path = name + "src/input/1.jpg";
   imp.set(path);
 } // GEN-LAST:event_stopButtonActionPerformed