當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。