General Image Enhancement
As demonstrated in the previous discussion, one major difference between laboratory radioscopy and field radioscopy is the increased uncertainty in establishing an informative and useful image in the field. Situation-dependent placement of both the imager and source introduces a greater possibility for improper spatial relationships. Hence, while traditional film radiography has been used with some success in the nondestructive evaluation (NDE) of historic buildings, this approach has been limited by the inability to field calibrate the placement of equipment.
One major advantage of digital radioscopy is the increased ability to field calibrate imaging. Whether the feedback is immediate (live imaging) or requires a field- based processor, the increased capability to modify spatial relationships opens new opportunities for the building investigator. In addition to the advantages presented by field calibration, rapid in-field feedback also allows the investigator the opportunity to analyze a situation, then identify and diagnose material and assembly-related issues at a broad level. While such near instantaneous diagnosis is sufficiently valuable to merit its use, digital radioscopy affords an additional level of usefulness through the very way it stores information.
Familiar to users of digital photography is the ease with which images can be edited for special effects. Digital radiographs afford the same opportunities in that, like digital photographs, information is stored as some gradient of color value in an individual cell (i.e., pixel) positioned adjacent to other such cells. This assignment of color value and position results in a bitmap. An advantage of a bitmap image is in being able to readily analyze and control the image on a pixel-by-pixel basis. However, bitmap graphics (also known as raster graphics) are resolution dependent, that is, they contain a fixed number of pixels. As a result, they lose detail and appear jagged when viewed at too large a scale on screen, or in print. In contrast, vector graphics are made up of lines and curves defined by mathematical objects (i.e., vectors). Vector graphics are resolution independent, and with adequate information can be positioned in three dimensional space, as opposed to the ‘flatness’ of raster images.
Digital radiographs are records of the total and cumulative amount of radiation passing onto the imager at that specific point. Whether film or a digital imager, this information is recorded as a ‘color’ along a continuous gradient. A simple grayscale gradient records total density where black is ‘high’ and white is ‘low.’
Post-processing can be used to enhance the distinction by emphasizing various parts of the gradient. The resulting graphic output can be enhanced grayscale or a color image used for the purpose of improving visual analysis.
Additionally, while the radiographic images themselves are not three- dimensional, post-processing multiple radiographs taken from different perspectives can be used for purposes of optical or digital photogrammetry. This ability to measure relative position can be used to create vector objects that can indicate three-dimensional spatial position.
As suggested above, the possibilities of the post-processing and manipulation of digital photographs are recognized in the practice of conventional photography and are being applied in a variety of professional fields. For example, both digital enhancement of images and photogrammetry are being used in forensic automobile accident investigation. Enhancement of radiographic images is becoming more widely applied in industrial NDE applications. While such applications are different than those in this study, we began with a proposition that raw image radiographs might be made more useful in the diagnosis of building conditions and assemblies.
We identified two common and significant obstacles faced by building investigators in which field radioscopy might assist: wood deterioration and the location of hidden objects. Specifically, wood deterioration is often marked by a loss of material density. Radiographic imaging was assumed to be a likely means of detecting this loss of density. Hidden objects, often mechanical fasteners, are of a density different than the surrounding material. Hence, they are, as demonstrated earlier, clearly distinguishable from the surrounding building fabric.
Of the variety of traditional and modern building materials we chose to investigate wood (timber) because it is both widely used and subject to material degradation (e.g., decay and insect damage) and frequently joined with metallic (i.e., higher density) fasteners (e.g., screws, nails, spikes). While we believe our research into wood is not the limit of the applicability of radioscopic building evaluation, successful implementation with this material can afford a useful first pass for feasibility.
A radiographic image is a cumulative recording of the amount of radiation reaching the imager. As this is cumulative, the line (i.e., orientation) of x-rays from source to imager is of great importance. Although radiographic images appear similar to photographs, the optics involved are significantly different. Hence, both the positioning of the imager and the source relative to the building component being analyzed are of utmost importance. Successfully positioning the imager near (and close to parallel to) the principal plane of the object of interest results in the crispest and most accurate imagery. Unfortunately in field imaging ideal setups are difficult to achieve. However, even without exact positioning radiographs usually convey some sense of difference between denser and less dense areas. Denser areas are darker (less cumulative radiation) and less dense areas lighter (more penetration, and hence, exposure.) In addition to appearing photograph-like the radiographer can subject this raw imagery to further analysis, with the knowledge that the degree of exposure (degree of grayness) is a recording of density.
Unlike with film radiographs digital image enhancement can manipulate the relationships between adjacent areas of an image. Accomplished by a variety of algorithms, such mathematical transformations done on a pixel-by-pixel basis can achieve powerful visual affects when viewed at a larger scale. Such manipulation has become a standard practice in digital photography. A variety of software for specialized scientific applications, general professional use and amateur photography has been developed. While each of these has its position in the marketplace, the more specialized programs are generally more powerful, although sometimes at the price of being narrowly tailored to specific uses.
As part of this study we chose to make a first-pass review of the usefulness of a leading professional image manipulation software, Adobe® Photoshop®; a specialized scientific software package, Image-Pro Express; and a specialized consumer photograph enhancement package based on NASA developed technology, Tru-View PhotoFlair®. Our exploratory manipulations focused on three areas: 1) enhancing image legibility, 2) eliminating ‘hot spots’ resulting from the original image capture and 3) identifying (and ideally, quantifying) loss of density.
In general, the main limitations of digital x-rays are the “fuzziness” of the images and the information limitations of grayscale analysis. Fuzziness can be the result of several factors. However, in general, there are several geometric considerations the radiographer needs to address. While good relative positioning of source, object and imager is the best method of reducing unsharpness, a variety of field conditions, including awkward access, uncertainty about the position of hidden objects, and multiple objects in different positions (and at different angles) relative to source and imager, can all contribute to fuzziness and the need for post-processing.
Since radiographs are a measure of total radiation, the grayscale as a measure of intensity is appropriate. Although the interpretation of grayscale radiographs (as for example, determining loss of density) can be enhanced, some distinctions, such as hue, cannot be interpreted from a grayscale image. Hot spots in radiography are the result of field positioning that too narrowly focuses the x- rays relative to the imager. Again, better positioning in image capture might effectively address this issue, but in some cases it was assumed that post- processing might be able to correct for a hotspot.
Several off-the-shelf software packages were investigated, including the two that were provided with the imaging system software. The software packages varied greatly in their available features for addressing visual enhancement. However, each is equipped with digital image filtering, an algorithmic means of transforming the image. Specific image processing techniques include:
- histogram equalization: in this method the image is modified by using an automatic, mathematically derived algorithm that causes darker regions in an image to appear brighter.
- high-pass filtering: in this method the edge features are highlighted. This makes it easier to see the finer detail in the image and eliminates some of the impact of illumination changes.
- unsharp masking: in this method the high-pass filtered image is added back to the original image to enhance the edge detail while keeping the original image context.
- autolevels: autolevels uses a single user-defined parameter to enhance images. In some applications autolevels produces good results for illumination changes.
- multi-scale retinex: this algorithm performs a pixel-by-pixel analysis in the context of surrounding pixels, enhancing both contrast and edge definition.
To compare the software packages, images from the same set of objects were manipulated using each package. The first object was one with three groups of materials with different levels of x-ray absorption. This test wall, referred to as the complex wall , included a selection of different metal fasteners (maximum absorption of x-rays), wooden studs (moderate absorption), and thin outer clapboard (low absorption). The goal of enhancing this image was to improve discernment of the entire image, with no level of absorption being distorted. Within this complex wall was also a much more subtle feature, a strip of plastic that was not visible on the original radiograph. A second goal was to determine whether image enhancement could “detect” this subtle feature. The second object, framing lumber in a test wall, was one with very little contrast – all the components were wood. We attempted to manipulate the image from the wood-frame wall so that all subtle details of wood grain, various wood members, and splits and cracks were discernable.
Imaging System Software: SAIC® RTR-4TM
The SAIC® image editing package allows for normal image manipulation methods typically associated with all photographic packages: sharpening, smoothing, adjusting brightness and contrast, and histogram stretching. Additionally, the grayscale image can be colorized (providing a broader range of tones in the final image) or inverted (with dark and light areas inverted), and filters that help identify edges (edge enhance, emboss) are present.
The features that were particularly helpful in improving the complex wall radiograph (Figure 51) were the manual contrast stretch (not the automatic stretch), the rainbow palette, the image sharpen (moderate), the edge detect and emboss features. The first two of these were under the Display Menu, and while they improved visualization of detail, they were not saved in the final TIF file, so they could not easily be imported to other software. The contrast stretch feature was particularly helpful in that manual manipulation of the histogram allowed for more detailed investigation of both lighter and darker areas of the image. While both lighter and darker areas could be better defined, they could not all be improved at the same time. The histogram equalize feature performed similarly (see the improved definition of the overlapping clapboard in the lighter areas of Figure 52). It was not as versatile as the manual contrast stretch.
The emboss and edge detect features (Figures 53 and 54) were useful to emphasize the contrast between the wood studs and the metal fasteners, with the emboss feature providing slightly more detail. The emboss feature also helped to make the radiograph appear three dimensional, or have depth of field, giving the metal fasteners the appearance of being raised, and even emphasizing the overlapping clapboard on the outside of the wall, and the wood grain in the studs.
Modifications to the radiograph of the wood-frame wall were more disappointing (Figure 55). Because of the small range of contrast, the rainbow palette feature merely changed the grey tones to a fixed color. The greatest improvement was when the contrast stretch feature (either automatic or manual) was used, but since this could not be saved as an image, it is not presented in the report. The histogram equalizer improved the contrast, but created a grainy texture while emphasizing the hot spot of radiation from the source (Figure 56). The emboss and edge detect features only emphasized a little of the wood grain without providing additional detail.
Imaging System Software: EPIX Scanner, Logos Imaging System
The Logos Imaging System software has components similar to the SAIC® System. One-button features include the invert, equalize, sharpen, smooth, emboss, despeckle, outline and colorize features. Manual features that allow the user some control over the final image included an image enhancement feature that allowed brightness, contrast and gamma to be manipulated separately in the final image. Finally, the histogram function was similar to the manual contrast stretch available in the SAIC® package. Both improve the range of grey tones shown on the radiograph, darkening ones that are too light, and lightening those that are too dark.
The colorized radiograph is shown in Figure 57. Because the range of grey tones is replaced with a full palette of colors, visualization of some features is enhanced. Note the horizontal nail edge on the upper left hand portion of the radiograph which was difficult to see in the previous radiographs.
The emboss features are similar for both systems (see Figures 53 and 58). But the outline feature of Logos, while similar to the edge detect feature of SAIC® (see Figure 59) shows more details of the metal components (compare Figures 54 and 59).
General Purpose Software: Adobe® Photoshop® Elements
In addition to the two proprietary software packages that came with the radioscopy systems, several commercially available photographic enhancement packages were investigated, including Adobe® Photoshop®, Adobe® Photoshop® Elements and Jasc Paint Shop Pro®8. These packages, for the most part, contain the same image modification techniques found in the packages available with the x-ray systems. However, some features of Adobe® ￼￼￼￼￼￼￼￼￼Photoshop® (Full Package & Elements) provide more flexibility while using a particular type of image modification, allowing for the identification of more subtle features.
Adobe® Photoshop® has an extensive array of features and is widely considered to be the standard in digital photograph manipulation software. Hence, we chose to use Photoshop® as our “base case” software for attempting to manipulate our radiographs. In general, we found it to be the most versatile, but at the price of a fairly steep learning curve for the infrequent user or one not familiar with the terminology of digital photography and optics. However, as a result of our first-pass analysis we also found that Photoshop® was able to varying degrees successfully address each of our three manipulation objectives: 1) enhancing image legibility, 2) identifying loss of density, and 3) eliminating hot spots.
Photoshop® affords a full palette of image adjustments and filters capable of enhancing legibility. Of these, contrast adjustment, histogram manipulation, unsharp mask, hipass filtering, and auto levels were all useful under differing specific conditions and sometimes in combination. We first reviewed these concepts using the more user-friendly PS Elements, and then in more depth using the full package version of Photoshop®.
Regarding image legibility, the unsharp mask command (Figure 63) allows the user to vary the amount feature (high values work best), radius (low to moderate values work best), and threshold (values close to zero work best) values while viewing the final result. This allows for more focused sharpening techniques which can further emphasize boundaries between different components of the wall.
The emboss feature also allows for flexibility, where sun angle (direction of illumination), height (low, between 5 and 20 works best) and amount (use higher values) creates a greater distinction between features. Compare Figure 64 to the emboss feature used in Figures 53 and 58. A similar filter, bas relief, can also enhance subtle differences in the images, allowing manipulation of the detail (use high end values), smoothness (low end values), and light direction.
The glowing edge filter, found under the stylize heading in filters, also works much better than the edge detect features found above, since edge width (use low to moderate), brightness (use a high value) and smoothness (use a low value) can all be adjusted on the screen while viewing the initial and final result. Compare Figure 65 with Figures 54 and 59 above. There is even a hint of the plastic strip on the right side of the radiograph, as there was with the bas relief filter.
The wooden wall was not as dramatically improved using the filters. The best definition of both gaps between the boards and wood grain was found using the unsharp mask filter (Figure 66) and the emboss filter (Figure 67). Compare these to Figure 55, the original radiograph.
General Purpose Software: Adobe® Photoshop® (Full Release)
The strength of the full release version of Adobe® Photoshop® (and in many cases Adobe® Photoshop® Elements) is that each of the various image adjustments and filters is controllable, with most of the manipulations of an auto- preview window in which variables might be adjusted before committing to processing the entire image (Figure 68). The high degree of flexibility and choice of tools makes working with Photoshop® powerful, but also very demanding in terms of expertise and time. The primary use of the software is in the graphics industry, where knowledgeable technicians can maximize the potential of this software. For the digital radiographer, several commands are worth noting and further experimentation.
- Contrast and Brightness control are the easiest to use of the image adjustments. (Figure 69) They proved effective for slight corrections of over- or under-exposure. However, they did little to actually enhance the sharpness or focus of the images.
- Levels, Curves, and Autolevels, under the Image Adjust menu (Figure 69) provide means for controlling histogram equalization, and hence allow for ‘highlighting’ different parts of the grayscale. The first two commands are manual but interactive; and the third automatic.
In addition to image adjustments, Adobe® Photoshop® provides several filters worth noting.
- Bas relief (located in the menu under Filter/Sketch) proved to be an effective way to “raise” wood grain from an otherwise flat image Figure 70b.
- Unsharp mask (located in the menu under Filter/Sharpen) is an effective means of both heightening contrast and increasing edge definition as suggested by Figure 70c. The radiograph in this image depicts is of the wooden wall.
While the three-dimensional effect such filtering creates is a pseudo- representation, it makes the resulting image more intelligible to the viewer.
Our second area of concern was the control of hotspots resulting from the relative positioning of source, object, and imager. Adobe® Photoshop® provides a means for visually correcting the contrast problem (Figure 71). The application of a radial gradient mask proved to be an effective way of removing the hotspot. The process involves creating a new Photoshop® layer that masks the central portion of the image. The size of the mask and the degree of transparency are interactively controlled by the operator. This process is roughly the equivalent of a “dodge” in the printing of traditional photographs. The image with a corrected hotspot may then be subjected to further image adjustments and/or filtering. However, it remains preferable to attempt to limit hotspots during image capture.
Specialized Scientific Software: Media Cybernetics Image-Pro
The Media Cybernetics (http://www.mediacy.com) Image-Pro family of software provides utilities for acquiring, analyzing, measuring and communicating information in “various scientific, medical, and industrial applications.” The strength of this family of products is in their vertical integration of processes from acquisition to report preparation. However, for ￼￼￼￼our purposes, most of these features proved unnecessary. We used the most basic version of this program, Image-Pro Express, with the intent of determining whether its orientation to the scientific applications increased its functionality for this study’s x-ray analysis as compared to Adobe® Photoshop®.
Like Photoshop®, Image-Pro includes a variety of enhancement filters. The high-pass, unsharp mask, and histogram equalization filters performed similarly to their equivalents in Photoshop®. There are also several features, of which the descriptions and interface are more clearly related to the needs of the scientific researcher, rather than the photographic editor. For example, the flatten command reduces the intensity variations in the background pixels. However, its description explains that equalizing background variations is often done to prepare an image for a count/size measurement or other analytic operation “if its objects are difficult to isolate because the background contains pixels of the same intensity as the objects of interest.” This command proved useful in removing background noise, but it must be noted that the same effect could be achieved with Photoshop®, albeit with less of an explanation.
We speculated that Image-Pro’s conversion to color bitmaps from grayscale followed by color enhancement might also provide a more comfortable interface. While this might be true for some users the use of pseudo-color was not substantially improved over that attainable with Photoshop®. However, we must also note that as with Photoshop® a more thorough investigation into this feature is warranted. In summary, Image-Pro’s orientation to the scientist provides a sometimes more intelligible interface, and a variety of features that would be useful in some scientific applications (e.g., microscopy) we generally found that this program provided little advantage over Adobe® Photoshop® for interpretation of radiographs in historic preservation.
Specialized Consumer Software: Tru-View PhotoFlair®
PhotoFlair® by Tru-View Imaging Company, is the commercially licensed version of the NASA developed Retinex image processing algorithm. Similar to some respects to the filters and levels of Photoshop®, the retinex algorithm specifically improves dynamic range compression and sharpness of images. The patented technology has been applied to accident investigation, medical imaging, as well as general photography. Based on preliminary investigations, researchers from Tru-View and the NASA Langley Research Center reported promising results in the enhancement of medical x-rays, mammograms, and CT scans (Rahman et al, 2001). Given the similarities of these applications to our own interests we further evaluated this software.
PhotoFlair® is available as both a stand-alone program and as a plug-in for Photoshop®. It proved to contain a very easy and quick-to-use enhancement feature. The ability to substantially improve images with one-click was convincing. Figure 72 displays the effect of the algorithm on the complex-wall image. Applying the manipulation requires a single selection of an icon on the toolbar (left arrow). The resulting image (right) shows greater contrast and sharpness. This allowed for immediately identifying the two screws (right arrow) that were difficult to detect in the original image. The program also allows for adjustment to the automatic adjustments, and alternate calibrations can be saved for future use.
The two image enhancement packages available with the imaging systems provided most important features that allow for basic image improvement. Under most circumstances, they would be able to address problems associated with digital image capture. Several features, including emboss and colorize commands, were quite valuable in identifying subtle features found in individual radiographs. Of the other photo enhancement packages investigated, Adobe® Photoshop® proved the most versatile, with Adobe® Photoshop® Elements being the cheapest, easiest to use, and requiring little in the way of a learning curve. For purposes of historic preservation, the Adobe® Photoshop® Full Release added little to Elements. PhotoFlair® was found to offer a quick, easy improvement with one button, and could be added to Adobe® Photoshop® as a plug in .