本文整理汇总了Java中com.ni.vision.NIVision.IMAQdxStartAcquisition方法的典型用法代码示例。如果您正苦于以下问题:Java NIVision.IMAQdxStartAcquisition方法的具体用法?Java NIVision.IMAQdxStartAcquisition怎么用?Java NIVision.IMAQdxStartAcquisition使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.ni.vision.NIVision
的用法示例。
在下文中一共展示了NIVision.IMAQdxStartAcquisition方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: 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);
}
示例2: 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);
}
示例3: 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;
}
}
示例4: startCapture
import com.ni.vision.NIVision; //导入方法依赖的package包/类
public synchronized void startCapture() {
if (m_id == -1 || m_active)
return;
NIVision.IMAQdxConfigureGrab(m_id);
NIVision.IMAQdxStartAcquisition(m_id);
m_active = true;
}
示例5: 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;
}
}
示例6: selectCamera
import com.ni.vision.NIVision; //导入方法依赖的package包/类
public void selectCamera(boolean id){
if (!broken){
try{
if (doneInit) resetAcquisition();
NIVision.IMAQdxConfigureGrab(getSession(id));
NIVision.IMAQdxStartAcquisition(getSession(id));
initilizedCamera = id;
doneInit=true;
}catch (VisionException v){broken=true;pushError(v);}
}
}