Title:

A six-pack for the Mac.
(software review)
(Macintosh-based image processing software)
(evaluation )

Source: ESD: The Electronic System Design Magazine
Referenced by: National Institute of Health / NIH Image
Publication Date: 06/01/1989
Author: Hollinger, Steven J.
© Sentry Technology Group, Inc.

Image processing on the microcomputer was revitalized with the introduction of the Macintosh II. The Mac II, IIx, and IIcx excel in their abilities to acquire, manipulate, communicate, and output data. Built on a solid graphical foundation, the Mac II is ideal for scientific image processing applications. It offers an environment that boasts power and flexibility, yet is intuitive enough for researchers unfamiliar with computer jargon.

It is no coincidence then, that six image processing software packages have been released for the Mac: Graftek's Ultimage, 2Ai's Bigmage, MacRAIL and Image Analyst from Automatix, Perceptic's TCL-Image, and Image 1.06, a shareware program developed at the National Institutes of Health (Table 1). All claim to address applications ranging from medical to astronomy. They supply the fundamental features that should be at any image scientist's fingertips. In addition, each package has strengths and weaknesses that suit it to specific applications. MacRAIL and TCL are image processing environments for custom application development. The remaining four products - Ultimage, Bigmage, Image Analyst, and Image 1.06 - are complete applications with a standard Macintosh look and feel. Because these four programs use the Mac interface, a series of processing or analysis functions can be accomplished without learning special command languages or even consulting the manual.

User-Friendly Image Processing

The imaging platform of choice used to be a DOS-based workstation, such as a rugged IBM AT. With the Mac family, innovations in application design have left DOS and OS/2 (and, to some extent, UNIX) systems playing catch-up. These innovations include a standardized user interface, extensive support of ROM-based libraries, and a commitment to object-oriented programming languages. Apple's position in the image processing arena will be further strengthened by the maturation of true multitasking operating systems (such as A/UX).

With its ROM-based Toolbox, Mac offers developers a set of libraries for interfacing with lab equipment using the standard Mac interface of pull-down menus and dialogue boxes. Below the level of the Toolbox, image applications can take advantage of the hardware horsepower driving the Mac II line. Sending a positive signal to the image processing market is Apple's commitment to the Motorola 680X0 family. The Mac II boasts a 16-MHz 68020 CPU and a 68881 floating-point coprocessor. Both the Mac IIx and IIcx have a 68030-based motherboard featuring the 68882 math chip.

The Mac's excellence as a true imaging platform hinges on the simplicity with which data can be moved from source to destination. Of course, the user interface facilitates this, but other aspects of the Macintosh environment are equally important. For instance, Apple's PICT file format has proven successful for moving images, text, and graphic primitives between applications and to/from input and output devices. Under the Mac's Multifinder, multiple application windows are managed. Also, information can be passed back and forth between each application through the Mac's Clipboard. Simply put, Macintosh applications and devices talk to each other in a universal language.

Use of color has also been standardized. To run a color image processing application on the Mac, only the Apple color monitor and an 8-bit color video display card are required. With the release of Apple's 32-bit QuickDraw, display cards supporting 32-bit color will also run software based on the 8-bit standard. No longer will the lab scientist have to fumble for a manual to figure out if a DOS image package supports the IBM 8514 standard, EGA, CGA, MDA, VGA, or super VGA.

Typically, imaging operations fall into one of two categories: processing or analysis. Image processing refers to the manipulation of image data; image analysis refers to the extraction of statistics. A crime lab intent on recovering fingerprints from a dusted glass will likely perform a series of processing functions to enhance a scan of the print. On the other hand, a robot hand guided by a machine-vision system will move to specific coordinates derived through image analysis. To meet the needs of these two different markets (scientific versus industrial), image processing packages generally perform both processing and analysis.

Common to all of the packages reviewed is a set of fundamental techniques for image restoration and manipulation. These include filters (e.g., smoothing, gradient, sharpening, edge detection, and median), histogram equalization, geometric transformations (e.g., rotation and flipping), color palette manipulation, and logic/arithmetic operations (e.g., add, multiply, and XOR). Aside from subtle differences in how these features are accessed, performance does not vary significantly from application to application during the actual processing phases. More significant differences exist in other areas, however,

