org.opencv.core.Core.getTickCount()方法的使用及代码示例

x33g5p2x  于2022-01-18 转载在 其他  
字(6.0k)|赞(0)|评价(0)|浏览(130)

本文整理了Java中org.opencv.core.Core.getTickCount()方法的一些代码示例,展示了Core.getTickCount()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Core.getTickCount()方法的具体详情如下:
包路径:org.opencv.core.Core
类名称:Core
方法名:getTickCount

Core.getTickCount介绍

[英]Returns the number of ticks.

The function returns the number of ticks after the certain event (for example, when the machine was turned on). It can be used to initialize "RNG" or to measure a function execution time by reading the tick count before and after the function call. See also the tick frequency.
[中]返回刻度数。
该函数返回特定事件(例如,当机器打开时)后的滴答数。它可用于初始化“RNG”或通过读取函数调用前后的勾号计数来测量函数执行时间。另请参见滴答声频率。

代码示例

代码示例来源:origin: kongqw/OpenCVForAndroid

public void init() {
  mFramesCouner = 0;
  mFrequency = Core.getTickFrequency();
  mprevFrameTime = Core.getTickCount();
  mStrfps = "";
  mPaint = new Paint();
  mPaint.setColor(Color.BLUE);
  mPaint.setTextSize(20);
}

代码示例来源:origin: jtsky/EasyPR_Android

public void init() {
  mFramesCouner = 0;
  mFrequency = Core.getTickFrequency();
  mprevFrameTime = Core.getTickCount();
  mStrfps = "";
  mPaint = new Paint();
  mPaint.setColor(Color.BLUE);
  mPaint.setTextSize(20);
}

代码示例来源:origin: farkam135/GoIV

public void init() {
  mFramesCouner = 0;
  mFrequency = Core.getTickFrequency();
  mprevFrameTime = Core.getTickCount();
  mStrfps = "";
  mPaint = new Paint();
  mPaint.setColor(Color.BLUE);
  mPaint.setTextSize(20);
}

代码示例来源:origin: SouvDc/face-detection

public void init() {
  mFramesCouner = 0;
  mFrequency = Core.getTickFrequency();
  mprevFrameTime = Core.getTickCount();
  mStrfps = "";
  mPaint = new Paint();
  mPaint.setColor(Color.BLUE);
  mPaint.setTextSize(20);
}

代码示例来源:origin: imistyrain/EasyPR4Android

public void init() {
  mFramesCouner = 0;
  mFrequency = Core.getTickFrequency();
  mprevFrameTime = Core.getTickCount();
  mStrfps = "";
  mPaint = new Paint();
  mPaint.setColor(Color.BLUE);
  mPaint.setTextSize(20);
}

代码示例来源:origin: ctodobom/OpenCV-3.1.0-Android

public void init() {
  mFramesCouner = 0;
  mFrequency = Core.getTickFrequency();
  mprevFrameTime = Core.getTickCount();
  mStrfps = "";
  mPaint = new Paint();
  mPaint.setColor(Color.BLUE);
  mPaint.setTextSize(20);
}

代码示例来源:origin: tz28/Chinese-number-gestures-recognition

public void init() {
  mFramesCouner = 0;
  mFrequency = Core.getTickFrequency();
  mprevFrameTime = Core.getTickCount();
  mStrfps = "";
  mPaint = new Paint();
  mPaint.setColor(Color.BLUE);
  mPaint.setTextSize(20);
}

代码示例来源:origin: SOFTPOWER1991/OpenCVCheck

public void init() {
  mFramesCouner = 0;
  mFrequency = Core.getTickFrequency();
  mprevFrameTime = Core.getTickCount();
  mStrfps = "";
  mPaint = new Paint();
  mPaint.setColor(Color.BLUE);
  mPaint.setTextSize(20);
}

代码示例来源:origin: DuckDeck/AndroidDemo

public void init() {
  mFramesCouner = 0;
  mFrequency = Core.getTickFrequency();
  mprevFrameTime = Core.getTickCount();
  mStrfps = "";
  mPaint = new Paint();
  mPaint.setColor(Color.BLUE);
  mPaint.setTextSize(20);
}

代码示例来源:origin: abhn/marvel

public void init() {
  mFramesCouner = 0;
  mFrequency = Core.getTickFrequency();
  mprevFrameTime = Core.getTickCount();
  mStrfps = "";
  mPaint = new Paint();
  mPaint.setColor(Color.BLUE);
  mPaint.setTextSize(40);
}

代码示例来源:origin: InnoFang/Android-Code-Demos

public void init() {
  mFramesCouner = 0;
  mFrequency = Core.getTickFrequency();
  mprevFrameTime = Core.getTickCount();
  mStrfps = "";
  mPaint = new Paint();
  mPaint.setColor(Color.BLUE);
  mPaint.setTextSize(20);
}

代码示例来源:origin: hschott/Camdroid

public void init() {
  mFramesCouner = 0;
  mFrequency = Core.getTickFrequency();
  mprevFrameTime = Core.getTickCount();
  mStrfps = "";
  mPaint = new Paint();
  mPaint.setColor(Color.BLUE);
  mPaint.setTextSize(20);
}

代码示例来源:origin: leadrien/opencv_native_androidstudio

public void init() {
  mFramesCouner = 0;
  mFrequency = Core.getTickFrequency();
  mprevFrameTime = Core.getTickCount();
  mStrfps = "";
  mPaint = new Paint();
  mPaint.setColor(Color.BLUE);
  mPaint.setTextSize(20);
}

代码示例来源:origin: ytai/IOIOPlotter

public void init() {
  mFramesCouner = 0;
  mFrequency = Core.getTickFrequency();
  mprevFrameTime = Core.getTickCount();
  mStrfps = "";
  mPaint = new Paint();
  mPaint.setColor(Color.BLUE);
  mPaint.setTextSize(20);
}

代码示例来源:origin: akshika47/OpencvAndroid

public void init() {
  mFramesCouner = 0;
  mFrequency = Core.getTickFrequency();
  mprevFrameTime = Core.getTickCount();
  mStrfps = "";
  mPaint = new Paint();
  mPaint.setColor(Color.BLUE);
  mPaint.setTextSize(20);
}

代码示例来源:origin: KePeng1019/SmartPaperScan

public void init() {
  mFramesCouner = 0;
  mFrequency = Core.getTickFrequency();
  mprevFrameTime = Core.getTickCount();
  mStrfps = "";
  mPaint = new Paint();
  mPaint.setColor(Color.BLUE);
  mPaint.setTextSize(20);
}

代码示例来源:origin: raulh82vlc/Image-Detection-Samples

public void init() {
  mFramesCouner = 0;
  mFrequency = Core.getTickFrequency();
  mprevFrameTime = Core.getTickCount();
  mStrfps = "";
  mPaint = new Paint();
  mPaint.setColor(Color.BLUE);
  mPaint.setTextSize(20);
}

代码示例来源:origin: kongqw/OpenCVForAndroid

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);
    }
  }
}

代码示例来源:origin: leadrien/opencv_native_androidstudio

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);
    }
  }
}

代码示例来源:origin: raulh82vlc/Image-Detection-Samples

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);
    }
  }
}

相关文章

Core类方法