Android video stream capture for AR

自闭症网瘾萝莉.ら 提交于 2019-12-05 06:04:06

问题


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,


回答1:


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.

An example on usage can be found in the ZXing source code (a.k.a. Barcode Scanner) source code.




回答2:


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.



来源:https://stackoverflow.com/questions/2326523/android-video-stream-capture-for-ar

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!