In the realm of image analysis, the only features common to all six packages are histogram display and pixel intensity display. Beyond these two basic image descriptors, the packages differ. For instance, Image Analyst easily recognizes and describes relationships between image objects over time (e.g., the bolt is now 2 mm from the nut). On the other hand, TCL can facilitate the restoration of image features (e.g., a fetus description mottled by noise in an ultrasound).

Ultimately French

Ultimage from France's Graftek targets industrial, scientific, and research applications. U.S. distributor GTFS, Inc. (Santa Rosa, CA) describes Ultimage as a modular toolbox with primary and advanced features for image enhancement, interpretation, and analysis.

Ported from the VAX to the Mac, the package debuted at the Macworld Expo in Aug. 1988 (under the name Optimage). Ultimage developers claimed that it would run at least 20% faster than its MicroVAX twin, and would use Levco's (San Diego, CA) Transputer board to up performance. At the time of writing, Ultimage (vl.2.1) does not support the Levco board.

Of the packages reviewed, only Ultimage ships without full functionality. Several advanced image processing options appear in the menus, but are disabled. Also, scripting and zooming are unavailable. By including menu items that will appear in future versions, Ultimage does show where Graftek plans to take the product.

Even though Ultimage's functional items are difficult to sieve from the dream list of menu choices, the ones that work are well developed and, in some instances, provide exceptional user interfaces (Figure 1). Most Ultimage options are selected from pull-down menus. From the File menu, PICT (with full-color palette import) and gray-scale TIFF image files can be opened. The Acquire command can be used to open images from Data Translation's (Marlboro, MA) QuickCapture board. In addition to the menu items, a small settings window allows selection of preferences for palette, cursor style, and threshold.

Ultimage provides support for all fundamental processing operators. For most operations, the user can act on the source image or produce a new output image. a rectangular selection (region of interest) can be made of part of the image, but it is only active for some processing options. For example, convolutions and filters do not use the region of interest (ROI), but lookup table (LUT) operations do. Undo is not supported for all operation classes, either. According to GTFS, these inconsistencies are being addressed.

Ultimage's morphological processing operators, logic/arithmetic operations, and reporting features are the program's real strengths, especially for disciplines involving binary images. The package offers a spectrum of primary and advanced morphological filters. One option provides a checkbox for displaying iterations. In this way, morphological filters can be viewed as they operate on images. Support of these operations makes Ultimage attractive for use in biomedical research, where objects must be manually identified, enhanced, and characterized.

Once an image is converted to binary form, a Particle option can be selected to perform an analysis on individual features. Data can be extracted and displayed as scatter plots, distributions, or statistics. By placing the cursor close to a particular object's centroid, characteristics such as the axis of least inertia for that blob are presented. Because Ultimage's macro option is disabled, automation for gathering statistics is not possible.

Ultimage demonstrates a unique approach to processing arithmetic and logic operations. To carry out these functions, a dialogue box is used that acts as an engine for applying complex functions to images. The Arithmetic/Logic Operators dialogue box lists the open images and the available operators. First, an image is selected from the list. Next, an operator such as Multiplication can be chosen from a comprehensive list of logic and arithmetic operations. At this point, either another image of identical resolution or a constant is selected. The values in the second image or the constant are multiplied by the corresponding pixel intensities in the source image. Output values of this sequence can be used as new inputs, and a new operator can be chosen from the list. Finally, the resulting values can be output to a displayed image. In this way, multiple operations can be applied to various images without leaving the dialogue box.

Another strength of Ultimage is its provision of some basic Fourier domain processing operations. These features are often used to eliminate noise, identify periodic artifacts, or even compress image data. Ultimage carries out high- and low-pass filtering on images in the frequency domain, and performs inverse Fast Fourier Transforms (FFTs) to reproduce the enhanced image in the spatial domain. Neither Ultimage nor any other package reviewed can mask discrete points in the frequency domain - a desirable option for eliminating image noise.

Ultimage's use of color is limited. If the document's own palette is undesirable, five standard palettes can be selected - black and white, rainbow, temperature, gradient, and binary. However, it is not possible to create a custom palette for pseudocoloring images.

In sum, Ultimage is fine for performing a rapid series of image processing operations in lab settings. Though it does not include important items like zooming and pseudocolor. Ultimage is useful as an engine for prototyping image restoration experiments.

