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


Java OpenCVFrameGrabber类代码示例

本文整理汇总了Java中org.bytedeco.javacv.OpenCVFrameGrabber的典型用法代码示例。如果您正苦于以下问题:Java OpenCVFrameGrabber类的具体用法?Java OpenCVFrameGrabber怎么用?Java OpenCVFrameGrabber使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


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

示例1: start

import org.bytedeco.javacv.OpenCVFrameGrabber; //导入依赖的package包/类
@Override
public void start() {
    OpenCVFrameGrabber grabberCV = new OpenCVFrameGrabber(this.systemNumber);
    grabberCV.setImageWidth(width());
    grabberCV.setImageHeight(height());
    grabberCV.setFrameRate(frameRate);
    grabberCV.setImageMode(FrameGrabber.ImageMode.COLOR);
 
    try {
        grabberCV.start();
        this.grabber = grabberCV;
        this.isConnected = true;
    } catch (Exception e) {
        System.err.println("Could not start frameGrabber... " + e);

        System.err.println("Could not camera start frameGrabber... " + e);
        System.err.println("Camera ID " + this.systemNumber + " could not start.");
        System.err.println("Check cable connection, ID and resolution asked.");

        this.grabber = null;
    }
}
 
开发者ID:poqudrof,项目名称:PapARt,代码行数:23,代码来源:CameraOpenCV.java

示例2: start

import org.bytedeco.javacv.OpenCVFrameGrabber; //导入依赖的package包/类
@Override
public void start() {
    OpenCVFrameGrabber grabberCV = new OpenCVFrameGrabber(this.systemNumber);
    grabberCV.setImageWidth(width());
    grabberCV.setImageHeight(height());
    grabberCV.setImageMode(FrameGrabber.ImageMode.COLOR);
 
    try {
        grabberCV.start();
        this.grabber = grabberCV;
        this.isConnected = true;
    } catch (Exception e) {
        System.err.println("Could not start frameGrabber... " + e);

        System.err.println("Could not camera start frameGrabber... " + e);
        System.err.println("Camera ID " + this.systemNumber + " could not start.");
        System.err.println("Check cable connection, ID and resolution asked.");

        this.grabber = null;
    }
}
 
开发者ID:poqudrof,项目名称:PapAR,代码行数:22,代码来源:CameraOpenCV.java

示例3: create

import org.bytedeco.javacv.OpenCVFrameGrabber; //导入依赖的package包/类
@Override
public FrameGrabber create(int deviceNumber) {
  // On Windows, videoInput is much more reliable for webcam capture.  On other platforms,
  // OpenCV's frame
  // grabber class works fine.
  if (StandardSystemProperty.OS_NAME.value().contains("Windows")) {
    return new VideoInputFrameGrabber(deviceNumber);
  } else {
    return new OpenCVFrameGrabber(deviceNumber);
  }
}
 
开发者ID:WPIRoboticsProjects,项目名称:GRIP,代码行数:12,代码来源:CameraSource.java

示例4: OpenCVWebCam

import org.bytedeco.javacv.OpenCVFrameGrabber; //导入依赖的package包/类
public OpenCVWebCam(int device, int width, int height) {
	this.grabber = new OpenCVFrameGrabber(device);
	grabber.setImageWidth(width);
	grabber.setImageHeight(height);
	this.setBackground(Color.LIGHT_GRAY);
}
 
开发者ID:Rohde-Schwarz-Cybersecurity,项目名称:PanBox,代码行数:7,代码来源:OpenCVWebCam.java


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