Java Code Examples for org.opencv.core.Core#getTickCount()

The following examples show how to use org.opencv.core.Core#getTickCount() . 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: FpsMeter.java    From VIA-AI with MIT License 8 votes vote down vote up
public void measure() {
    if (!mIsInitialized) {
        init();
        mIsInitialized = true;
    } else {
        mFramesCounter++;
        if (mFramesCounter % STEP == 0) {
            long time = Core.getTickCount();
            double fps = STEP * mFrequency / (time - mprevFrameTime);
            mprevFrameTime = time;
            if (mWidth != 0 && mHeight != 0)
                mStrfps = FPS_FORMAT.format(fps) + " FPS@" + Integer.valueOf(mWidth) + "x" + Integer.valueOf(mHeight);
            else
                mStrfps = FPS_FORMAT.format(fps) + " FPS";
            Log.i(TAG, mStrfps);
        }
    }
}
 
Example 2
Source File: FpsMeter.java    From ml-authentication with Apache License 2.0 6 votes vote down vote up
public void measure() {
    if (!mIsInitialized) {
        init();
        mIsInitialized = true;
    } else {
        mFramesCouner++;
        if (mFramesCouner % STEP == 0) {
            long time = Core.getTickCount();
            double fps = STEP * mFrequency / (time - mprevFrameTime);
            mprevFrameTime = time;
            if (mWidth != 0 && mHeight != 0)
                mStrfps = FPS_FORMAT.format(fps) + " FPS@" + Integer.valueOf(mWidth) + "x" + Integer.valueOf(mHeight);
            else
                mStrfps = FPS_FORMAT.format(fps) + " FPS";
            Log.i(TAG, mStrfps);
        }
    }
}
 
Example 3
Source File: FpsMeter.java    From MOAAP with MIT License 6 votes vote down vote up
public void measure() {
    if (!mIsInitialized) {
        init();
        mIsInitialized = true;
    } else {
        mFramesCouner++;
        if (mFramesCouner % STEP == 0) {
            long time = Core.getTickCount();
            double fps = STEP * mFrequency / (time - mprevFrameTime);
            mprevFrameTime = time;
            if (mWidth != 0 && mHeight != 0)
                mStrfps = FPS_FORMAT.format(fps) + " FPS@" + Integer.valueOf(mWidth) + "x" + Integer.valueOf(mHeight);
            else
                mStrfps = FPS_FORMAT.format(fps) + " FPS";
            Log.i(TAG, mStrfps);
        }
    }
}
 
Example 4
Source File: FpsMeter.java    From MOAAP with MIT License 6 votes vote down vote up
public void measure() {
    if (!mIsInitialized) {
        init();
        mIsInitialized = true;
    } else {
        mFramesCouner++;
        if (mFramesCouner % STEP == 0) {
            long time = Core.getTickCount();
            double fps = STEP * mFrequency / (time - mprevFrameTime);
            mprevFrameTime = time;
            if (mWidth != 0 && mHeight != 0)
                mStrfps = FPS_FORMAT.format(fps) + " FPS@" + Integer.valueOf(mWidth) + "x" + Integer.valueOf(mHeight);
            else
                mStrfps = FPS_FORMAT.format(fps) + " FPS";
            Log.i(TAG, mStrfps);
        }
    }
}
 
Example 5
Source File: FpsMeter.java    From SimpleDocumentScanner-Android with MIT License 6 votes vote down vote up
public void measure() {
    if (!mIsInitialized) {
        init();
        mIsInitialized = true;
    } else {
        mFramesCouner++;
        if (mFramesCouner % STEP == 0) {
            long time = Core.getTickCount();
            double fps = STEP * mFrequency / (time - mprevFrameTime);
            mprevFrameTime = time;
            if (mWidth != 0 && mHeight != 0)
                mStrfps = FPS_FORMAT.format(fps) + " FPS@" + Integer.valueOf(mWidth) + "x" + Integer.valueOf(mHeight);
            else
                mStrfps = FPS_FORMAT.format(fps) + " FPS";
            Log.i(TAG, mStrfps);
        }
    }
}
 
Example 6
Source File: FpsMeter.java    From real_time_circle_detection_android with MIT License 6 votes vote down vote up
public void measure() {
    if (!mIsInitialized) {
        init();
        mIsInitialized = true;
    } else {
        mFramesCouner++;
        if (mFramesCouner % STEP == 0) {
            long time = Core.getTickCount();
            double fps = STEP * mFrequency / (time - mprevFrameTime);
            mprevFrameTime = time;
            if (mWidth != 0 && mHeight != 0)
                mStrfps = FPS_FORMAT.format(fps) + " FPS@" + Integer.valueOf(mWidth) + "x" + Integer.valueOf(mHeight);
            else
                mStrfps = FPS_FORMAT.format(fps) + " FPS";
            Log.i(TAG, mStrfps);
        }
    }
}
 
Example 7
Source File: FpsMeter.java    From OpenCV-android with Apache License 2.0 6 votes vote down vote up
public void measure() {
    if (!mIsInitialized) {
        init();
        mIsInitialized = true;
    } else {
        mFramesCouner++;
        if (mFramesCouner % STEP == 0) {
            long time = Core.getTickCount();
            double fps = STEP * mFrequency / (time - mprevFrameTime);
            mprevFrameTime = time;
            if (mWidth != 0 && mHeight != 0)
                mStrfps = FPS_FORMAT.format(fps) + " FPS@" + Integer.valueOf(mWidth) + "x" + Integer.valueOf(mHeight);
            else
                mStrfps = FPS_FORMAT.format(fps) + " FPS";
            Log.i(TAG, mStrfps);
        }
    }
}
 
Example 8
Source File: FpsMeter.java    From FTCVision with MIT License 6 votes vote down vote up
public void measure() {
    if (!mIsInitialized) {
        init();
        mIsInitialized = true;
    } else {
        mFramesCouner++;
        if (mFramesCouner % STEP == 0) {
            long time = Core.getTickCount();
            double fps = STEP * mFrequency / (time - mprevFrameTime);
            mprevFrameTime = time;
            if (mWidth != 0 && mHeight != 0)
                mStrfps = FPS_FORMAT.format(fps) + " FPS@" + Integer.valueOf(mWidth) + "x" + Integer.valueOf(mHeight);
            else
                mStrfps = FPS_FORMAT.format(fps) + " FPS";
            Log.i(TAG, mStrfps);
        }
    }
}
 
Example 9
Source File: FpsMeter.java    From pasm-yolov3-Android with GNU General Public License v3.0 6 votes vote down vote up
public void measure() {
    if (!mIsInitialized) {
        init();
        mIsInitialized = true;
    } else {
        mFramesCouner++;
        if (mFramesCouner % STEP == 0) {
            long time = Core.getTickCount();
            double fps = STEP * mFrequency / (time - mprevFrameTime);
            mprevFrameTime = time;
            if (mWidth != 0 && mHeight != 0)
                mStrfps = FPS_FORMAT.format(fps) + " FPS@" + Integer.valueOf(mWidth) + "x" + Integer.valueOf(mHeight);
            else
                mStrfps = FPS_FORMAT.format(fps) + " FPS";
            Log.i(TAG, mStrfps);
        }
    }
}
 
Example 10
Source File: FpsMeter.java    From sudokufx with Apache License 2.0 6 votes vote down vote up
public void measure() {
    if (!mIsInitialized) {
        init();
        mIsInitialized = true;
    } else {
        mFramesCouner++;
        if (mFramesCouner % STEP == 0) {
            long time = Core.getTickCount();
            double fps = STEP * mFrequency / (time - mprevFrameTime);
            mprevFrameTime = time;
            if (mWidth != 0 && mHeight != 0)
                mStrfps = FPS_FORMAT.format(fps) + " FPS@" + Integer.valueOf(mWidth) + "x" + Integer.valueOf(mHeight);
            else
                mStrfps = FPS_FORMAT.format(fps) + " FPS";
            Log.i(TAG, mStrfps);
        }
    }
}
 