Another package reviewed, Bigmage from 2Ai (Advanced Analysis and Image, Pasadena, CA) is a lower-cost version of a medical imaging package called Multimage. Developed for the Dupuytren Hospital in Limoges, France, Multimage ran on a Bull mainframe, and was later ported to Sun. Bigmage was introduced for the Mac II platform in Jan. 1988.

Image processing using Bigmage is intuitive and straightforward for the Mac-initiated. Bigmage adheres to the standard Mac user interface, with pull-down menus and dialogue boxes. It uses the Mac File menu, and supports the Clipboard commands in the Edit menu for cutting and pasting.

The Big Picture

Providing a solid foundation of image processing functions, the package includes advanced features for biomedical and scientific imaging. Bigmage and Ultimage have many features in common. Like Ultimage, Bigmage is very strong in binary and primary morphological operations (Figure 2). Basic operations include thinning and thickening, typically used to identify objects of interest. For instance, an erosion might be used to eliminate bumps in an image, or a dilation might be used to fill in valleys.

More sophisticated morphological functions, such as rolling ball and top-hat operators, are also supported. Bigmage distinguishes itself from Ultimage with its Define menu. It allows unique convolution kernels, a connectivity matrix (used for describing the relationship between a particle and its neighbors), and other custom settings. At the time of this writing, 2Ai has also released a version of Bigmage that fully supports integration with MPW C objects externally compiled, and invoked under a user menu.

The package offers rudimentary options for image analysis. A status window can be opened that displays morphological characteristics of an image (i.e., centroids, areas). Bigmage, as in Ultimage, displays pixel intensities along a user-defined line in the image. Similarly, the line disappears once the intensity histogram is displayed. For histogramming, a normalized or cumulative histogram can be chosen. An excellent feature for maintaining statistical data is the program's ability to open text files to type in notes, while keeping image windows open for viewing.

Although Bigmage supports basic geometric transformations for rotation and symmetry (flipping), it lacks translations for scaling and stretching. While Bigmage can perform an FFT on an image, and then apply a low-or high-pass filter to the resulting frequency plane, the program does not include the inverse FFT function.

Bigmage opens images of the SATIE format, as well as two proprietary format types: one for gray-scale and a second for color palette storage. During testing, Bigmage would not import the color palette of a PICT file, but did import the image itself. TIFF files were also supported. Bigmage offers pseudocolor support that is simple and well adapted to allowing the Mac's 8-bit color palette to be adjusted.

2Ai claims that Bigmage is compatible with its parent program, Multimage. If so, this package provides advanced medical imaging scientists an upgrade path for faster processing on Sun workstations. Bigmage ships with a manual and program disk. The documentation goes beyond the standard "How to use" demonstrations and offers approaches for solving processing problems. Most functions are described under the headings, "What does it do?" and "How does it work?" However, these helpful explanations are not meant for the novice. Bigmage falls into the category of advanced processing. The program disk also includes a number of demonstration files that step through various image processing functions.

A rich, intuitively built image processing program, Bigmage is a particularly useful tool for recovering information from binary and gray-scale images. Bigmage's compact, intelligently organized menus are designed to carry out a rapid succession of operations. They also make Bigmage a good choice for specialists who are not entirely familiar with image processing jargon.

Railing on Images

Ultimage and Bigmage are typical of applications software that requires little or no programming talent. MacRAIL from Automatix (Billerica, MA) is not a typical Mac application. As one of the industry leaders in robot and machine-vision products, Automatix has delivered a package that combines a solid infrastructure of imaging tools in the form of an extensible programming environment.

Originally developed from machine-vision and robot programming, the Automatix RAIL ran on a proprietary 68000-based system. Along with the rest of the Automatix machine-vision and control products, RAIL has been ported onto the Mac platform as MacRAIL. Because MacRAIL is an environment, not a canned application, its power lies in its flexibility. With MacRAIL, runtime image processing programs or interactive scripts can be created. MacRAIL moves ahead of its predecessors by including a menu package that helps the programmer access the Mac user-interface libraries. With this added functionality, applications created in MacRAIL have the look and feel of the true Mac interface.

