X
8972 Rate this article:
2.3

Tips for Using the n-Dimensional Visualizer

Anonym

ENVIprovides a multi-dimensional scatter plotting tool designed to help you visualize and distinguish the spectral endmembers for your multi- or hyperspectral imagery. This help article discusses how to use the n-Dimensional Visualizer in combination with Minimum Noise Fraction (MNF) and Pixel Purity Index (PPI) images derived from a multi- or hyperspectral image.

The n-Dimensional Visualizer is an n-dimensional scatter plot which can be interactively rotated. The n-Dimensional Visualizer was designed to help you visualize the shape of the data cloud that results from plotting image data in spectral space (i.e., with image bands as plot axes). It is typically used with image data which have been transformed using ENVI's MNF tool. The n-Dimensional Visualizer was developed as an aid for identifying and distinguishing image pixels which correspond to mixing endmembers. Endmembers, in this context, are pure, spectrally unique materials which occur in the scene. Using a linear unmixing model, every spectrum in the image can be reconstructed as some combination of the image endmember spectra.

Choosing a Region of Interest

The n-Dimensional Visualizer can accept data only from a Region of Interest (ROI). This is because interactively rotating all of the data in a full image is too computationally intensive. Moreover, the intended use of the n-Dimensional Visualizer is to receive as input an ROI containing the spectrally purest pixels in a scene, then to allow the user to segregate these pure pixels into their respective endmembers. The purest pixels are those which are the closest to containing only one spectrally unique material (i.e., one endmember material). Defining an ROI which contains the purest image pixels in an image is most easily done using ENVI's Pixel Purity Index tool. It is possible to import to the n-Dimensional Visualizer an ROI that is not based on the purest pixels in the image, but if you do then some scene endmembers may not be represented in the resulting n-D scatter plot.

Locating Endmembers in a Spectral Data Cloud

When pixel data are plotted in a scatter plot which uses image bands as plot axes, the spectrally purest pixels always occur in the corners of the data cloud, while spectrally mixed pixels always occur on the inside of the data cloud. To convince yourself of this, imagine two pixels, each being made up entirely of a different material. Say one pixel is in a park with uniform grass, and the other is in a lake. If the two pixels are plotted in a scatter plot, the scatter plot may look like Figure 1a.

A.

ENVI263_1a.jpg

B.

ENVI263_1b.jpg

Figure 1. Two-dimensional scatter plots showing: A) two pure pixels corresponding to different endmember materials, and pixels containing mixtures of the two endmember materials, and B) the scatter plot shown in A, with an additional pure pixel corresponding to a third endmember material.

Now imagine another pixel that is 50% filled with grass, and 50% filled with lake. That pixel will plot exactly between the previous two pixels - halfway along the line connecting the other two pixels in the scatter plot. Now if a pixel is 10% filled with grass, and 90% filled with lake, we would expect the pixel to plot much closer to the pixel containing 100% lake.

Finally, imagine a third pixel, which is 100% filled with a third material, say sand. That pixel will create a third corner to the data cloud. Any pixel that contains a mixture of sand, water and grass will fall inside the triangle defined by connecting the three pure pixels together (Figure 1b). Any pixel that contains only two of the three materials will fall on the edge of the triangle, but only the pure pixels will fall in the corners of the triangle. In this example, the data cloud forms a triangle. This example considers only a two dimensional scatter plot with three endmembers, but even in scatter plots using any number of dimensions with data containing any number of endmembers, pure pixels will always plot in the corners of the data cloud, and mixed pixels will fall within the shape defined by these corners.

The n-Dimensional Visualizer Plot

Once you have started the n-Dimensional Visualizer, you can display scatter plots with as many dimensions as you have bands in your input image. When a scatter plot with more than three dimensions is visualized you may notice that as the data cloud rotates, it occasionally folds in on itself in a way that is difficult to understand. This is a result of plotting more dimensions than we have experience visualizing (after all, we live in a 3-dimensional world). Remember that it is not necessary to comprehend the direction of the rotations to derive useful information from the n-Dimensional Visualizer.

