Java Code Examples for org.opencv.highgui.Highgui#CV_CAP_ANDROID_COLOR_FRAME_RGBA

The following examples show how to use org.opencv.highgui.Highgui#CV_CAP_ANDROID_COLOR_FRAME_RGBA . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: MyCameraBridgeViewBase.java    From pulse with ISC License 6 votes vote down vote up
public Mat onCameraFrame(MyCameraBridgeViewBase.CvCameraViewFrame inputFrame) {
     Mat result = null;
     switch (mPreviewFormat) {
        case Highgui.CV_CAP_ANDROID_COLOR_FRAME_RGB:
            result = mOldStyleListener.onCameraFrame(inputFrame.rgb());
            break;
        case Highgui.CV_CAP_ANDROID_COLOR_FRAME_RGBA:
            result = mOldStyleListener.onCameraFrame(inputFrame.rgba());
            break;
        case Highgui.CV_CAP_ANDROID_GREY_FRAME:
            result = mOldStyleListener.onCameraFrame(inputFrame.gray());
            break;
        default:
            Log.e(TAG, "Invalid frame format! Only RGBA and Gray Scale are supported!");
    };

    return result;
}
 
Example 2
Source File: CameraBridgeViewBase.java    From SoftwarePilot with MIT License 5 votes vote down vote up
public Mat onCameraFrame(CvCameraViewFrame inputFrame) {
     Mat result = null;
     switch (mPreviewFormat) {
        case Highgui.CV_CAP_ANDROID_COLOR_FRAME_RGBA:
            result = mOldStyleListener.onCameraFrame(inputFrame.rgba());
            break;
        case Highgui.CV_CAP_ANDROID_GREY_FRAME:
            result = mOldStyleListener.onCameraFrame(inputFrame.gray());
            break;
        default:
            Log.e(TAG, "Invalid frame format! Only RGBA and Gray Scale are supported!");
    };

    return result;
}
 
Example 3
Source File: CameraBridgeViewBase.java    From android-object-distance with Apache License 2.0 5 votes vote down vote up
public Mat onCameraFrame(CvCameraViewFrame inputFrame) {
     Mat result = null;
     switch (mPreviewFormat) {
        case Highgui.CV_CAP_ANDROID_COLOR_FRAME_RGBA:
            result = mOldStyleListener.onCameraFrame(inputFrame.rgba());
            break;
        case Highgui.CV_CAP_ANDROID_GREY_FRAME:
            result = mOldStyleListener.onCameraFrame(inputFrame.gray());
            break;
        default:
            Log.e(TAG, "Invalid frame format! Only RGBA and Gray Scale are supported!");
    };

    return result;
}
 
Example 4
Source File: CameraBridgeViewBase.java    From marvel with MIT License 5 votes vote down vote up
public Mat onCameraFrame(CvCameraViewFrame inputFrame) {
     Mat result = null;
     switch (mPreviewFormat) {
        case Highgui.CV_CAP_ANDROID_COLOR_FRAME_RGBA:
            result = mOldStyleListener.onCameraFrame(inputFrame.rgba());
            break;
        case Highgui.CV_CAP_ANDROID_GREY_FRAME:
            result = mOldStyleListener.onCameraFrame(inputFrame.gray());
            break;
        default:
            Log.e(TAG, "Invalid frame format! Only RGBA and Gray Scale are supported!");
    };

    return result;
}
 
Example 5
Source File: CameraBridgeViewBase.java    From Android-Car-duino with GNU General Public License v2.0 5 votes vote down vote up
public Mat onCameraFrame(CvCameraViewFrame inputFrame) {
     Mat result = null;
     switch (mPreviewFormat) {
        case Highgui.CV_CAP_ANDROID_COLOR_FRAME_RGBA:
            result = mOldStyleListener.onCameraFrame(inputFrame.rgba());
            break;
        case Highgui.CV_CAP_ANDROID_GREY_FRAME:
            result = mOldStyleListener.onCameraFrame(inputFrame.gray());
            break;
        default:
            Log.e(TAG, "Invalid frame format! Only RGBA and Gray Scale are supported!");
    };

    return result;
}
 
Example 6
Source File: CameraBridgeViewBase.java    From ResistorScanner with MIT License 5 votes vote down vote up
public Mat onCameraFrame(CvCameraViewFrame inputFrame) {
     Mat result = null;
     switch (mPreviewFormat) {
        case Highgui.CV_CAP_ANDROID_COLOR_FRAME_RGBA:
            result = mOldStyleListener.onCameraFrame(inputFrame.rgba());
            break;
        case Highgui.CV_CAP_ANDROID_GREY_FRAME:
            result = mOldStyleListener.onCameraFrame(inputFrame.gray());
            break;
        default:
            Log.e(TAG, "Invalid frame format! Only RGBA and Gray Scale are supported!");
    };

    return result;
}
 
Example 7
Source File: CameraBridgeViewBase.java    From effective_android_sample with Apache License 2.0 5 votes vote down vote up
public Mat onCameraFrame(CvCameraViewFrame inputFrame) {
     Mat result = null;
     switch (mPreviewFormat) {
        case Highgui.CV_CAP_ANDROID_COLOR_FRAME_RGBA:
            result = mOldStyleListener.onCameraFrame(inputFrame.rgba());
            break;
        case Highgui.CV_CAP_ANDROID_GREY_FRAME:
            result = mOldStyleListener.onCameraFrame(inputFrame.gray());
            break;
        default:
            Log.e(TAG, "Invalid frame format! Only RGBA and Gray Scale are supported!");
    };

    return result;
}