MacRAIL is a Pascal-like interpretive programming language that is block structured and not strongly typed. (All variable types do not need to be specified in advance because MacRAIL recognizes them automatically.) It has all the control constructs of Pascal (if, then, else, and so on), but MacRail also has built-in variables and functions for image acquisition, processing, and analysis. Using the Automatix developer's package, optimized extensions to MacRAIL can be built in MPW C and linked with the MacRAIL library.

MacRAIL performs simplified image processing, analysis, and control functions by recognizing specific commands (Figure 3). These commands can be saved as a named script that will run when invoked under MacRAIL. With scripting, the scientist can actually prototype a unique image processing application or environment. The MacRail scripting worksheet works much like the commonly used MPW development worksheet and supports the Edit, Find, Mark, and File menus.

Another strength lies in the provision of access software to the Mac user-interface library. The MacRAIL Menu Package creates a link between lower-level processing software and the standard Mac dialogue boxes, alert boxes, pull-down menus, and so on.

Both image analysis and processing capabilities are robust, and the software includes extensive manipulation capabilities for image processing. The dept of MacRAIL's analysis features, especially for machine-vision applications, is significant. MacRAIL has built-in functions for full 3D camera calibration. Three-dimensional calibration makes it possible to compute a mathematical model for transformations between real-world objects and image coordinates. Most packages only allow a magnification factor to be specified, which is best suited for measuring 2D coordinates. To identify any image point as an (x, y, z) coordinate, MacRAIL performs a perspective transformation that finds its location in 3D space.

MacRAIL also has built-in functions for stereo sensor pair calibration and structured lighting sensor calibration, the two most common techniques for recovering depth from 2D images. For many machine-vision applications, these types of calibrations are not extras; they are necessities. MacRAIL has built-in functions for image enhancement with mean and median filters as well as an edge-detection package. Moreover, MacRAIL can perform basic morphological operations like erosion and dilation. Because it was not originally designed for use in purely scientific environments, the package relies on third-party support for more obscure functions, such as the morphological sets found in Bigmage and Ultimage. In fact, Image 1.06 from the National Institutes of Health is also available through Automatix.

Processing can be initiated by an external event, such as cell motion under an electron microscope or by a machine part passing a photoelectric sensor. Without human intervention MacRAIL can trigger a strobe that will light an event and capture an image in sync with the pulse to perform a measurement on the image, setting up multiple regions of interest; and output computations. Hardware support is of primary importance in the lab as well as on the manufacturing floor. MacRAIL provides extensive real-world input and output tools. Specifically, it has software support for third-party digital I/O, analog I/O, and parallel and serial communications. National Instrument's (Austin, TX) GPIB boards are fully supported in both C and MacRAIL.

MacRAIL comes with two disks, a user manual, and a debugger. Also included is a MacRAIL-based application program called ASAP, which is nearly identical to Image Analyst, except that ASAP can trigger a sequence on an input strobe, or can signal an output port on a pass/fail condition. MacRAIL requires the Data Translation QuickCapture board in its minimum configuration.

Automatix offers a selection of MacRAIL-level application packages tailored for image geometry, statistical analysis, camera calibration, and optic configuration. Written in MacRAIL or C, the packages are either linked under MPW or run as scripts in the MacRAIL worksheet. The Profiler is a performance analysis package that discovers where time is being spent in MacRAIL applications, so that intensive sections of code can be optimized. A statistical performance analysis package aids in the identification of trends found during the analysis of a series of images. Automatix also offers training and technical support programs for MacRAIL.

See the Image Analyst

Image Analyst represent Automatix's foray into the image processing marketplace (apart from dedicated machine-vision systems). With Image Analyst, standard image processing functions such as filtering or convolving an area of interest can be performed. Image Analyst's strength, however, lies in the integration achieved between the developed and the powerful MacRAIL-based analysis library. With true expertise in machine vision rather than scientific processing, Automatix has created a package that seems to complement rather than compete with the others reviewed for this article.

Image Analyst is written in MacRAIL and provides access to most of MacRAIL's image processing and analysis functions. In fact, when Image Analyst is invoked, it takes about two minutes for the entire MacRAIL library to be loaded (though MacRAIL is not directly accessible to Image Analyst). With Image Analyst, macro-like sequences of operations on an image can be generated, then saved, run, or edited via a Mac interface.