Example 11
Source File: FpsMeter.java    From PixaToon with GNU General Public License v3.0 5 votes vote down vote up
public void init() {
    mFramesCouner = 0;
    mFrequency = Core.getTickFrequency();
    mprevFrameTime = Core.getTickCount();
    mStrfps = "";

    mPaint = new Paint();
    mPaint.setColor(Color.BLUE);
    mPaint.setTextSize(20);
}
 
Example 12
Source File: FpsMeter.java    From MOAAP with MIT License 5 votes vote down vote up
public void init() {
    mFramesCouner = 0;
    mFrequency = Core.getTickFrequency();
    mprevFrameTime = Core.getTickCount();
    mStrfps = "";

    mPaint = new Paint();
    mPaint.setColor(Color.BLUE);
    mPaint.setTextSize(20);
}
 
Example 13
Source File: FpsMeter.java    From Document-Scanner with GNU General Public License v3.0 5 votes vote down vote up
public void init() {
    mFramesCouner = 0;
    mFrequency = Core.getTickFrequency();
    mprevFrameTime = Core.getTickCount();
    mStrfps = "";

    mPaint = new Paint();
    mPaint.setColor(Color.BLUE);
    mPaint.setTextSize(20);
}
 
Example 14
Source File: FpsMeter.java    From Machine-Learning-Projects-for-Mobile-Applications with MIT License 5 votes vote down vote up
public void init() {
    mFramesCouner = 0;
    mFrequency = Core.getTickFrequency();
    mprevFrameTime = Core.getTickCount();
    mStrfps = "";

    mPaint = new Paint();
    mPaint.setColor(Color.BLUE);
    mPaint.setTextSize(20);
}
 
Example 15
Source File: FpsMeter.java    From real_time_circle_detection_android with MIT License 5 votes vote down vote up
public void init() {
    mFramesCouner = 0;
    mFrequency = Core.getTickFrequency();
    mprevFrameTime = Core.getTickCount();
    mStrfps = "";

    mPaint = new Paint();
    mPaint.setColor(Color.BLUE);
    mPaint.setTextSize(20);
}
 
Example 16
Source File: FpsMeter.java    From FtcSamples with MIT License 5 votes vote down vote up
public void init() {
    mFramesCouner = 0;
    mFrequency = Core.getTickFrequency();
    mprevFrameTime = Core.getTickCount();
    mStrfps = "";

    mPaint = new Paint();
    mPaint.setColor(Color.BLUE);
    mPaint.setTextSize(20);
}
 
Example 17
Source File: FpsMeter.java    From Chinese-number-gestures-recognition with BSD 2-Clause "Simplified" License 5 votes vote down vote up
public void init() {
    mFramesCouner = 0;
    mFrequency = Core.getTickFrequency();
    mprevFrameTime = Core.getTickCount();
    mStrfps = "";

    mPaint = new Paint();
    mPaint.setColor(Color.BLUE);
    mPaint.setTextSize(20);
}
 
Example 18
Source File: FpsMeter.java    From AndroidDocumentScanner with MIT License 5 votes vote down vote up
public void init() {
    mFramesCouner = 0;
    mFrequency = Core.getTickFrequency();
    mprevFrameTime = Core.getTickCount();
    mStrfps = "";

    mPaint = new Paint();
    mPaint.setColor(Color.BLUE);
    mPaint.setTextSize(20);
}
 
Example 19
Source File: FpsMeter.java    From MOAAP with MIT License 5 votes vote down vote up
public void init() {
    mFramesCouner = 0;
    mFrequency = Core.getTickFrequency();
    mprevFrameTime = Core.getTickCount();
    mStrfps = "";

    mPaint = new Paint();
    mPaint.setColor(Color.BLUE);
    mPaint.setTextSize(20);
}
 
Example 20
Source File: FpsMeter.java    From SoftwarePilot with MIT License 5 votes vote down vote up
public void init() {
    mFramesCouner = 0;
    mFrequency = Core.getTickFrequency();
    mprevFrameTime = Core.getTickCount();
    mStrfps = "";

    mPaint = new Paint();
    mPaint.setColor(Color.BLUE);
    mPaint.setTextSize(20);
}