File: nipguidese4.html

package info (click to toggle)
nip2 8.9.1-1
  • links: PTS
  • area: main
  • in suites: forky, sid, trixie
  • size: 23,352 kB
  • sloc: ansic: 64,077; sh: 4,681; yacc: 1,133; makefile: 927; lex: 386; xml: 40; perl: 17
file content (444 lines) | stat: -rw-r--r-- 22,636 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"  
  "http://www.w3.org/TR/html4/loose.dtd">  
<html > 
<head><title>Infrared imaging</title> 
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> 
<meta name="generator" content="TeX4ht (http://www.tug.org/tex4ht/)"> 
<meta name="originator" content="TeX4ht (http://www.tug.org/tex4ht/)"> 
<!-- 3,html --> 
<meta name="src" content="nipguide.tex"> 
<link rel="stylesheet" type="text/css" href="nipguide.css"> 
</head><body 
>
  <!--l. 13--><div class="crosslinks"><p class="noindent">[<a 
href="nipguidese5.html" >next</a>] [<a 
href="#tailnipguidese4.html">tail</a>] [<a 
href="nipguidech3.html#nipguidese4.html" >up</a>] </p></div>
  <h3 class="sectionHead"><span class="titlemark">3.1    </span> <a 
 id="x11-100003.1"></a>Infrared imaging</h3>
<!--l. 15--><p class="noindent" >Most museums use tube cameras (usually called Vidicons)
for infrared imaging. Although they are relatively cheap
they are not very stable and they suffer from (sometimes
quite severe) geometric distortions. More modern solid-state
cameras are still expensive but are becoming more widely
used because of their greater stability. This guide assumes
you are using a tube camera but almost all of it applies to
solid-state cameras as well.
<!--l. 23--><p class="indent" >  Whatever your camera there are three main sources of
error which have to be addressed in order to be able to make
successful mosaics:
<!--l. 26--><p class="indent" >
    <ol  class="enumerate1" >
    <li 
  class="enumerate" id="x11-10002x1">Tube  cameras  suffer  very  badly  from  distortions
    in  the  image,  usually  either  &#8216;pin-cushioning&#8217;  or
    &#8216;barrelling&#8217;. These distortions result in alignment
    errors when sub-images are joined together.                </li>
          <li 
  class="enumerate" id="x11-10004x2">The sensitivity of the tube varies across its surface,
          causing   some   parts   of   each   sub-image   to   be
          brighter   than   others.   This   is   made   worse   by
          unavoidable variations in illumination. When a lot
          of such images are joined together the result is a
          &#8216;brick wall&#8217; effect.
          </li>
          <li 
  class="enumerate" id="x11-10006x3">The  sensitivity  of  the  tube  also  varies  between
          sub-images,   partly   as   the   overall   lightness   in
          the  field  of  view  changes,  and  also  because  the
          electronics  in  the  camera  change  as  the  camera
          heats   up.   This   leads   to   a   patchy,   unbalanced
          mosaic.
          </li></ol>
  <!--l. 47--><p class="indent" >    The first two problems will be different in each Vidicon
  and will change each time a tube is replaced. All three
  problems need to be addressed to create successful infrared
  reflectogram mosaics.
  <!--l. 51--><p class="noindent" >
      <h4 class="subsectionHead"><span class="titlemark">3.1.1    </span> <a 
 id="x11-110003.1.1"></a>Setting up your system</h4>
  <!--l. 53--><p class="noindent" >
      <h5 class="subsubsectionHead"><a 
 id="x11-120003.1.1"></a>Mechanical set-up</h5>
  <!--l. 55--><p class="noindent" >It is vital that the optical axis of the Vidicon is at
  right-angles to the picture plane and that, whether it is
  the Vidicon or the painting that moves during image
  capture, it remains perpendicular. Obviously, with a
  seriously warped panel, this may not be possible. The
  lighting should be carefully adjusted so that the area of
  interest is lit as evenly as possible. If you can, arrange
  for the lights to remain stationary with respect to the
  camera.
  <!--l. 62--><p class="indent" >    An easy way to test camera alignment is to image a piece
  of graph paper, move the camera (either left-right or
  up-down) by 90% of the field of view, and see how features
  in the overlap area move. First rotate the centre around the
  optical axis to get the centre line of the images lined up.
  Next check the corners and adjust camera pitch and
  yaw.
                                                                                       

                                                                                       
<!--l. 68--><p class="noindent" >
  <h5 class="subsubsectionHead"><a 
 id="x11-130003.1.1"></a>Video set-up</h5>