When setting up processing sequences, Image Analyst can maintain multiple ROIs in the image field (Figure 4). For each ROI, one or more types of analyses can be performed (e.g., connectivity, edge detection, image enhancement, image correlation, or gray-scale analysis). Image Analyst automatically computes features in an ROI according to the selected processing category assigned to that area. For example, when connectivity has been selected, access to information such as minimum identifiable blob size in the ROI is provided. For each identified object in the image, the centroid, orientation of major and minor axis, area, roundness, and moments of inertia are also computed. Based on these statistics, measurements can be taken as an additional step in the sequence of operation. Complementing the standard measurement tools (point-to-point, point-to-line), Image Analyst has routines to detect lines or object boundaries within an ROI. For example, the Hough Transform, used for identifying robust lines within an image, can be applied before performing a line-to-point measurement.

Generated sequences can be edited and run either automatically or by command. The results of performing a sequence can be saved to file, printed, or displayed on a monitor. The specifics of processing for each ROI are saved as properties of the ROI. When the ROI is moved around the image, the processing and analysis operations that were performed on the ROI before it was moved are repeated on the new ROI. This process of automating ROI operations is useful in scenarios where the ROI must be found using a vision system, rather than a human operator.

Image Analyst does not include support for I/O with triggers on external devices. Triggers are essential in industrial environments where vision is used for automating the manufacturing or inspection process, and in fact both MacRAIL and the companion application ASAP support them. Image Analyst is extremely useful in setting up, prototyping, or generating statistics from a typical automation scenario. However, for ultimate device control, MacRAIL is required. Image Analyst supports but does not require the Data Translation Quick Capture board.

In conclusion, Image Analyst is a high-powered vision/analysis program. The ability to automate sequences in the Image Analyst package would lend its power to any image processing discipline which has a projected outcome and which would require automatic gathering of statistical data. Especially considering the lack of device control capability. Image Analyst is best suited for prototyping inspection systems that will later be installed with custom vision systems like MacRAIL.

Power and Strength

TCL-Image, an image processing environment distributed by Perceptics (Knoxville, TN), has the strongest image processing base of all the reviewed packages. TCL was developed in the Netherlands by Multihouse TSI. TCL is not based on Perceptics' own NuVision hardware accelerator, but rather has been introduced on other platforms, most recently the Mac II.

TCL is well adapted to generating automated sequences for image acquisition, image restoration, and feature extraction. Like MacRAIL, TCL is a programming environment. Unlike MacRAIL, TCL is driven by an interpretive command language, similar to a system language like Digital's DCL, rather than a programming language like Pascal. One advantage of TCL's command language interface is the portability of TCL scripts between platforms, including Apollo, HP, and 386 machines. Some of the more powerful commands available on these systems have not yet been brought over to the Mac version of TCL, including use of a text editing worksheet.

Apart from a File menu for capturing images or quitting, and an Edit menu for specifying a pathname or using the Clipboard, TCL does not have any Mac-like tools or options. To perform an image processing function, a command is invoked through the TCL worksheet. The worksheet is not designed to use the mouse; only a command at the current prompt can be executed (Figure 5).

The processing library is expensive in breadth and depth. For each category of operations (e.g., convolutions, edge detections, and morphology), TCL supports a multitude of options. TCL's processing library is relatively difficult to access, since the cryptic TCL command language must first be mastered. For example, to perform a Laplacian convolution to detect the edges in an image, the following must be entered:

[is greater than] LAPL imagein imageout

TCL's standard edge-detection operators like the Sobel, Roberts, and Laplacian filters are complemented by more unusual ones, like the Kirsch, Robinson, and Lee-Haralick-Verbick. These and many more are not found in other packages. TCL's connectivity library is equally dense. The TCL manual supplies helpful references to technical literature where the origins and use of the more obscure functions can be found. Also, a large demonstration script library is provided as an introduction.

Elementary programming constructs, useful in an interpretive environment, are offered, as opposed to more complex expressions associated with compiled languages. FOR...NEXT loops and WHILE...DO instructions are all part of the TCL language. Calls to subroutines are supported, but these must be script-based since TCL does not yet support externally compiled modules. TCL has an online Help command for quick reference and a Journal command that records an interactive session with TCL into a script file.

