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


Java CameraBridgeViewBase.CvCameraViewListener2方法代码示例

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


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

示例1: init

import org.opencv.android.CameraBridgeViewBase; //导入方法依赖的package包/类
/**
 * Initializes the OpenCVPipeline.
 * @param context the application context, usually hardwareMap.appContext
 * @param viewDisplay the ViewDisplay that will display the underlying JavaCameraView to the screen;
 *                    in most cases, using CameraViewDisplay.getInstance() as the argument is just fine.
 * @param cameraIndex The index of the camera to use. On every FTC-legal phone (afaik) 0 is the back camera, and 1 is the front camera.
 */
public void init(Context context, final ViewDisplay viewDisplay, final int cameraIndex) {
    this.initStarted = true;
    this.viewDisplay = viewDisplay;
    this.context = context;
    final Activity activity = (Activity) context;
    final Context finalContext = context;
    final CameraBridgeViewBase.CvCameraViewListener2 self = this;
    activity.runOnUiThread(new Runnable() {
        @Override
        public void run() {
            // JCVs must be instantiated on a UI thread
            cameraView = new JavaCameraView(finalContext, cameraIndex);

            cameraView.enableFpsMeter();

            cameraView.setOnClickListener(new View.OnClickListener() {
                @Override
                public void onClick(View view) {
                    viewIndex++;
                }
            });

            cameraView.setCameraIndex(cameraIndex);
            cameraView.setCvCameraViewListener(self);
            inited = true;
        }
    });
}
 
开发者ID:GTHSRobotics,项目名称:DogeCV,代码行数:36,代码来源:OpenCVPipeline.java

示例2: startOpenCV

import org.opencv.android.CameraBridgeViewBase; //导入方法依赖的package包/类
public void startOpenCV(CameraBridgeViewBase.CvCameraViewListener2 cameraViewListener) {
    if (FtcRobotControllerActivity.mOpenCvCameraView.isEnabled())
        FtcRobotControllerActivity.mOpenCvCameraView.disableView();
    FtcRobotControllerActivity.turnOnCameraView.obtainMessage().sendToTarget();
    FtcRobotControllerActivity.mOpenCvCameraView.setCvCameraViewListener(cameraViewListener);
    FtcRobotControllerActivity.mOpenCvCameraView.enableView();
}
 
开发者ID:SCHS-Robotics,项目名称:Team9261-2017-2018,代码行数:8,代码来源:OpenCVPractice.java

示例3: startOpenCV

import org.opencv.android.CameraBridgeViewBase; //导入方法依赖的package包/类
public void startOpenCV(CameraBridgeViewBase.CvCameraViewListener2 cameraViewListener) {
    if (FtcRobotControllerActivity.mOpenCvCameraView.isEnabled()) {
        FtcRobotControllerActivity.mOpenCvCameraView.disableView();
    }
    FtcRobotControllerActivity.turnOnCameraView.obtainMessage().sendToTarget();
    FtcRobotControllerActivity.mOpenCvCameraView.setCvCameraViewListener(cameraViewListener);
    FtcRobotControllerActivity.mOpenCvCameraView.enableView();
}
 
开发者ID:SCHS-Robotics,项目名称:Team9261-2017-2018,代码行数:9,代码来源:GyroTestRed.java

示例4: startOpenCV

import org.opencv.android.CameraBridgeViewBase; //导入方法依赖的package包/类
public void startOpenCV(CameraBridgeViewBase.CvCameraViewListener2 cameraViewListener) {
    FtcRobotControllerActivity.turnOnCameraView.obtainMessage(1,cameraViewListener).sendToTarget();
}
 
开发者ID:SCHS-Robotics,项目名称:Team9261-2017-2018,代码行数:4,代码来源:Calibration.java

示例5: startOpenCV

import org.opencv.android.CameraBridgeViewBase; //导入方法依赖的package包/类
public void startOpenCV(CameraBridgeViewBase.CvCameraViewListener2 cameraViewListener) {
    FtcRobotControllerActivity.turnOnCameraView.obtainMessage(1, cameraViewListener).sendToTarget();
}
 
开发者ID:SCHS-Robotics,项目名称:Team9261-2017-2018,代码行数:4,代码来源:DubtapeV3M2.java

示例6: initOpenCV

import org.opencv.android.CameraBridgeViewBase; //导入方法依赖的package包/类
/**
 * Inits OpenCV lib.
 *
 * @param listener CvCameraViewListener2.
 */
void initOpenCV(CameraBridgeViewBase.CvCameraViewListener2 listener);
 
开发者ID:davidmigloz,项目名称:go-bees,代码行数:7,代码来源:MonitoringContract.java


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