/** * Get an image from the camera. Be sure to free the image when you are done with it. * @return A new image from the camera. */ public ColorImage getImage() throws AxisCameraException, NIVisionException { ColorImage image = new HSLImage(); if (getImageFn.call1(image.image) == 0) { image.free(); throw new AxisCameraException("No image available"); } return image; }
/** * ColorImage- getImage/getTarget/refresh/update * should filter image and get details * http://www.spectrum3847.org/frc2012api/edu/wpi/first/wpilibj/image/ColorImage.html */ public ColorImage getImage() throws AxisCameraException, NIVisionException { ColorImage image=new HSLImage(); if (true) {//getImageFn.call1(image.image) == 0) { image.free(); throw new AxisCameraException("No image available"); } return image; }
public ColorImage getImage() throws WsCameraException, NIVisionException { ColorImage image = new HSLImage(); if (getImageFn.call1(image.image) == 0) { image.free(); throw new WsCameraException("No image available"); } return image; }
/** * Returns the AxisCamera (final), in case direct access is necessary * For the most part, this should not be used, and if a new camera * method is needed, it should just be added to this class * * @method getCameraInstance() * @return ColorImage - Camera.getImage() or a 0x0 hsl image * @author Nathan Lydick * @throws NIVisionException * - throws exception when fails * @written Oct 16, 2014 * ------------------------------------------------------- */ public ColorImage getImage () throws NIVisionException { if (this.haveCamera) return this.camera.getImage(); // returns a 0x0 image return new HSLImage(); }
/** * Instantiate a new image object and fill it with the latest image from the * camera. * * @return a pointer to an HSLImage object */ public HSLImage getImage() throws NIVisionException { HSLImage image = new HSLImage(); this.getImage(image); return image; }