当前位置: 首页>>代码示例>>Java>>正文


Java AxisCamera.getInstance方法代码示例

本文整理汇总了Java中edu.wpi.first.wpilibj.camera.AxisCamera.getInstance方法的典型用法代码示例。如果您正苦于以下问题:Java AxisCamera.getInstance方法的具体用法?Java AxisCamera.getInstance怎么用?Java AxisCamera.getInstance使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在edu.wpi.first.wpilibj.camera.AxisCamera的用法示例。


在下文中一共展示了AxisCamera.getInstance方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: robotInit

import edu.wpi.first.wpilibj.camera.AxisCamera; //导入方法依赖的package包/类
protected void robotInit() {
    dsout = new DSOutput();
    System.out.println("Loading " + fullname);
    dsout.clearOutput();
    dsout.say(1, "Loading...");
    Timer.delay(1);
    acam = AxisCamera.getInstance("10.28.79.11");
    dsout.say(1, "Welcome to");
    dsout.say(2, fullname);

}
 
开发者ID:frc2879,项目名称:2014-mermaid,代码行数:12,代码来源:Robot.java

示例2: robotInit

import edu.wpi.first.wpilibj.camera.AxisCamera; //导入方法依赖的package包/类
protected void robotInit() {
    
    Debug.clear();
    Debug.log(1, 1, "Robot Initalized");
    state = START;
    lastUpdate = System.currentTimeMillis();
    motorTime = 0L;
    vertHeight = 0;

    drive.initializeDrive(LEFT_DRIVE_FRONT, LEFT_DRIVE_REAR, RIGHT_DRIVE_FRONT, RIGHT_DRIVE_REAR);
    //drive.initializeDrive(6, 4);
    drive.setSafety(false);
    intake = new VexSpike(INTAKE_SPIKE);
    intake2 = new VexSpike(INTAKE_SPIKE_2); //special spike
    intake2.deactivate(); //special spike
    intake.deactivate();
    
    winch = new VexSpike(WINCH_SPIKE);
    drive.addVictor(TRIGGER_PORT);
    drive.addVictor(WINCH_PORT);
    //trigger = new Victor(TRIGGER_PORT);

    camera = AxisCamera.getInstance("10.40.79.11");


    cc = new CriteriaCollection();      // create the criteria for the particle filter
    cc.addCriteria(NIVision.MeasurementType.IMAQ_MT_AREA, 400, 65535, false);
    //camera = AxisCamera.getInstance("10.40.79.11");
    horzCenterMassX = 0.0;
    horzCenterMassY = 0.0;
    vertCenterMassX = 0.0;
    vertCenterMassY = 0.0;

    System.out.println("End of Robot Init");
}
 
开发者ID:OASTEM,项目名称:2014CataBot,代码行数:36,代码来源:RobotMain.java

示例3: robotInit

import edu.wpi.first.wpilibj.camera.AxisCamera; //导入方法依赖的package包/类
public void robotInit() {
    
    System.out.println("-- 2014 Target Test --");
    
    camera = AxisCamera.getInstance();  // get an instance of the camera
    cc = new CriteriaCollection();      // create the criteria for the particle filter
    cc.addCriteria(MeasurementType.IMAQ_MT_AREA, AREA_MINIMUM, 65535, false);
}
 
开发者ID:jousley,项目名称:2014VisionSample,代码行数:9,代码来源:VisionSampleProject2014.java

示例4: FRC2014Java

import edu.wpi.first.wpilibj.camera.AxisCamera; //导入方法依赖的package包/类
FRC2014Java(){
    
    //Motor Controllers
    leftDrive = new Talon(TALON_PORT_L);
    rightDrive = new Talon(TALON_PORT_R);
    
    //Joystick
    xbox = new Joystick(1);
    
    //Winch
    winch = new Talon(2);
    
    //Intake
    intake = new Talon(8);
    
    //Cam
    cam = new Talon(3);
    
    //Catapult Limit Switch
    catapultLimit = new DigitalInput(1);
    
    //Cam Limit Switch
    camLimit = new DigitalInput(2);
    
    //Intake Limit Switch
    intakeLimit = new DigitalInput(3);
    
    //Cameras
    cameraFront = AxisCamera.getInstance("10.10.2.11");
    cameraBack = AxisCamera.getInstance("10.10.2.12");
    
    //Watchdog
    dog = Watchdog.getInstance();
}
 
