Android - show processed camera preview

寵の児 提交于 2019-12-07 20:11:02

问题


i´m trying to create some kind of AR (Augmented Reality), but i don´t know how exactly can I get preview from phone camera frame by frame, process each frame as a bitmap and than show it in my SurfaceView. My starting point is CameraPreview SDK example.

Can anybody tell me, how to:

1) get frame/bitmap from camera (i guess, i´ll need to decode picture from YUV to RGB like here: Converting preview frame to bitmap)

2) show bitmap (after processing) in a SurfaceView


回答1:


Finally, i found what i was looking for in this post: Image processing with android camera




回答2:


I would suggest you download this guy's sample program:

http://nhenze.net/?p=172

its really helpful !



来源:https://stackoverflow.com/questions/5162376/android-show-processed-camera-preview

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