edu.wpi.first.wpilibj.Relay.Direction的实例源码

项目:STEAMworks    文件VisionTest.java   
public Visiontest() {
        UsbCamera camera = CameraServer.getInstance().startAutomaticCapture(); // cam0 by default
        camera.setResolution(IMG_WIDTH,IMG_HEIGHT);
        camera.setBrightness(0);
//      camera.setExposureManual(100);
        camera.setExposureAuto();

        CvSource cs= CameraServer.getInstance().putVideo("name",IMG_WIDTH,IMG_HEIGHT);

        visionThread = new VisionThread(camera,new gripPipeline(),pipeline -> {
            Mat IMG_MOD = pipeline.hslThresholdOutput();
            if (!pipeline.filterContoursOutput().isEmpty()) {
                //Rect recCombine = Imgproc.boundingRect(pipeline.filterContoursOutput().get(0));
                Rect recCombine = computeBoundingRectangle(pipeline.filterContoursOutput());
                if (recCombine == null) {
                    targetDetected = false;
                    return;
                }
                targetDetected = true;
                computeCoords(recCombine);
                synchronized (imgLock) {
                    centerX = recCombine.x + (recCombine.width / 2);
                }

                Imgproc.rectangle(IMG_MOD,new Point(recCombine.x,recCombine.y),new Point(recCombine.x + recCombine.width,recCombine.y + recCombine.height),new Scalar(255,20,0),5);

            } else {
                targetDetected = false;
            }

            cs.putFrame(IMG_MOD);
        });

        visionThread.start();
        Relay relay = new Relay(RobotMap.RELAY_CHANNEL,Direction.kForward);
        relay.set(Relay.Value.kOn);
        //this.processImage();
    }
项目:2013_drivebase_proto    文件WsRelay.java   
public WsRelay(int moduleNumber,int channel,Direction direction)
{
    relay = new Relay(moduleNumber,channel,direction);
}
项目:2014_software    文件WsRelay.java   
public WsRelay(int moduleNumber,direction);
}
项目:2013_robot_software    文件WsRelay.java   
public WsRelay(int moduleNumber,direction);
}

相关文章

买水果
比较全面的redis工具类
gson 反序列化到多态子类
java 版本的 mb_strwidth
JAVA 反转字符串的最快方法,大概比StringBuffer.reverse()性...
com.google.gson.internal.bind.ArrayTypeAdapter的实例源码...