Esoc495 fa21 tutorial

From Sidiprojects Wiki
Jump to navigation Jump to search


  • You will need a computer with a camera attached (a laptop with a builtin camera is acceptable, or any computer with a USB camera).
  • You will need the extension pack to use your camera. To get it, first find your version of virtualbox by going to "Help -> About Virtualbox" (on the Mac, you need to go to the menu item called "VirtualBox" to see "About Virtualbox", if I recall correctly). You should see this:

Esoc488 fa18 get version.png

Look in this box for your version number. If you recently downloaded virtualbox, then you have 6.1.26; get the right extension pack from here. Otherwise You can find older extension packs here.

  • You should be able to double-click the extension pack file to have Virtualbox open and install it (be sure that you don't have an VM's running when you do this).

Importing the appliance

  • Download the appliance file if you haven't already from here.
  • Once the extension pack is installed, try to run the Info_Privacy_VM_OpenCV appliance. Once the window opens and it starts to boot, click Devices -> Webcam and select your video camera (it should show a checkbox with a "tick" in it when you've selected the camera). If you don't see your camera there (and have one connected), close the appliance window (select "Power off the Machine" when prompted). In the Virtualbox Manager, click "Settings" and select USB -> USB 2.0 (EHCI) Controller.

Inside the virtualbox program, select File -> Import appliance, then select the appliance file that you saved. (You don't need to decompress it, just select the .tar.gz file itself).

Booting into the VM

Double click the VM that now appears in virtualbox to boot it. You will eventually reach this screen:

Esoc488 fa18 first screen.png

Press the space bar once to show the screen that asks for a password, which looks like this

Login screen.png

The password for the user account 'nemo' is 'outis'. The password for 'root' is 'toor.' Type in 'outis' to authenticate.

Select from the top menu Devices -> Webcams and select your camera (there should be a check mark inside the box next to your camera's name). Test it by clicking the word 'Activities' in the upper-left of the Debian desktop, typing in 'Cheese' and pressing enter. Your laptop camera should come on, like this:

File:Esoc488 fa18 testing webcam w cheese.webm

Testing OpenCV

Again click the word 'Activities' in the upper-left of the Debian desktop, but now type in 'terminal' and press enter. Navigate to the OpenCV subdirectory at /home/nemo/opencv-3.0.0/samples/python2/, and run the example python script for face detection, called ',' as in this video:

File:Esoc488 fa18 testing opencv.webm