Debian Codegraph @

imdi/Readme.txt

raw
1
2 This is the development area for IMDI, the
3 Integer Multi-Dimensional Interpolation routines.
4
5 They provide a flexible and high performance
6 system for applying color transforms to typical
7 raster pixel data. Because they provide a means of
8 applying arbitrary combination dependent mappings
9 of multi-channel pixel data, there are many other
10 possible uses for these sorts of routines as well,
11 including high quality matting/compositing. For instance,
12 one could create a smooth, proportional "chroma key"
13 type of matt for matting one RGB image onto another
14 by creating a 6 channel to 3 dimensional transform,
15 that its applied to each pair of pixels from the
16 source images and produces one combined output pixel.
17 Additional input or output alpha channels are easy
18 to add by simply adding more input and/or output
19 dimensions. The matting calculatons can be almost
20 arbitrarily complex, and the imdi will apply them
21 to the pixel data at very high speed.
22
23 The system has two parts, one that generates taylored,
24 optimised source code for the transformation kernels,
25 and the run time code that matches a transform request
26 to a compiled kernel, and initialises the appropriate
27 run time lookup tables.
28
29 The kernel source generator is intended to accomodate
30 various optimisations, such as assembly code, vector
31 instruction set (ie. MMX, AltiVec etc.) versions, but
32 at present only generates the more portable 'C' code
33 kernels.
34
35 Both 8 bit per component and 16 bit per component
36 pixel data is handled, up to 8 input and output
37 dimensions (but this limit could be trivially raised).
38
39 imdi_make.exe is the module that triggers the generation of
40 optimised source code as configured for the color spaces
41 and pixel formats selected. By default creates
42 a single imdi_k.c and imdi_k.h file, but if
43 given the -i flag, creates a separate file
44 for each kernel variant.
45
46 cgen.c C code generator module.
47
48 itest.c regresion test routine.
49 Normally runs speed and accuracy tests for
50 all configured kernel variants.
51 The -q flag makes it run quicker,
52 but makes the benchmarking inacurate,
53 the -s flag will cause it to stop
54 if any routine has unexpectedly low
55 accuracy.
56
57 cctiff.c is the utility that takes an ICC device
58 profile link, and converts a TIFF file
59 from the input colorspace to the output
60 space. Both 8 bit and 16 bit TIFF files
61 are handled, as well as colorspaces up to
62 8 channels in and out.
63 This accepts either a device link ICC profile,
64 or links an input and output devce ICC profile
65 to define the color transform.
66
67
68 greytiff.c is a utility similar to cctiff, that
69 is an example of how to colorimetrically
70 convert an RGB file into a monochrome RGB file.
71
72
73
74 Misc. Notes
75 -----------
76
77 ITU-T Rec. T.42 specifies the ITULAB encoding in terms of a range
78 and offset for each component, which are related to the minimum and
79 maximum values as follows:
80
81 minimum = - (range x offset) / 2^n - 1
82 maximum = minimum + range
83
84 The Decode field default values depend on the color space. For the
85 ITULAB color space encoding, the default values correspond to the
86 base range and offset, as specified in ITU-T Rec. T.42 [T.42]. The
87 following table gives the base range and offset values for
88 BitsPerSample=8 and 12, and the corresponding default minimum and
89 maximum default values for the Decode field, calculated using the
90 equations above when PhotometricInterpetation=10.
91
92 +-----------------------------------------------+
93 | ITU-T Rec. T.42 | Decode |
94 +---------+-----------| base values | default values |
95 | BitsPer + Component +------------------+----------------------------+
96 | -Sample | | Range | Offset | Min | Max |
97 +---------+-----------+--------+---------+--------------+-------------+
98 | 8 | L* | 100 | 0 | 0 | 100 |
99 | +-----------+--------+---------+--------------+-------------+
100 | | a* | 170 | 128 | -21760/255 | 21590/255 |
101 | +-----------+--------+---------+--------------+-------------+
102 | | b* | 200 | 96 | -19200/255 | 31800/255 |
103 +---------+-----------+--------+---------+--------------+-------------+
104 | 12 | L* | 100 | 0 | 0 | 100 |
105 | +-----------+--------+---------+--------------+-------------+
106 | | a* | 170 | 2048 | -348160/4095 | 347990/4095 |
107 | +-----------+--------+---------+--------------+-------------+
108 | | b* | 200 | 1536 | -307200/4095 | 511800/4095 |
109 +---------+-----------+--------+---------+--------------+-------------+
110
111 For example, when PhotometricInterpretation=10 and BitsPerSample=8,
112 the default value for Decode is (0, 100, -21760/255, 21590/255,
113 -19200/255, 31800/255).
114