Java 类edu.wpi.first.wpilibj.vision.AxisCamera 实例源码

项目:2017    文件:KilroyCamera.java   
/**
 * 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;
        }
}
项目:2017    文件:KilroyCamera.java   
/**
 * 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;
        }
}
项目:2017    文件:KilroyCamera.java   
public AxisCamera.ExposureControl getExposureControl ()
{
    if (this.haveCamera)
        return this.camera.getExposureControl();
    // returns automatic
    return AxisCamera.ExposureControl.kAutomatic;
}
项目:2017    文件:KilroyCamera.java   
public AxisCamera.Resolution getResolution ()
{
    if (this.haveCamera)
        return this.camera.getResolution();
    // returns the smallest resolution and our default
    return AxisCamera.Resolution.k160x120;
}
项目:2017    文件:KilroyCamera.java   
public AxisCamera.Rotation getRotation ()
{
    if (this.haveCamera)
        return this.camera.getRotation();
    // returns 0 rotation
    return AxisCamera.Rotation.k0;
}
项目:2017    文件:KilroyCamera.java   
public AxisCamera.WhiteBalance getWhiteBalance ()
{
    if (this.haveCamera)
        return this.camera.getWhiteBalance();
    // returns automatic
    return AxisCamera.WhiteBalance.kAutomatic;
}
项目:2017    文件:KilroyCamera.java   
public void writeExposureControl (AxisCamera.ExposureControl value)
{
    if (this.haveCamera)
        {
        this.camera.writeExposureControl(value);
        }
    else
        {
        // returns nothing

        }
}
项目:2017    文件:KilroyCamera.java   
public void writeResolution (AxisCamera.Resolution value)
{
    if (this.haveCamera)
        {
        this.camera.writeResolution(value);
        }
    else
        {
        // returns nothing

        }
}
项目:2017    文件:KilroyCamera.java   
public void writeRotation (AxisCamera.Rotation value)
{
    if (this.haveCamera)
        {
        this.camera.writeRotation(value);
        }
    else
        {
        // returns nothing

        }
}
项目:2017    文件:KilroyCamera.java   
public void writeWhiteBalance (AxisCamera.WhiteBalance whiteBalance)
{
    if (this.haveCamera)
        {
        this.camera.writeWhiteBalance(whiteBalance);
        }
    else
        {
        // returns nothing

        }
}
项目:2016    文件:KilroyCamera.java   
/**
 * 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;
        }
}
项目:2016    文件:KilroyCamera.java   
public AxisCamera.ExposureControl getExposureControl ()
{
    if (this.haveCamera)
        return this.camera.getExposureControl();
    // returns automatic
    return AxisCamera.ExposureControl.kAutomatic;
}
项目:2016    文件:KilroyCamera.java   
public AxisCamera.Resolution getResolution ()
{
    if (this.haveCamera)
        return this.camera.getResolution();
    // returns the smallest resolution and our default
    return AxisCamera.Resolution.k160x120;
}
项目:2016    文件:KilroyCamera.java   
public AxisCamera.Rotation getRotation ()
{
    if (this.haveCamera)
        return this.camera.getRotation();
    // returns 0 rotation
    return AxisCamera.Rotation.k0;
}
项目:2016    文件:KilroyCamera.java   
public AxisCamera.WhiteBalance getWhiteBalance ()
{
    if (this.haveCamera)
        return this.camera.getWhiteBalance();
    // returns automatic
    return AxisCamera.WhiteBalance.kAutomatic;
}
项目:2016    文件:KilroyCamera.java   
public void writeExposureControl (AxisCamera.ExposureControl value)
{
    if (this.haveCamera)
        {
        this.camera.writeExposureControl(value);
        }
    else
        {
        // returns nothing

        }
}
项目:2016    文件:KilroyCamera.java   
public void writeResolution (AxisCamera.Resolution value)
{
    if (this.haveCamera)
        {
        this.camera.writeResolution(value);
        }
    else
        {
        // returns nothing

        }
}
项目:2016    文件:KilroyCamera.java   
public void writeRotation (AxisCamera.Rotation value)
{
    if (this.haveCamera)
        {
        this.camera.writeRotation(value);
        }
    else
        {
        // returns nothing

        }
}
项目:2016    文件:KilroyCamera.java   
public void writeWhiteBalance (AxisCamera.WhiteBalance whiteBalance)
{
    if (this.haveCamera)
        {
        this.camera.writeWhiteBalance(whiteBalance);
        }
    else
        {
        // returns nothing

        }
}
项目:frc_2015_recyclerush    文件:Robot.java   
@Override
public void robotInit() {
    oi = new OI(joystickMove);
    camera = new AxisCamera("10.10.2.11");
}
项目:FRC-2015-Robot-Java    文件:RobotVision.java   
public static void initialize()
{
    frame = NIVision.imaqCreateImage(NIVision.ImageType.IMAGE_RGB, 0);
       camera = new AxisCamera("10.47.76.20");
}
项目:2017    文件:KilroyCamera.java   
/**
 * 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;
}
项目:2016    文件:KilroyCamera.java   
/**
 * 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;
}