Unlike the 2-D scatterplot tool available from ENVI's display Tools menu, the n-Dimensional Visualizer scatter plots are arranged so that the mean of each image band falls in the center of the plot. The origin of the scatter plot is therefore in the center of the data cloud. This can be seen by going to the Options menu of the n-D Controls dialog, and choosing Show Axes. The axes of the chosen bands will be shown in the n-D Visualizer window.

A few n-Dimensional Visualizer controls are particularly useful when rotating the data cloud:

  • The speed with which the data cloud rotates can be controlled by changing the Speed value in the n-D Controls dialog. Higher values cause faster rotation, with fewer steps between the different, randomly chosen orientations of the scatter plot axes. The information in the View status box tells the number of steps used to move between any two randomly chosen orientations of the scatter plot axes.
  • If the rotation has been stopped, then the buttons labeled Step can be used to back up the rotation by one step or to rotate forward by one step. This can be useful if you were unable to stop the rotation at the exact orientation which best displayed a corner of the data cloud.
  • The button labeled New can be used to jump the scatter plot axes to a completely new random orientation without waiting for all of the intermediate steps. The New button is useful if you find yourself rotating slowly through a series of views which are not helpful for identifying corners of the data cloud.
  • You can resize the n-D Visualizer window by clicking and dragging a corner of the window.

Identifying Image Endmembers

The usual objective of using the n-Dimensional Visualizer is to visually identify and distinguish the purest pixels in the image. The purest pixels will always form the very tip of a corner in the data cloud. Moreover, each corner will correspond to one spectrally unique material in the image. Therefore, you will be trying to find all of the corners of the data cloud, and assign each corner a different color. Once the purest pixels are separated into different classes this way, then the pixel spectra from those classes can be used as the endmembers for spectral analysis, such as linear spectral unmixing or matched filtering.

Remember that if the ROI imported into the n-Dimensional Visualizer was defined using the PPI, then the data cloud shown in the n-Dimensional Visualizer will show only corners. The pixels that would normally fall in the center of the data cloud are the mixed pixels, which are not included in an ROI defined using the PPI (Figure 2).

A.

ENVI263_2a.jpg

B.

ENVI263_2b.jpg

Figure 2. An n-D Visualizer scatterplot showing: A) an ROI containing the full range data from the same image, and B) an ROI containing only the purest pixels in an image (generated using the Pixel Purity Index).

To determine which pixels correspond to different image endmembers, watch the data cloud rotate until you see pixels forming a corner (i.e., sticking out of the data cloud). For example, the pixels at the upper center of the scatter plots in Figure 2 are forming a clear corner. When a corner like this becomes visible, stop the animation, select a class color from the Class menu, and circle the most extreme corner pixels to signify that they represent one endmember. It is best not to circle all of the pixels which cluster together into a corner. If possible, it is better to try to identify only the few pixels in that corner which form the most extreme tip of the corner. These are the pixels which contain the largest fraction of that particular endmember material. For example, in Figure 2, there is one pixel that is clearly much further out toward the tip of the corner in the upper center of the scatterplot. The less extreme pixels will contain larger fractions of other materials. A corner may consist of tens of clustered pixels or only one or two similar pixels.

After you have colored the corner pixels, watch the data cloud rotate, and make sure that the pixels you selected stay together in all projections. You will want to change the bands used in the scatter plot periodically, so that every band eventually gets included in the scatter plot. This is the way to make sure that all of the pixels you have identified as being in the same class really do have similar values at all wavelengths. If the pixels do not cluster together in all projections, they do not correspond to the same material. If you find that some of the pixels separate from the rest of the class in some projections, then you can delete those pixels from the class by choosing White as the class color, and then circling the errant pixels.

Class Collapsing

Sometimes it is difficult to define all of the visible classes because they tend to get in each others' way in many projections of the data cloud. Moreover, subtle corners in the data cloud which are similar, but still distinguishable can be swamped by the obvious, high-contrast corners. To help you distinguish these subtle corners, ENVI provides a "class collapsing" tool, which is a recursive, flexible implementation of partial unmixing. Class collapsing calculates a new projection of the data cloud which hides the span of the collapsed classes and maximizes the spread of the remaining points. Each class that is collapsed removes one dimension of rotation.

There are two ways to collapse classes: by variance and by mean. Both methods are available from the Options menu. Don't forget that you can uncollapse classes by selecting Options -> Uncollapse.

