User Tools

Site Tools


presentation:eec

Image Error Decoding Workstation

This workstation use a webcam to capture a live image that can be scratched and reconstructed by the demo program thanks to error coding algorithm.

THE CAPTURING DAEMON

The presentation laptop has an automatic system to capture images from a webcam connected to a usb port. These images can be used for the decoding demo running locally in the machine.

In order to simplify the displacement of the program, we have installed all the software in a laptop that is ready for use, but before starting the workstation is necessary to connect the webcam (the one normally connected to the cafeteria workstation) to one of the usb port on the computer (you can find it the rear of the laptop), else the kernel module is not loaded correctly and the webcam is unusable.

<note> If you start the laptop without the webcam connected, connect it and reboot. </note>

During the boot process the workstation will launch the program

/usr/local/bin/motion -a 1 -c 1

as root process. This is necessary so the motion program can access the webcam properly. The motion program has a configuration file

/usr/local/etc/motion.conf

where are written all the information about how the process must run.

The parameters in the command line (-a 1 -c 1) instruct the program to take a snapshot from the webcam every second. The program save the captured image as

/usr/local/gym/snapshot.ppm

This namefile is mandatory because the demo program look for exactly this file when running, so don't change it.

If you need to stop or relaunch the motion daemon you have to execute (as root):

/etc/init.d/motion.sh stop (to stop the daemon)
/etc/init.d/motion.sh start (to start the daemon)

If the motion program is stopped, the demo will show only the last image captured.

THE DEMO

The workstation boot by default in graphical mode, so you have to enter only the login/password (login: gym, password: gym) couple to enter. Once logged in you can start a terminal window by using the application bar situated in the low part of the screen or using the context menu (click of the right button in the desktop area).

the current workdir is

/usr/local/gym

and all the processes for the demo will read/write in this directory all the files they need.

To see the captured images you have to start the demo program. You can use the standard parameters just clicking on the leftmost icon of the application bar (the icon with a sort of face on it), else you have to open a terminal windows and start the program

./demo a b

a is the dimension of the image on the screen b is the number of iterations for the decoding of the image. You can try with different values.

as standard we suggest to run the program with these parameters:

./demo 3 15

The program open a graphical window where you will find an image (captured form the webcam) with 4 buttons below. Clicking on the first button on the left you can see the last image captured by the motion daemon.

<note> If you launch the demo program without parameter, the window of the program is too big for the screen of the laptop. You have to specify 3 as the first parameter, in order to use the program. </note>

You can find different images in the working directory:

Images

  • initial.ppm : is the initial image that you see when the demo program is launched.
  • snapshot.ppm : is the photo that you can see, as said above, this file is wrote by the motion daemons every time it capture a frame from the webcam.
  • notwork.ppm : is the image displayed when the decoder fail.

THE PROGRAM

You can modify and compile the program by yourself. In the working directory

/usr/local/gym

you can find all the source and launch make to compile your modifications.

<note> The Program work with the compiler gcc 3.3 on debian distribution. Go in Segmentation Fault if compiled with gcc 3.4 or above. </note>

EXTERNAL MONITOR AND BEAMERS

If you connect an external monitor you can use the key combination Fn+F5 to cycle between the monitor of the laptop and the external one. Every time you press the combination keys, the monitors are activated using this cycle line:

  • External monitor or Beamer
  • Both Monitors
  • Internal Monitor

p.s.: the Fn key is in the lower left of the laptop keyboard

presentation/eec.txt · Last modified: 2008/12/17 16:53 by damir