spectro/fakeread

Summary

Simulate the measurement of a devices response, using an existing device profile, or measured test point data set. The device profile can be either an ICC or MPP profile, or the data set can be a .ti3 file. A device link separation or color space conversion can be applied before the print/measure simulation, as well as device calibration  or inverse calibration curves.

fakeread can be useful for creating a data set from an existing profile to re-create a different style of profile (i.e. create a cLUT profile from a matrix profile), for creating synthetic data sets with known amounts of randomness for testing profile creation against a perfectly known ideal, or for creating verification test sets for checking colorimetric colorspace emulation against.

The options below are in the order of color processing that fakeread performs.

Usage

fakeread [-options] profile.[icm|mpp|ti3] inoutfile
 -v [n]            Verbose mode [level]
 -e flag           Video encode device input to sepration as:
     n              normal 0..1 full range RGB levels (default)
     t              (16-235)/255 "TV" RGB levels
     6              Rec601 YCbCr SD (16-235,240)/255 "TV" levels
     7              Rec709 1125/60Hz YCbCr HD (16-235,240)/255 "TV" levels
     5              Rec709 1250/50Hz YCbCr HD (16-235,240)/255 "TV" levels
     2              Rec2020 YCbCr UHD (16-235,240)/255 "TV" levels
     C              Rec2020 Constant Luminance YCbCr UHD (16-235,240)/255 "TV" levels
 -p separation.icm Use device link separation profile on input
 -E flag           Video decode separation device output. See -e above
 -k file.cal       Apply calibration (include in .ti3 output)
 -i file.cal       Include calibration in .ti3 output, but don't apply it
 -K file.cal       Apply inverse calibration
 -r level          Add average random deviation of <level>% to device values (after sep. & cal.)
 -0 pow            Apply power to device chanel 0-9
 -b output.icm     Apply BT.1886-like mapping with effective gamma 2.2
 -b g.g:output.icm Apply BT.1886-like mapping with effective gamma g.g
 -B output.icm     Apply BT.1886 mapping with technical gamma 2.4
 -B g.g:output.icm Apply BT.1886 mapping with technical gamma g.g
 -I intent         r = relative colorimetric, a = absolute (default)
 -A L,a,b          Scale black point to target Lab value
 -l                Output Lab rather than XYZ
 -s                Lookup
MPP spectral values
 -R level          Add average random deviation of <level>% to output PCS values
 -u                Make random deviations have uniform distributions rather than normal
 -S seed           Set random seed
 profile.[icm|mpp|ti3]     ICC, MPP or .ti3 profile/file to use
  inoutfile                 Base name for input[.ti1]/output[.ti3] file


Examples


fakeread profile.icm testvalues
fakeread -p separation.icm profile.icm testvalues

Comments

The -v flag reports extra information, e.g. on what BT.1886 option is doing. A level > 1 will be more verbose.

The -e flag applies a Video encoding to the input of the separation.

     n           normal 0..1 full range RGB levels (default)
     t           (16-235)/255 "TV" RGB levels
     6           Rec601 YCbCr SD (16-235,240)/255 "TV" levels
     7           Rec709 1125/60Hz YCbCr HD (16-235,240)/255 "TV" levels
     5           Rec709 1250/50Hz YCbCr HD (16-235,240)/255 "TV" levels
     2           Rec2020 YCbCr UHD (16-235,240)/255 "TV" levels
     C           Rec2020 Constant Luminance YCbCr UHD (16-235,240)/255 "TV" lev


The -p separation.icm option enables a device to device value conversion before converting to expected PCS values. This might be an ink separation of a video calibration device link. The argument is the name of the ICC device link that defines the separation.

The -E flag applies a Video decoding to the output of the separation.   See -e for the list of decodings.

The -k file.cal parameter specifies a calibration file created by printcal or dispcal, and the supplied calibration curves will be applied to the chart device values after any separation and before the device profile. This allows emulating a system that uses per device channel calibration. The calibration curves will also be included in the resulting .ti3 file, so that they can be passed through to the ICC profile allowing accurate computation of ink limits.

The -i file.cal parameter specifies a printer calibration file created by printcal or dispcal, and the calibration curves will be included in the included in the resulting .ti3 file, so that they can be passed through to the ICC profile, to allow accurate computation of ink limits. The calibration is not applied to tchart values. Note that if the supplied ICC profile contains VCGT calibration curves, that these will be included in the resulting .ti3 by default.