TCL maintains two internal image file types, one of integer type (as in the other products reviewed and one containing floating-point representations of the image. Using floating-point pixel intensities, many complex operations can be carried out with highly accurate results. For example, rotations typically degrade image quality as fractional pixel intensities are truncated. By maintaining a floating-point representation, TCL rotations preserve significant information, protecting the integrity of the original pixel information. For some operations, it may be necessary to convert from the integer format to the complex format. One drawback to TCL's file format support is the absence of import and export functionality. An image must enter the TCL environment through the frame capture board, or a test pattern generation routine.

In contrast to MacRAIL, with its strong analysis orientation, TCL's strength is its ability to customize advanced image processing sequences. The intuitive Mac interface has been sacrificed in order to maintain portability across various TCL platforms. With the addition of a Mac interface and a line option for compiled modules, Perceptic's TCL-Image would be an even more powerful package for custom processing.

Simple and Intuitive

Image 1.06 is a public domain program from the National Institutes of Health (Bethesda, MD). The program can be used to acquire, enhance, measure, and edit images. This is the first program any developer interested in image analysis should become familiar with because it is both simple and intuitive.

Image 1.06 includes Pascal source code and example images. Because the source code is included, the package provides a strong base on which a researcher can build. Image 1.06 offers most of the elementary image processing operations. It has menu options for edge detection, inversion, contrast enhancement, smoothing, sharpening, dithering, noise reduction, and histogram equalization.

Unique to the six packages reviewed, Image 1.06's tool palette holds a variety of MacPaint-like image retouching tools, as well as several image processing tools. For retouching, tools include a paintbrush, airbrush, eraser, eyedropper, and smudging finger. Several outlining tools allow the selection and manipulation of nonrectangular regions. A ruler tool makes simplified measurements in pixels, metric, or U.S. standard units. For image analysis, a counting tool counts objects in an image, marks them, and records their X-Y coordinates. Results can then be displayed as a simple table.

The density profile tool plots the gray levels in an image, using either a fixed scale or selectable maximum and minimum values. Resulting plots can then be cut and pasted into other applications, either as a graph or as a column of numbers for transfer to analysis and plotting programs. The CLUT tool lets color LUTs be modified by clocking and dragging in the CLUT window. Image 1.06 supports four types of LUTs: gray-scale, pseudocolor, Mac II system palette, and 256-continuous-color spectrum. The CLUT tool can also highlight and then measure ROIs based on their density.

Two kinds of palettes can be created and saved. Pseudocolor palettes are limited to 32 colors. Colors can be edited using the eyedropper tool, and the number of colors can be reset. For more complex palettes with up to 256 colors or gray levels, image 1.06 recognizes Mac CLUT resource files.

Images can be captured from Data Translation's QuickCapture board. As with the other packages, the files can be imported or exported in TIFF and PICT formats. Image 1.06 also does dithering for printing on a black-and-white printer, and halftoning for printing on a gray-scale printer. Print commands can be used to print the image, a density or calibration plot, the contents of the histogram window, measurements made with the Measure command or the ruler, or the X-Y coordinates found with the point measurement tool.

Good Starting Point

Image 1.06 is a good starting point for scientific image processing, and obviously the best value. All of the basic processing functionality is provided - even in source listings. Image 1.06, the first image processing software for the Mac, is still undergoing significant revisions, with future features promised to include more than the 32 pseudocolors, as well as extensive support for image arithmetic. Image 1.06 can be downloaded from many Mac bulletin boards and group libraries.

With the six packages, the Mac II becomes a true workstation for an array of image processing markets. Ultimage from Graftek and Bigmage from 2Ai Inc. are useful in environments where images are manipulated to detect features, typical in biomedical research settings. MacRAIL from Automatix is tailored for automated machine-vision environments requiring customization. Also from Automatix, Image Analyst is geared toward more intensive analytical scenarios - for inspection, statistics gathering, or pattern recognition. With its command language interface and impressive processing library, TCL-Image from Perceptics is well suited to the automated feature extraction or image restoration markets. Finally, NIH's Image 1.06 is written by and for the medical community, but its shareware status and source code listings make it especially attractive as a stepping-stone to advanced processing or analysis.

Steve Hollinger
S. H. Pierce & Co.

Acknowledgment

The author would like to thank Carol McGarry for assistance with editing and Dr. John Agapakis for contributions in image analysis evaluation.