Input Parameter

InputMode (/IM=1)

Range of values [0-10]
Determination of the search strategy for images and videos:
0: Only one single image pair will be corrected. The program uses the indicated file name(s) StereoFileName (if StereoImageInput = 1) or LeftFileName and RightFileName (if StereoImageInput = 2).
1: Searches in the directory PathofImages for the files <name_s.*> (if StereoImageInput = 1) or for all files <name_l.*> and <name_r.*> (if StereoImageInput = 2), to correct them individually one after another.
2: Scans and corrects all files in the directory PathofImages including all subdirectories.
3: Video mode: The left and right image sequences are expected to be stored into separate subdirectories PathofImages\l\ and PathofImages\r\ for StereoImageInput = 2 and into the subdirectory PathofImages\s\, if StereoImageInput = 1. The images are mounted together in their alphabetical sequences. In a first run, the images are only analyzed and then, in a second run, they are all corrected with the same evaluated error values. See also parameter InterlacedMode.
4: "Unnamed": All images of the directory PathofImages will be mounted in the alphabetical ordering. If images are left-right separated, the following ordering is used (1-2), (3-4), (5-6), (7-8).
5: "Adjacent": Make sense only for left-right separated images. All images of the directory PathofImages will be mounted in the alphabetical ordering (1-2), (2-3), (3-4), (4-5) etc.
6: "Bracketing": Make sense only for left-right separated images. All images of the directory PathofImages will be mounted in the alphabetical ordering (1-2), (3-2), (3-4), (5-4) etc.
7: "First-to-all": Make sense only for left-right separated images. All images of the directory PathofImages will be mounted in the alphabetical ordering (1-2), (1-3), (1-4), (1-5) etc.
8: "Every-pair": Make sense only for left-right separated images. All images of the directory PathofImages will be mounted in the alphabetical ordering (1-2), (1-3), (1-4), (1-5)...; (2-3), (2-4), (2-5)...; (3-4), (3-5)... etc.
9: Left and right images are expected to be stored in separate subdirectories \l\ and \r\. Images formats with both views in one file (SBS, SBSQ, MPO) are expected to be stored in the subdirectory PathofImages\s\. The images are mounted together in their alphabetical sequences.
Below the folder PathofImages, there may exist one further level of subdirectories, for example, the following structure of folders will be supported:
  [Ireland]
    - [2007.09.18_Dublin]
      - [l] left images
      - [r] right images
    - [2007.09.19_Newgrange]
      - [l] left images 
      - [r] right images
    - [2007.09.20_MountSteward]
      - [l] left images 
      - [r] right images
    - [<further subdirectories>]
  
With this example, you have to set: PathofImages = "Ireland".

