Debian Codegraph @

doc/scanin.html

raw symbols SCIP
1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2 <html>
3 <head>
4 <title>scanin</title>
5 <meta http-equiv="content-type" content="text/html;
6 charset=windows-1252">
7 <meta name="author" content="Graeme Gill">
8 </head>
9 <body>
10 <h2><b>scanin/scanin</b></h2>
11 <h3>Summary</h3>
12 Convert an 8 or 16 bit per component <a
13 href="File_Formats.html#TIFF">TIFF</a> image of a test chart
14 into&nbsp;<a href="File_Formats.html#.ti3">.ti3</a> device values
15 using automatic pattern recognition, or manual chart alignment.<br>
16 Performs other tasks associated with turning a TIFF raster of test
17 patches into numeric values. <br>
18 <h3>Usage Summary<br>
19 </h3>
20 <small><a style="font-family: monospace;" href="#_"> usage</a><span
21 style="font-family: monospace;">: scanin [options] input.tif
22 recogin.cht valin.cie [diag.tif]</span><br style="font-family:
23 monospace;">
24 <span style="font-family: monospace;">&nbsp;&nbsp; :- inputs
25 'input.tif',&nbsp; and outputs scanner 'input.ti3', or</span><br
26 style="font-family: monospace;">
27 <br style="font-family: monospace;">
28 <a style="font-family: monospace;" href="#g"> usage</a><span
29 style="font-family: monospace;">: scanin -g [options] input.tif
30 recogout.cht [diag.tif]</span><br style="font-family:
31 monospace;">
32 <span style="font-family: monospace;">&nbsp;&nbsp; :- outputs file
33 'recogout.cht', or</span><br style="font-family: monospace;">
34 <br style="font-family: monospace;">
35 <a style="font-family: monospace;" href="#o"> usage</a><span
36 style="font-family: monospace;">: scanin -o [options] input.tif
37 recogin.cht [diag.tif]</span><br style="font-family: monospace;">
38 <span style="font-family: monospace;">&nbsp;&nbsp; :- outputs file
39 'input.val', or</span><br style="font-family: monospace;">
40 <br style="font-family: monospace;">
41 <a style="font-family: monospace;" href="#c"> usage</a><span
42 style="font-family: monospace;">: scanin -c [options] input.tif
43 recogin.cht scanprofile.[icm|mpp] pbase [diag.tif]</span><br
44 style="font-family: monospace;">
45 <span style="font-family: monospace;">&nbsp;&nbsp; :- inputs
46 pbase.ti2 and outputs printer pbase.ti3, or</span><br
47 style="font-family: monospace;">
48 <br style="font-family: monospace;">
49 <a style="font-family: monospace;" href="#r"> usage</a><span
50 style="font-family: monospace;">: scanin -r [options] input.tif
51 recogin.cht pbase [diag.tif]</span><br style="font-family:
52 monospace;">
53 <span style="font-family: monospace;">&nbsp;&nbsp; :- inputs
54 pbase.ti2+.ti3 and outputs pbase.ti3</span><br
55 style="font-family: monospace;">
56 <br style="font-family: monospace;">
57 <span style="font-family: monospace;">&nbsp;</span><a
58 style="font-family: monospace;" href="#g">-g</a><span
59 style="font-family: monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
60 Generate
61
62
63
64
65
66 a chart reference (.cht) file</span><br style="font-family:
67 monospace;">
68 <span style="font-family: monospace;">&nbsp;</span><a
69 style="font-family: monospace;" href="#o">-o</a><span
70 style="font-family: monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
71 Output
72
73
74
75
76
77 patch values in .val file</span><br style="font-family:
78 monospace;">
79 <span style="font-family: monospace;">&nbsp;</span><a
80 style="font-family: monospace;" href="#c">-c</a><span
81 style="font-family: monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
82 Use
83
84
85
86
87
88 image to measure color to convert printer pbase .ti2 to .ti3</span><span
89 style="font-family: monospace;"></span><br style="font-family:
90 monospace;">
91 <span style="font-family: monospace;">&nbsp;</span><a
92 style="font-family: monospace;" href="#ca">-ca</a><span
93 style="font-family: monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
94 Same
95
96
97
98
99
100 as -c, but accumulates more values to pbase .ti3</span><br
101 style="font-family: monospace;">
102 <span style="font-family: monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
103 from
104
105
106
107
108
109 subsequent pages</span><br style="font-family: monospace;">
110 <span style="font-family: monospace;">&nbsp;</span><a
111 style="font-family: monospace;" href="#r">-r</a><span
112 style="font-family: monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
113 Replace
114
115
116
117
118
119 device values in pbase .ti3</span><br style="font-family:
120 monospace;">
121 <span style="font-family: monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
122 Default
123
124
125
126
127
128 is to create a scanner .ti3 file<br>
129 </span></small><small><span style="font-family: monospace;">&nbsp;</span><a
130 style="font-family: monospace;" href="#F">-F
131 x1,y1,x2,y2,x3,y3,x4,y4</a><span style="font-family: monospace;">
132 <br>
133 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
134 Don't
135
136
137
138
139
140 auto recognize, locate using four fiducual marks<br>
141 &nbsp;<a href="#p">-p</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
142 Compensate
143
144
145
146
147
148 for perspective distortion<br style="font-family: monospace;">
149 </span></small><small><span style="font-family: monospace;"></span><span
150 style="font-family: monospace;">&nbsp;</span><a
151 style="font-family: monospace;" href="#a">-a</a><span
152 style="font-family: monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
153 Recognize
154
155
156
157
158
159 chart in normal orientation only</span><br style="font-family:
160 monospace;">
161 <span style="font-family: monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
162 Default
163
164
165
166
167
168 is to recognize all possible chart angles<br>
169 &nbsp;<a href="#m">-m</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
170 Return
171
172
173
174
175
176 true mean (default is robust mean)<br>
177 </span></small><small><span style="font-family: monospace;">&nbsp;<a
178 href="#G">-G gamma</a>
179 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
180 Approximate gamma encoding of image</span></small><br
181 style="font-family: monospace;">
182 <small><span style="font-family: monospace;"></span><span
183 style="font-family: monospace;">&nbsp;</span><a
184 style="font-family: monospace;" href="#v">-v [n]</a><span
185 style="font-family: monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
186 Verbosity
187
188
189
190
191
192 level 0-9</span><br style="font-family: monospace;">
193 <span style="font-family: monospace;">&nbsp;</span><a
194 style="font-family: monospace;" href="#d">-d</a><span
195 style="font-family: monospace;"> [ihvglLIcrsonap]&nbsp;&nbsp;
196 generate diagnostic output (try -dipn)</span><br
197 style="font-family: monospace;">
198 <span style="font-family: monospace;">&nbsp;&nbsp;&nbsp;&nbsp; </span><a
199 style="font-family: monospace;" href="#di">i</a><span
200 style="font-family: monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
201 diag
202
203
204
205
206
207 - B&amp;W of input image</span><br style="font-family:
208 monospace;">
209 <span style="font-family: monospace;">&nbsp;&nbsp;&nbsp;&nbsp; </span><a
210 style="font-family: monospace;" href="#dh">h</a><span
211 style="font-family: monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
212 diag
213
214
215
216
217
218 - Horizontal edge detection</span><br style="font-family:
219 monospace;">
220 <span style="font-family: monospace;">&nbsp;&nbsp;&nbsp;&nbsp; </span><a
221 style="font-family: monospace;" href="#dv">v</a><span
222 style="font-family: monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
223 diag
224
225
226
227
228
229 - Vertical edge detection</span><br style="font-family:
230 monospace;">
231 <span style="font-family: monospace;">&nbsp;&nbsp;&nbsp;&nbsp; </span><a
232 style="font-family: monospace;" href="#dg">g</a><span
233 style="font-family: monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
234 diag
235
236
237
238
239
240 - Groups detected</span><br style="font-family: monospace;">
241 <span style="font-family: monospace;">&nbsp;&nbsp;&nbsp;&nbsp; </span><a
242 style="font-family: monospace;" href="#dl">l</a><span
243 style="font-family: monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
244 diag
245
246
247
248
249
250 - Lines detected</span><br style="font-family: monospace;">
251 <span style="font-family: monospace;">&nbsp;&nbsp;&nbsp;&nbsp; </span><a
252 style="font-family: monospace;" href="#dL">L</a><span
253 style="font-family: monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
254 diag
255
256
257
258
259
260 - All lines detected<br>
261 </span></small><small><span style="font-family: monospace;">&nbsp;&nbsp;&nbsp;&nbsp;
262
263
264
265
266
267 </span><span style="font-family: monospace;"><a href="#dI">I</a>
268 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
269 diag
270
271
272
273
274
275 - lines used to improve fit<br>
276 </span></small><small><span style="font-family: monospace;">&nbsp;&nbsp;&nbsp;&nbsp;
277
278
279
280
281
282 </span><a style="font-family: monospace;" href="#dc">c</a><span
283 style="font-family: monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
284 diag
285
286
287
288
289
290 - lines perspective corrected</span></small><br
291 style="font-family: monospace;">
292 <small><span style="font-family: monospace;"></span><span
293 style="font-family: monospace;">&nbsp;&nbsp;&nbsp;&nbsp; </span><a
294 style="font-family: monospace;" href="#dr">r</a><span
295 style="font-family: monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
296 diag
297
298
299
300
301
302 - lines rotated</span><br style="font-family: monospace;">
303 <span style="font-family: monospace;">&nbsp;&nbsp;&nbsp;&nbsp; </span><a
304 style="font-family: monospace;" href="#ds">s</a><span
305 style="font-family: monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
306 diag
307
308
309
310
311
312 - sample boxes rotated</span><br style="font-family: monospace;">
313 <span style="font-family: monospace;">&nbsp;&nbsp;&nbsp;&nbsp; </span><a
314 style="font-family: monospace;" href="#do">o</a><span
315 style="font-family: monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
316 diag
317
318
319
320
321
322 - sample box outlines</span><br style="font-family: monospace;">
323 <span style="font-family: monospace;">&nbsp;&nbsp;&nbsp;&nbsp; </span><a
324 style="font-family: monospace;" href="#dn">n</a><span
325 style="font-family: monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
326 diag
327
328
329
330
331
332 - sample box names</span><br style="font-family: monospace;">
333 <span style="font-family: monospace;">&nbsp;&nbsp;&nbsp;&nbsp; </span><a
334 style="font-family: monospace;" href="#da">a</a><span
335 style="font-family: monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
336 diag
337
338
339
340
341
342 - sample box areas</span><br style="font-family: monospace;">
343 <span style="font-family: monospace;">&nbsp;&nbsp;&nbsp;&nbsp; </span><a
344 style="font-family: monospace;" href="#dp">p</a><span
345 style="font-family: monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
346 diag
347
348
349
350
351
352 - pixel areas sampled</span></small> <br>
353 <small><span style="font-family: monospace;">&nbsp; <a href="#O">-O</a>
354 outputfile&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Override the
355 default output filename &amp; extension.</span></small><br>
356 <h3><a name="Usage"></a>Usage Details and Discussion</h3>
357 <span style="font-weight: bold;">scanin</span> is setup to deal with
358 a raster file that has been <u>roughly</u> cropped to a size that
359 contains the test chart. It's exact orientation is not important
360 [ie. there is usually no need to rotate or crop the image any more
361 finely.] The reference files are normally set up with the assumption
362 that the edges of the chart are visible within the image, and if the
363 image is
364 <b> cropped to exclude the chart edges</b>, it may well <b>not
365 recognize</b> the chart properly. It is often better to crop out
366 anything outside the chart itself (i.e. labeling text, logo's below
367 the chart etc., but not text that is part of the chart itself.) It
368 is designed to cope with a variety of resolutions, and will cope
369 with some degree of noise in the scan (due to screening artefacts on
370 the original, or film grain), but it<b> isn't really designed</b> to
371 accept
372 <b> very high resolution input</b>, and high resolution images may
373 well fail. For anything over 1200 pixels on a side, you should
374 consider down sampling the scan using a filtering down-sample,
375 before submitting the file to scanin. Similarly, any file with a
376 large level of noise (due to screening or scanner artifacts, or a
377 noisy surrounding texture) should consider cropping out the noisy
378 surrounding, or down sampling the image or filtering it with some
379 average preserving filter before submitting it to scanin. Examining
380 the diagnostic output (ie. -dig and -dil) may help in determining
381 whether noise is an issue. To check that the chart has been
382 correctly recognized, use -dipn and examine the diag image.<br>
383 <br>
384 There are 5 basic modes that <b>scanin</b> operates in.<br>
385 <ul>
386 <li><a name="_"></a>When no special argument is given scanin is
387 assumed to be parsing an input device characterization chart
388 (ie. an IT8.7/2 chart), for the purpose of creating a <a
389 href="File_Formats.html#.ti3">.ti3</a> data file containing
390 the CIE test values and the corresponding RGB scanner values.
391 The <a href="File_Formats.html#.ti3">.ti3</a> file can then be
392 used for creating an input profile using <a href="colprof.html">colprof</a>.
393 The file arguments are: <a name="_p1"></a>The TIFF file that is
394 to be processed, <a name="_p2"></a>the image recognition
395 template file, <a name="_p3"></a>the CIE reference value
396 definitions for the test chart (sometimes labeled a ".q60"
397 file), <a name="_p4"></a>and an optional name for the image
398 recognition diagnostic output. The resulting .ti3 file will have
399 the same base name as the input TIFF file.</li>
400 <li><a name="g"></a>If the<b> -g</b> flag is specified, then
401 scanin is operating in a mode designed to create the necessary
402 image recognition template file (<a
403 href="File_Formats.html#.cht">.cht</a>) boilerplate
404 information. Patch location and labeling information would need
405 to be added manually to such a generated file, to make a
406 complete and useable recognition template file. <a
407 href="cht_format.html">CHT file format.</a> The input TIFF
408 file in this situation, should be a good quality image, perhaps
409 synthetically generated (rather than being scanned), and
410 perfectly oriented, to make specification of the patch locations
411 easier. The file arguments are: <a name="gp1"></a>The TIFF file
412 that is to be processed, <a name="gp2"></a>the image
413 recognition template file to be created, <a name="gp3"></a>and
414 an optional name for the image recognition diagnostic output.</li>
415 <li><a name="o"></a>If the <b>-o</b> flag is used, then scanin
416 will process the input TIFF file and produce a generic&nbsp;<a
417 href="File_Formats.html#CGATS">CGATS</a> &nbsp;style file
418 containing just the patch values (a <span style="font-weight:
419 bold;">.val</span> file). The file arguments are: <a
420 name="op1"></a>The TIFF file that is to be processed, <a
421 name="op2"></a>the image recognition template file to be
422 created, <a name="op3"></a>and an optional name for the image
423 recognition diagnostic output.</li>
424 <li><a name="c"></a>If the <b>-c</b> flag is used, then an input
425 image of a print test chart can be used in combination with a
426 device profile, to estimate the CIE tristimulus values of the
427 patches. This allows RGB input devices to be used as a crude
428 replacement for a color measuring instrument. The icc or mpp
429 profile has (presumably) been created by scanning an IT8.7/2
430 chart (or similar) through the RGB input device, and then using
431 scanin to create the .ti3 file needed to feed to colprof to
432 create the input device profile. The file arguments in -c mode
433 are: <a name="cp1"></a>The TIFF file that is to be processed
434 containing the image of a print test chart, <a name="cp2"></a>the
435
436
437
438
439 image recognition template file for the test chart generated by
440 the <a href="printtarg.html"> printtarg</a> tool, <a
441 name="cp3"></a>the input device ICC or MPP profile, <a
442 name="cp4"></a>the base name for the .ti2 file containing the
443 test chart printer device values and their patch identifiers and
444 the base name for the resulting .ti3 file, <a name="cp5"></a>and
445
446
447
448
449 finally an optional name for the image recognition diagnostic
450 output. The resulting .ti3 file will have the same base name as
451 the input TIFF file. If there is more than one page in the test
452 chart, then scanin will need to be run multiple times, once for
453 each scan file made from each test chart. <a name="ca"></a>The
454 <b>-ca</b> flag combination should be used for all pages after
455 the first, as this then adds that pages test values to the .ti3
456 file, rather than creating a .ti3 file that contains only that
457 pages test values. If the incoming .ti2 file contains
458 per-channel calibration curves, these will be passed through to
459 the .ti3 so that accurate ink limits can be computed during
460 profiling. </li>
461 <li><a name="r"></a>If the <span style="font-weight: bold;">-r</span>
462 flag is used, then the input TIFF value is used as a source of
463 device values to replace any existing device values in the given
464 .ti3 file. This is intended for use in the situation in which
465 the device values being fed into an output device are altered in
466 some way that is difficult to predict (ie. such as being
467 screened and then de-screened), and this alteration to the
468 device values needs to be taken into account in creating a
469 profile for such a device. The file arguments in -r mode are: <a
470 name="rp1"></a>The TIFF file that is to be processed
471 containing a rasterized image of an output test chart, <a
472 name="rp2"></a>the image recognition template file for the
473 test chart generated by the <a href="printtarg.html"> printtarg</a>
474 tool,&nbsp; <a name="rp3"></a>the base name for the .ti2 file
475 containing the output test chart device values and their patch
476 identifiers and the base name for the .ti3 file that is to have
477 its device values replaced, <a name="rp4"></a>and finally an
478 optional name for the image recognition diagnostic output.<br>
479 </li>
480 </ul>
481 A number of flags and options are available, that are independent of
482 the mode that scanin is in.<br>
483 <br>
484 Normally scanin will try and recognize a chart, irrespective of its
485 orientation. For charts that have some asymmetric patch size or
486 arrangement (such as an IT8.7/2, or a chart generated by <a
487 href="printtarg.html"> printtarg</a> with the <b>-s</b> option),
488 this is both flexible and reliable. Other charts may be symmetrical,
489 and therefore having scanin figure out the orientation automatically
490 is a problem if the recognition template does not contain expected
491 patch values, since it will have an equal chance of orienting it
492 incorrectly as correctly. To solve this, the <a name="a"></a><b>-a</b>
493 flag can be used, and care taken to provide a raster file that is
494 within 45 degrees of "no rotation".<br>
495 <br>
496 <a name="F"></a>Normally scanin will use automatic chart recognition
497 to identify the location of the test patches and extract their
498 values. If the chart <a href="cht_format.html">CHT file</a>&nbsp;
499 has four fiducial marks defined, then the chart can be manually
500 aligned by specifying the pixel location of the four marks as
501 arguments to the <span style="font-weight: bold;"><span
502 style="font-weight: bold;">-F</span></span> flag. The top left,
503 top right, bottom right and bottom left fiducial marks X and Y
504 co-ordinates should be specified as a single concatenated argument,
505 separated by comma's, e.g: -F 10,20,435,22,432,239,10,239&nbsp; The
506 coodinates may be fractional using a decimal point. Four fiducial
507 marks allows for compensation for perspective distortion.<br>
508 <br>
509 <a name="p"></a>By default the automatic chart recognition copes
510 with rotation, scale and stretch in the chart image, making it
511 suitable for charts that have been scanned, or shot squarely with a
512 camera. If a chart has been shot not exactly facing the camera
513 (perhaps to avoid reflection, or to get more even lighting), then it
514 will suffer from perspective distortion as well. The <span
515 style="font-weight: bold;"><span style="font-weight: bold;">-p</span></span>
516 flag enables automatic compensation for perspective distortion.<br>
517 <br>
518 <a name="m"></a>Normally scanin computes an average of the pixel
519 values within a sample square, using a "robust" mean, that discards
520 pixel values that are too far from the average ("outlier" pixel
521 values). This is done in an attempt to discard value that are due to
522 scanning artefacts such as dust, scratches etc. You can force scanin
523 to return the true mean values for the sample squares that includes
524 all the pixel values, by using the <span style="font-weight: bold;">-m</span>
525 flag.<br>
526 <br>
527 <a name="G"></a>Normally scanin has reasonably robust feature
528 recognition, but the default assumption is that the input chart has
529 an approximately even visual distribution of patch values, and has
530 been scanned and converted to a typical gamma 2.2 corrected image,
531 meaning that the average patch pixel value is expected to be about
532 50%. If this is not the case (for instance if the input chart has
533 been scanned with linear light or "raw" encoding), then it may
534 enhance the image recognition to provide the approximate gamma
535 encoding of the image. For instance, if linear light encoding
536 ("Raw") is used, a <span style="font-weight: bold;">-G</span> value
537 of 1.0 would be appropriate. Values less than 2.2 should be tried if
538 the chart is particularly dark, or greater than 2.2 if the chart is
539 particularly light. Generally it is only necessary to provide this
540 is there are problems in recognizing the chart.<br>
541 <br>
542 <a name="v"></a> The <b>-v</b> flag enables extra verbosity in
543 processing. This can aid debugging, if a chart fails to be
544 recognized.<br>
545 <br>
546 <a name="d"></a> The <b>-d</b> flag enables the generation of an
547 image recognition diagnostic raster. The name of diagnostic raster
548 can be specified as the last in the command line, or if not, will
549 default to <span style="font-weight: bold;">diag.tif</span>.
550 Various flags control what is written to the diagnostic raster. Note
551 that at least one flag must be specified for a diagnostic raster to
552 be produced.<br>
553 <b><a name="di"></a>i</b>&nbsp;&nbsp;&nbsp; creates a black and
554 white version of the input raster in the diagnostic output, to be
555 able to compare with the feature extraction.<br>
556 <b><a name="dh"></a>h</b>&nbsp;&nbsp;&nbsp; will show pixels in the
557 input image classified as being on horizontal edges, in red.<br>
558 <b><a name="dv"></a>v</b>&nbsp;&nbsp;&nbsp; will show pixels in the
559 input image classified as being vertical edges, in green.<br>
560 <b><a name="dg"></a>g</b>&nbsp;&nbsp;&nbsp; will show groups of
561 pixels that will be used to estimate edge lines, each group in a
562 different color.<br>
563 <b><a name="dl"></a>l</b>&nbsp;&nbsp;&nbsp; will show valid lines
564 estimated from the vertical and horizontal pixel groups, in white.<br>
565 <b><a name="dL"></a>L</b>&nbsp;&nbsp;&nbsp; will show all lines
566 (valid and invalid) estimated from the vertical and horizontal pixel
567 groups, in white.<br>
568 <b><a name="dI"></a>I</b> &nbsp;&nbsp; will show valid lines lines
569 used to improve the final fit, in blue.<br>
570 <b><a name="dc"></a>c</b> &nbsp;&nbsp; will show the lines with
571 perspective correction applied in cyan.<br>
572 <b><a name="dr"></a>r</b>&nbsp;&nbsp;&nbsp; will show the lines
573 rotated to the reference chart orientation, in yellow.<br>
574 <b><a name="ds"></a>s</b>&nbsp;&nbsp;&nbsp; will show the diagnostic
575 sampling box edge outlines, rotated to the reference chart
576 orientation, in orange.<br>
577 <b><a name="do"></a>o</b>&nbsp;&nbsp;&nbsp; will show all the
578 sampling box edge outlines, in orange.<br>
579 <b><a name="dn"></a>n</b>&nbsp;&nbsp;&nbsp; will show the ID names
580 of the sampling boxes, plus the diagnostic sample boxes, using a
581 simple stroke font, in orange.<br>
582 <b><a name="da"></a>a</b>&nbsp;&nbsp;&nbsp; will show the sampling
583 areas as crossed boxes, plus the diagnostic sample boxes, in orange.<br>
584 <b><a name="dp"></a>p</b>&nbsp;&nbsp;&nbsp; will show the sampling
585 areas as colored pixels.<br>
586 <br>
587 The combination of <b>-dipn</b> is usually a good place to start.<br>
588 <br>
589 The <a href="File_Formats.html#TIFF">TIFF</a> file can be either 8
590 or 16 bits per color component, with 16 bit files being slower to
591 process, but yielding more precise results.<br>
592 <br>
593 If at all in doubt that the file has been recognized correctly, use
594 the <span style="font-weight: bold;">-dipn</span> diagnostic flag
595 combination, and check the resulting diagnostic raster file.<br>
596 [ A badly recognised image will typically result in high self fit
597 delta E's when used with colprof. ]<br>
598 <br>
599 <a name="O"></a>The <span style="font-weight: bold;">-O</span>
600 parameter allows the output file name &amp; extension to be
601 specified independently of the last tiff filename. This works for
602 the default, -g and -o modes. It is ignored for the -r, -c and -ca
603 modes that use a basename for .ti2 in and .ti3 output. Note that the
604 full filename must be specified, including the extension. <br>
605 <br>
606 <br>
607 <br>
608 </body>
609 </html>