开发者ID:CircuitRunners,项目名称:frc_2014_aerialassist,代码行数:35,代码来源:FRC2014Java.java

示例5: PillowCam

import edu.wpi.first.wpilibj.camera.AxisCamera; //导入方法依赖的package包/类
public PillowCam() {
    camera = AxisCamera.getInstance();
    
    cc = new CriteriaCollection();
    cc.addCriteria(MeasurementType.IMAQ_MT_AREA, AREA_MIN, AREA_MAX, false);
    
    ccLeft = new CriteriaCollection();
    ccLeft.addCriteria(MeasurementType.IMAQ_MT_FIRST_PIXEL_X, 0, 120, false);
    
    ccRight = new CriteriaCollection();
    ccRight.addCriteria(MeasurementType.IMAQ_MT_FIRST_PIXEL_X, 200, 320, false);
}
 
开发者ID:mortorqrobotics,项目名称:PillowBot,代码行数:13,代码来源:PillowCam.java

示例6: VisionController

import edu.wpi.first.wpilibj.camera.AxisCamera; //导入方法依赖的package包/类
private VisionController() {
    camera = AxisCamera.getInstance();
    cc = new CriteriaCollection();      // create the criteria for the particle filter
    cc.addCriteria(NIVision.MeasurementType.IMAQ_MT_AREA, AREA_MINIMUM, 65535, false);

    target = new TargetReport();
    verticalTargets = new int[MAX_PARTICLES];
    horizontalTargets = new int[MAX_PARTICLES];
}
 
开发者ID:KProskuryakov,项目名称:FRC623Robot2014,代码行数:10,代码来源:VisionController.java

示例7: CameraUnit

import edu.wpi.first.wpilibj.camera.AxisCamera; //导入方法依赖的package包/类
public CameraUnit()
{
    camera = AxisCamera.getInstance(ReboundRumble.CAMERA_IP);
    camera.writeResolution(AxisCamera.ResolutionT.k320x240);
    camera.writeExposurePriority(AxisCamera.ExposurePriorityT.imageQuality);
    camera.writeExposureControl(AxisCamera.ExposureT.hold);
    camera.writeWhiteBalance(AxisCamera.WhiteBalanceT.fixedIndoor);
    cc = new CriteriaCollection();
    cc.addCriteria(MeasurementType.IMAQ_MT_BOUNDING_RECT_WIDTH, 15, 400, false);
    cc.addCriteria(MeasurementType.IMAQ_MT_BOUNDING_RECT_HEIGHT, 15, 400, false);
    cameraPan = new Servo(1, 6);
    cameraTilt = new Servo(1, 7);
}
 
开发者ID:FIRST-FRC-Team-2028,项目名称:2012,代码行数:14,代码来源:CameraUnit.java

示例8: Vision

import edu.wpi.first.wpilibj.camera.AxisCamera; //导入方法依赖的package包/类
public Vision() {
	if (enableVision) camera = AxisCamera.getInstance("10.25.2.11");
	lastFrame = System.currentTimeMillis();
	frameProcess = 0;
	cc = new CriteriaCollection();
	cc.addCriteria(MeasurementType.IMAQ_MT_AREA, 3000, 6000, false);
	distanceReg = new Regression(0.0000086131992, -0.0893246981, 244.5414525); // a, b, c
	angleReg = new Regression(15.32142857, -565.2928571, 5720.678571); // a, b, c
	SmartDashboard.putNumber("Angle Regression Constant", angleReg.getConstant());
}
 
开发者ID:Team-2502,项目名称:RobotCode2013,代码行数:11,代码来源:Vision.java

示例9: robotInit

import edu.wpi.first.wpilibj.camera.AxisCamera; //导入方法依赖的package包/类
public void robotInit() {
        camera = AxisCamera.getInstance();
        cc = new CriteriaCollection();
        cc.addCriteria(MeasurementType.IMAQ_MT_BOUNDING_RECT_WIDTH, 0, 0, false);
        cc.addCriteria(MeasurementType.IMAQ_MT_BOUNDING_RECT_HEIGHT, 0, 0, false); //todo: check WPILibJ documentation
        SmartDashboard.putBoolean("Grab state", false);
        SmartDashboard.putBoolean("Lift state", false);
        System.out.println("RobotInit() completed. \n");
}
 
开发者ID:team1482BGHS,项目名称:Robotcode,代码行数:10,代码来源:Team1482Robot.java