10: The images, which should be mounted, can be indicated by supplying a file with the name given by ListofImages (default: cosima_files.txt). In each line of this file the names of the two images are to be given - separated by blanks. If one of the filenames content any spaces, both names have to be written with apostrophes. Example:
image_1_l.jpg   image_1_r.jpg (right)
"image_2_l.jpg"   "image_2_r.jpg" (also right)
image 3_l.jpg   image 3_r.jpg (wrong due to spaces)
"image 3_l.jpg"   "image 3_r.jpg" (so it's right)
"image 3_l.jpg"   image_3_r.jpg (again wrong, missing aprostrohes)
"image 3_l.jpg"  "image_3_r.jpg" (right)
image_2_l.jpg   image_2_r.jpg OK (will not be processed due to OK)
image_2_l.jpg   image_2_r.jpg QU (will not be processed due to QU)

Only images without an "OK" and without an "QU" at the end of the line will be processed!

Please attention:

  • With the InputModi 1 and 2, the resulting images get the following file name format: <name>_<nnn>_c<x>.<end>. The meaning of <nnn> is the evaluated deviation in promille relatively to the image width (so a value of 1/30 is related to 33 promille, 1 promille = 0.1 percent), <x> stands for [l,r,s,a] meaning [left, right, stereo, anaglyph], and <end> is the file ending indicating the image file format.
  • With the modi 4-9, the resulting images get the following file name format: <left name>-<right name>_<nnn>_c<x>.<end>. Same meaning as above.
  • For the VideoMode the original left image names are taken unaltered (if InterlacedMode = 0) or a new counter will be attached to the original left image names (if InterlacedMode ≠ 0). Tn this case, all digits of the original names are replaced by a "#".
  • With the modi 3-9 the parameter ImageType will be used for setting the file format.
  • With the Modi 1-9, a file with the name given from ListofImages (default: cosima_files.txt) will be written including a list with all processed image pairs.
    After a successful correction, an "OK"is written behind the image names. Subsequently, this file can be used as an input file with InputMode = 10. At this, only those image pairs will be processed again, which have got no "OK" at the end of the line!
  • If the parameter EstimateGeometry is set equal to 2 (and using InputMode = 10), Cosima reads all correction parameters from the file ListofImages and corrects the image with these values. In that case, only images with an OK entry are considered. The parameter EstimateWindow is not further evaluated for that operation.

IncludeSubdirs (/IN=0)

Range of values [0,1,2]
Include optionally subdirectories. The InputMode = 2 is redundant using that parameter, but will be kept anyway due to compatibility reasons.
0: Without subdirectories.
1: Using subdirectories, but without \cl, \cr, \ca, \cs, \lo and \ro. With that parameter value, you can supress images, which are generated by Cosima.
2: Using all subdirectories.
The meaning of this parameter with different InputModi:
InputModus = 0: IncludeSubdirs is irrelevant
InputModus = 1: IncludeSubdirs will be set to 0.
InputModus = 2: IncludeSubdirs may be set to 1 or 2.
InputModus = 3: IncludeSubdirs is irrelevant
InputModus = 4-8: IncludeSubdirs may be set to 1, 2 or 3.
InputModus = 9: IncludeSubdirs considers only 1 level of subdirectories!
InputModus = 10: IncludeSubdirs is irrelevant.
The subdirectories will not be mixed, but will be processed separately.

PathofImages (/PM=.\)

Range of values: characters
Directory, where the image files are stored. The path can be given as a 'relative path' (e.g. "images", ".\images\" or "..\images" with ".\" aims to the current path) or as an 'absolute path' (e.g. "D:\holiday\images"). With the parameter RootDirectory the root of the relative paths can be choosen. Only evaluated with InputMode 1-9.

RootDirectory (/RD=0)

Range of values [0,1,2]
Root directory for relative path of images. This parameter chooses the root directory, if PathofImages is a relative path.
0: The root directory is the path of the ini-file.
1: The root directory is the path of cosima.exe.
2: The root directory is the current path. Attention: Using the user interface Cosima Gui, it will be set RootDirectory = 0.

ImageType (/IT=tif;bmp;tga;jpg;mpo)

Range of values: characters
File format filter for the search modes InputMode = 3-9. It is possible to input different ending types, separated with a semicolon. Cosima supports the most of the usual file formats. Some exceptions (like *.psd) will be converted silently by IrfanView in the background.

ExifTimeTolerance (/TT=0)

Range of values [0-86399]
Time tolerance for image pairing. If that parameter is activated and the Inputmodi is 4-9, only such single images are paired together, which have got the same difference value of their shooting times. For that, the first image pair of every subdirectory is used as a reference pair and only such images are paired with a shooting times difference not exceeding the shooting times difference of the reference pair by the value of ExifTimeTolerance. For every subdirectory a new reference pair is taken. For the evaluation of the shooting time, the key Exif.DateTimeOriginal will be written from the images (only jpg- and tif-images).
If the shooting time difference of a pair of images exceeds the tolerated value, the orphaned image will be find-out by evaluating the shooting times and the image counter will be incremented for that directory. Using the parameter RenameOrphans, all found orphaned images can be marked and renamed.
0: This functionality is deactivated, all images are paired.
1-86399: Tolerance time in seconds. A recommended combination may be: InputMode = 9, ExifTimeTolerance = 3 and RenameOrphans = 1.

Hint I: Huge directories with lots of images need processing times for the EXIF time reading of several minutes. Using the external program exiv2.exe, this processing time can be reduced by a factor of two to three. For that, only the files exiv2.exe and libexpat.dll are to be copied into the Cosima directory. Cosima checks the existence of these files and switches from internal to external EXIF time reading method. You may download the two files from: http://www.exiv2.org/download.html.
Hint II: With the help of Exiv2, also CR2 files can be paired.

RenameOrphans (/RO=0)

Range of values [0-4]
Renaming control of orphan images. If orphaned images are found using the parameter ExifTimeTolerance, these images can be renamed with RenameOrphans. Only InputMode = 9.
0: without renaming
1: move left orphaned images into the subdirectory '\lo' and right orphaned images into the subdirectory '\ro'.
2: append the suffixes '_lo' respectively '_ro' to the file names, this will keep the sorting order within the directory
3: precede the prefix '_' to the file names of orphaned images, these images will be ordered to the top
4: precede the prefix 'z' to the file names, these images will be ordered to the bottom

RenameRefused (/RU=0)

Range of values [0-2]
Renaming control of refused images. Images, which Cosima cannot mount automatically, may moved into subfolders using this parameter. Only for InputMode = 9.
0: without renaming
1: move left images into the subdirectory '\lu' and the right images into the subdirectory '\ru'.
2: append the suffixes '_lu' respectively '_ru' to the file names, this will keep the sorting order within the directory.

LeftFileName (/LF=image_l.jpg)

Range of values: characters
File name of the left image including the ending (if StereoImageInput = 2).

RightFileName (/RF=image_r.jpg)

Range of values: characters
File name of the right image including the ending (if StereoImageInput = 2).

StereoFileName (/SF=image_s.jpg)

Range of values: characters
File name of the side-by-side mounted stereo image including the ending (if StereoImageInput = 1).

StereoImageInput (/SI=2)

Range of values [1,2]
Selection,if two single images or one stereoimage as input:
1: Expects either a side-by-side mounted stereo image or MPO format. Only for InputMode 0-4, 9 and 10.
2: Expects two separate files, one for the left image and one for the right image as input.
Attention: When MPO images are opened, they are automatically splittet and stored as jpg images \l\<name>_mpo_l.jpg and \r\<name>_mpo_r.jpg. These temporary files will not be removed (and can be used otherwise), if EstimateGeometry = 0,3,4.
3: Expects a horizontally squeezed side-by-side mounted stereo image. Only for InputMode 0-4, 9 and 10.

InverseInput (/II=0)

Range of values [0,1]
Changes left and right input image:
0: Expects a sidecorrect mounting of the stereo image and accordingly a left-right sorting with the unnamed modes.
1: Expects inverse mounting of the stereo image (left/right exchanged) and accordingly a right-left sorting with the unnamed mode. Should be set with "*.jps."-files.

RotMirInputLeft (/RL=0)

Wertebereich [0-7]
Range of values [0-7]
Rotates and mirrors the left input. With this parameter it is possible to rotate and mirror the left input image. This would be necesarry, if one camera has been mounted upside down e.g.
0: No input rotation/mirroring at all.
1: Rotation by +90 degree (no mirroring).
2: Rotation +180 degree (no mirroring).
3: Rotation +270 degree (no mirroring).
4: Horizontal mirroring (left-right).
5: Rotation +90 degree and horizontal mirroring.
6: Vertical mirroring (same as rotation +180 degree and horizontal mirror).
7: Rotation by +270 degree and horizontal mirroring.
-1: The Exif:Orientation key will be evaluated and applied to the image.

RotMirInputRight (/RR=0)

Range of values [0-7]
Rotates and mirrors the right input. With this parameter it is possible to rotate and mirror the right input image. This would be necesarry, if one camera has been mounted upside down e.g..
0: No input rotation/mirroring at all.
1: Rotation by +90 degree (no mirroring).
2: Rotation +180 degree (no mirroring).
3: Rotation +270 degree (no mirroring).
4: Horizontal mirroring (left-right).
5: Rotation +90 degree and horizontal mirroring.
6: Vertical mirroring (same as rotation +180 degree and horizontal mirror).
7: Rotation by +270 degree and horizontal mirroring.
-1: The Exif:Orientation key will be evaluated and applied to the image.

Examples:

Left camera up-side down: RotMirInputLeft = 2, RotMirInputRight = 0; Macro mirror box (CoMirrorBox): RotMirInputLeft = 6, RotMirInputRight = 0; Tri-Delta: RotMirInputLeft = 1, RotMirInputRight = 3, InverseInput = 1 (use also PassePartout = 6!)

CroppInput (/CP=0)

Range of values [0,1,2]
0: To input images of different sizes a frame will be appended to get equal sized images. The color of the frames is set by PasseColor. All image pixels, which have the same color as PasseColor, are changed by a minimum amount.
1: Input images of different sizes will be cropped to get equal sized images.
2: The smaller image will be scaled-up. That functionality is useful for images with strongly different scalings after cutting-out the same image content from both images.

Passepartout (/PP=0)

Range of values [0-6]
Tell Cosima whether image has frames or not, for scanned slides use 4!
0: No passepartout frame will be used.
1: A passepartout frame will be used. This means, that all pixels are mentioned as non-image pixels, which possess the color of PasseColor. They will be ignored during the analysis of the image, but may be added at the resulting images, if desired. Attention: PassePartout = 1 is only suitable for monochromatic edges!
2 As 1, with an automatic recognition of the framing colors with ignoring the parameters of PasseColor. All four edges are estimated individually. Attention: PassePartout = 2 is only suitable for monochromatic edges!
3: A passepartout with a rectangle frame (of color PasseColor) will be assumed, which should be automatically recognized and suppressed. The image will be cropped from this frame.
4 As 3, with an automatic recognition of the framing colors with ignoring the parameters of PasseColor. All four edges are estimated individually. This is the preferred setting for scanned slides.
5: A passepartout frame will be used, but with the information, which pixels are passepartout pixels, is not get from the image itself but from two separate passepartout files with the identifications <name_l_pass.bmp> and <name_r_pass.bmp>. These files must have the same sizes as <name_l.bmp> and <name_r.bmp>.
6: The input images are cropped with masks, which are defined with the following mask parameters, all units are percent:
LeftImageStartx: With the left image the left edge to cut in percent.
LeftImageStarty: With the left image the lower edge to cut in percent.
LeftImageWidth: With the left image the image width in percent.
LeftImageHeight: With the left image the image height in percent.
RightImageStartx: With the right image the left edge to cut in percent. With already side-by-side mounted input images, RightImageStartx will start at the middle of the image.
RightImageStarty: With the right image the lower edge to cut in percent.
RightImageWidth: With the right image the image width in percent.
RightImageHeight: With the right image the image height in percent.

Hint: If the automatic cropping crops too less of the edges, then the value of PasseTolerance must be enhanced, if it is cropped too much, then PasseTolerance must be reduced.

PasseColorRed (/PR=0)

Range of values [0,255]
Only relevant for Passepartout = 1 and 3: Red color value of the passepartout frame.

PasseColorGreen (/PG=0)

Range of values [0,255]
Only relevant for Passepartout = 1 and 3: Green color value of the passepartout frame.

PasseColorBlue (/PB=0)

Range of values [0,255]
Only relevant for Passepartout = 1 and 3: Blue color value of the passepartout frame.

PasseTolerance (/PT=60)

Range of values [0,255]
Tolerance threshold for frame recognition. With PassePartout = 1-4, the passepartout frame has to be extracted from the original image by the program. For that, the program wanders from the outer image boarder to the middle of the image. The edge of the passepartout frame is located exactely at that point, where on that way the color of the image pixel differs more than the value of PasseTolerance from PasseColor (if Passepartout = 1/3) or the value of the estimated color (if Passepartout = 2/4) .

PasseOutput (/PO=0)

Range of values [0,1]
Control the output of recogniced frame. This parameter makes only sense with PassePartout = 1,2,3,4, when the passepartout frame is estimated automatically by the program.
0: No control output.
1: As a control, the estimated passepartout frames are written as files <name>_l_pass_used.bmp and <name>_r_pass_used.bmp.