||Imaging a vampire
(PC-based image processing software)
||ESD: The Electronic System Design Magazine
||Hollinger, Steven J.
|© Sentry Technology Group, Inc.
Three image processing packages - Optimas from BioScan,
ImagePro from Media Cybernetics, and Semper 6 from Synoptics - are
currently available for DOS-based image processing. Using test images
from F.W. Murnau's 1922 film Nosferatu, Eine Symphonie Des Grauens (A
Symphony of Terror), all three packages were reviewed on an AT-compatible
system. Targeting the familiar disciplines, from microbiology to criminology,
these three products distinguish themselves by tapping into various niche
markets. For example, Semper 6 contains a class of commands of multispectral
analysis addressing the study of remotely sensed data.
Nosferatu represents one of the finest examples of German expressionist
cinema. Over time, many frames from the film have become damaged or lost.
Aside from the challenge of restoring these frames, other mysteries prompted
the choice of Nosferatu as an image processing subject. Confusion about
the true identity of the actor portraying the vampire in Nosferatu led
to a facial structure examination. And hieroglyphic markings in the film,
not visible to the naked eye, can be recovered using image processing
Nosferatu was loosely based on Bram Stoker's Dracula. Stoker's widow sued
the production company and had the master negative and copies destroyed.
Fortunately, a pirated version was brought to France and was eventually
released in America in 1929. Though currently in restoration, the duplication
process has reduced Nosferatu to a low-contrast, flat negative.
Where File Formats Diverge
Optimas, ImagePro, and Semper 6 have many similar features. Each includes
standard operations for image acquisition and basic processing. Rudimentary
file operations are also similar, with facilities to save and restore
disk-based images. Fortunately, although file formats differ, some standards
are adopted. ImagePro from Media Cybernetics (Silver Spring, MD) uses
CUT and Halo File Format (HFF) files. ImagePro documentation describes
a CUT file as a "device-independent storage format." HFF images
can be ported between applications developed in the HALO environment.
Because the HFF file is an extension of TIFF, ImagePro can import TIFF
files and export HFF files into applications with TIFF support.
Synoptics' (Cambridge, England) Semper 6 archives images in various internal
file formats, partitioned into libraries for added organization. Storing
images in byte, integer, floating-point, or complex representation, Semper
6 shields the operator from internal conversions. By maintaining floating-point
and complex representations, Semper 6 makes a reasonable trade-off: Disk
space and processing time are increased for the sake of image accuracy.
However, Semper 6 does not support standard image file formats.
Optimas from BioScan (Edmonds, WA) uses the TIFF file format so, like
ImagePro, its images can be imported from or exported to a number of imaging
Whereas ImagePro can output to PostScript printers, Optimas and Semper
6 support Encapsulated PostScript (EPS) output files. EPS files contain
PostScript commands to print high quality halftones, or to integrate images
into page layout for automatic stripping. Unlike TIFF, EPS images cannot
be read back into an image processing for additional manipulation or analysis.
Looking Through Windows
Interfaces for all three packages differ. Semper 6 is designed around
a command line interface familiar to DOS or UNIX users, while Optimas
runs under Microsoft Windows. ImagePro runs under its own menu system,
similar to Windows but with hierarchical menus rather than the menu-bar
Optimas can run the application either using a provided runtime version
of Windows, or by purchasing and installing Microsoft Windows separately.
With Optimas, BioScan maximizes the Windows environment. Optimas can run
simultaneously with other Windows-based applications, like Microsoft Word.
It can move data between these applications, passing text and graphics
information through the Window's clipboard. One of the most advantageous
features is the ability to use the DDE (Dynamic Data Exchange) facility
in Windows to link two concurrent applications to the same data. Of course,
Windows skeptics retain the right to wince at some anomalies, such as
the ease with which Optimas lets the user quit without first saving the
ImagePro's presentation uses a single main menu in which options can be
selected to bring up submenus. The main menu contains options ranging
from File to Filtering. To use hierarchical menus, the operator may have
to use the keyboard or close menu boxes from one class of operations to
select another under a different branch of the main menu.
By comparison, Semper 6 is more akin to a shell than an application with
its command line interpreter. To Synoptics' credit, a library of routines
for custom menu development is included for programmers who want mouse-driven
operation. Semper 6 commands can be typed in at a prompt or invoked through
a script file. Here, the mouse is typically used on the image display
for choosing points, lines, curves, or areas of interest rather than on
the primary PC display for program choices. For instance, if "xwires"
is entered at the command prompt, Semper 6 waits for a mouse click in
the image, and sets (x,y) variables to the position of the selected pixel.
ImagePro Detects Hieroglyphics
With a library of filters, both linear and nonlinear, ImagePro subclassifies
them according to operation type - blurring, sharpening, morphology, or
edge detection - within its Filter menu. Blurring operations include low-pass
and median filters, while sharpening filters include high-pass and unsharp
masking. These filters are applied to the framestore-based image, working
their way from top to bottom of the image. This is particularly helpful
in some instances for tracking completion time. Kernel size, a filter
scale factor (affecting lightness), and a filter boost factor (affecting
sharpness) can be changed through an Attribute option. Filters run quickly
and can often be reapplied to simulate larger matrix sizes.
User-specified filters and built with ImagePro's kernel editing module.
Here, a 3 X 3, 5 X 5, or 7 X 7 filter can be created, named, and saved.
ImagePro is packaged with nearly 15 undocumented filters found under the
user-specified menu, from low-pass to Laplacian derivatives. These filters,
as well as those created in the kernel editor, are specified by filename
when invoked. Because the directory of filenames may be so long that it's
unwieldy, repeated invocations of user-specified filters should be left
to ImagePro's macro-generation module.
ImagePro's morphological filters include the basic erosion and dilation
pair, used for identifying the most primary shapes in an image. These
two filters can be combined or repeated to simulate skeletonizing, thinning,
or thickening. Other common morphological operations, such as border object
removal, labeling, and hole filling, are absent.
Contrast manipulation, histogram equalization, and thresholding operations
are defined within ImagePro's Contrast menu. Here, contrast can be interactively
adjusted by drawing a contrast mapping function with the mouse while the
palette is dynamically updated to display the changes. Three flaws diminish
the usefulness of this interface: the dialogue box used for drawing the
contrast function covers a large portion of the image; the image's histogram
is not displayed during the contrast adjustment; and the contrast function
cannot be created as a curve, only as a series of sloped line segments.
In most instances, noninteractive adjustments are a better choice.
For noninteractive contrast changes, ImagePro provides five predefined
histogram equalizations, among which are logarithmic, linear, and bell
curves. These equalizations can be applied to an ROI, to the entire image,
or to the display palette. Thresholding the image or shifting pixel values
can also be accomplished quickly on the image, ROI, or palette.
Arithmetic, logical, and geometric functions are defined in the Operations
item in ImagePro's main menu. For arithmetic and logical groups, the current
ROI can be processed using a unary operator (perhaps subtracting a constant
from each pixel), or combined with another image. The second image can
be stored permanently in a file or temporarily in ImagePro's alternate
image buffer or "page." Selections can be rotated to any integer-degree.
ImagePro rotations are fast, but the trade-off is often a noticeable degradation
in the image quality. Scaling is fast because it uses pixel replication
rather than interpolation, and can be applied to various source/destination
ROIs. Resizing while preserving the aspect ratio and warping the image
are not supported.
Once an image is sufficiently processed, information can be obtained either
from the visual presentation or from an analysis of the image in statistical
measurements. ImagePro's Measurement menu includes commands for measuring
pixel intensity, distances from point-to-point, and angles. Using a calibrate
facility, distances are represented in a user-defined measurement system.
These measurements are displayed on the primary PC display, but cannot
be directed to a disk file. The Analysis menu contains histogramming and
profiling functions. Cumulative and selective histograms can be generated
for points, lines, or ROIs. ImagePro includes line intensity and frequency
profiles. Though the selected line disappears once the statistics are
produced, the extracted data can be saved to disk for post analysis.
Macros can be developed in ImagePro through an interactive script builder.
Using the mouse, actions are recorded to a script file that can be saved
for later replay. Though virtually undocumented, the macro facility is
powerful as a prototyping language. Interestingly, the ImagePro macro
generator produces readable ASCII scripts that can be modified in any
text editor once the syntax is understood.
Image filtering and ROI capabilities of ImagePro can be applied to detect
features within images. In image analysis, this can provide vital information
to image processing researchers. For example, in 1930, a sound version
of Nosferatu was released, called Die Zwolfe Stunde. This version contained
new scenes and different character names from Murnau's original. Though
Murnau's script distinctly called for hieroglyphic markings to be used
on various papers in the film, one interesting mark was detected by ImagePro - providing
Die Zwolfe Stunde's origin. Figure 1 (top left) shows an unretouched scene
depicting Nosferatu reading a paper. Markings on the paper are not discernible
with the naked eye. In the top right, dynamic range has been stretched.
In the bottom left, the image has been filtered and a cubic function applied
to the image histogram. At the bottom of his image (in small box), the
letters "NOSF" were detected. Finally, at bottom right, these
markings have been scaled up.
Semper Restores Imaging Predator
Just as ImagePro and Optimas have organized menus, the facilities in Semper
6 can be broken into logical groups. There are five main divisions: device
management, picture management, image processing, image analysis, and
program control. The device management group includes commands for examining
and reorganizing Semper 6 devices or libraries. Picture management commands
perform display, palette, and other primary maintenance operations. Image
processing and analysis categories are self-descriptive. The program control
command set offers structured programming conventions as well as a library
of user-interface functions. It should be noted that a single Semper 6
command sentence, for example "if 10 Fourier from 1 to display,"
can perform operations from more than one of the five main classes.
For device management, Semper 6 users can control the display, image,
and library devices. The commands let devices be created, examined, and
erased, rather than individual pictures. Multiple image libraries can
be opened at once, and images can be transferred across any open device
of the same type. The "partition" command is extremely powerful,
creating defined partitions on the image display. By assigning a custom
palette to each partition, Semper 6 can organize the display into separate
windows, not just separate ROIs as in Optimas and ImagePro. (In fairness
to these packages, it should be mentioned that similar functions can be
achieved through scripting.)
Synoptics' interpreter is the key to Semper 6's success in image processing
and analysis. The interpreter is so complex it would be difficult to represent
in a menu-or icon-based interface. Most Semper 6 commands have suboptions
and, in many cases, commands can be combined to carry out complicated
or very specific operations with maximum efficiency. As an example, "Erode
from i1 to i2 times n" erodes an n-pixel border off all objects in
image 1, saving the result in image 2. This type of operation is typical
of those used during a Semper 6 session.
Semper 6's image processing library is extensive. Convolution kernels
can be defined or chosen from a set of common filter functions. With the
Synoptics Synergy board, many linear filters can process an entire framestore
in roughly 5 sec (Media Cybernetics and BioScan also optionally support
DSP hardware). As with the other packages reviewed, Semper 6 lacks crucial
morphological processing support with only binary erosion and dilation
filtering. However, particle options bolster its morphological offerings.
With standard geometric transformations for scaling, rotating, compositing,
and warping, as well as a "calculate" command for performing
arithmetic operations, Semper 6 is fundamentally well-rounded.
For extraction of numerical image information, Semper 6 has various options.
Point, line, or histograms can be generated. The library for particle
analysis is quite rich. What Semper 6 lacks in morphological filters it
makes up for in morphological analysis. In fact, particle commands are
designed to perform useful morphological functions. For example, "pedit,"
defined to eliminate image particles, can be used to label pixels, cells,
or blobs. The particle command library can assist in the identification
of shapes, and in the sorting or counting of these shapes.
Once strained, particles can be analyzed to determine measurements such
as area, roundness, or center of mass. Though in some instances small
procedures have to be written, in general particle statistics and measurements
can be extracted by a single command. In fact, "analyze" and
"pcalculate" are used exactly for this purpose - they channel
information about each particle to the current output stream.
Semper 6 also categorizes a group of commands for remote sensing application.
Remotely sensed images are typically multispectral, containing layers
of information from different spectral profiles. Semper 6 offers commands
for classifying, correcting, and generating statistics from these multilayered
images. A "separate" command produces multiple single-layered
images from one multilayered image. Inversely, the "stack" command
can create multilayered images. Although Semper 6 is the only package
reviewed to offer multispectral processing, other commercial DOS-based
packages for remote sensing are available.
To get the most from Semper 6, line macros, scripts, and eventually programs
should be developed. Line macros can be constructed, labeled, and invoked
during one session. Scripts are basically text files containing a series
of Semper commands. Because Semper 6 lacks a text editing facility or
a learn mode, Semper scripts must be written outside the Semper session.
For command line, macro, or scripted processing, Semper 6 includes an
extensive set of programming constructs. In addition to ifs, loops, and
jumps are some obscure but often useful tools. The "assign,"
"log," and "echo" operations allow data to be opened,
written to, and redirected from multiple output streams. File output streams
are vital for gathering statistics.
Unique to Semper 6 is support for extensive processing outside the spatial
domain. Often, undesirable artifacts can be identified and eliminated
once the image enters a different representation. Other benefits of these
alternative processing methods include image compression and pattern matching.
Semper 6 can convert an image to Fourier, power spectrum, or Walsh representations,
process this resultant data, then perform an inverse transformation back
to the spatial form.
Because periodic noise will appear as a spike in the frequency domain,
it can easily be removed by a point transform. Figure 2 depicts a frame,
unretouched, from a commercial video copy of Nosferatu. In the top left
is a scene from the film which has lost the dynamic range captured by
the original print. Moving clockwise, a region of interest (ROI) is selected
(top middle) using Semper 6 and its histogram slightly stretched. The
histogram is equalized, enhancing contrast but also boosting periodic
noise introduced during video capture (top right). A Fourier transform
is performed, and the power spectrum displayed - periodic artifacts appear
as spikes (middle right). These Fourier spikes are masked to eliminate
only the periodic abnormalities, then the inverse Fourier is performed
to return the image to its spatial representation (bottom right). The
image is again equalized to enhance its contrast (bottom middle). Notice
how the noise has been removed with minimal loss of detail. Finally, the
entire process is applied to the original scene (bottom left).
Optimas to Vampire: What If?
With the elegance of a Windows interface, similar in many ways to that
found in ImagePro, Optimas makes "what if?" experiments easy
to perform. Its strength, however, does not lie in prototyping. Rather,
Optimas excels in the ability to classify and extract information from
segmented images. Though Optimas covers the fundamental image processes,
it is obvious that BioScan has placed the greatest emphasis on the data
collection facility. Through it, menu analysis and extraction is facilitated.
With support for a C-like macro language and Microsoft's DDE exchange
protocol, Optimas users can communicate the extracted data.
Optimas' main menu options are File, Edit, Image, Data, and Macro. The
File menu performs perfunctory file and printer I/O tasks. The Edit menu
is where Undo and ROI selections reside. Image processing functions are
invoked through the Image menu, while analysis operations are found under
the Data menu. Finally, macro recording and playback can be signaled via
the Macro menu.
As expected under Windows, Optimas' File and Edit menus fulfill their
basic responsibilities without offering flashy options. Here, in addition
to the aforementioned Undo and ROI options, other options exist for configuration
recall and for creation of an output data stream. One other notable feature
in the File menu allows notes, titles, and other information to be saved
along with TIFF or PostScript files. Optimas provides an option to save
overlay information along with the image file. A "Print" option
is supported and configured under Windows.
The Image menu divides processing tasks into nine classes: contrast adjustments,
histograms, palette operations, filters, arithmetic operations, retouching,
scaling and thresholding, and frame capture options. Contrast adjustments
are powerful, yet somewhat inflexible. Optimas performs dynamic contrast
adjustments on live frame captures. Image brightness or contrast is manually
adjusted. When selecting an "auto" option, it can be automatically
equalized as the frame buffer changes. Once a frame is frozen, these modifications
can be applied to the image pixel data. Although useful, the main limitation
to contrast/brightness control is that it can only be applied to live
images. This is acceptable for camera-based processing. However, if live
input cannot be used, or if stored images are to be loaded, the adjustments
Optimas' Filter Menus is, relative to Semper 6 and ImagePro, equally robust.
Here, a selection of edge detections, convolutions, and miscellaneous
nonlinear filters can be applied to the ROI. Beyond the traditional Laplacians
and Sobels are a few added attractions. A stop-motion function is simple
but extremely helpful in eliminating video-field flicker caused by rapid
movement between fields. The iterative skeletonize operation complements
the erosion and dilation filters. As described later, Optimas extends
this small morphological group with others contained in the Classification
menu, just as Semper 6 offers extra tools in the Particle class of commands.
The filters provided under the Filter menu are good selections and perform
quickly over the framestore-based image.
The Arithmetic menu under the Image Menus is well-designed. Data buffers
can be created and combined using a list of arithmetic and logical operators.
First the current ROI is copied to one of a list of buffers. A new ROI
can be selected, and can be averaged, subtracted, multiplied, or even
compared logically with the buffered data. If buffers have different dimensions,
interpolative scaling is used. Arithmetic operations cannot be performed
using a constant (to double the image intensity, for example). With the
exception of scaling, geometric transformations are also absent.
Though focused, Optimas' image analysis capabilities are extraordinary.
As stated earlier, Synoptics' Semper 6 has such a vast library it would
be difficult to provide its power in the form of a mouse-driven application.
BioScan has succeeded, under Optimas' Data menu, to package ease of use
with power. Here, features can be classified, marked, and extracted from
various image objects using an assortment of tools. In addition, Optimas
provides outstanding morphological support for multiple objects within
the scene. Automatically identifying multiple objects based on luminance
properties of a given sample object, Optimas can even label or reject
objects within the set. Entirely through a mouse-driven dialogue, a weighted
average of luminances can be used to specify how a blob should be recognized.
Though automatic selection sometimes can miss blobs that should be included,
it is successful more often than not if tuned properly.
Measurements, features, experiments, and image data are all exportable
to the selected output stream. For immediate feedback, views can be opened
on the display to contain the results from one or more experiments. Data
can also be sent to a user-formatted file, or can be shared with another
application through Microsoft's DDE facility. Optimas supports full data
exchange with Microsoft's Excel spreadsheet program. By linking Optimas
with Excel, images can be analyzed while simultaneously forwarding extracted
data to a spreadsheet. In fact, using Excel's macro features, Optimas
macros can be driven from Excel.
Easily programmed, either in learn mode or in a macro editor, Optimas
provides a set of tools for programming logic and for procedure-level
access to its image processing/analysis functions. With a built-in interpreter,
Optimas runs macros written in a syntax that resembles C language. Bound
into the Optimas application, run-time macros cannot be built for creating
a turnkey application out of Optimas (as with Semper 6 and ImagePro's
developer toolkit). Though, according to BioScan, Optimas will soon support
an "external" macro command, at the time of this writing the
macro facility cannot link to externally developed procedures (as can
Semper 6 and ImagePro).
Allowing image measurements to be transferred to data analysis programs
enables data from different images to be readily compared. In Nosferatu,
the portrayal of the gaunt, nightmarish vampire was credited to Max Schreck,
a name which translates from German to "terror." Film historians
have suggested that Schreck was a pseudonym for veteran actor Alfred Abel,
star of Fritz Lang's Metropolis. Using Optimas, multiple frames have been
acquired and montage (Figure 3). An image of Abel in Metropolis has been
restored (top left) along with three others of Schreck in similar silhouetted
poses. Optimas has been used to identify distinct facial structures (avoiding
features exaggerated by makeup); in this case, reference lines are drawn
from the jaw to the base of the nose to the recess in the forehead of
each subject. Extracting angular measurements and distances, Optimas can
be programmed to evaluate data, and link it to Excel through DDE for further
analysis. Measurements made using Optimas do support the possibility that
Abel played the part of Nosferatu.
Optimas, Semper 6, and ImagePro are flexible and robust imaging packages.
In addition to their menus (or command-line interpreters) for interactive
access, programming languages enable the three products to be customized
for specific applications. BioScan has concentrated the power of Optimas
in its unsurpassed data-collection procedures, rather than in advanced
processing. Considering the market it targets, Optimas' uneven balance
between processing and analysis is expected - images acquired for biomicroscopy
don't typically require restoration. Conversely, Media Cybernetics' ImagePro
is weighted toward image processing. With software hooks for new devices,
user modules, and third-party add-ons, ImagePro's capabilities broaden.
Offering the widest spectrum of imaging processing and analysis operations,
Synoptics' Semper 6 has a less-defined orientation, attractive for a range
of vertical markets.
S. H. Pierce & Co.
The author would like to thank Carol McGarry for assistance with editing
and Robert Swerdlow of Avalon Department Group for providing lab materials.