[ Capturing | Segmentation ]

HOWTO Run MultiCam SW in G9

This document describes how to run MultiCam (originally ViRoom) software in G9 and how to use its basic functions. It does not explain how to install it and it does not give full list of functions.

There are two versions of binaries, for 32-bit and 64-bit Linux PCs:

  /local/MultiCam/ViRoom/32bit/Viroom/bin
  /local/MultiCam/ViRoom/64bit/Viroom/bin

Choose version according to your computer (64-bit version does not have support for input from video streams, otherwise they should be identical). Make sure that you can ssh to machines where the cameras are connected without typing password -- ssh without password explains how to do that. ssh is used to automatically start processes (even on your computer). Make sure that no module of the system is running on any of the computers which you want to use (theoretically, reconnecting or parallel run of multiple systems working on different tasks is possible, but it'll be much easier if you don't try that). Quit VrGUI and orangutan by hitting Quit button in VrGUI. You can make alias (quite useful) for killing the rest of modules, such as:

  alias slayvi='skill -c tamarin camerad lemur; ssh popper skill -c camerad tamarin; ipcclean'

to kill the named modules on your computer and popper and clean shared memory. The system is then started by command:

  /local/MultiCam/ViRoom/32bit/Viroom/bin/orangutan -c configfile.xml

or

  /local/MultiCam/ViRoom/64bit/Viroom/bin/orangutan -c configfile.xml

The XML configuration file describes which cameras (or other input) should be used and what should be done with the images. You can change some things in VrGUI, but not all of them. In the next sections, example configuration files are given for most common tasks.

Capturing

The configuration file capturing_g9.xml (download it, it won't be displayed) should work for you with just minor changes. The list of elements and parameters that you might need to change:

  • binpath parameter in orangutan element: set directory according to your computer architecture (32-bit or 64-bit)
  • filename parameter of image: path template for saving the images, %04u substitutes for camera ID and %05d for frame number, extension can be pnm or jpg; /local/temporary/Capturing directory is a good choice, because it's on local disk of each computer in G9 -- just make sure that all the directories are empty before you start and nobody else is capturing; you have to move the the captured images to /local/MultiCam/Data/... afterwards
  • camerad elements: put one element for each computer you want to use (with different IDs); notice that if the binaries that should run on that computer are different then those set in orangutan's binpath, you have to specify binpath in camerad element (e.g. when I'm running the system from 32-bit radon, but 64-bit popper should be used for capturing as well)
  • verbose parameters: verbosity level can be adjusted from 0-3, setting low level might decrease the load a bit
  • xtermcmd="" in orangutan element: all modules will be started from the same console and their output will go to this console - use in combination with low verbosity level to reduce the mess on the screen; the drawback is that detection of errors will be impossible

If everything goes well, a lot of windows should appear after you run orangutan. If the windows start repeating line "cannot create socket for port", just wait, there's a timeout before incorrectly closed TCP socket can be used again.

The important windows are vrgui (Qt interface) and lemur (displaying camera images). All cameras attached to the computers you specified with camerad element in configfile will be detected shown in a table in vrgui. If the camera chip ID is found in the configuration file (as signature parameter in the camera element), given camera ID (cid) will be used for the camera, otherwise some strange camera ID will be assigned. Set camera parameters (better manually) to whatever you need, you can save them and load them later. Saving of images is turned on by checking the "save" checkbox. Verify that the images are appearing under the path you set in configfile.

Framerate problems and solutions

The red delay counter should show 1-2, if it starts increasing the capturing modules are not able to capture at the required speed -- decrease it or try to distribute cameras more evenly between computers (not during runtime!) or use more computers or try to save jpg instead of pnm.

If the delay counter stays low, but the framerate is lower than you have set, the central module cannot go faster -- this should be solved by unchecking the "send" checkbox. Camera images won't be displayed by lemur then, only confirmation will be sent to the central computer.

Segmentation

The configuration file segm4stereo.xml (download it, it won't be displayed) can be used for the simplest segmentation without object models using pre-recorded sequence. The parameters concerning input/output you might want to change are:

  • binpath parameters: see capturing
  • camerad element: set host to the computer which should do the segmentation - usually your own
  • camera elements: image sources - one camera element per camera, signature contains filename template (see image/filename parameter in capturing for syntax)
  • respath parameter in objdet: filename template for storing results; comment the parameter out if you only want to see the segmentation
  • downscale parameter in objdet: resolution of segmented image compared to the original image size - 0..same, 1..half, 2..quarter ...;

Then there are tracker parameters, but if the segmentation results are fine for you, there's no need to change them:

  • object_size parameter of objdet: minimal size of the object as portion of the whole image frame, 1.0 means object-less segmentation, there'll be only background or new pixels (foreground)
  • trObjFastBG element: simple background model with one Gaussian per pixel and fixed variance; you can set the variance (increase it if you see noise in background) and learning factor alpha (set to 0 for static background)
  • trObjNew element: log-probability of new object (or foreground if object_size==1.0, in that case leave dissolve at 0)

Parameters of the background and new object model can be set in vrGUI's object detection tab (however they are not written to config file, so next time they'll return to the original values). You can change what is being displayed (and saved!) with send image radio button.


Petr Doubek, doub@cmp.felk.cvut.cz