开发者

surfaceView combine with view

开发者 https://www.devze.com 2023-03-21 14:58 出处:网络
I am developing game with face recognition,I have a surface-view and View inside the surface vi开发者_如何转开发ew I capture camera frames and above it have view to recognize the faces and draw them,

I am developing game with face recognition,I have a surface-view and View

inside the surface vi开发者_如何转开发ew I capture camera frames and above it have view to recognize the faces and draw them, the thing is it's working but to slowly, I was thinking about using AsyncTask but am not sure it could help, because as far as i know Views are drawn in UI thread and surface-view are drawn in a separate thread


Make sure that you don't do the same error as I did with using a Camera.PictureCallback instead of a Camera.PreviewCallback. Methods using the Camera.PictureCallback will capture a full picture of several megapixels, while Camera.PreviewCallback methods will return a picture small enough to be used on your screen.

Usually you will not have processing power enough to process a full Camera.PictureCallback for each frame.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号