简体   繁体   English

AR的Android视频流捕获

[英]Android video stream capture for AR

I would like to be able to capture the video from an android phone camera, and then process this video. 我希望能够从Android手机摄像头捕获视频,然后处理此视频。 Processing involves adding a layer of AR to the live stream. 处理涉及向直播流添加AR层。 Is this possible on android? 这可能在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. 我查看了android网站[ http://developer.android.com/guide/topics/media/index.html],但这似乎与视频捕获和存储有关。 I would like to be able to play with the video pre-storage. 我希望能够播放视频预存储。

Thanks, 谢谢,

Depending on how real-time you want the data to be, you can potentially use Camera.setPreviewCallback with Camera.PreviewCallback#onPreviewFrame to listen for preview frames coming from the camera. 根据您希望数据的实时性,您可以将Camera.setPreviewCallbackCamera.PreviewCallback#onPreviewFrame一起使用来侦听来自摄像头的预览帧。

An example on usage can be found in the ZXing source code (aka Barcode Scanner) source code. 有关使用的示例可以在ZXing源代码 (又名条形码扫描器)源代码中找到。

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. 我个人认为最好使用Android MediaRecorder的视频流,而不是使用previewPicture,因为后者只是一些样本,帧速率较低。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM