/** * Sets the Camera boolean, in case a change is necessary * * @method KilroyCamera() - constructor * @param hasCamera * - whether we have a camera * @author Nathan Lydick * @written Oct 16, 2014 * ------------------------------------------------------- */ public KilroyCamera (boolean hasCamera) { if (hasCamera == false) System.out.println("ATTENTION: the AXIS CAMERA is DISABLED :("); this.haveCamera = hasCamera; if (hasCamera) { this.camera = new AxisCamera(KILROY_CAMERA_IP); } else { this.camera = null; } }
/** * Sets the Camera boolean, in case a change is necessary * * @method KilroyCamera() - constructor * @param hasCamera * - whether we have a camera * @param ip * The ip that the camera is at with the context of 10.x.39.11 * @author Ryan McGee * * @written Mar 9, 2017 * ------------------------------------------------------- */ public KilroyCamera (boolean hasCamera, String ip) { if (hasCamera == false) System.out.println("ATTENTION: the AXIS CAMERA is DISABLED :("); this.haveCamera = hasCamera; if (hasCamera) { KILROY_CAMERA_IP = ip; this.camera = new AxisCamera(KILROY_CAMERA_IP); } else { this.camera = null; } }
public AxisCamera.ExposureControl getExposureControl () { if (this.haveCamera) return this.camera.getExposureControl(); // returns automatic return AxisCamera.ExposureControl.kAutomatic; }
public AxisCamera.Resolution getResolution () { if (this.haveCamera) return this.camera.getResolution(); // returns the smallest resolution and our default return AxisCamera.Resolution.k160x120; }
public AxisCamera.Rotation getRotation () { if (this.haveCamera) return this.camera.getRotation(); // returns 0 rotation return AxisCamera.Rotation.k0; }
public AxisCamera.WhiteBalance getWhiteBalance () { if (this.haveCamera) return this.camera.getWhiteBalance(); // returns automatic return AxisCamera.WhiteBalance.kAutomatic; }
public void writeExposureControl (AxisCamera.ExposureControl value) { if (this.haveCamera) { this.camera.writeExposureControl(value); } else { // returns nothing } }
public void writeResolution (AxisCamera.Resolution value) { if (this.haveCamera) { this.camera.writeResolution(value); } else { // returns nothing } }
public void writeRotation (AxisCamera.Rotation value) { if (this.haveCamera) { this.camera.writeRotation(value); } else { // returns nothing } }
public void writeWhiteBalance (AxisCamera.WhiteBalance whiteBalance) { if (this.haveCamera) { this.camera.writeWhiteBalance(whiteBalance); } else { // returns nothing } }
/** * Sets the Camera boolean, in case a change is necessary * * @method KilroyCamera() - constructor * @param hasCamera * - whether we have a camera * @author Nathan Lydick * @written Oct 16, 2014 * ------------------------------------------------------- */ public KilroyCamera (boolean hasCamera) { this.haveCamera = hasCamera; if (hasCamera) { this.camera = new AxisCamera(KILROY_CAMERA_IP); } else { this.camera = null; } }
@Override public void robotInit() { oi = new OI(joystickMove); camera = new AxisCamera("10.10.2.11"); }
public static void initialize() { frame = NIVision.imaqCreateImage(NIVision.ImageType.IMAGE_RGB, 0); camera = new AxisCamera("10.47.76.20"); }
/** * 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 AxisCamera - the camera instance (or null) * @author Nathan Lydick * @written Oct 16, 2014 * ------------------------------------------------------- */ public final AxisCamera getCameraInstance () { return this.camera; }