间`opencv.android.JavaCameraView`和`opencv.android.NativeCameraView`的区别是什么 [英] What is the difference between `opencv.android.JavaCameraView` and `opencv.android.NativeCameraView`

查看:1008
本文介绍了间`opencv.android.JavaCameraView`和`opencv.android.NativeCameraView`的区别是什么的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Exacly作为主题表示:在 opencv.android.JavaCameraView opencv.android.NativeCameraView 。什么是优势之一比其他的主要的,它提供了更多的选择吗?

Exacly as stated in the subject: What is the difference between opencv.android.JavaCameraView and opencv.android.NativeCameraView. What are advantages one over the other, the main ones, which gives more options?

推荐答案

在<一个href="http://docs.opencv.org/doc/tutorials/introduction/android_binary_package/dev_with_OCV_on_Android.html?highlight=nativecameraview">OpenCV文档:

org.opencv.android.JavaCameraView 类OpenCV库内部实现的。它是由 CameraBridgeViewBase 继承,扩展 SurfaceView ,并使用标准的Andr​​oid摄像头API。或者您可以使用 org.opencv.android.NativeCameraView 类,实现相同的接口,但使用 VideoCapture 类摄像头访问后端。 的OpenCV:show_fps =真正的的OpenCV:camera_id =任何选项使FPS信息,并允许使用任何相机设备。应用程序试图使用相机背面第一。

The org.opencv.android.JavaCameraView class is implemented inside OpenCV library. It is inherited from CameraBridgeViewBase, that extends SurfaceView and uses standard Android camera API. Alternatively you can use org.opencv.android.NativeCameraView class, that implements the same interface, but uses VideoCapture class as camera access back-end. opencv:show_fps="true" and opencv:camera_id="any" options enable FPS message and allow to use any camera on device. Application tries to use back camera first.

CvCameraViewListener 接口的实现可以让你从帧摄像机抓取后其在屏幕上绘制之前添加的处理步骤。最重要的功能是 onCameraFrame 。这是回调函数,它被称为从摄像头获取的帧。回调输入的 CvCameraViewFrame 是重新从相机presents框架类的对象。

Implementation of CvCameraViewListener interface allows you to add processing steps after frame grabbing from camera and before its rendering on screen. The most important function is onCameraFrame. It is callback function and it is called on retrieving frame from camera. The callback input is object of CvCameraViewFrame class that represents frame from camera.

这篇关于间`opencv.android.JavaCameraView`和`opencv.android.NativeCameraView`的区别是什么的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