最終更新:2017-04-04 (火) 16:49:47 (2551d)
OpenCV/Android/カメラ
インターフェイス
CameraBridgeViewBase.CvCameraViewFrame This class interface is abstract representation of single frame from camera for onCameraFrame? callback Attention: Do not use objects, that represents this interface out of onCameraFrame? callback! CameraBridgeViewBase.CvCameraViewListener Mat onCameraFrame?(Mat inputFrame) CameraBridgeViewBase.CvCameraViewListener2 Mat onCameraFrame?(CameraBridgeViewBase.CvCameraViewFrame inputFrame)
抽象クラス
org.opencv.android.CameraBridgeViewBase This is a basic class, implementing the interaction with Camera and OpenCV library.
派生クラス
org.opencv.android.JavaCameraView
- This class is an implementation of the Bridge View between OpenCV and Java Camera.
- This class is implemented inside OpenCV library. It is inherited from CameraBridgeViewBase?, that extends SurfaceView and uses standard Android camera API.
org.opencv.android.NativeCameraView
- This class is an implementation of a bridge between SurfaceView and native OpenCV camera.
- uses org.opencv.highgui.VideoCapture class as camera access back-end.
- OpenCV 3.0でなくなってる
- The other, a bit sad but inevitable news - we had to drop support for libnative_camera on Android. It used some undocumented API and never worked stable.
org.opencv.android.CameraGLSurfaceView
- draft implementation of alternative CameraBridge? via GLES?
- Camera 2 API
- OpenCV 3.1
- Support for Camera2 API in Android 5+. See opencv/samples/android/tutorial-4-opencl, the tutorial that demonstrates 3 ways of processing data from camera:
- purely CPU pipeline (3-4 fps on our test device)
- OpenCV-based using UMat and transparent API (10-13 fps on the same device)
- direct use of OpenCL (28-30fps). This is the fastest method, as you can see, because it uses OpenCL images, whereas more universal T-API has to use OpenCL buffers.
- Support for Camera2 API in Android 5+. See opencv/samples/android/tutorial-4-opencl, the tutorial that demonstrates 3 ways of processing data from camera: