Detailed Contents
1. Introduction
2. Starting DigImage
3. Basic Operation
4. Sample Session
5. Command Files
6. Movies
7. Coordinate Systems
8. Warnings, Errors and Crashes
9. Utilities
10. Macros
11. Other Considerations
12. Updates
Appendix A: Menus
Index
In this section we shall illustrate DigImage through the use of a sample session. For brevity menus will be given in a shortened form, showing only those items of direct interest. The sample problem we shall consider is the advance of a two-dimensional gravity current in a quiescent ambient fluid along a channel. We shall assume the experiment was visualised by adding dye to the gravity current and that the experiment was illuminated by diffuse back lighting (e.g. a projector shining on tracing film).
The first stage of processing is to acquire a time sequence of images. For the final "production" run of the analysis this will most readily be done by having the computer control the VTR (see section 5.5 for an example command file using this feature), but in the first exploratory analysis it is more convenient to manually synchronise the acquisition process. On starting, DigImage will be positioned in the main menu:
Main Menu
A: Additional User Supplied
C: Contours and Edges D: Plots & Screen Dumps
E: Enhance image F: Filter
G: Grab/Display
...
f1 Help shift_f1 General help
->
Selecting [G: Grab/Display] by pressing <G> moves to the child menu
=>G
Grab & Display Menu
A ALU acquire F Freeze frame
G Grab single frame T Grab frame after a delay
S Grab a sequence of frames X Strobe video source
Y Select multiplexed input R Real colour grab
B Display specific buffer Decrease buffer by one
D Display sequence of buffers Increase buffer by one
J Display summary of buffers Z Zoom & pan/locate points
C Copy a buffer E Erase a buffer
M: Manipulate image N Exchange Buffers
I Display intensity scale O: Output Look Up Table
f1 Help shift_f1 General help
Q Return to parent menu
->
The simplest method for acquiring a single video frame into a frame buffer is by selecting the [G Grab single frame] option. For later use we shall acquire a picture of the background illumination (before the gravity current is released) into buffer 1, and a snap shot of the gravity current at some stage of its development into buffer 2.
->G Grab to which buffer ? => =>1 Press any key to grab frame (C for continuous acquisition)
You now need to place the VTR in PLAY mode. You should notice that the frame grabbers monitor is displaying the same image as on the video, although it may be in false colour. At some point while the background illumination is being displayed, press any key (except <C>) to complete the acquisition. After the image is acquired, DigImage returns to [;G: Grab & Display]. Now repeat this process to acquire an image of the developing gravity current.
->G Grab to which buffer ? => =>2 Press any key to grab frame (C for continuous acquisition)
The DT-2861 and DT-2862 frame grabbers are grey scale devices, digitising only the intensity and not the colour information of the incoming video signal. While the frame grabber board accepts a colour signal, it performs better when receiving only the intensity information. If the frame grabber is connected to the VTR through the VTR's Super VHS socket, then it will only be receiving monochrome information. However, if the connection is through the BNC connector, it is desirable to place the VTR's MODE switch (AG7330) or on-screen menu setting (AG7350) to B&W before acquiring the buffers. Failure to do this can lead to the colour signal interfering with the intensity information during the digitisation process.
DigImage may map the intensities of the digitised grey scale image to a wide range of false colour schemes. The human eye is not very sensitive to gradual changes in intensity and so such mappings frequently aid in the interpretation of the information contained in the image. The false colours are generated through an "output look up table": the eight bit intensity signal acts as a pointer to a table containing 256 entries. Each entry encodes eight bit values for the red, green and blue components to be used for that intensity when displaying the image on the frame grabber monitor. Before exploring the various mapping schemes, we shall add an intensity scale to a copy of the gravity current image. First make a copy of this image by selecting [C Copy a buffer]
->C Copy which buffer ? => =>2 To which buffer ? => =>3
then change the output to the copy in buffer 3 using [B Display specific buffer]
->B Display which buffer ? => =>3
and add the intensity scale to the bottom of the image using [I Display intensity scale]
->I
Place intensity scale at Bottom, Top, Left, Right or Nowhere ?
{BTLRN}->
->B
The bar which is produced by this option corresponds to a linear change in the digitised intensity from a value of zero at the left hand end to 255 at the right. Note that this may not represent how a linear change of intensity is seen by a video camera or video tape as each element has its own inherent response which will need careful calibration if the absolute intensities are required.
To change the false colour scheme select the [O: Output look up table] option from ;G: Grab & Display].
->O
Output Look Up Tables
0 Monochrome - positive 1 Monochrome - negative
2 Single cycle false colour 3 Single cycle false colour
4 Pseudo-contours 5 R:8G:64B
...
Next LUT
Previous LUT
U User file
f1 Help shift_f1 General help
Q Return to parent menu
->
Selecting any of the menu options [0 Monochrome - positive] to [M Single cycle - much whitened]. The up and down arrow keys may be used to move through the tables one at a time. Try exploring the various possibilities. The intensity bar at the bottom of the image will show you how the colours map onto the grey level intensities.
We shall now process some of the information on the images. We start by returning to the main menu. This may be achieved either by selecting [Q Return to parent menu] twice, <escape> twice or more conveniently by
->;
which will always return to the main menu from whatever menu you are currently in.
Most video sources operate in an interlaced mode. This means that a single frame is made of two video fields. The first field to be transmitted contains all the even numbered lines, and the second all the odd numbered lines. The field rate (50 or 60Hz) is twice the frame rate (25 or 30Hz). Typically the electronic shutter on a video camera is open on a duty cycle equal to the field rate and not the frame rate, and so the information contained in the two fields corresponds to slightly different times. If the flow is evolving rapidly, in terms of pixels per field, this small difference can be very important.
For our present example we shall assume that the flow is evolving rapidly. A shimmering of the digitised image usually indicates this situation. To make use of such an image it may be necessary to consider only one of the two fields contained in the frame. We may select either the even or the odd lines, or by creating a copy of the image, select the even lines in one copy and the odd lines in the other. Effectively we filter out the unwanted lines from one of the images. From the main menu we enter the [F: Filter] menu tree
Main Menu
A: Additional User Supplied
C: Contours and Edges D: Plots & Screen Dumps
E: Enhance image F: Filter
G: Grab/Display
...
f1 Help shift_f1 General help
->
->F
Filter Menu
C: Convolution filters
F: Fourier domain filters
I: Interlace filters
L Fast low pass filter
M: Morphological filters
f1 Help shift_f1 General help
Q Return to parent menu
->
A wide variety of different filter types are available within the various child menus. For our present purpose select [I: Interlace filters]:
->I
Interlace Filters
A Average interlace information
D Duplicate interlace information
I Intensity interlace correction
V Vertical line interlace correction
f1 Help shift_f1 General help
Q Return to parent menu
->
To remove the information from one field we must replace it with information from the other. This may be achieved in two ways: we may simply copy the contents of the even (odd) lines into the odd (even), or we may replace the even (odd) lines with the average of the neighbouring odd (even) lines. Both strategies lead to an image containing the same amount of information, but the second yields a somewhat smoother image. For this example we shall employ the averaging process by selecting [A Average interlace information]:
->A
Filter which buffer ?
=>
=>2
Average Window or Whole Screen ?
{WS}->
The interlace filter may be applied to the entire frame buffer (selected by pressing <S>) or a window within the buffer (selected by <W>). For the time being we shall filter the entire buffer. If window filtering were selected, DigImage would produce the Window Selection submenu to provide window specification. Use of this submenu is illustrated later in this sample session.
->S
Use Odd or Even lines ?
{OE}->
We shall keep the odd lines and remove the even numbered lines. With high quality images there is no difference (other than the corresponding times) between either choice. However, for low quality images the frame grabber generally makes a better job of digitising the odd numbered lines, and so there may be some advantages in utilising the odd field.
->O
We shall now consider the background illumination. As this should not be changing with time, there is no need to remove one of the video fields. Moreover the background illumination should normally be relatively smooth, although the digitised version may contain some noise component. To ensure the background image is smooth, and reduce the noise component we shall apply a low pass filter to this image. First select [Q Return to parent menu] (or <escape>) to return to the parent filter menu and then enter the [C: Convolution filters] menu:
->Q
Filter Menu
C: Convolution filters
F: Fourier domain filters
...
Q Return to parent menu
->
->C
Convolution Menu
1 Low pass, 5 point
2 Low pass, 9 point
3 High pass, 5 point
4 High pass, 9 point
5 Laplacian, 5 point
6 Laplacian, 9 point
L Low pass, MxN point
U User-specified convolution kernel
f1 Help shift_f1 General help
Q Return to parent menu
->
A convolution filter operates by replacing the intensity of a pixel at a point by a linear combination of its own old intensity and the old intensity of its neighbours. A simple low pass filter is obtained by effectively applying a moving average over a small window to the image. Menu options [1 Low pass, 5 point] and [2 Low pass, 9 point] offer predefined filters giving such a low pass character with the averaging being performed over five and nine pixels respectively. Alternatively [L Low pass, MxN point] offers greater flexibility, and [U User-specified convolution kernel] allows complete specification of the linear combination to be used. We shall select [L Low pass, MxN point] and filter using an average extending seven pixels vertically by five horizontally. As for the foreground buffer, we shall filter the entire buffer.
->L
Filter which buffer?
=>
=>1
Filter Window or whole Screen ?
{WS}->
->S
Number of rows in low pass kernel (odd) ?
=>
=>7
Number of columns in low pass kernel (odd) ?
=>
=>5
We shall now utilise the image containing background illumination to correct the developing gravity current for the non-uniformity of this illumination. After returning to the main menu via <;> we enter the [E: Enhance images] menu. There may be a short delay between pressing <E> and the Enhance images menu starting as it may be necessary for DigImage to change to a different program module.
->;
Main Menu
A: Additional User Supplied
C: Contours and Edges D: Plots & Screen Dumps
E: Enhance image F: Filter
G: Grab/Display
...
f1 Help shift_f1 General help
->
->E
Enhance Images
A Average of buffers
C Concentration of dye - allowing for parallax
D Correct Dye image for background variations
E Histogram equalisation
F: Fit polynomial to background
I Intensity histogram
L Linear intensity changes (i <-- a + bi)
R RMS average of buffers
f1 Help shift_f1 General help
Q Return to parent menu
->
For simplicity we shall assume the camera is a reasonable distance away (relative to the width of the tank) from the evolving current so that parallax does not represent a significant problem in the analysis. Option [D Correct Dye image for background variations] is tailored to modify the foreground image for variations in the background. The basic assumption made is that a given concentration of dye absorbs a fixed fraction of the light passing through it regardless of the intensity of that light. Under this assumption the we may correct for the background intensity variations by simply dividing the foreground by the background, normalising the result in a suitable manner. Strictly speaking the correction should be undertaken using absolute intensities taking into account the intensity transfer functions of the camera, VTR, video tape and frame grabber. DigImage includes a number of features aimed at relating the digitised intensities and absolute intensities. Most of these reside in the menu [;PI: Intensities] - refer to the Help System in this menu for further details. For the present analysis we shall assume the digitised intensity scale is reasonably close to an absolute intensity scale (within an arbitrary constant of proportionality). The validity of this assumption depends primarily on whether the camera being used imposes a gamma correction (see Document\Cameras.TXT for details) and whether the gain and zero offset of the frame grabber card are adjusted appropriately (refer to the frame grabber manual for details).
Under the above assumptions taking the logarithm of this quotient will return a value proportional to 1-C, where C is the concentration. For more details consult the <f1> help facility for this option. Assuming linear response etc. we may undertake this correction and place the result in buffer 3 (overwriting the image already there) by
->D
Buffer containing background ?
=>
=>1
Correct what buffer for background ?
=>
=>2
Another buffer {Y/N} ?
->
->N
Buffer for first corrected image (the second will be in one more than
this etc.) ?
=>
=>3
Intensity scale factor (around 1) ?
=>
The intensity scale factor is used to rescale the resultant intensity to make the most use of the 256 available values. Typically a value in the neighbourhood of 1 is required.
=>1 Intensity black offset (around 0) ? =>
This value affects the corrected value which will be set to an intensity of zero. The value should be in the range 0.0 to 1.0. Typically 0.0 gives good results.
=>0
Use Rational (F/B) or Logarithmic (log(F/B)) correction {R/L} ?
->
->L
Correct in Window or whole Screen {W/S} ?
->
As with the filtering processes, we have the option of processing either the entire screen (<S>) or a window within the buffer (<W>). To illustrate the windowing procedure, we shall select <W>.
->W
Window Selection: Region to correct for background
arrow keys - control of corner numeric pad - shift window
page up/down home/end to move to extremes
C Reduce size of window E Increase size of window
X Toggle between opposite S Toggle between speeds
D Set to default window W Set to whole screen
M Enter coordinates from keyboard V Enable mouse <=> no VTR control
G Exit and make this the deflt Q Exit; leave default
H Help on windows
->
The window may be resized and moved as the user desires, provided it remains rectangular. The most useful method of control is using the cursor keys to move either the top left or bottom right corner of the window around the screen. [X Toggle between opposite corners] may be used to toggle between moving the top left and bottom right corners. For each press of a cursor key the corner may be moved by either one or 16 pixels. [S Toggle between movement speeds] toggles between the large and small steps. In addition eight of the keys on the numeric key pad may be used to move the window around the screen without changing the shape or size of the window. For example, <2> moves the window down either 1 or 16 pixels, while <9> moves it up and to the right by the currently set amount. [C Reduce size of window] and [E Increase size of window] may be used to change the size of the window without affecting either the aspect ratio or the location of its centre.
For this example we shall utilise the [M Enter coordinates from keyboard] option to manually specify the corner coordinates for the window.
->M
Specify using Pixel or World coordinates {P/W} ?
->
As we have not specified a world coordinate system, we shall give the window in pixel coordinates. The coordinate origin is at the top left corner of the screen with i downwards and j towards the right. We shall set up the window to extend from (100,0) to (411,511), leaving a boarder 100 pixels wide at the top and bottom of the image. This choice is purely arbitrary in this example.
->P Present window: 256 270 300 333 Top of window (now 256) ? =>256 =>100 Bottom of window (now 270) ? =>270 =>411 Left side of window (now 300) ? =>300 =>0 Left side of window (now 333) ? =>333 =>511
Now that the window is specified as we want it, we may exit using either [G Exit and make this the default] or [Q Exit; leave default unchanged]. The effect of selecting the former is to make the current window the one which the Windows Selection submenu will produce the next time it is entered, while the latter option will mean the submenu will again produce the (100,0) to (411,511) window.
->G
An alternative method exists for systems with a mouse fitted to one of the serial ports (as the video needs two serial ports, such systems must have at least three serial ports). The following combination of movement and buttons may be used to alter the window:
| Mouse buttons | Effect of mouse movement |
| No buttons | No effect |
| Left button | Drag top left corner of window |
| Right button | Drag bottom right corner of window |
| Left + Right | Drag entire window without changing size or shape |
| Middle | Drag top left corner of window to change size and shape, but leaving middle of window where it is |
| Left+Middle+Right | Equivalent to [Q Exit, leave default] |
Note that a serial mouse may not be used when the computer has active control over the VTR. This limitation is due to potential conflicts between the serial port to which the mouse is attached and that controlling the VTR. The control over the VTR may be relinquished (and mouse enabled) either by choosing [;VX Return to previous menu, disabling video routines] when exiting [;V: Video tape recorder control], or by selecting [V Enable mouse <=> no VTR control]. Moreover under Windows 95 the mouse may not behave quite as expected unless DigImage is running in full screen. We recommend, therefore, that if you wish to use the mouse, that you switch to full screen mode. With Windows 3.11, the mouse will only be usable if there is a DOS level mouse driver installed and you are operating at full screen.
We now have the corrected image displayed in buffer 3. Regions where the gravity current has not reached should have an intensity of approximately 255 (white). If the intensity differs significantly from this, then it is likely that the video tape was made using a camera with an automatic gain control and/or automatic iris activated. This may lead to difficulties in analysing the flow as the camera will continually adjust its exposure with the changing flow.
To help interpret the image, it is useful to add
an intensity scale to the image. This may be achieved either by
returning to [;GI Display intensity
scale], or more conveniently through
a function key. Pressing <ctrl><f1>
displays a brief function key template
| f1 | f2 | f3 | f4 | f5 | f6 | f7 | f8 | f9 | f10 | f11 | f12 | |
| alt | Index | MSDOS | Summar | News | Del | Macro | ||||||
| ctrl | Fn Hlp | CD | ? Buf | ?OLUT | Text | Type | Erase | PrtSc | Aver | Main | ||
| shift | Gen Hlp | Hist | Buf | OLUT | Sectn. | Close | XFn | Grab | Dupl | Copy | VTR | |
| Help | Dir | Buf | OLUT | Cursor | Journ | Inv | Mask | Scale | Filt | Copy | X VTR |
from which we may see that <f9> will display the intensity scale (on the current buffer).
-><f9>
Place intensity scale at Top, Bottom, Left, Right or Nowhere ?
{T/B/L/R/N} ->
->
->B
On pressing <f9> a region of the computer screen is blanked out and the prompt generated in inverse video within that region. After the operation is complete the original contents of that region are restored. This behaviour is typical of facilities invoked by function key sequences. Refer to section 3.2 for further details on other function keys.
To complete this sample session, we shall produce a contour map of the intensities in our corrected image. After returning to the main menu by <;>, we shall enter the [C: Contours and Edges] menu and choose the [C Contours] option within it to produce an iso-concentration contour on buffer 4.
->;
->C
Contours and Edges
C Contours
E Locate edge in window
F Fill to contour
I Remove small islands
M Produce contour mask buffer
P Points with additional data
S Plot intensity sections
f1 Help shift_f1 General help
Q Return to parent menu
->
->C
Find contours on which buffer ?
=>
=>3
Plot contours on which buffer ?
=>
=>4
Contours in Window or Screen {W/S} ?
->
We shall confine the contours to the same window as we used to correct the image (we made this the default window).
->W
Window Selection: Region containing contours
...
G Exit and make this the default Q Exit; leave default
H Help on windows
->
->G
Threshold value ?
=>
We shall contour the concentration corresponding to an intensity of 128, and plot it with the same intensity.
=>128 Plot contour with what intensity ? => =>128 Minimum number of points in edge ? =>
Contours containing fewer points than this will not be plotted. We shall plot only those contours containing at least 100 points, and smooth the contours by taking a running average over five points.
=>100 Smooth over how many pixels ? => =>5
This sequence may be repeated with different intensities as often as desired. Each time the contour will be overlayed on the current contents of buffer 4. To erase the contents, either invoke [;GE Erase a buffer] or use <ctrl><f8> to erase the current output buffer.
To complete our sample session, use <;>
to return to the main menu then invoke [Q
Exit DigImage] to return to MS-DOS. For
an example of how to automate such an analysis, using the computer
control of the VTR for acquiring images, refer to section 5.5 In
this example we have covered only a small fraction of DigImage's
capabilities. The best way to learn what DigImage is capable of
is to simply try it out. Remember that <f1>
and <shift><f1>
will provide help on whatever you are doing whenever you need
it.
DigImage documentation page
DigImage home page
Stuart Dalziel's home page