List of usage examples for org.opencv.core Core getTickCount
public static long getTickCount()
From source file:org.gearvrf.ipbsample.SampleViewManager.java
License:Apache License
@Override public void onInit(GVRContext arg0) throws Throwable { GVRScene gvrScene = arg0.getNextMainScene(new Runnable() { @SuppressWarnings("deprecation") @Override//w w w .j ava 2 s . c o m public void run() { initializeCamera(); // initializeSensors(); // initializeLocation(); imageFreq = Core.getTickFrequency(); imageTime = Core.getTickCount(); } }); bitmapTexture = new GVRBitmapTexture(arg0, bitmap); GVRSceneObject cameraObject = new GVRSceneObject(arg0, arg0.createQuad(5.3333f, 3.0f), bitmapTexture); cameraObject.getTransform().setPosition(0.0f, 0.0f, -4.0f); gvrScene.getMainCameraRig().addChildObject(cameraObject); }
From source file:org.gearvrf.ipbsample.SampleViewManager.java
License:Apache License
private void setFps() { ++imageCount;//w ww. j a v a 2 s.co m if (imageCount % imageStep == 0) { long time = Core.getTickCount(); imageFps = Math.round(imageStep * imageFreq / (time - imageTime) * 100.0) / 100.0; imageTime = time; } }