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


Java CameraBridgeViewBase.setMaxFrameSize方法代码示例

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


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

示例1: onCreate

import org.opencv.android.CameraBridgeViewBase; //导入方法依赖的package包/类
@Override
public void onCreate(Bundle savedInstanceState) {
    Log.i(TAG, "called onCreate");
    super.onCreate(savedInstanceState);
    getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);

    setContentView(R.layout.activity_my);
    // get the OverlayView responsible for displaying images on top of the camera
    overlayView = (OverlayView) findViewById(R.id.overlay_view);

    mOpenCvCameraView = (CameraBridgeViewBase) findViewById(R.id.java_camera_view);
    // Michael Troger
    if (FIXED_FRAME_SIZE) {
        mOpenCvCameraView.setMaxFrameSize(FRAME_SIZE_WIDTH, FRAME_SIZE_HEIGHT);
    }
    mOpenCvCameraView.setVisibility(SurfaceView.VISIBLE);

    mOpenCvCameraView.setCvCameraViewListener(this);

    mi = new ActivityManager.MemoryInfo();
    activityManager = (ActivityManager) getSystemService(ACTIVITY_SERVICE);
}
 
开发者ID:michaeltroger,项目名称:shape-detection,代码行数:23,代码来源:MainActivity.java

示例2: onCreate

import org.opencv.android.CameraBridgeViewBase; //导入方法依赖的package包/类
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
    Log.i(TAG, "called onCreate");
    super.onCreate(savedInstanceState);
    getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);

    setContentView(R.layout.activity_main);

    mOpenCvCameraView = (CameraBridgeViewBase) findViewById(R.id.tutorial1_activity_java_surface_view);

    // Michael Troger
    if (FIXED_FRAME_SIZE) {
        mOpenCvCameraView.setMaxFrameSize(FRAME_SIZE_WIDTH, FRAME_SIZE_HEIGHT);
    }

    mOpenCvCameraView.setVisibility(SurfaceView.VISIBLE);

    mOpenCvCameraView.setCvCameraViewListener(this);
}
 
开发者ID:michaeltroger,项目名称:template-matching,代码行数:21,代码来源:MainActivity.java

示例3: onCreate

import org.opencv.android.CameraBridgeViewBase; //导入方法依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);
    getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
    askPermissions();
    JniManager.init();
    mOpenCvCameraView = (CameraBridgeViewBase) findViewById(R.id.camera_surface);
    mOpenCvCameraView.setVisibility(CameraBridgeViewBase.VISIBLE);
    mOpenCvCameraView.setMaxFrameSize(640, 480);
    mOpenCvCameraView.setCvCameraViewListener(this);
}
 
开发者ID:uelordi01,项目名称:Android-opencv-native-samples,代码行数:13,代码来源:MainActivity.java

示例4: OpenCVFrameGrabberInit

import org.opencv.android.CameraBridgeViewBase; //导入方法依赖的package包/类
public OpenCVFrameGrabberInit(CameraBridgeViewBase cameraBridgeViewBase, int frameWidthRequest, int frameHeightRequest, FrameGrabber.CameraOrientation cameraOrientation, boolean ignoreOrientationForDisplay) {
    this.cameraOrientation = cameraOrientation;
    this.ignoreOrientationForDisplay = ignoreOrientationForDisplay;

    cameraBridgeViewBase.setVisibility(SurfaceView.VISIBLE);

    cameraBridgeViewBase.setMinimumWidth(frameWidthRequest);
    cameraBridgeViewBase.setMinimumHeight(frameHeightRequest);
    cameraBridgeViewBase.setMaxFrameSize(frameWidthRequest, frameHeightRequest);
    cameraBridgeViewBase.setCvCameraViewListener(this);
}
 
开发者ID:FTC7393,项目名称:EVLib,代码行数:12,代码来源:OpenCVFrameGrabberInit.java

示例5: OpenCVFrameFeeder

import org.opencv.android.CameraBridgeViewBase; //导入方法依赖的package包/类
public OpenCVFrameFeeder(CameraBridgeViewBase cameraBridgeViewBase, int frameWidthRequest, int frameHeightRequest, FrameGrabber.CameraOrientation cameraOrientation, boolean ignoreOrientationForDisplay) {
    this.cameraOrientation = cameraOrientation;
    this.ignoreOrientationForDisplay = ignoreOrientationForDisplay;

    cameraBridgeViewBase.setVisibility(SurfaceView.VISIBLE);

    cameraBridgeViewBase.setMinimumWidth(frameWidthRequest);
    cameraBridgeViewBase.setMinimumHeight(frameHeightRequest);
    cameraBridgeViewBase.setMaxFrameSize(frameWidthRequest, frameHeightRequest);
    cameraBridgeViewBase.setCvCameraViewListener(this);
}
 
开发者ID:FTC7393,项目名称:EVLib,代码行数:12,代码来源:OpenCVFrameFeeder.java

示例6: setCamera

import org.opencv.android.CameraBridgeViewBase; //导入方法依赖的package包/类
public void setCamera(CameraBridgeViewBase openCvCameraView) {
    openCvCameraView.setVisibility(SurfaceView.VISIBLE);
    openCvCameraView.setMaxFrameSize(MAX_WIDTH, MAX_HEIGHT);
    openCvCameraView.setCvCameraViewListener(this);
}
 
开发者ID:raulh82vlc,项目名称:Image-Detection-Samples,代码行数:6,代码来源:FDOpenCVPresenter.java


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