/** This function is called periodically during operator control */ public void teleopInit() { ColorImage image; try { image = camera.getImage(); image.write("unedited.jpg"); BinaryImage bImage = image.thresholdRGB(160, 255, 160, 255, 160, 255); bImage.write("whitemask.jpg"); MonoImage mImage = image.getLuminancePlane(); mImage.write("luminancePlane.jpg"); image.free(); bImage.free(); } catch (NIVisionException e) { System.out.println("Error retrieving image: NIVisionException"); e.printStackTrace(); } catch (AxisCameraException e) { System.out.println("Error retrieving image: AxisCameraException"); e.printStackTrace(); } }