示例10: ImageProcesser

import edu.wpi.first.wpilibj.camera.AxisCamera; //导入方法依赖的package包/类
public ImageProcesser(UltimateAscentRobot robot){
        super(robot);
        
        //roboRealm.
        
        driverStation = NetworkTable.getTable("SmartDashboard");
//        try {
//            NetworkTable.initialize();
//        } catch (IOException ex) {
//            ex.printStackTrace();
//        }
        
        camera = AxisCamera.getInstance("10.36.95.11");    
        camera.writeCompression(40);
        camera.writeResolution(AxisCamera.ResolutionT.k320x240);
        camera.writeExposureControl(AxisCamera.ExposureT.automatic);
        camera.writeRotation(AxisCamera.RotationT.k0);
        
        highGoal = null;
        leftMiddleGoal = null;
        rightMiddleGoal = null;
        lowGoal = null;
        leftSeparator = null;
        rightSeparator = null;
        post = null;
        bar = null;
    }
 
开发者ID:Foximus-Prime,项目名称:2013-Ultimate-Ascent-Robot,代码行数:28,代码来源:ImageProcesser.java

示例11: CameraSubsystem

import edu.wpi.first.wpilibj.camera.AxisCamera; //导入方法依赖的package包/类
public CameraSubsystem() {
//        super(kp, ki, kd);
        try {
            cam = AxisCamera.getInstance();
            cam.writeResolution(AxisCamera.ResolutionT.k320x240);
        }
        catch(Exception e) {
            cam = null;
            System.out.println("Could not connect to camera.");
        }
        cc.addCriteria(NIVision.MeasurementType.IMAQ_MT_BOUNDING_RECT_HEIGHT, MIN_HEIGHT, MAX_HEIGHT, true);
        cc.addCriteria(NIVision.MeasurementType.IMAQ_MT_BOUNDING_RECT_WIDTH, MIN_WIDTH, MAX_WIDTH, true);
//        this.setSetpoint(160);
//        this.setAbsoluteTolerance(.03);
    }
 
开发者ID:FIRST-FRC-Team-4097,项目名称:Robot-Code-2013,代码行数:16,代码来源:CameraSubsystem.java

示例12: ImageProPart

import edu.wpi.first.wpilibj.camera.AxisCamera; //导入方法依赖的package包/类
public ImageProPart(BotRunner runner){
    super(runner);
    
    AxisCamera.getInstance("10.36.95.11");
}
 
开发者ID:Foximus-Prime,项目名称:2014-Assist-Robot-Prime,代码行数:6,代码来源:ImageProPart.java

示例13: AxisCameraM1101

import edu.wpi.first.wpilibj.camera.AxisCamera; //导入方法依赖的package包/类
public AxisCameraM1101() {
    camera = AxisCamera.getInstance();
    criteriaCollection = new CriteriaCollection();
    criteriaCollection.addCriteria(NIVision.MeasurementType.IMAQ_MT_AREA, 
            AREA_MINIMUM, 65535, true);
}
 
开发者ID:bethpage-robotics,项目名称:Aerial-Assist,代码行数:7,代码来源:AxisCameraM1101.java

示例14: ShooterComputer

import edu.wpi.first.wpilibj.camera.AxisCamera; //导入方法依赖的package包/类
public ShooterComputer() {
    camera = AxisCamera.getInstance(RobotMap.CAMERA_IP);  // get an instance of the camera
    cc = new CriteriaCollection();      // create the criteria for the particle filter
    cc.addCriteria(MeasurementType.IMAQ_MT_AREA, 500, 65535, false);
    prefs = Preferences.getInstance();
}
 
开发者ID:iraiders,项目名称:2014Robot-,代码行数:7,代码来源:ShooterComputer.java

示例15: robotInit

import edu.wpi.first.wpilibj.camera.AxisCamera; //导入方法依赖的package包/类
public void robotInit() {
    camera = AxisCamera.getInstance("10.35.28.11");  // get an instance of the camera
    cc = new CriteriaCollection();      // create the criteria for the particle filter
    cc.addCriteria(MeasurementType.IMAQ_MT_AREA, AREA_MINIMUM, 65535, false);
}
 
开发者ID:Brainiac98,项目名称:2014CameraTracking,代码行数:6,代码来源:VisionSampleProject2014.java


注:本文中的edu.wpi.first.wpilibj.camera.AxisCamera.getInstance方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。