code: public void stop() {
  
  		if (!started.compareAndSet(true, false)) {
  			return;
  		}
  
  		LOG.debug("Stopping panel rendering and closing attached webcam");
  
  		updater.stop();
  		updater = null;
  
  		image = null;
  
  		try {
  			errored = !webcam.close();
  		} catch (WebcamException e) {
  
  			errored = true;
  
  			Display.getDefault().syncExec(new Runnable() {
  
  				@Override
  				public void run() {
  					redraw();
  				}
  			});
  
  			throw e;
  		}
  	}
docs: Stop rendering and close webcam.