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