Android Eclipse 模拟器上的相机:
我的笔记本电脑盖子上没有嵌入式摄像头。我将通过外部 USB 摄像头进行连接。
模拟器运行时可以识别这个吗?我会实时显示 AVD 皮肤屏幕内的图像吗?
I don't have an embedded camera in the lid of my notebook. I'd be hooking up through an external USB camera.
The emulator runtime can pick this up right? I'll get the image displayed inside the AVD skin's screen in real time?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
在当前版本的模拟器(Ice Cream Sandwich、API14;Linux)中,提供了网络摄像头支持。谷歌的文档和网络上提供的大多数答案尚未反映这一点。模拟器本身可以:
以及进一步:
选项 -fake_camera 的帮助
使用 -fake-camera 来控制假相机模拟。
<模式> 的有效值是:
选项 -webcam
-webcam name=[,dir=] 设置网络摄像头模拟的参数。
返回 ->模拟相机朝后
模拟网络摄像头的默认方向值为“前”
In the current release of the emulator (Ice Cream Sandwich, API14;Linux), web camera support is available. Google's documentation and most answers available on the web do not yet reflect this. The emulator itself does:
and further:
help for option -fake_camera
Use -fake-camera <mode> to control fake camera emulation.
Valid values for <mode> are:
help for option -webcam
-webcam name=[,dir=<direction>] to setup parameters for web camera emulation.
<direction> defines direction the camera is facing. Valid values are:
back -> emulate camera as facing back
Default direction value for emulated web camera is 'front'
无论如何,模拟器都不会显示实时摄像头。
如果您需要在自己的应用程序中使用实时相机源进行调试,可以在以下位置找到解决方案
http://www.tomgibara.com/android/camera-source
已针对较新的 Android 进行更新版本:
http://www.inter-fuser .com/2009/09/live-camera-preview-in-android-emulator.html
Afaik the emulator wont show a realtime camera regardless.
If you need a live camera-source to use in your own app for debugging, there is a sollution at
http://www.tomgibara.com/android/camera-source
Updated for newer android versions:
http://www.inter-fuser.com/2009/09/live-camera-preview-in-android-emulator.html
是时候升级您的 ADK 了!
从 Android SDK 版本 14 开始,模拟器支持网络摄像头来模拟相机:
来自:Android SDK 工具,SDK 工具,修订版 14
它有效!我自己也试过这个。
Time to upgrade your ADK!
As of Android SDK version 14, the emulator supports webcams to simulate a camera:
from: Android SDK Tools, SDK Tools, Revision 14
It works! I've tried this myself.
来自安卓文档:
...
不支持相机/视频捕获
...
换句话说,不,您无法在模拟器中访问或预览相机。
From the android documentation:
...
No support for camera/video capture
...
In other words, no, you cannot access or preview the camera in the emulator.