<!--l. 69--><p class="noindent" ><a name="nip_label_sec:vidpref"></a>
<!--l. 71--><p class="indent" >  On Linux, you can capture video directly into <span 
class="phvr7t-x-x-80">nip2</span>
provided that your capture card is compatible with v4l. You
may need to adjust the <span 
class="phvr7t-x-x-80">nip2 </span>video settings. These settings
can be found under the headings <span 
class="phvr7t-x-x-80">Video for linux </span>and <span 
class="phvr7t-x-x-80">General</span>
<span 
class="phvr7t-x-x-80">video capture </span>in the <span 
class="phvr7t-x-x-80">Preferences </span>window, which can be
accessed by selecting <span 
class="phvr7t-x-x-80">Edit </span>/ <span 
class="phvr7t-x-x-80">Preferences </span>from the main <span 
class="phvr7t-x-x-80">nip2</span>
window. The default settings, see Figure&#x00A0;<a 
href="#x11-130011">3.1<!--tex4ht:ref: fg:vidpref --></a>, are for the
Hauppauge PCI capture card and should be changed as
required.
                                           
                                                                                       

                                                                                       
<!--l. 80--><p class="indent" >  <a 
 id="x11-130011"></a><hr class="float"><div class="float" 
>
                                           
                                                                                       

                                                                                       
<div class="center" 
>
<!--l. 80--><p class="noindent" >
<!--l. 80--><p class="noindent" ><img 
src="figs/scr21a.png" alt="PIC"  
></div>
<br /> <div class="caption" 
><span class="id">Figure&#x00A0;3.1: </span><span  
class="content">Recommended video preference settings</span></div><!--tex4ht:label?: x11-130011 -->
<!--l. 82--><p class="noindent" ><a name="nip_label_fg:vidpref"></a>
                                           
                                                                                       

                                                                                       
  </div><hr class="endfloat" />
<!--l. 85--><p class="indent" >  Once you have set up your card, select <span 
class="phvr7t-x-x-80">Tasks </span>/ <span 
class="phvr7t-x-x-80">Capture </span>/
<span 
class="phvr7t-x-x-80">Capture Video Frame </span>to create a new video object, which will
appear as a still image in your current selected column. The
captured image can be updated by opening the image in a
viewing window and then pressing Ctrl-C (a shortcut for <span 
class="phvr7t-x-x-80">File</span>
/ <span 
class="phvr7t-x-x-80">Recalculate Image</span>).
<!--l. 91--><p class="indent" >  You can create more than one video object: this can help
you to get the overlaps right if you have two open at once
(one showing the previous grab) when you are moving the
camera around.
  <h5 class="subsubsectionHead"><a 
 id="x11-140003.1.1"></a>Setting the crop and aspect</h5>
<!--l. 97--><p class="noindent" >While it is possible to correct geometric distortions after the
image is captured, it is difficult to do the necessary
modelling accurately and reliably. Instead, we suggest the
grabbed images should simply be cropped, since the most
severe distortion affects the perimeter of each video
image.
<!--l. 102--><p class="indent" >  To determine the area to crop, set up the Vidicon as it
would be set to image a painting and capture an image of a
rectangular grid &#8212; a piece of graph paper works well as a
target. Before capturing the grid, check the current video
crop settings in the <span 
class="phvr7t-x-x-80">Preferences </span>window and ensure that the
crop is set at maximum: left 0, top 0, width 768, height 576
(these are the dimensions for a PAL signal, they may be
different on your system). Also set the <span 
class="phvr7t-x-x-80">Aspect ratio </span>line to
1.
<!--l. 110--><p class="indent" >  Create a new video object and look for the largest
rectangle with little distortion (no more than a few pixels).
If you create a region on the video image (by holding down
the Ctrl key and dragging down and right with the left
mouse button, see <span 
class="cmsy-10"></span><span 
class="ptmb7t-">??</span>) you can compare the straight edges
of the region against the distorted lines of the grid. You can
then expand and contract the region until you decide on the
optimum area. The settings you need for the crop box can
be taken from the values contained within the region
object, which can be viewed by left-clicking several
times on the down arrow to the left of the region object
name.
<!--l. 120--><p class="indent" >  Finally, you can set an aspect ratio: <span 
class="phvr7t-x-x-80">nip2 </span>will automatically
stretch video frames vertically by this factor. You can
measure the aspect ratio of your capture card by taking a
picture of something you know to be square and dividing
the width in pixels by the height in pixels.
<!--l. 125--><p class="indent" >  Move back to the <span 
class="phvr7t-x-x-80">Preferences </span>window and enter the crop
values in the <span 
class="phvr7t-x-x-80">General video capture </span>section. Next time
you create a new video object, you should find that it     is cropped to the appropriate area. The settings you
  enter in the <span 
