Using a Webcam

With the Emulator, you can host a webcam just like a device camera.

Before running the application, install a USB-connected webcam or embedded webcam on your machine. On Linux, the webcam feature uses libv4l-0. If you do not have it on your machine, this feature does not work properly. You can check the feature status with the following command:

$ dpkg -l | grep libv4l-0

Note
  • The webcam must support video4linux2. (Currently, only '/dev/video0' is supported.)
  • Multiple instances of the Emulator can be launched, but only a single Emulator instance can use the camera feature.
  • Depending on the webcam in use, the Emulator camera feature may not work properly.

The following table lists the host webcam features.

Table: Webcam features
Feature Detail Notes
FPS 30 fps -
Preview image format YUYV
I420
YV12
-
Capture image format YUYV
I420
YV12
JPEG
-
Preview resolution QSIF: 160 x 120
QCIF: 176 x 144
QVGA: 320 x 240
CIF: 352 x 288
VGA: 640 x 480
-
Capture resolution QSIF: 160 x 120
QCIF: 176 x 144
QVGA: 320 x 240
CIF: 352 x 288
VGA: 640 x 480
-
Attributes Brightness
Contrast
Unsupported attributes can return an error. For example, the camera_start_focusing() method returns an error.

Where to Go Next