用于 AR 的 Android 视频流捕获
我希望能够从 Android 手机摄像头捕获视频,然后处理该视频。处理涉及向直播流添加一层 AR。这在安卓上可行吗?很确定应该是这样。
我查看了android网站[http://developer.android.com /guide/topics/media/index.html] 但这似乎与视频捕获和存储有关。我希望能够播放视频预存储。
谢谢,
I would like to be able to capture the video from an android phone camera, and then process this video. Processing involves adding a layer of AR to the live stream. Is this possible on android? Pretty sure it should be.
I have looked at the android site [http://developer.android.com/guide/topics/media/index.html] but this seems to be concerned with video capture and storage. I would like to be able to play with the video pre-storage.
Thanks,
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
根据您希望数据的实时程度,您可以使用 <代码>Camera.setPreviewCallback与
Camera.PreviewCallback#onPreviewFrame
监听来自相机的预览帧。有关使用的示例可以在 ZXing 源代码(又名条码扫描器)源代码。
Depending on how real-time you want the data to be, you can potentially use
Camera.setPreviewCallback
withCamera.PreviewCallback#onPreviewFrame
to listen for preview frames coming from the camera.An example on usage can be found in the ZXing source code (a.k.a. Barcode Scanner) source code.
我正在研究这个问题。我个人认为最好使用Android MediaRecorder中的视频流,而不是previewPicture中的视频流,因为后者只是一些样本,帧速率较低。
I am studying the problem. Personally I think it is better to use video streams from Android MediaRecorder, rather than from previewPicture, because the latter is just some samples, with lower frame rate.