class="phvr7t-x-x-80">Preferences </span>/  window will be saved and
  automatically loaded again next time you start <span 
class="phvr7t-x-x-80">nip2</span>. See
  appendix&#x00A0;<a 
href="nipguideap1.html#x48-89000A">A<!--tex4ht:ref: sec:config --></a>.
  <!--l. 131--><p class="indent" >    Choosing the usable area of the image is a matter of
  compromise &#8212; the smaller the area, the more images are
  required to build a mosaic of a particular painting. If the
  area chosen is too large then the amount of distortion can
  cause serious errors in the final mosaic.
  <!--l. 136--><p class="indent" >    It&#8217;s possible to use the VIPS rubber sheet plug in to
  detect and correct geometric distortion in your images
  automatically. This lets you use the full area of the sensor. It
  is a bit fiddly, but see the rubber sheet documentation if you
  are determined.
  <!--l. 141--><p class="noindent" >
      <h4 class="subsectionHead"><span class="titlemark">3.1.2    </span> <a 
 id="x11-150003.1.2"></a>Capturing the data</h4>
  <!--l. 143--><p class="noindent" >
      <h5 class="subsubsectionHead"><a 
 id="x11-160003.1.2"></a>Setting the gain and offset</h5>
  <!--l. 145--><p class="noindent" >Once everything is correctly set up, position the painting in
  front of the camera and experiment with the gain and offset
  settings on the Vidicon to achieve the optimum infrared
  image on the computer screen. Note that the appearance of
  the image on the computer will normally be different to its
  appearance on the video monitor connected directly to the
  camera.
  <!--l. 151--><p class="indent" >    Repeat this process at different points across the whole
  area to be captured. Although it is not always possible, the
  aim is to find a setting that does not need altering much
  during the capture of the data. This seems to lead to more
  successful mosaics.
  <!--l. 156--><p class="noindent" >
      <h5 class="subsubsectionHead"><a 
 id="x11-170003.1.2"></a>Grey card correction</h5>
  <!--l. 158--><p class="noindent" >To counteract the problem of uneven sensitivity across the
  target area of the tube, it is necessary to capture an image of
  a piece of grey card. This grey card image is then used to
  correct all subsequent images. The card should be a flat,
  even grey, of around 50% reflectance. The Vidicon and
  lighting positions with respect to the painting should not be
  changed between the imaging of the grey card and the
  capturing of the mosaic. A grey card can be captured at any
  time, but it is good practice to start with one &#8212; you may
  forget later.
                                                                                       

                                                                                       
<!--l. 167--><p class="indent" >  If your mosaic will take several hours to capture, you
may wish to grab extra grey cards, since the sensitivity of
the tube can change as it warms up. Be sure to note which
data images correspond to which grey cards!
<!--l. 171--><p class="indent" >  In association with the first grey card, it is a good idea to
grab an image of your grid to record the scale at which the
data images are being made.
<!--l. 174--><p class="noindent" >
  <h5 class="subsubsectionHead"><a 
 id="x11-180003.1.2"></a>Image capture</h5>
