Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to use a PC webcam as the emulator's camera

I'm developing a qr code reader application. How can I use my webcam as a camera to scan the qr code in the emulator ?

my SDK version is 4.3. I checked it out in developer.android site and they said that you have to select webcam0 as a back camera. I tried but it didn't work, and shows "unfortunately your app has been stopped".

like image 640
Selvarathinam Vinoch Avatar asked Dec 15 '22 07:12

Selvarathinam Vinoch


2 Answers

Follow the below steps in Eclipse.

  1. Goto -> AVD Manager
  2. Create/Edit the AVD.
  3. Hardware > New:
  4. Configures camera facing back
  5. Click on the property value and choose = "webcam0".
  6. Once done all the above the webcam should be connected. If it doesnt then you need to check your WebCam drivers.

check this answer for the image & a further link:

Here

like image 78
Ahmed Ekri Avatar answered Dec 17 '22 19:12

Ahmed Ekri


Use the Camera tab in Extended controls to add or modify Scene images. There are two image locations, one on the wall and one on the table.

To view these image locations in the scene, launch your emulator, then move the camera to the dining room area through the door behind the camera’s starting position. https://developers.google.com/ar/develop/java/emulator#add_augmented_images_to_the_scene

Sample image from my emulator: enter image description here

like image 43
ToolFan Avatar answered Dec 17 '22 20:12

ToolFan