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


Java USBCamera.openCamera方法代码示例

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


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

示例1: startAutomaticCapture

import edu.wpi.first.wpilibj.vision.USBCamera; //导入方法依赖的package包/类
/**
 * Start automatically capturing images to send to the dashboard.
 *
 * You should call this method to just see a camera feed on the dashboard
 * without doing any vision processing on the roboRIO. {@link #setImage}
 * shouldn't be called after this is called.
 *
 * @param cameraName The name of the camera interface (e.g. "cam1")
 */
public void startAutomaticCapture(String cameraName) {
  try {
    USBCamera camera = new USBCamera(cameraName);
    camera.openCamera();
    startAutomaticCapture(camera);
  } catch (VisionException ex) {
    //DriverStation.reportError(
       // "Error when starting the camera: " + cameraName + " " + ex.getMessage(), true);
  }
}
 
开发者ID:FRC2832,项目名称:Robot_2016,代码行数:20,代码来源:CameraServer2832.java

示例2: startCamera

import edu.wpi.first.wpilibj.vision.USBCamera; //导入方法依赖的package包/类
/**
 * Start automatically capturing images to send to the dashboard.
 *
 * You should call this method to just see a camera feed on the dashboard
 * without doing any vision processing on the roboRIO. {@link #setImage}
 * shouldn't be called after this is called.
 *
 * @param cameraName The name of the camera interface (e.g. "cam1")
 */
private USBCamera startCamera(String cameraName) {
  try {
    USBCamera camera = new USBCamera(cameraName);
    camera.openCamera();
    //startAutomaticCapture(camera);
    return camera;
  } catch (VisionException ex) {
    DriverStation.reportError(
        "Error when starting the camera: " + cameraName + " " + ex.getMessage(), true);
  }
  return null;
}
 
开发者ID:MontclairRobotics,项目名称:Sprocket,代码行数:22,代码来源:CameraServers.java

示例3: startAutomaticCapture

import edu.wpi.first.wpilibj.vision.USBCamera; //导入方法依赖的package包/类
/**
 * Start automatically capturing images to send to the dashboard.
 *
 * You should call this method to just see a camera feed on the dashboard
 * without doing any vision processing on the roboRIO. {@link #setImage}
 * shouldn't be called after this is called.
 *
 * @param cameraName The name of the camera interface (e.g. "cam1")
 */
public void startAutomaticCapture(String cameraName) {
  try {
    USBCamera camera = new USBCamera(cameraName);
    camera.openCamera();
    startAutomaticCapture(camera);
  } catch (VisionException ex) {
    DriverStation.reportError(
        "Error when starting the camera: " + cameraName + " " + ex.getMessage(), true);
  }
}
 
开发者ID:trc492,项目名称:Frc2016FirstStronghold,代码行数:20,代码来源:CameraServer.java


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