code: public BufferedImage getImage() {
  
  		if (!isReady()) {
  			return null;
  		}
  
  		long t1 = 0;
  		long t2 = 0;
  
  		if (asynchronous) {
  			return updater.getImage();
  		} else {
  
  			// get image
  
  			t1 = System.currentTimeMillis();
  			BufferedImage image = transform(new WebcamGetImageTask(driver, device).getImage());
  			t2 = System.currentTimeMillis();
  
  			if (image == null) {
  				return null;
  			}
  
  			// get FPS
  
  			if (device instanceof WebcamDevice.FPSSource) {
  				fps = ((WebcamDevice.FPSSource) device).getFPS();
  			} else {
  				// +1 to avoid division by zero
  				fps = (4 * fps + 1000 / (t2 - t1 + 1)) / 5;
  			}
  
  			// notify webcam listeners about new image available
  
  			notifyWebcamImageAcquired(image);
  
  			return image;
  		}
  	}
docs: Capture image from webcam and return it. Will return image object or null if webcam is closed
  or has been already disposed by JVM.<br>
  <br>
  <b>IMPORTANT NOTE!!!</b><br>
  <br>
  There are two possible behaviors of what webcam should do when you try to get image and
  webcam is actually closed. Normally it will return null, but there is a special flag which
  can be statically set to switch all webcams to auto open mode. In this mode, webcam will be
  automatically open, when you try to get image from closed webcam. Please be aware of some
  side effects! In case of multi-threaded applications, there is no guarantee that one thread
  will not try to open webcam even if it was manually closed in different thread.
  
  @return Captured image or null if webcam is closed or disposed by JVM