The -K file.cal parameter specifies a calibration file created by printcal or dispcal, and the inverse of the supplied calibration curves will be applied to the chart device values after any separation and before the device profile. This allows for undoing calibration curves that may be part of a video calibration device link, so that the (calibrated device value) device profile will work as expected.

The -r parameter is a way of simulating instability in the behaviour of the simulated printing system. The parameter supplied to the flag will be used to scale a random offset added to the device values (after any separation and calibration is applied). The offset will be a normally distributed error with an average deviation of level%. A typically value supplied might be 1.0 to simulate 1% randomness.

The -0, -1, -2 .. -9 parameters are a way of simulating changes in the behavior of the simulated printing system. The parameter supplied to the flag will be used to modify the device values (after any separation, calibration and device randomness is applied) by raising them to the power of the parameter. This applies a transfer curve to the simulated device response.

The -b output.icm flag applies extra input processing, applying BT.1886-like video gamma mapping using an effective gamma of 2.2 by default, and overridable using -b g.g:output.icm where g.g is the gamma. output.icm is the display ICC profile that provides the black point that the BT.1886 curves will target. The gamma is an effective gamma, meaning that its effect on 50% input is the same as that of a pure power curve, in spite of any black offset added by BT.1886. This has the benefit of making the overall effect of brightness independent of the black level of the display. Setting an effective gamma other than 2.2 is one way of making the viewing condition adjustment for the different conditions of video encoding and decoding, or for modelling the source colorspace as a rendering on a video display. BT.1886 will only work with matrix type input profiles. Typically this will be used to create a verification test set for checking the operation of a device link or 3dLut created using collink, using the same BT.1886 parameters.

The -B output.icm flag applies extra input processing, applying BT.1886-like video gamma mapping using a gamma of 2.4 by default, and overridable using -B g.g:output.icm where g.g is the gamma. output.icm is the display ICC profile that provides the black point that the BT.1886 curves will target. The gamma is the technical gamma, or power applied to the input image, and this means that its effect on 50% input will depend on the black level of the display, making the overall brightness somewhat unpredictable. For a more predictable effect, use -b.

The -I parameter allows changing the intent used in looking up the ICC profile colors to relative colorimetric. This would not be used if you intend to make a profile from the resulting .ti3 file, since profiles are always made from absolute colorimetric measurement values. Note that this flag does nothing if the profile is an MPP or .ti3 file.

The -A parameter is a way of simulating devices that have a different black point to the profile used. This only works if an ICC profile is used, and scales the black point to the parameter value. This will be done in XYZ space by default, and in L*a*b* space if the -l flag is used.

The -l flag causes the CIE output values to be L*a*b* rather than the default XYZ values.

The -s flag works if a spectral MPP file is being used as a device profile, and causes the output to include spectral values.

The -R parameter is a way of simulating instability in the behavior of the simulated measuring system. The parameter supplied to the flag will be used to scale a random offset added to the PCS values. The offset will be a normally distributed error with an average deviation of level%. A typically value supplied might be 1.0 to simulate 1% randomness.

The -u flag changes the distribution of the random offsets applied using the -r or -R flags, from the default standard deviation, to a uniform deviation distribution. The level is still specified as an average deviation.

The -S parameter lets a particular random seed be used when generating random offsets, so that the randomness can be made repeatable. Normally a different seed will be used for each run.

Fakeread is useful in creating artificial test value for testing colprof, as well as providing one path for turning an MPP profile into an ICC profile. It can also be used to create a reference file for verifying against. If a .ti3 file is specified instead of an ICC or MPP profile, then the closest matching measured points in the ..ti3 are substituted for the test values in the .ti1 file on output. If the .ti1 file is a monochrome test file with a White device value, then an RGB ICC profile, MPP or .ti3 may be used, and the White values will be translated to equal RGB values. If the .ti1 file is a monochrome test file with a Black device value, then a CMYK ICC profile, MPP or .ti3 may be used, and the Black values will be translated to equal CMY = 0, K = grey values. Note that any calibration within a supplied ICC profile is not applied during the conversion, although it will be included in the .ti3 output (see -k and -i flags for how apply calibration curves during the conversion and/or include a specific calibration curves in the output).

If a separation device profile is provided (e.g. from CMY -> CMYK, or perhaps CMYK->CMYK, to simulate a color correction step before "printing", or perhaps a Video RGB->RGB calibration link) then this will be applied to the .ti1 device values, before converting the the device values into .ti3 PCS values.