Documentation

Imatest INI Reference

This page is a reference for the INI files used to store Imatest settings, particularly imatest-v2.ini, which is the basis of ini files used to control Imatest IT. It focuses on INI file settings that are used by several modules and are of interest to users of Imatest IT and the Functional Interface. Settings for Rescharts and Multicharts, which were formerly stored in separate INI files, are omitted.

New in Imatest 4.2:  imatest.ini, multicharts.ini, and rescharts.ini have been merged into imatest-v2.ini, which supports non-Latin characters (Asian languages) using escape sequences. Changes are described in INI file format changes in 4.2.

New in Imatest 3.10:  You can control Imatest with files other than the default imatest.ini by clicking Select INI file (in the INI File Settings dropdown or the Manage Settings window. This can be particularly valuable for testing control files for Imatest IT.

Imatest-v2.ini, the other INI files used by Imatest, and utilities for manipulating Imatest INI files are described in detail in Saved Settings. Only the key points will be covered here.

To keep this document to a reasonable length, the INI references for Imatest IT modules are stored in their own files:

Blemish Detect INI Reference

SFRplus INI Reference

The contents of INI files are of less importance to users of Imatest Master (and other GUI-based versions) because they are set in the Settings windows (dialog boxes) and when image files are read and cropped, so that users rarely need to view or edit them.

We strongly recommend that Imatest IT users have a copy of Imatest Master (or other GUI-based Imatest edition) to facilitate creation and testing of the INI files used to control IT modules.

Table of contents

INI file structure
Running Imatest from a Custom INI file (for testing)
Sections that affect many modules
api | dcraw | rdraw
Variables used in many modules
Secondary readout | Miscellaneous variables

 

INI File structure

Imatest settings are stored in INI files, which conform to an informal (but widely-used) standard.

INI file structure
INI FILES are text files structured so that

  • section titles are enclosed within brackets ( [ … ] ),
  • data lines have the form name = value, e.g.,
    nwid_save = 2601.
  • Comment lines start with a semicolon (;).

Value may be a number, an array of numbers, or a character string. INI files are readable, but the meaning is not always obvious. See the Imatest INI Reference for more details.

[section]
name1 = value1
name2 = value2
; This is a comment.

[next_section]

EXAMPLE

dispwelcome = 1 means display the Welcome screen when Imatest is started.edfile is location of the image editor, used to display saved screens in interactive modules (Rescharts, etc.)

[imatest]
dispwelcome = 1
exiftool = 2
expandplt = Min
fontsize = 10
readexif = 1
shrink_largef = 1
edfile = C:\Program Files (x86)\IrfanView\i_view32.exe
[sfr]
filecomb = 0
folder = C:\Imatest\Data\SFR
save_dir = C:\Imatest\Data\SFR\Results

Running Imatest from a custom ini file (for testing)

It is often useful to test INI files in Imatest Master (or IS, etc.). Starting with Imatest 3.10, you can substitute a custom INI file for imatest-v2.ini. To do so, press Select INI file in the INI File Settings dropdown menu.

ini_file_selection
The INI file selection window, for selecting an alternate ini file for running Imatest

  • Imatest always starts in the default imatest-v2.ini. To change to another INI file you must open the INI File Selection window (from the INI File Settings dropdown menu or from Manage Settings).
  • Since running Imatest can change the contents of the INI file, we recommend working from a copy of a file used in Imatest IT (not the file you intend to keep).
  • Only the main Imatest control file (normally imatest-v2.ini) is affected.

Sections that affect many modules

Notes
(-IT) Not used in Imatest IT
(gr) Affects graphics (figures). May not be of interest for Imatest IT, where graphics is often suppressed.
(index) Setting is equal to the index of the popup menu. You’ll need to open the Settings window to see these: Never used for important IT settings.
(index-1) Setting is equal to the index of the popup menu – 1 (0 – (index-1)). Keeps backwards compatibility for some settings that were originally 0 (off) or 1 (on), but had options added.

Imatest Master and other GUI-based editions have a set of utilities for editing and manipulating INI files. You can store them in a named file, load them into imatest-v2.ini, import into an ini file (changing only values included in the import file), copy the contents to the clipboard, edit them, or scan them for errors. Click on the Manage settings button for more detail.

[api] Parameters that affect Imatest IT (DLL and EXE; all modules)

[api] is set in Imatest Master by clicking Settings, IT settings from the Imatest main window to open the Imatest IT settings window. Note that API is the former name of Imatest IT. Settings affect Imatest IT/EXE and IT/DLL. These settings are described in http://www.imatest.com/docs/it_dll_instructions/#ini.

it_settings_4_5

Parameter Settings window Typical values
(default if in [brackets])
Description Notes
nomsg Never display progress bars… checkbox 0 or 1 [0] Select 1 to suppress all warning messages  
savedel Always close figures after save checkbox 0 or 1 [0] Select 1 to always close figures after saving them. Somewhat misnamed
sfrrefine Automatically refine ROIs in SFR… checkbox 0 or 1 [0] Select 1 for automatic region refine for SFR module.  
disable_figs Suppress all figures checkbox 0 or 1 [0] Select 1 to disable all figures.  
continue_on_error Continue processing batch runs if error encountered (IT only) 0 or 1 [0] Select 1 to continue processing batch runs if an error is encountered.  
passFail Pass/fail ini file full path name to file that contains Pass/Fail criteria The contents of this file (in ini format) is described in http://www.imatest.com/docs/it-passfail/.  
fig_display_mode Figure display mode drop-down menu 1, 2, 3 [1] Select 1 to display all figures, 2 to create hidden figures, or 3 to disable all figures. This setting extends disable_figs, which can still be used

[dcraw] Decode commercial RAW files

The dcraw dialog box is a GUI front-end for the dcraw program, described in detail here. It is used for converting raw files from commercial cameras with minimal signal processing (i.e., sharpening or noise reduction). Dcraw operates from a command line whose parameters are described in the dcraw manpage (i.e., reference).

dcraw_dialog_box
dcraw settings window

Parameter Settings window Typical values
(default if in [brackets])
Description Notes
bayercols (Pixel color mapping popup menu in the Monochrome image settings window) 1-5 [1] Mapping between pixel and color in Bayer raw images: 1: unknown; 2-5: Red in R1C1, R2C2, R2C1, R2C2.  
bdep -4 String for command line corresponding to bit depth. ‘ ‘: 8-bit; ‘ -4’: 16-bit linear; ‘ -6 ‘: 16-bit. See manpage.  
brawShift (Bit shift popup menu in the Monochrome image settings window) 1-6 [1] (index) Bit shift: 1 for auto; 2-6: 0,2,4,6,8 bits, respectively.  
colorspace Output color space index 0-5 [1] Index (0-5) corresponding to the color space: -o option described in the manpage.  
csps — (from colorspace) ‘ -o 1 ‘ Saved string corresponding to colorspace. ‘ -o –n ‘ if demosaicing is selected; ‘ -D ‘ or ‘ -D 6 ‘ otherwise. (for dcraw command line)
dcgamma Output gamma dropdown 1-5 [2] Index: 1 = Default (BT.709 (-g 2.222 4.5)); 2 = 1.0 (Linear); 3 = 1.8 (Apple, etc.); 4 = 2.2; 5 = sRGB (near 2.2)  
delfile Delete the saved file (checkbox) [0] 0 or 1 If checked, delete the saved file after it has been read for analysis.  
folder     Last folder name for dcraw read  
imgpath        
lastfiles        
libraw Program (dropdown menu) 1-3 [3] 1 = dcraw.exe (Win XP); 2 = Libraw (dcraw_emu.exe or unprocessed_raw.exe); 3 = dcrawMS.exe (recommend; for Win Vista and 7)  
nwb White balance 1-3 [1] Index: 1 = cemera; 2 = “gray world”; 3 = none  
ppm Save as PPM… checkbox 0 or 1 [0] 0 = save file as TIFF; 1 = save file as PPM.  
preset Preset (radio buttons) 4 1 = Color 24-bit sRGB; 2 = Color 48-bit Adobe; 3 = Bayer 48-bit linear; 4 = Manual settings (Enable all)  
qual Quality (qual is the index-1) 0-4 [0] qual-1 = n is converted to the command line string ‘ -q n ‘ for qual > 0. Default is blank string for qual = 0. See manpage Interpolation Options.  
rawconv Demosaicing 1-3 [1] Demosaicing index: 1 = Normal RAW conversion; 2 = 8-bit no demosaicing; 3 = 16-bit no demosaicing.  
rawraw (Set in Read Raw) ‘raw’ or other If ‘raw’, process file extension .raw with dcraw. Otherwise process it with ReadRaw.  
rmcn   0-4 location of red pixel in Bayer (undemosaiced) images: 0=unknown, 1: red in R1C1, 2: red in R1C2, etc.  
save   ‘ ‘ [blank] ‘ ‘  
wb — (from nwb) [‘ -w ‘] String corresponding to nwb (White balance index): 1 = ‘ -w ‘ (camera); 2 = ‘ -a ‘ (average); 3 = ” (none). See manpage.  
whitelvl Auto white level (checkbox) 0 (off) or 1 [1] Auto white level if 1.  
whitenorm Normalize (white level) by (index) 1-7 [2] Normalize to {1.0,1.01,1.05,1.10,1.25,1.50,2.0}, based on whitenorm.  

[dcraw]
bayercols = 5
bdep = -4
brawShift = 1
colorspace = 1
csps = -o 1
dcgamma = 2
delfile = 0
folder = C:ImatestSFRplus
gamma = 1
imgpath = C:ImatestDataColorcheckMiscRawNoise
lastfiles = “sfrplus.raw”
libraw = 3
nwb = 1
ppm = 0
qual = 0
rawconv = 1
rawraw = crw
rmcn = 4
save =
wb = -w
whitelvl = 0
whitenorm = 2

[rdraw] Generalized Read Raw

[rdraw] affects all Imatest modules when raw image files from manufacturer’s development systems are read in (either directly or from stored files). The settings GUI is described in RAW Files. Settings are based on the file extension (shown in boldface below). Since settings for up to 8 file extensions are saved, most variables have 8 entries, indicated by *8. For these settings the nth values correspond to one another.

[rdraw] Affects all Imatest modules including IT/EXE and IT/DLL when raw files from manufacturer’s development systems are read in. Settings are described in . Settings are based on the file extension. Since settings for up to 8 file extensions are saved, many variables have 8 entries, indicated by *8.
Parameter Typical values
(default if in [brackets])
Description Notes
bitshift 1-10 (index *8) Index of bit shift: 1 = auto; 2-10 = 0, -2, -4, -6, -8, 2, 4, 6, 8, respectively. Used as GUI index; not used for actual bit shift calculation. Example: use bitshift = 9 to shift the value by 6 bits. (This value has been used when 10 bits of precision are stored in 16 bits.) -IT
bitshift_num -8 to 8 (-99 for auto) (*8) Actual number of bits to shift (-99 indicates auto). Used for actual bit shift.  
demoz 1 or 2 (*8) 1 to demosaic the image using Matlab’s simple routing.
2 keeps image in Bayer raw format.
 
endian 1 or 2 (*8) Endian (byte order) setting index (does not apply to uint8 (one byte) input). Used as GUI index. -IT
endian_str ieee_le or ieee_be (*8) Endian (byte order) string. Used for opening file to read. See http://en.wikipedia.org/wiki/Endianness  
extension raw, rw1, … (*8) The file extension (up to 4 characters) that specifies how the file is decoded. Up to eight extensions are stored. The nth value of a parameter (bitshift_num, height, etc.) corresponds to the nth extension. Since RAW is commonly used for all sorts of formats, it is often advisable to change the extension name to something more identifiable.  
height number (pixels) Height of image in pixels  
inpix_size 1, 2, or 3 (*8) Input pixel size: 1 for uint8 (8-bits), 2 for uint16 (16-bits), 3 for uint32  
nexten 1-8 The extension displayed in the GUI. -IT
nskip integer [0] (*8) the number of bytes to skip at the beginning of the file  
nskipend integer [0] (*8) the number of bytes to skip at the end of the file  
nunpack integer (unused) May be used in the future for unpacking bits.  
offset 0 Offset in pixels: subtract from pixel level. We have seen some sensors with a 64-bit offset.  
outpix_size 1 or 2 (*8) Output pixel size: 1 for uint8 (8-bits) or 2 for uint16 (16-bits)  
precision string String of format uintm=>uintn where m and n are 8 or 16.  
rawraw (in
[dcraw]
raw or other If set to “raw”, file extension “raw” (an obscure Leica format) is processed with dcraw. We recommend setting it to another string, like “CR2”.  
rmcn 1-4 (index *8) Location of the red pixel in Bayer RAW images. 1 = Red in R1C1; 2 = Red in R1C2; 3 = Red in R2C1; 4 = Red in R2C2. These correspond to ‘rggb’, ‘grbg’, ‘gbrg’, and ‘bggr’ in the Matlab demosaic routine.  
rotateimg 1-8 (index *8) Rotate converted image: 1-4 = 0°, 90°, 180°, 270° CCW (no mirror); 5-8 = 0°, 90°, 180°, 270° CCW (mirrored).  
savefmt 1-7 (index) Format and conditions for saving converted RAW file: 1 = None (never save); 2 = PNG (always save); 3 = JPEG (always save); 4 = PNG (convert/test-only); 5 = JPEG (convert/test-only), 6 = TIFF (always save); 7 = TIFF (convert/test-only). 1, 4, 5, 7 can be used where there is no need to save the converted file (in IT, for example).  
testfolder folder name Last folder used to test Generalized Read Raw -IT
transpose 1 [1] (*8) Transpose rows and columns. In practice, always on [1]  
whitebal 1-3 (index) (*8) White Balance. 1 = none; 2 = Simple gray world— darken; 2 = Simple gray world— lighten  
whitelvl 1,2 (*8) White level. 1 = No change; 2 = Auto: 99% of saturation.  
width number (pixels) (*8) Width of image in pixels  

[rdraw]
bitshift = 1 1 1 1 1 1 1 1
bitshift_num = -99 -99 -99 -99 -99 -99 -99 -99
demoz = 2 2 1 2 2 2 1 2
endian = 2 2 2 2 2 2 1 2
endian_str = ieee-le ieee-le ieee-le ieee-le ieee-le ieee-le ieee-be ieee-le
extension = raw4 raw rpp rrr rw8 r800 rw4 rw3
height = 400 808 2448 2464 2448 800 400 808
inpix_size = 1 2 2 2 2 2 1 2
lastfiles = “Dark_15_37_7 hotpixel 584.raw” “Dark_16_4_26 hotpixel 1402.raw” “Dark_19_16_27.raw” “Dark_19_17_17.raw” “Dark_19_18_16.raw” “Dark_19_19_5.raw” “Dark_19_19_48.raw” “Dark_19_20_37.raw”
nexten = 4
nskip = 0 0 0 0 0 0 0 0
nskipend = 0 0 0 0 0 0 0 0
nunpack = 1 1 1 1 1 1 1 1
outpix_size = 1 2 2 2 2 2 1 2
precision = uint8=>uint8 uint16=>uint16 uint16=>uint16 uint16=>uint16 uint16=>uint16 uint16=>uint16 uint8=>uint8 uint16=>uint16
rawraw = raw
rmcn = 1 3 4 2 4 3 4 2
rotateimg = 1 1 1 1 1 1 1 1
savefmt = 4
testfolder = C:ImatestDocumentsCompaniesLab1262012-07-12
transpose = 1 1 1 1 1 1 1 1
whitebal = 1 1 1 1 1 1 1 1
whitelvl = 1 1 1 1 1 1 1 1
width = 400 1296 3264 3280 3264 1280 400 1296

 

Variables used in many modules

Secondary readout variables

Used in sharpness modules: [sfr], [sfrplus], [logf], [logfc], [random], [star], [wedge].

Parameter Typical values
(default if in [brackets])
Description Notes
areanorm [2 2] Normalization for MTF area plots Type of MTF Area plot for first and second secondary readout. 1: unnormalized, 2: normalized (generally preferred; similar to MTF50 when there is no frequency domain overshoot.
rdtype MTF
MTF__P
MTF @
MTF Area
(none)
1st secondary readout name  
rdtype2 same as above 2nd secondary readout name  
rdtype3 same as above; often (none) 3rd secondary readout name Used only for lens-style MTF plots
rdpct 10-80 [30] 1st readout percentage Percentage nn for MTFnn or MTFnnPSame as aboveSame as aboveExample: for rdtype = MTF__P, rdpct = 20, rdunit = 4,
Secondary readout 1 would be MTF20 (C/P)
rdpct2 2nd readout percentage
rdpct3 3rd readout percentage
rdnum numeric Number for MTF @
1st readout
The number depends on the units in rdunit (below).Example: for rdtype = MTF @, rdnum = .25, rdunit = C/P,
Secondary readout would be MTF @ .25 C/P
rdnum2 Number for MTF @
2nd readout
rdnum3 Number for MTF @
3rd readout
rdunit 1 for C/P
2 for LP/mm
3 for LP/in
4 for LW/PH (See notes.)
Index for units:
1st readout
Values corresponding to rdunit: {‘C/P’; ‘LP/mm’; ‘LP/in’; ‘LW/PH’; ‘LP/PH’; ‘C/mrad’; ‘C/deg’; ‘C/Obj mm’; ‘C/Obj in’}
rdunit2 Save as above ” 2nd readout
rdunit3 Save as above ” 3rd readout
 

Miscellaneous variables

These are set during image file read, cropping, or in the monochrome file or save results dialog boxes.

Parameter Settings
window
Typical values
[default]
Description Notes
bayeraw — (Set by several buttons in the Monochrome image settings window) 0-5 [0] If > 0, monochrome files contains Bayer RAW data. 1-4, indicates primary color to analyze (R, Gr, B, Gb). 5 indicates Demosaic.  
closefigs Set by the Close figures after save checkbox in the Save window. 0 or 1 [0] 1 recommended for IT (closes windows after save).  
figsave Set in Save figures as PNG or FIG dropdown menu in Save window 1 or 2 [1 recommended] Type of figure to save (PNG or FIG). FIG files not recommended because they require much more storage. (gr)
filecomb Set when multiple files are selected for analysis 0 or 1 [0] 0: Read and analyze files as a batch, 1: Combine files (signal-average) (-IT)
folder Set during image file read (Path name) Folder for last input image (-IT)
nchan Channel popup menu 1-4 Channel to analyze: 1-4: R, G, B, Y (Luminance)  
nht_save Set during image read 2448 … Height in pixels of recent image(s). There may be several.  
nwid_save Set during image read 3264 … Width in pixels of most recent image(s). There may be several.  
plot_image Plot checkboxes in Settings window 1 0 0 0 0 0    
roi Set during region selection (primarily in the fine adjust window) 1 1 3264 2448 (typical) Region of interest (crop) in pixels. [x1 y1 x2 y2] Groups of 4, each group corresponding to a number in nht_save and nwid_save.  
save_answer Save window— main answer (unused) Yes, No Saved setting not used. (-IT)
save_dir Set in Save window (Folder name) Last folder used to save results (-IT)
saveCSV Save window 0 or 1 [-99 = ignore] Save CSV results. Overrides save_file_list.  
saveJSON Save window 0 or 1 [-99 = ignore] Save JSON results. Overrides save_file_list.  
saveXML Save window 0 or 1 [-99 = ignore] Save XML results. Overrides save_file_list.  
save_file_list Save window [1 1 1 0 0 0 0 0 0 0] List of results to save if element is set to 1:
Details differ in different modules.
 
speedup Speedup checkbox 0 or 1 [1] if set to 1, skip several calculations to speed up operation. Details differ in different modules.