Starting Cosima

The kernel program Cosima is a command line program, which is started with an inifile including all parameters. There are several different possibilities to start Cosima:

Using the graphical user interface Cosima Gui:
The easiest way to start Cosima is from the user interface Cosima Gui (yellow start button). The user interface allows a comfortable setting of all the parameter values and the administration of many parameter inifiles. You will find more help for the Gui here.

Double clicking an inifile:
After you have bound the ending *.ini to cosima_gui.exe (mark any inifile - right mouse button - Open with ... - Choose standard program - check Cosima Gui, tick "Always ..." - OK) the Cosima Gui will open, if you double click an inifile and this inifile will be loaded.

Inifile send to ... Cosima Gui
Mark Inifile - right mouse button - Senden to ... - Cosima Gui will open a new instance of the Cosima Gui and loads the inifile. Inifiles may be also loaded into an already opened Cosima Gui per drag-and-drop.

Inifile send to ... Cosima:
Inifiles can also be sended directly to Cosima: Mark inifile - right mouse button - Send to ... - Cosima. This will start Cosima at once without using the Cosima Gui.

Images send to ... Cosima Gui:
Mark one or two images - right mouse button - Send to ... - Cosima Gui will start the GUI and will also set the parameters LeftFileName, RightFileName respectively StereoFileName and InputMode = 0.

Images send to ... Cosima:
Mark one or two images - right mouse button - Send to ... - Cosima will start at once the correction process of the image or the image pair.

One or two directories send to ... Cosima Gui:
Mark one or two directories - right mouse button - Send to ... - Cosima Gui will start to process the whole directory. With one directory, you will be asked, whether the directory contains stereoimages (SBS, MPO, RGBD, SmartPhone) or named unnamed left-right images.or named or unnamed left-right images. For more details please see "Drag and drop".

Drag and drop on the Cosima Gui:
The following cases are distinguished:
Dropping an ini file on the Cosima Gui: The ini file is loaded.
Drop an image on the Cosima Gui: The parameters InputMode (= 0), PathofImages, StereoFilename and StereoImageInput are set. RGBD images (StereoImageInput = 6) are recognized by the extension "_RGBD" and SmartPhone images (StereoImageInput = 7) by the embedded depth mask, otherwise StereoImageInput = 1 is set.
Drop two images on the Cosima Gui: The parameters InputMode (= 0), PathofImages, Left/RightFilename and StereoImageInput are set: StereoImageInput = 2 for left/right separated images, StereoImageInput = 5 if the endings "_RGB" and "_D" are recognized.
Drop a directory on the Cosima Gui: A query takes place. The options are:
  • Unordered stereo images: The parameters InputMode (= 4), PathofImages and StereoImageInput are set. RGBD images (StereoImageInput = 6) are recognized by the extension "_RGBD" and SmartPhone images (StereoImageInput = 7) by the embedded depth mask, otherwise StereoImageInput = 1 is set.
  • Unnamed single images: The parameters InputMode (= 4), PathofImages and StereoImageInput (= 2) are set. If the images are RGB and depth images, the parameter StereoImageInput must be set to 5 manually.
  • Named single images: The parameters InputMode (= 1), PathofImages and StereoImageInput are set. If the endings "_L and _R" are recognized, StereoImageInput= 2 will be set, if the images are RGB and depth images and the endings "_RGB" and "_D" are recognized, the parameter StereoImageInput is set to 6.
Drop two directories on the Cosima Gui (they must be "~\l" and "~\r" directories): The parameters InputMode (= 9), PathofImages and StereoImageInput are set: if the endings "_RGB" and "_D" are recognized, StereoImageInput = 5, otherwise StereoImageInput = 2 for left-right separated images.

Batchfile:
The use of batch files is recommended not only for advanced users! With the help of batch files, a number of Cosima runs can be started automatically. For that, create at first a batchfile with the ending *.bat and write one command line for each Cosima call. The syntax for one Cosima call is:
C:\Cosima\Cosima.exe <inidatei> /<parameter>=<value>.
With <inidatei> is the inifile used for all Cosima runs (you have to create it before with the GUI) and /<parameter>=<value> will set a specific parameter to a specific parameter value. To identify the parameter, the two-letter-shortname must applied here.

Example: Assuming, you want to compare all 6 possible anaglyph methods at the same time. At first, create an inifile anaglyph.ini containing all your wanted parameter settings. Then, create a batch file, e.g. use the name anaglyph.bat for that, and write the following lines into it:
C:\Cosima\Cosima.exe anaglyph.ini /EG=3 /AT=0 /ID=_0
C:\Cosima\Cosima.exe anaglyph.ini /EG=4 /AT=1 /ID=_1
C:\Cosima\Cosima.exe anaglyph.ini /EG=4 /AT=2 /ID=_2
C:\Cosima\Cosima.exe anaglyph.ini /EG=4 /AT=3 /ID=_3
C:\Cosima\Cosima.exe anaglyph.ini /EG=4 /AT=4 /ID=_4
C:\Cosima\Cosima.exe anaglyph.ini /EG=4 /AT=5 /ID=_5
In that example, three parameters are given additionally: EstimateGeometry (EG), AnaglyphType (AT) and IdentOutputDir (ID): The values given here will overrule the values given in the inifile, the values in the inifile doesn't care!
  • EstimateGeometry is set = 3 in the first run, elsewhere it is set = 4. So, the geometric image errors will be estimated and stored only in the first run and will be re-used for the other runs.
  • AnaglyphType get all 6x values from 0 to 5.
  • IdentOutputDir is set to avoid overwriting the resulting images at every run. In this example, the images from the 6 runs will be stored into 6 different subdirectories.
Finally, the job will be started with a double click on the file anaglyph.bat.