mirror of
https://github.com/opencv/opencv.git
synced 2025-06-12 20:42:53 +08:00
Report resolution together with FPS in JavaCamera2View.
This commit is contained in:
parent
903b66906e
commit
b1441c9d6a
@ -321,6 +321,10 @@ public class JavaCamera2View extends CameraBridgeViewBase {
|
|||||||
}
|
}
|
||||||
createCameraPreviewSession();
|
createCameraPreviewSession();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (mFpsMeter != null) {
|
||||||
|
mFpsMeter.setResolution(mFrameWidth, mFrameHeight);
|
||||||
|
}
|
||||||
} catch (RuntimeException e) {
|
} catch (RuntimeException e) {
|
||||||
throw new RuntimeException("Interrupted while setCameraPreviewSize.", e);
|
throw new RuntimeException("Interrupted while setCameraPreviewSize.", e);
|
||||||
}
|
}
|
||||||
|
@ -54,6 +54,7 @@ public class FpsMeter {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void setResolution(int width, int height) {
|
public void setResolution(int width, int height) {
|
||||||
|
Log.d(TAG, "FpsMeter.setResolution " + Integer.valueOf(mWidth) + "x" + Integer.valueOf(mHeight));
|
||||||
mWidth = width;
|
mWidth = width;
|
||||||
mHeight = height;
|
mHeight = height;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user