<!--l. 175--><p class="noindent" ><a name="nip_label_sec:imcap"></a>
<!--l. 177--><p class="indent" >  Open a video window, <span 
class="phvr7t-x-x-80">Tasks </span>/ <span 
class="phvr7t-x-x-80">Capture </span>/ <span 
class="phvr7t-x-x-80">Capture Video</span>
<span 
class="phvr7t-x-x-80">Frame</span>, and when it shows the desired area, save the file. The
choice of file name is a question of personal preference. We
find it helpful to use a format that indicates where in the
mosaic the data comes from &#8212; for example, <span 
class="phvr7t-x-x-80">dat3.5.v </span>for the
fifth image in row three.
<!--l. 183--><p class="indent" >  It is helpful to be able to see the previous image to ensure
that there is sufficient overlap. To achieve this, a second
video window can be opened and placed alongside and the
images grabbed into alternate windows.
<!--l. 187--><p class="noindent" >
  <h5 class="subsubsectionHead"><a 
 id="x11-190003.1.2"></a>Capture tips</h5>
    <ul class="itemize1">
    <li class="itemize">Make a new directory for each painting, and keep
    all of the image files for that painting (including a
    grey card and a grid) in that directory.
    </li>
    <li class="itemize">VIPS can join up images in any layout, but you will
    get much less confused when you assemble your
    images if you stick to a regular grid. This can be
    difficult &#8212; a good compromise is to keep one axis
    fixed and grab in rows (or columns).
    </li>
    <li class="itemize">You can help to reduce mosaicing errors later if you
    keep your rows (or columns) as short as possible.
    So if the painting is in landscape format, grab in
    columns (or turn the painting on its side and grab
    in rows); if the painting is portrait, grab in rows (or
    turn the painting on its side and grab in columns).
    </li>
    <li class="itemize">The  semi-automatic  mosaic  functions  (see  <span 
class="cmsy-10"></span><a 
href="nipguidese5.html#x12-230003.2">3.2<!--tex4ht:ref: sec:mosaicing --></a>)           need a minimum overlap between the sub-images
          they  join  of  around  20  pixels.  For  safety,  you
          should  aim  for  a  larger  overlap  than  this:  we
          recommend an overlap of 60 pixels (around 20mm,
          usually).
          </li>
          <li class="itemize">If  the  overlap  area  is  featureless,  it  is  worth
          identifying   a   good   tie-point   and   ensuring   it
          is  visible  in  both  images,  even  if  this  means
          increasing the overlap for one of the joins.
          </li></ul>
  <!--l. 221--><p class="noindent" >
      <h4 class="subsectionHead"><span class="titlemark">3.1.3    </span> <a 
 id="x11-200003.1.3"></a>Correcting illumination</h4>
  <!--l. 222--><p class="noindent" ><a name="nip_label_sec:grey"></a>
  <!--l. 224--><p class="indent" >    Before the mosaic can be assembled, the data images need
  to be corrected for non-uniformity of illumination using the
  grey card image. This function can be performed within <span 
class="phvr7t-x-x-80">nip2</span>
  or directly using a predefined VIPS command-line
  tool.
  <!--l. 228--><p class="noindent" >
      <h4 class="subsectionHead"><span class="titlemark">3.1.4    </span> <a 
 id="x11-210003.1.4"></a>Correcting with the command-line tool</h4>
  <!--l. 229--><p class="noindent" ><a name="nip_label_sec:linuxgrey"></a>
  <!--l. 231--><p class="indent" >    First, close <span 
class="phvr7t-x-x-80">nip2 </span>and open a command line window,
  (xterm, mingw, etc). Move to the directory containing your
  image files with <span 
class="phvr7t-x-x-80">cd</span>. For example, if you have made a
  directory called <span 
class="phvr7t-x-x-80">raphael </span>inside your home directory,
  type:
                                                                                       

                                                                                       
  <div class="verbatim" id="verbatim-6">
prompt%&#x00A0;cd&#x00A0;raphael
</div>
<!--l. 237--><p class="nopar" >
<!--l. 239--><p class="indent" >  The program you need to use is called <span 
class="phvr7t-x-x-80">light</span><span 
class="phvr7t-x-x-80">_correct</span>.
You need to give it the name of the grey-card image
and the names of all of the image files you want it to
correct with that gray card. Suppose you have saved
your gray card image as <span 
class="phvr7t-x-x-80">grey.v</span>, and your painting image
files are called <span 
class="phvr7t-x-x-80">dat1.1.v </span>and <span 
class="phvr7t-x-x-80">dat1.2.v</span>. You would then
enter:
                                                 <div class="verbatim" id="verbatim-7">
  prompt%&#x00A0;light_correct&#x00A0;grey.v&#x00A0;dat1.1.v&#x00A0;dat1.2.v 
</div>
<!--l. 247--><p class="nopar" >
<!--l. 249--><p class="indent" >  The program will run and print messages explaining its
progress. It creates a new set of corrected image files, with
the same names as before, but prefixed with <span 
class="phvr7t-x-x-80">ic</span><span 
class="phvr7t-x-x-80">_</span>. In this
example, it would create two new images files called
<span 
class="phvr7t-x-x-80">ic</span><span 
class="phvr7t-x-x-80">_dat1.1.v </span>and <span 
class="phvr7t-x-x-80">ic</span><span 
class="phvr7t-x-x-80">_dat1.2.v</span>.
<!--l. 254--><p class="indent" >    If there are a lot of image files to correct this could mean
a lot of typing. Fortunately, you can use wildcard characters
to abbreviate lists of file names. The example above can be
abbreviated to:
                                                                                       

                                                                                       
  <div class="verbatim" id="verbatim-8">
