且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

添加效果的Andr​​oid摄像头preVIEW

更新时间:2023-11-16 17:01:40

您可以配置摄像头类为您提供了preVIEW缓冲区(但副本)。这是提供throuh previewBuffer回调接口。你必须实现接口,并将其设置在相机上。在preVIEW您将得到preVIEW缓冲区。 的http://developer.android.com/reference/android/hardware/Camera.$p$pviewCallback.html

You can configure camera class to provide you the preview buffer (but copies). This is provided throuh PreviewBuffer Callback interface. You have implement the interface and set it on the camera. During preview you will get the preview buffers. http://developer.android.com/reference/android/hardware/Camera.PreviewCallback.html

然后就可以在缓冲区应用自定义处理算法,并利用地面或OpenGL的表面绘制相同的。

Then you can apply custom processing algorithm on the buffer and use either Surface or opengl surface to draw the same.

Shash316