APPENDIXCLEANING THE SCANNING ARTIFACTS
An example of a typical subframe, as downloaded from the web page of the Lunar and Planetary Institute, is shown in Figure A.1.
The scanning artifacts ("venetian blind effect") make it difficult to visualize the lunar surface. Current computing technology makes it possible to estimate and remove most of the scanning and reconstruction artifacts. A two-stage process is used to clean the images in this book. First, the systematic artifacts such as white lines between framelets and brightness variations across framelets are measured and removed. Second, a filter suppresses remaining variable striping patterns. The cleaned image is shown in Figure A.2.
The programs for each of the stages were written in Visual Basic and run in a Windows 98 environment. They use utility routines from a book by Rod Stevens .
Steps of Stage 1: The steps performed by the program that measures and removes systematic artifacts (Stage 1) are:
Specific Techniques of Stage 1: The program addresses several problems that are specific to the mosaics.
Finding the edges of framelets. Usually, framelet edges are represented by bright lines caused by light shining between the framelet filmstrips as the mosaics were laid up. Although they are narrower than the distance between scans of the digital images, the lines appear in either two or three adjacent lines of pixels because the scan spot used in creating the digital images was larger than the distance between scans. The scan lines are usually tilted with respect to the framelet edges by two or more pixels across a frame and have curvature of the order of one pixel across a frame. In many frames, the white lines are obscured by saturation or overcome by image signal in large parts of the frame. Development artifacts and some valid signals can produce false segments of bright lines that are not at framelet edges.
The approach taken to find these lines is to search in a band of scan lines 17 pixels high, looking in 17 by 21 blocks of pixels for a bright white line segment of either two or three pixels in width. A quadratic best-fit line is calculated using the centers of the line segments. Successive fits are calculated, eliminating those centers that are most off the line until all remaining centers are within half a pixel of the line. If the remaining centers are at least 25% of the possible centers, the line is accepted as a framelet edge. If not, the band is moved down the picture to find an edge.
Removing each framelet edge line. For each horizontal pixel index, the pixels above and below the calculated vertical value of the best-fit line are examined to determine the probable value of the excess brightness of the line and a weighted value is subtracted from the brightness of the two or three pixels near the line. This process preserves more detail in the image than simply averaging the brightness around the line.
Contrast model. The streaking artifact was applied in the spacecraft on a low contrast image, essentially linear in its relation between photographed brightness and density, However, the atlas images were printed at high contrast and are therefore nonlinear. Thus in order to determine and compensate for streaking, it is necessary to linearize the brightness by reversing the contrast function. An empirical study was conducted, varying the assumed contrast function and minimizing the residual fundamental and second and third harmonics of the artifacts at the framelet frequency. The resulting contrast function has a linear contrast gain of 3 between output brightness values of 0.1 to 0.9 of the full range and exponential curves at each end of the brightness range.
Special handling. A few images require special techniques. For example, a feature has been added to compensate for an alternating pattern of darker and lighter framelets in some of the images.
Quantitative Results: A spectral analysis program has been written to compare the spectra of the input and output images to provide a quantitative measure of improvement. Figure A.1 shows the fine-scale normalized vertical spectral density of LO4-140H3 before and after processing.
Figure A.3:Spectral density of LO4-140H3 for periods near the framelet width (about 40 Pixels).
The removal of systematic artifacts greatly improved the appearance of the pictures. The venetian blind effect disappears, providing a subjective effect of more direct visual contact with the lunar surface. However, traces of the framelet artifacts remain in parts of some of the images.
Steps of Stage 2: Stage 2 is a two-dimensional filter process:
The remaining artifacts are substantially removed by application of the two dimensional filter (see Figure A.2). Careful comparison of filtered images with the originals verifies that shadows, topographic variations, and albedo variations such as associated with rays are preserved. This is true even when the digital images are examined under magnification that resolves the pixels.
Specific Techniques of Stage 2:
Fourier Transform and inverse transform: A fast-fourier-transform algorithm runs in the vertical direction and stores arrays of the real and imaginary parts of the transform. The same algorithm runs in the horizontal direction on these arrays to create the real and imaginary two-dimensional arrays that are now in the frequency domain. The same process is used for the inverse transform. The fast fourier transform algorithm used is limited to image arrays that have dimensions M and N that must be integer powers of two; therefore the dimensions of the actual images are built up to the next power of two by adding virtual blank brightness data.
Filter characteristic: The filter has a low-pass characteristic in the vertical (North-South) direction to suppress the framelet frequency and its harmonics. In the horizontal direction (East-West) it has a high-pass characteristic to reject patches of horizontal stripes while permitting topographic detail to remain.
Both filters are of the second-order Darlington type.
A second-order low-pass Darlington filter has the form:
where f is the frequency and T is the period of the frequency that reduces the filter function G(f) to 0.5.
A high-pass Darlington filter has the form:
Examination of the two-dimensional fourier transform of an input image (whose systematic artifacts have been removed) shows strong noise at horizontal frequencies whose period is less than 150 pixels and vertical frequencies whose period is more than 25 pixels. A compound (two-dimensional) "Normal" filter with the following form is used to suppress the noise:
where fx is the frequency in the x direction (East – West) and fy is the frequency in the y direction (North – South).
The "Normal" filter is used as the default, and is effective for most of the pictures. If streaks remain after application of the "Normal" filter, a "Strong" filter is used instead. This happens most often when large areas of dark sky or shadow beyond the terminator appear in an image. The form of the "Strong" filter is:
RETURN TO BOOK RETURN HOME