When you collapse classes by their means, the mean values of the different classes are calculated, and then the means of all of the classes are forced to the same location of the scatter plot. For example, visualize a data cloud that has the shape of a tetrahedron, with four corners (Figure 3a). If you have identified two classes in that data cloud, then when you collapse the classes by their mean values, ENVI arranges the data cloud so that the two means of the identified classes now always appear right on top of each other in one place. As the scatter plot rotates, only the orientations in which these two corners appear to be right on top of each other will be used.
 

ENVI263_3.jpg

Figure 3. The shape of a four-cornered (i.e., four endmember) data cloud with well separated corners.
 

ENVI263_4.jpg

Figure 4. The same data cloud as in Figure 3, with class C and D collapsed.

When you collapse classes by variance, the covariance matrix of all classified pixels (lumped together regardless of class) is calculated. To perform class collapsing by variance you should have at least nb*nb/2 pixels classified (where nb = the number of bands in the data) so that the nb*nb covariance matrix can be calculated. A whitening transform is then calculated based on the covariance statistics. Whitening will collapse the colored pixels into a fuzzy ball in the center of the scatter plot, thereby hiding any corners they may form. Although the whitening transform is calculated from the covariance matrix of the classified pixels, it is applied to all of the pixels. If any of the unclassified pixels contain mixtures of the endmembers included among the classified pixels, then those unclassified pixels, too, will collapse to the center of the data cloud. Any unclassified pixels which do not contain mixtures of endmembers defined thus far will stick out of the data cloud very well after the class collapsing, making them much easier to distinguish.

Collapsing by variance is often used for partial unmixing work. For example, if you are trying to distinguish very similar but distinct endmembers, you can put all of the other pixels of the cloud into one class and then collapse this class by variance. The subtle distinctions between the unclassified pixels will be greatly enhanced in the resulting scatter plot.

The Class Controls Dialog

A convenient way to control the way different classes are displayed or collapsed in the n-D Visualizer plot is to use the Class Controls tool. To bring up the Class Controls tool, go to the n-D Controls window and choose Options -> Class Controls. In the resulting n-D Class Controls dialog, each defined class is listed along with check boxes to indicate whether the pixels in the class are colored in the n-D Visualizer plot and whether the class should be used in any class collapsing. Turning these check boxes on or off will change the current n-D Visualizer plot accordingly.

At the top of the n-D Class Controls dialog, the active class is indicated by color. The active class is defined by choosing a class color from the Class menu. The buttons at the top of the n-D Class Controls dialog perform various operations on the active class:

Symbol: change the symbol used to display the current class in the n-Dimensional
Visualizer plot
Stats: display the mean, minimum, maximum, and standard deviation spectra of the
current class together in one plot
Mean: display the mean spectrum of the current class alone
Plot: display the spectrum of each pixel in the class together in one plot
Clear: delete the current class
Export: export the current class to an ROI

Exporting Classes to ROIs

After all of the corners in the data cloud have been selected as different classes, you can export them to individual ROIs for further processing. For example, the ROIs can then be imported as endmembers for classification, linear spectral unmixing, matched filtering, or other mapping methods. To export all of your classes to ROIs from the n-D Controls, choose Options-> Export All (or, starting in ENVI 3.6, right-click in the n-D plot window). You can also export the classes one at a time by choosing Export Class instead of Export All, or by selecting the class in the n-D Class Controls dialog and then choosing Export. Remember that each time you export n-Dimensional Visualizer classes, new ROIs will be generated. For example, if you choose Export All twice, two identical ROIs will be generated for each n-Dimensional Visualizer class. For this reason, you will probably want to wait until you have chosen all of the corners in the data cloud before you choose Export All.

Saving and Restoring n-Dimensional Visualizer States

If you should need to close the n-Dimensional Visualizer before you are finished choosing classes, you can save the current state of the n-Dimensional Visualizer to a file. When you save the n-Dimensional Visualizer state, information about the data cloud, current axes, orientation of the scatter plot, and the defined classes is saved to a file. After the n-Dimensional Visualizer state has been saved to a file, you can start up the n-Dimensional Visualizer in its previous state by choosing Spectral -> n-Dimensional Visualizer -> Visualize with Previously Saved Data.