本文整理汇总了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;
}
});
}
示例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();
}
示例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();
}
示例4: startOpenCV
import org.opencv.android.CameraBridgeViewBase; //导入方法依赖的package包/类
public void startOpenCV(CameraBridgeViewBase.CvCameraViewListener2 cameraViewListener) {
FtcRobotControllerActivity.turnOnCameraView.obtainMessage(1,cameraViewListener).sendToTarget();
}
示例5: startOpenCV
import org.opencv.android.CameraBridgeViewBase; //导入方法依赖的package包/类
public void startOpenCV(CameraBridgeViewBase.CvCameraViewListener2 cameraViewListener) {
FtcRobotControllerActivity.turnOnCameraView.obtainMessage(1, cameraViewListener).sendToTarget();
}
示例6: initOpenCV
import org.opencv.android.CameraBridgeViewBase; //导入方法依赖的package包/类
/**
* Inits OpenCV lib.
*
* @param listener CvCameraViewListener2.
*/
void initOpenCV(CameraBridgeViewBase.CvCameraViewListener2 listener);