public void setBackgroundImage(File f) throws IOException {
   if (srcStream != null) {
     srcStream.stopRunning();
     srcStream = null;
   }
   srcImage = ImageIO.read(f);
 }
  public void setSourceStream(String s) throws IOException {

    if (srcStream != null) {
      srcStream.stopRunning();
    }

    //		int frameSkip = 2;
    if (s.equals(JMYRON_SRC)) {
      //			frameSkip = 50;
      srcStream = new WebCam(w, h, 12, this, false);
    } else if (s.equals(LOCALAXIS_SRC)) {
      String ip = ElProps.THE_PROPS.getProperty("axisIP", "10.0.1.90");
      String url = "http://" + ip + "/";
      String username = ElProps.THE_PROPS.getProperty("axisUsername", "root");
      String password = ElProps.THE_PROPS.getProperty("axisPassword", "n0h0");
      srcStream = new AxisCamera(url, w, h, 0, 0, username, password, this);
    } else {
      srcStream = null;
      throw new IOException("Unknown source");
    }
    srcStream.start();
    // gridDetector.resetBackground(frameSkip);
  }