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.
精彩评论