使用Android摄像头没有表面观 [英] Use Android Camera without surface View
本文介绍了使用Android摄像头没有表面观的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我开发在Android上,我想用照相机(过程像素的值)做出头,但只是在后台,是有可能做到这一点没有表面的看法?只使用一个缓冲区读取像素的值并做处理。 感谢每个人都可以帮助我
I'm developing on android, i want to do somethings with camera (process pixels's values), but just in background, is it possible to do it without surface view? just use a buffer to read pixels's values and do processing. thanks for every one can help me
推荐答案
我一直在寻找一个答案,这一段时间。我发现它在那里,这里复制的便利。
I've been looking for an answer to this for a while. I found it there, copied here for convenience.
HTTP://handy$c$cworks.com/ P = 19
基本上,我们只需要创建一个虚拟SurfaceView(它的工作原理,甚至内部的服务),并用它来拍照功能。
Basically, let's just create a dummy SurfaceView (it works even inside a Service), and use it for Camera functions.
SurfaceView view = new SurfaceView(this);
c.setPreviewDisplay(view.getHolder());
c.startPreview();
c.takePicture(shutterCallback, rawPictureCallback, jpegPictureCallback);
这篇关于使用Android摄像头没有表面观的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文