Android Eclipse 模拟器上的相机:

发布于 2024-09-10 05:20:54 字数 89 浏览 1 评论 0原文

我的笔记本电脑盖子上没有嵌入式摄像头。我将通过外部 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

放飞的风筝 2024-09-17 05:20:54

在当前版本的模拟器(Ice Cream Sandwich、API14;Linux)中,提供了网络摄像头支持。谷歌的文档和网络上提供的大多数答案尚未反映这一点。模拟器本身可以:

emulator -help
...
-fake-camera <mode>      set fake camera emulation mode
-webcam name=<name>[,dir=<direction>] setup web camera emulation
...
emulator -help-all

以及进一步:

选项 -fake_camera 的帮助

使用 -fake-camera来控制假相机模拟。
<模式> 的有效值是:

off   -> disable fake camera emulation
back  -> fake camera is facing back
front -> fake camera is facing front

选项 -webcam

  • -webcam off 的帮助以禁用网络摄像头模拟。
  • -webcam list 列出可用于模拟的网络摄像头。
  • -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:

emulator -help
...
-fake-camera <mode>      set fake camera emulation mode
-webcam name=<name>[,dir=<direction>] setup web camera emulation
...
emulator -help-all

and further:

help for option -fake_camera

Use -fake-camera <mode> to control fake camera emulation.
Valid values for <mode> are:

off   -> disable fake camera emulation
back  -> fake camera is facing back
front -> fake camera is facing front

help for option -webcam

  • -webcam off to disable web camera emulation.
  • -webcam list to list web cameras available for emulation.
  • -webcam name=[,dir=<direction>] to setup parameters for web camera emulation.

    • <name> platform-independent name identifying emulated camera device.
    • <direction> defines direction the camera is facing. Valid values are:

      • front -> emulate camera as facing front
      • back -> emulate camera as facing back

        Default direction value for emulated web camera is 'front'

枫以 2024-09-17 05:20:54

无论如何,模拟器都不会显示实时摄像头。

如果您需要在自己的应用程序中使用实时相机源进行调试,可以在以下位置找到解决方案
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

最冷一天 2024-09-17 05:20:54

是时候升级您的 ADK 了!

从 Android SDK 版本 14 开始,模拟器支持网络摄像头来模拟相机:

一般说明 - 向 Android 4.0 或更高版本平台添加了网络摄像头支持,以便在存在一个网络摄像头时模拟后置摄像头,并在存在两个网络摄像头时模拟后置和前置摄像头。网络摄像头支持仅适用于 Windows 和 Linux。 Mac 支持将在以后的版本中提供。

来自:Android SDK 工具,SDK 工具,修订版 14

它有效!我自己也试过这个。

Time to upgrade your ADK!

As of Android SDK version 14, the emulator supports webcams to simulate a camera:

General notes - Added webcam support to Android 4.0 or later platforms to emulate rear-facing cameras when one webcam is present, and to emulate both rear-facing and front-facing cameras when two webcams are present. Webcam suport is for Windows and Linux only. Mac support will come in a later release.

from: Android SDK Tools, SDK Tools, Revision 14

It works! I've tried this myself.

挽清梦 2024-09-17 05:20:54

来自安卓文档:

模拟器限制

在此版本中,以下限制
模拟器包括:

...

不支持相机/视频捕获

...

换句话说,不,您无法在模拟器中访问或预览相机。

From the android documentation:

Emulator Limitations

In this release, the limitations of
the emulator include:

...

No support for camera/video capture

...

In other words, no, you cannot access or preview the camera in the emulator.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文