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


Java NIVision.IMAQdxStopAcquisition方法代码示例

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


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

示例1: switchDirection

import com.ni.vision.NIVision; //导入方法依赖的package包/类
public static void switchDirection() {
	switch (lastSelected) {
	case "Front View":
		NIVision.IMAQdxStopAcquisition(currSession);
		currSession = sessionback;
		NIVision.IMAQdxConfigureGrab(currSession);
		Robot.drivetrain.ReverseDrive();
		lastSelected = "Back View";
		break;
	default:
	case "Back View":
		NIVision.IMAQdxStopAcquisition(currSession);
		currSession = sessionfront;
		NIVision.IMAQdxConfigureGrab(currSession);
		Robot.drivetrain.ForwardDrive();
		lastSelected = "Front View";
		break;
	case "Manual Change":
		break;
	}
}
 
开发者ID:frc3946,项目名称:Stronghold,代码行数:22,代码来源:Robot.java

示例2: operatorControl

import com.ni.vision.NIVision; //导入方法依赖的package包/类
public void operatorControl() {
    NIVision.IMAQdxStartAcquisition(session);

    /**
     * grab an image, draw the circle, and provide it for the camera server
     * which will in turn send it to the dashboard.
     */
    NIVision.Rect rect = new NIVision.Rect(10, 10, 100, 100);

    while (isOperatorControl() && isEnabled()) {

        NIVision.IMAQdxGrab(session, frame, 1);
        NIVision.imaqDrawShapeOnImage(frame, frame, rect,
                DrawMode.DRAW_VALUE, ShapeMode.SHAPE_OVAL, 0.0f);
        
        CameraServer.getInstance().setImage(frame);

        /** robot code here! **/
        Timer.delay(0.005);		// wait for a motor update time
    }
    NIVision.IMAQdxStopAcquisition(session);
}
 
开发者ID:wjaneal,项目名称:liastem,代码行数:23,代码来源:Robot.java

示例3: display

import com.ni.vision.NIVision; //导入方法依赖的package包/类
public void display() {
	NIVision.IMAQdxStartAcquisition(session);

    /**
     * grab an image, draw the circle, and provide it for the camera server
     * which will in turn send it to the dashboard.
     */
    NIVision.Rect rect = new NIVision.Rect(10, 10, 100, 100);

    //while (teleop && enabled) {
    while(enabled) {
        NIVision.IMAQdxGrab(session, frame, 1);
        NIVision.imaqDrawShapeOnImage(frame, frame, rect,
                DrawMode.DRAW_VALUE, ShapeMode.SHAPE_OVAL, 0.0f);
        
        CameraServer.getInstance().setImage(frame);

        /** robot code here! **/
        Timer.delay(0.005);		// wait for a motor update time
    }
    NIVision.IMAQdxStopAcquisition(session);
}
 
开发者ID:FRC-Team-3140,项目名称:FRC-2016,代码行数:23,代码来源:DriveCam.java

示例4: toggle

import com.ni.vision.NIVision; //导入方法依赖的package包/类
public void toggle(){
	if(currentSession == sessionBack){
		NIVision.IMAQdxStopAcquisition(sessionBack);
		NIVision.IMAQdxCloseCamera(sessionBack);
		sessionFront = NIVision.IMAQdxOpenCamera(RobotMap.FRONT_CAMERA, IMAQdxCameraControlMode.CameraControlModeController);
		NIVision.IMAQdxConfigureGrab(sessionFront);
		NIVision.IMAQdxStartAcquisition(sessionFront);
		currentSession = sessionFront;	
	}else if(currentSession == sessionFront){
		NIVision.IMAQdxStopAcquisition(sessionFront);
		NIVision.IMAQdxCloseCamera(sessionFront);
		sessionBack = NIVision.IMAQdxOpenCamera(RobotMap.BACK_CAMERA, IMAQdxCameraControlMode.CameraControlModeController);
		NIVision.IMAQdxConfigureGrab(sessionBack);
		NIVision.IMAQdxStartAcquisition(sessionBack);
		currentSession = sessionBack;
	}	
}
 
开发者ID:FRC4131,项目名称:FRCStronghold2016,代码行数:18,代码来源:Cameras.java

示例5: updateCamera

import com.ni.vision.NIVision; //导入方法依赖的package包/类
public void updateCamera() {
	
	if (frame == null || currSession == 0)
		return;
	
	String cameraSelected = (String) cameraSelector.getSelected();
	NIVision.IMAQdxGrab(currSession, frame, 1);
	CameraServer.getInstance().setImage(frame);

	if (cameraSelected == lastSelected) {
		return;
	}
	switch (cameraSelected) {
	case "Front View":
		NIVision.IMAQdxStopAcquisition(currSession);
		currSession = sessionfront;
		NIVision.IMAQdxConfigureGrab(currSession);
		Robot.drivetrain.ForwardDrive();
		lastSelected = "Front View";
		break;
	default:
	case "Back View":
		NIVision.IMAQdxStopAcquisition(currSession);
		currSession = sessionback;
		NIVision.IMAQdxConfigureGrab(currSession);
		Robot.drivetrain.ReverseDrive();
		lastSelected = "Back View";
		break;
	case "Manual Change":
		break;
	}
}
 
开发者ID:frc3946,项目名称:Stronghold,代码行数:33,代码来源:Robot.java

示例6: stopCapture

import com.ni.vision.NIVision; //导入方法依赖的package包/类
public synchronized void stopCapture() {
  if (m_id == -1 || !m_active)
    return;
  NIVision.IMAQdxStopAcquisition(m_id);
  NIVision.IMAQdxUnconfigureAcquisition(m_id);
  m_active = false;
}
 
开发者ID:trc492,项目名称:Frc2016FirstStronghold,代码行数:8,代码来源:USBCamera.java

示例7: setVideoEnabled

import com.ni.vision.NIVision; //导入方法依赖的package包/类
public void setVideoEnabled(boolean enabled)
{
    if (cameraServer != null)
    {
        if (enabled)
        {
            NIVision.IMAQdxStartAcquisition(usbCamSession);
        }
        else
        {
            NIVision.IMAQdxStopAcquisition(usbCamSession);
        }
        videoEnabled = enabled;
    }
}
 
开发者ID:trc492,项目名称:Frc2016FirstStronghold,代码行数:16,代码来源:Robot.java

示例8: resetAcquisition

import com.ni.vision.NIVision; //导入方法依赖的package包/类
private void resetAcquisition(){
	if (!broken){
		try{
			NIVision.IMAQdxStopAcquisition(getCurrentSession());
			NIVision.IMAQdxUnconfigureAcquisition(getCurrentSession());
		}catch (VisionException v){broken=true;pushError(v);}
	}
}
 
开发者ID:Millerbots,项目名称:FRC2549-2016,代码行数:9,代码来源:CameraSubsystem.java


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