prompt%&#x00A0;light_correct&#x00A0;grey.v&#x00A0;dat&#x22C6;.v
</div>
<!--l. 260--><p class="nopar" >
<!--l. 262--><p class="noindent" >The <span 
class="phvr7t-x-x-80">dat*.v </span>means &#8216;any filename which starts <span 
class="phvr7t-x-x-80">dat </span>and ends
with <span 
class="phvr7t-x-x-80">.v</span>&#8217;.
<!--l. 266--><p class="indent" >  You can use this technique to correct different parts of
your mosaic with different grey cards. If you have a file
called <span 
class="phvr7t-x-x-80">grey1.v </span>for the first row in your mosaic, and a file
called <span 
class="phvr7t-x-x-80">grey2.v </span>for the second, you could do the correction in
two parts:
                                                 <div class="verbatim" id="verbatim-9">
  prompt%&#x00A0;light_correct&#x00A0;grey1.v&#x00A0;dat1.&#x22C6;.v&#x00A0;\\
 &#x00A0;<br />prompt%&#x00A0;light_correct&#x00A0;grey2.v&#x00A0;dat2.&#x22C6;.v 
</div>
<!--l. 274--><p class="nopar" >
<!--l. 276--><p class="noindent" >
  <h4 class="subsectionHead"><span class="titlemark">3.1.5    </span> <a 
 id="x11-220003.1.5"></a>Correcting within <span 
class="phvr7t-x-x-80">nip2</span></h4>
<!--l. 277--><p class="noindent" ><a name="nip_label_sec:wingrey"></a>
<!--l. 279--><p class="indent" >    The function within <span 
class="phvr7t-x-x-80">nip2 </span>used to preform this correction is
<span 
class="phvr7t-x-x-80">Tasks </span>/ <span 
class="phvr7t-x-x-80">Capture </span>/ <span 
class="phvr7t-x-x-80">Flatfield</span>. A set of images can be corrected at
the same time by joining them together in a <span 
class="phvr7t-x-x-80">Group</span>. A group
can be produced by selecting all of the required images and
then using the <span 
class="phvr7t-x-x-80">Edit </span>/ <span 
class="phvr7t-x-x-80">Group </span>command.
<!--l. 285--><p class="indent" >    Load all of your images into <span 
class="phvr7t-x-x-80">nip2</span>, and group all the image
except the grey image. Select your grey image and then
your new group and then run the <span 
class="phvr7t-x-x-80">Tasks </span>/ <span 
class="phvr7t-x-x-80">Capture </span>/ <span 
class="phvr7t-x-x-80">Flatfield</span>
function. This will produce you a group of corrected
images. Right-click on this new group and select <span 
class="phvr7t-x-x-80">Save As</span>
from the menu. In the save window type in a name, for
example <span 
class="phvr7t-x-x-80">fred</span><span 
class="phvr7t-x-x-80">_01.v </span>and then hit the save button. All of the
images in your group will then be saved as <span 
class="phvr7t-x-x-80">fred</span><span 
class="phvr7t-x-x-80">_01.v</span>,
<span 
class="phvr7t-x-x-80">fred</span><span 
class="phvr7t-x-x-80">_02.v</span>, <span 
class="phvr7t-x-x-80">fred</span><span 
class="phvr7t-x-x-80">_03.v </span>&#x2026; <span 
class="phvr7t-x-x-80">fred</span><span 
class="phvr7t-x-x-80">_n.v</span>.
<!--l. 294--><p class="indent" >    If you want to keep row numbers in your file names, (see
<span 
class="cmsy-10"></span><a 
href="#x11-180003.1.2">3.1.2<!--tex4ht:ref: sec:imcap --></a>), you will need to correct your images one row
at a time, saving each row as <span 
class="phvr7t-x-x-80">fred01</span><span 
class="phvr7t-x-x-80">_01.v</span>, <span 
class="phvr7t-x-x-80">fred02</span><span 
class="phvr7t-x-x-80">_01.v</span>,
etc.
                                                                                       

                                                                                       
  <!--l. 298--><div class="crosslinks"><p class="noindent">[<a 
href="nipguidese5.html" >next</a>] [<a 
href="nipguidese4.html" >front</a>] [<a 
href="nipguidech3.html#nipguidese4.html" >up</a>] </p></div>
<!--l. 298--><p class="indent" >  <a 
 id="tailnipguidese4.html"></a>   
</body></html>