Feature Extraction Module
Feature Extraction Module
20FX46DOC
SrvprqSvtuIvpr
The IDL, ION Script, ION Java, IDL Analyst, ENVI, and ENVI Zoom software programs and the accompanying procedures, functions, and documentation described herein are sold under license agreement. Their use, duplication, and disclosure are subject to the restrictions stated in the license agreement. ITT Visual Information Solutions reserves the right to make changes to this document at any time and without notice.
GvvhvsXhh
ITT Visual Information Solutions makes no warranties, either express or implied, as to any matter not expressly set forth in the license agreement, including without limitation the condition of the software, merchantability, or fitness for any particular purpose. ITT Visual Information Solutions shall not be liable for any direct, consequential, or other damages suffered by the Licensee or any others resulting from use of the software packages or their documentation.
QrvvSrqpruvHhhy
If you are a licensed user of these products, ITT Visual Information Solutions grants you a limited, nontransferable license to reproduce this particular document provided such copies are for your use only and are not sold or distributed to third parties. All such copies must contain the title page and this notice page in their entirety.
@8yDshv
This software and its associated documentation are subject to the controls of the Export Administration Regulations (EAR). It has been determined that this software is classified as EAR99 under U.S. Export Control laws and regulations, and may not be re-transferred to any destination expressly prohibited by U.S. laws and regulations. The recipient is responsible for ensuring compliance to all applicable U.S. Export Control laws and regulations.
6pxyrqtr
ENVI and IDL are registered trademarks of ITT Corporation, registered in the United States Patent and Trademark Office. ION, ION Script, ION Java, and ENVI Zoom are trademarks of ITT Visual Information Solutions. ESRI, ArcGIS, ArcView, and ArcInfo are registered trademarks of ESRI. Portions of this work are Copyright 2008 ESRI. All rights reserved. Numerical Recipes is a trademark of Numerical Recipes Software. Numerical Recipes routines are used by permission. GRG2 is a trademark of Windward Technologies, Inc. The GRG2 software for nonlinear optimization is used by permission. NCSA Hierarchical Data Format (HDF) Software Library and Utilities. Copyright 1988-2001, The Board of Trustees of the University of Illinois. All rights reserved. NCSA HDF5 (Hierarchical Data Format 5) Software Library and Utilities. Copyright 1998-2002, by the Board of Trustees of the University of Illinois. All rights reserved. CDF Library. Copyright 2002, National Space Science Data Center, NASA/Goddard Space Flight Center. NetCDF Library. Copyright 1993-1999, University Corporation for Atmospheric Research/Unidata. HDF EOS Library. Copyright 1996, Hughes and Applied Research Corporation. SMACC. Copyright 2000-2004, Spectral Sciences, Inc. and ITT Visual Information Solutions. All rights reserved. This software is based in part on the work of the Independent JPEG Group. Portions of this software are copyrighted by DataDirect Technologies, 1991-2003. BandMax. Copyright 2003, The Galileo Group Inc. Portions of this computer program are copyright 1995-1999, LizardTech, Inc. All rights reserved. MrSID is protected by U.S. Patent No. 5,710,835. Foreign Patents Pending. Portions of this software were developed using Unisearchs Kakadu software, for which ITT has a commercial license. Kakadu Software. Copyright 2001. The University of New South Wales, UNSW, Sydney NSW 2052, Australia, and Unisearch Ltd, Australia. This product includes software developed by the Apache Software Foundation (www.apache.org/). MODTRAN is licensed from the United States of America under U.S. Patent No. 5,315,513 and U.S. Patent No. 5,884,226. QUAC and FLAASH are licensed from Spectral Sciences, Inc. under U.S. Patent No. 6,909,815 and U.S. Patent No. 7,046,859 B2. Portions of this software are copyrighted by Merge Technologies Incorporated. Support Vector Machine (SVM) is based on the LIBSVM library written by Chih-Chung Chang and Chih-Jen Lin (www.csie.ntu.edu.tw/~cjlin/ libsvm), adapted by ITT Visual Information Solutions for remote sensing image supervised classification purposes. IDL Wavelet Toolkit Copyright 2002, Christopher Torrence. IMSL is a trademark of Visual Numerics, Inc. Copyright 1970-2006 by Visual Numerics, Inc. All Rights Reserved. Other trademarks and registered trademarks are the property of the respective trademark holders.
Contents
Contents .............................................................................................................................................. 3 Chapter 1: Introduction ..................................................................................................................... 5 Introduction to ENVI Feature Extraction ........................................................................................ 6 Working with Multiple Layers ......................................................................................................... 8 Preprocessing ................................................................................................................................ 9 Installing and Licensing ENVI Feature Extraction ....................................................................... 10 Chapter 2: Preparing Input Data ..................................................................................................... 11 Overview of Input Files ................................................................................................................ Selecting a Base Image ............................................................................................................... Working with Ancillary Data ......................................................................................................... Working with Masks ..................................................................................................................... Chapter 3: Finding Objects ............................................................................................................. Segmenting Images ..................................................................................................................... Merging Segments ...................................................................................................................... Refining Segments ...................................................................................................................... Computing Attributes ................................................................................................................... Chapter 4: Extracting Features ....................................................................................................... Classifying or Exporting ............................................................................................................... Supervised Classification ............................................................................................................ Rule-Based Classification ............................................................................................................ Exporting Classification Results .................................................................................................. Chapter 5: Tips and Tricks for Using ENVI Feature Extraction ................................................... General Tips and Tricks .............................................................................................................. Find Objects Task ........................................................................................................................ Extract Features Task ................................................................................................................. Chapter 6: Preferences .................................................................................................................... 12 13 14 15 19 20 22 24 26 31 32 33 42 48 53 54 56 57 59
Contents
Chapter 1: Introduction
In this chapter you will find: Introduction to ENVI Feature Extraction, 6 Working with Multiple Layers, 8 Preprocessing, 9
Chapter 1: Introduction
Chapter 1: Introduction
You can also run the Feature Extraction workflow in batch mode, using the ENVI_FX_DOIT procedure in ENVI programming. See "ENVI_FX_DOIT" on page 64.
Chapter 1: Introduction
Chapter 1: Introduction
Preprocessing
Preprocessing
Consider preprocessing your input image in ENVI prior to using the image in ENVI Feature Extraction. After you have preprocessed the image, you can right-click on its filename in the Available Bands List in ENVI, and select Open File in ENVI Zoom.
Spatial Down-sampling
Reducing the spatial resolution of your input image can speed up processing and remove small, unwanted features. If your input image is very large, you can down-sample the image to speed processing time. For example, you can down-sample a 10,000 x 10,000 pixel image by a factor of 10 to yield a 1,000 x 1,000 pixel image. Or, if you want to extract features with a large area (such as fields), down-sampling can assist in reducing noise in the input image. You can spatially subset an image in ENVI Zoom prior to using it in ENVI Feature Extraction.
Hyperspectral Data
If you want to process data from a hyperspectral sensor in ENVI Feature Extraction, you should use only those bands that best show features of interest. Consider using ENVIs preprocessing tools to reduce the number of bands in the dataset before using ENVI Feature Extraction.
Layer Stacking
You can use ENVIs Layer Stacking tool to build a new multi-band file that consists of your input image plus any ancillary data such as DEMs, lidar images, or SAR images. When you process the multi-band file in ENVI Feature Extraction, ENVI Zoom stores the data from the ancillary datasets as additional avg_band_x attributes (see "Spectral Attributes" on page 28). These extra attributes can considerably improve your classification results.
Spatial Filtering
If your input image contains a lot of noise, you can apply a spatial filter in ENVI and use the filtered dataset in ENVI Feature Extraction. You should ideally select a filter that preserves edges well, such as a Lee or median filter.
Chapter 1: Introduction
10
In this chapter you will find: Overview of Input Files, 12 Selecting a Base Image, 13 Working with Ancillary Data, 14 Working with Masks, 15
11
12
5. You can continue with selecting ancillary data and/or mask files for input, or click OK in the Select Fx Input Files dialog to begin the Feature Extraction workflow. If you spatially or spectrally subsetted the base image, the Preparing Data dialog appears with a progress bar. When processing is complete, Feature Extraction proceeds to the Find Objects task of the workflow (see "Segmenting Images" on page 20). At this point, you cannot click Previous to return to the data selection steps.
13
14
Suppose you want to limit Feature Extraction processing to only residential areas so that you can identify rooftops within the scene. You could create a regular mask (in ENVI or ENVI Zoom), similar to the following example. If you were to import this mask during the data selection step, each subsequent step of the Feature Extraction workflow would ignore the area associated with the masked pixels.
Restrictions
The following restrictions apply to working with masks in ENVI Feature Extraction:
15
You can only use a single-band raster image or polygon shapefile as a mask file. Multi-band images or point/line shapefiles are not allowed. ENVI Zoom will convert polygon shapefiles to raster images for Feature Extraction. You can only specify one mask file for input. If you have multiple mask files, you can combine them into one image in ENVI prior to using ENVI Feature Extraction. A raster mask must have the same map projection as the base image. Masks are not reprojected to match the base image. If the mask has a different map projection than the base image, you could change the masks map projection in ENVI prior to using it in ENVI Feature Extraction. A raster mask must have the same spatial extent as the base image. When you combine ancillary data with a base image, ENVI Zoom creates a layer stack from the two inputs and uses the layer stack as input into Feature Extraction. In some cases, the layer stack will be reprojected and have a different spatial extent than the original base image. If you were to use a raster mask that was created from the original base image in the Feature Extraction workflow, you may receive an error message during segmentation because the spatial extents are different between the layer stack and the raster mask. If you are combining ancillary data and a mask with your base image, you can use the following steps to avoid this reprojection problem: (1) After selecting input data, cancel out of the Feature Extraction workflow. You will be prompted to save the mask and layer stack. (2) Save the vector or raster mask and layer stack to separate raster files. (3) Restart Feature Extraction, and use the layer stack as the base image, and the saved raster mask as the mask file. This method allows you to use the same raster mask and layer stack in the ENVI_FX_DOIT programmatic routine as well as the interactive Feature Extraction. You cannot use the same image for the base and/or ancillary data and/or mask file.
16
2. From the menu bar, select File > New > Vector Layer. The Create New Vector Layer dialog appears. 3. Enter a Layer Name. 4. From the Record Type drop-down list, select Polygon. 5. Click OK. 6. Use ENVI Zooms vector creation tools to draw polygons in the Image window, defining masked regions. See "Creating Vector Records" in ENVI Zoom Help for details. 7. From the menu bar, select File > Save As > New Vector. Save the vector layer to a shapefile. 8. Import the shapefile as described in Selecting a Mask File on page 16. You can also use ENVI to create mask files, and import these into ENVI Feature Extraction. See "Creating Masks" in ENVI Help for details.
17
18
In this chapter you will find: Segmenting Images, 20 Merging Segments, 22 Refining Segments, 24 Computing Attributes, 26
19
Segmenting Images
Segmenting Images
Segmentation is the process of partitioning an image into segments by grouping neighboring pixels with similar feature values (brightness, texture, color, etc.) These segments ideally correspond to real-world objects. ENVI Zoom employs an edge-based segmentation algorithm that is very fast and only requires one input parameter (Scale Level). By suppressing weak edges to different levels, the algorithm can yield multi-scale segmentation results from finer to coarser segmentation. Choosing a high Scale Level causes fewer segments to be defined, and choosing a low Scale Level causes more segments to be defined. You should ideally choose the highest Scale Level that delineates the boundaries of features as well as possible. Good segmentation ensures that classification results are more accurate. If you choose too high of a Scale Level, the boundaries between segments will not be properly delineated and you will lose features of interest. You should ensure that features of interest are not grouped into segments represented by other features. You should also ensure that a feature of interest is not divided into too many small segments (over-segmentation; usually the result of a low Scale Level). If you cannot avoid this problem in the Segment step, then you can use Merge in the second step to improve the delineation of feature boundaries. You can also use the Refine step to solve over-segmentation issues for certain features. Perform the following steps: 1. In the Feature Extraction dialog, enable the Preview option to display a Preview Portal showing the current segmentation results. You can use Blend, Flicker, and Swipe tools to view the underlying layer. You can also use the Pan, Zoom, and Transparency tools, although these are for display purposes only; they do not affect ENVI Feature Extraction results. You cannot adjust the Contrast, Brightness, Stretch, or Sharpen values in a Preview Portal. If a Preview Portal is displayed over an image, you can use any of ENVI Zooms enhancement tools on the image by first clicking on the image in the Image window or selecting the image layer in the Layer Manager. You can also move the Preview Portal around the image or resize it to look at different areas. Note: For optimal Preview Portal performance, set the Zoom to 100 percent before running ENVI Feature Extraction. See "Zooming" in ENVI Zoom Help. 2. Adjust the Scale Level as necessary. Values range from 0.0 (finest segmentation) to 100.0 (coarsest segmentation; all pixels are assigned to one segment). The default value is 50.0. Increasing the Scale Level results in fewer segments. Use the slider or type a number in the provided field, and press Enter to set this value. As you change the value, the Preview Portal shows the results in real time. Following are some tips on changing the value: Click on the slider bar to the right or left of the indicator to move the slider up or down incrementally by a value of 10.0. Click on the arrows to the right or left of the slider bar to move the slider up or down incrementally by a value of 1.0.
20
Segmenting Images
Click the up/down arrow keys next to the value field to move the slider up or down incrementally by a value of 0.1. Click the slider, then use the arrow keys (on your keyboard) to increase or decrease the value by 0.1. Click the slider, then press Home to move the slider to 100.0 or End to move the slider to 0.0. Type a value into the provided field and press Enter. 3. You can choose to select specific bands for input into the Segment step. For example, suppose you selected a low-resolution DEM as ancillary data for use with a Quickbird high-resolution optical image in Feature Extraction (see "Working with Ancillary Data" on page 14). ENVI Zoom creates a layer stack from these datasets as input into the Segment step. You would like to retain the shapes of the objects derived from segmentation (to match what you see in the optical image), while ignoring the DEM data. So you could select only the bands in the layer stack corresponding to the optical data, as input into the Segment step. Click the Select Input Bands button . The Select Input Bands dialog appears. All bands from the base image are selected by default. To select a single band, right-click on the image filename and choose Select None, then click to select a single band. Or, use the Ctrl key to select multiple bands. Click OK. The Preview Portal updates to show the selected bands of data. 4. When you are satisfied with the results, click Next to process the entire image. The Process Manager (in the ENVI Zoom Status Bar) shows the status of segmentation processing. ENVI Zoom creates a Region Means image, adds it to the Layer Manager, and displays it in the Image window. (An example layer name is filenameRegionMeans.) The Region Means image is a raster file that shows the results of the segmentation process. Each segment is assigned the mean band values of all the pixels that belong to that region. Feature Extraction proceeds to the Merge step (Step 2 of 4 of the Find Objects task).
21
Merging Segments
Merging Segments
Merging is an optional step used to aggregate small segments within larger, textured areas such as trees, clouds, or fields, where over-segmentation may be a problem. For example, if your image shows thick vegetation, increasing the Scale Level (in the previous Segment step) may not sufficiently delineate treecovered areas. The results may be over-segmented if you set a small Scale Level value or under-segmented if you set a large Scale Level value. Merging would be a useful option in this case for improving the delineation of tree boundaries. The Merge Level parameter in the ENVI Feature Extraction dialog represents the threshold lambda value, which ranges from 0.0 to 100.0 (see Background on page 23). Through an increasing nonlinear mapping, the parameter is more controllable and suitable for preview. You should ideally choose the highest Merge Level that delineates the boundaries of features as well as possible. If merging is not a useful option for your image, you can proceed directly to the Refine step by clicking Next in the Merge step (leaving the Merge Level at the default value of 0.0). No merging will be performed. Perform the following steps: 1. Enable the Preview option to display a Preview Portal showing the current segmentation results. 2. Adjust the Merge Level as necessary. Values range from 0.0 (default; no merging) to 100.0 (all segments merge into one). Use the slider or type a number in the provided field and press Enter to set this value. As you change the value, the Preview Portal shows the results in real time. Following are some tips on changing the value: Click on the slider bar to the right or left of the indicator to move the slider up or down incrementally by a value of 10.0. Click on the arrows to the right or left of the slider bar to move the slider up or down incrementally by a value of 1.0. Click the up/down arrow keys next to the value field to move the slider up or down incrementally by a value of 0.1. Click the slider, then use the arrow keys (on your keyboard) to increase or decrease the value by 0.1. Click the slider, then press Home to move the slider to 100.0 or End to move the slider to 0.0. Type a value into the provided field and press Enter. 3. When you are satisfied with the results, click Next. The Preview Portal closes. ENVI Zoom applies merging to the entire image, and the Process Manager (in the ENVI Zoom Status Bar) shows the status of merge processing. ENVI Zoom creates a merged Region Means image, adds it to the Layer Manager, and displays it in the Image window. (An example layer name is filenamemergedRegionMeans.) ENVI Zoom removes from the Layer Manager the Region Means image created during the Segment step. Feature Extraction proceeds to the Refine step (Step 3 of 4 of the Find Objects task).
22
Merging Segments
Background
ENVI Zoom employs the Full Lambda-Schedule algorithm created by Robinson, Redding and Crisp (2002). In ENVI Zoom, the algorithm iteratively merges adjacent segments based on a combination of spectral and spatial information. Merging proceeds if the algorithm finds a pair of adjacent regions, i and j, such that the merging cost is less than a defined threshold lambda value:
Where: is region i of the image is the area of region i is the average value in region i is the average value in region j is the Euclidean distance between the spectral values of regions i and j is the length of the common boundary of and
Reference: Robinson, D. J., Redding, N. J., and Crisp, D. J. (2002). Implementation of a fast algorithm for segmenting SAR imagery, Scientific and Technical Report, 01 January 2002. Australia: Defense Science and Technology Organization.
23
Refining Segments
Refining Segments
You can choose to refine segmentation results using another optional merging method called thresholding, which is useful for extracting point features (for example, airplanes or buildings) when over-segmentation is a problem. Thresholding is a raster operation that works with one band of your Region Means image to group adjacent segments based on their brightness value (digital number or DN). Thresholding works well with features that are in high contrast to their background (for example, bright aircraft against a dark tarmac). Choose one of the following options: No Thresholding (default): No thresholding will be performed. Click Next to proceed to the Compute Attributes step (Step 4 of 4 of the Find Objects task). Thresholding (advanced): If you select this option, a histogram of the first band of the Region Means image appears. Follow the steps below to continue. The Preview option is enabled, and a blank Preview Portal is displayed. Note: You may find it helpful to use the Transparency tool to adjust the transparency of the thresholding results in the Preview Portal so that you can see the underlying image.
Setting Thresholds
Click and drag the dashed vertical lines on the histogram to define the lower and upper limits of the threshold, or enter minimum and maximum values in the fields provided. ENVI Zoom computes and displays a mask image in the Preview Portal, which dynamically updates to show changes you make to the histogram. Pixel values below the low threshold and above the high threshold are assigned a value of 0, and values between the thresholds are assigned a value of 255 in the mask image. When you define the lower and upper limits of the threshold, you are essentially defining new boundaries for your features of interest. The black area in the mask image represents one big region, while the white areas represent other distinct regions. When you click Next, ENVI Zoom computes a mask image for the entire scene, segments the mask image, and assigns each distinct region a unique identifier. The identifiers are then used in computing attributes. If you do not adjust the histogram values, no thresholding is performed.
24
Refining Segments
Creating a Mask
Enable the Create Mask option if you want to create a raster layer from the mask that appears in the Preview Portal. Creating a mask during the Refine step is useful for filtering out unwanted features or noise from your segmentation results. A mask created during the Refine step is based on segments rather than individual pixels (as with a raster mask selected from the Select Fx Input Files dialog). To use an inverse version of the mask, enable the Inverse option. Feature Extraction will then process areas in the mask with pixel values of 0 and will ignore all other pixels. When you click Next, the mask is combined with the existing Region Means image to produce a new Region Means image, which is displayed in the Image window and added to the Layer Manager. ENVI Zoom will process areas with pixel values of 1 throughout the remaining workflow. You cannot click Previous from the Refine step and expect to use this mask when repeating the Segment and Merge steps. You will have an opportunity to save the mask to disk when you exit the Feature Extraction workflow. If you selected a mask file for input prior to starting the Feature Extraction workflow, and you create a new mask during the Refine step, ENVI Zoom will combine the two masks into one for the remaining workflow. Note: If you create a mask during the Refine step and proceed with selecting training data for supervised classification, the objects within the masked area will not be highlighted in color when you move your cursor over them. (See "Defining Training Data" on page 33).
25
Computing Attributes
Computing Attributes
ENVI Feature Extraction uses an object-based approach to classification, as opposed to pixel-based classification. The benefit of an object-based approach is that objects can be depicted with a variety of spatial, spectral, and texture attributes. In the Compute Attributes step, you define which attributes to compute for each object. Various preference settings control how ENVI Zoom computes the attributes. See "ENVI Feature Extraction Preferences" on page 60. You can use these attributes to help define classes when you perform rule-based or supervised classification. 1. Select any of the following attribute types to compute: Spatial: See "Spatial Attributes" on page 27. You must choose to compute spatial attributes if you plan to export segmentation results as described in "Exporting Vectors" on page 32. Spectral: See "Spectral Attributes" on page 28. Texture: See "Texture Attributes" on page 29. Color Space and Band Ratio: For use with multispectral images only. See "Color Space and Band Ratio Attributes" on page 29. 2. Click Next. ENVI Zoom computes the attributes for each object. If you choose to compute spatial attributes, ENVI Zoom performs an internal raster-to-vector operation and computes spatial attributes from the vectors. The previous steps (Segment, Merge, and Refine) can easily create very large segments that represent background objects and are meaningless in the context of classification. Creating vectors from these large regions consumes a lot of memory and results in poor display performance; therefore, ENVI Zoom ignores these large regions during vectorization. ENVI Zoom will not vectorize any region with more vertices than you specify in the Maximum Number of Vector Vertices preference. If you want to extract very large regions from an image, you should first down-sample the image prior to running ENVI Feature Extraction. ENVI Zoom proceeds to the Extract Features task of the Feature Extraction dialog. Note: ENVI Zoom computes attributes only for purposes of supervised or rule-based classification; the attributes are not passed to any output shapefiles you create during the Export task.
26
Computing Attributes
Spatial Attributes
Attribute
AREA LENGTH
Description Total area of the polygon, minus the area of the holes. Values are in map units. The combined length of all boundaries of the polygon, including the boundaries of the holes. This is different than the MAXAXISLEN attribute. Values are in map units. A shape measure that indicates the compactness of the polygon. A circle is the most compact shape with a value of 1 / pi. The compactness value of a square is 1 / 2(sqrt(pi)).
COMPACT
Polygons are either convex or concave. This attribute measures the convexity of the polygon. The convexity value for a convex polygon with no holes is 1.0, while the value for a concave polygon is less than 1.0.
A shape measure that compares the area of the polygon to the area of a convex hull surrounding the polygon. The solidity value for a convex polygon with no holes is 1.0, and the value for a concave polygon is less than 1.0.
A shape measure that compares the area of the polygon to the square of the maximum diameter of the polygon. The "maximum diameter" is the length of the major axis of an oriented bounding box enclosing the polygon. The roundness value for a circle is 1, and the value for a square is 4 / pi.
A shape measure that compares the area of the polygon to the square of the total perimeter. The form factor value of a circle is 1, and the value of a square is pi / 4.
A shape measure that indicates the ratio of the major axis of the polygon to the minor axis of the polygon. The major and minor axes are derived from an oriented bounding box containing the polygon. The elongation value for a square is 1.0, and the value for a rectangle is greater than 1.0.
A shape measure that indicates how well the shape is described by a rectangle. This attribute compares the area of the polygon to the area of the oriented bounding box enclosing the polygon. The rectangular fit value for a rectangle is 1.0, and the value for a non-rectangular shape is less than 1.0.
27
Computing Attributes
MAINDIR
The angle subtended by the major axis of the polygon and the x-axis in degrees. The main direction value ranges from 0 to 180 degrees. 90 degrees is North/South, and 0 to 180 degrees is East/West. The length of the major axis of an oriented bounding box enclosing the polygon. Values are map units of the pixel size. If the image is not georeferenced, then pixel units are reported. The length of the minor axis of an oriented bounding box enclosing the polygon. Values are map units of the pixel size. If the image is not georeferenced, then pixel units are reported. The number of holes in the polygon. Integer value. The ratio of the total area of the polygon to the area of the outer contour of the polygon. The hole solid ratio value for a polygon with no holes is 1.0.
MAJAXISLEN
MINAXISLEN
NUMHOLES HOLESOLRAT
Spectral Attributes
The following four attributes are computed for each band x in the original image. The shapefile attributes have 4 * x entries comprising the spectral attributes. Attribute
MINBAND_x MAXBAND_x AVGBAND_x STDBAND_x
Description Minimum value of the pixels comprising the region in band x. Maximum value of the pixels comprising the region in band x. Average value of the pixels comprising the region in band x. Standard deviation value of the pixels comprising the region in band x.
28
Computing Attributes
Texture Attributes
Attribute
TX_RANGE
Description Average data range of the pixels comprising the region inside the kernel. A kernel is an array of pixels used to constrain an operation to a subset of pixels. Refer to the Texture Kernel Size preference (see "ENVI Feature Extraction Preferences" on page 60). Average value of the pixels comprising the region inside the kernel. Average variance of the pixels comprising the region inside the kernel. Average entropy value of the pixels comprising the region inside the kernel. ENVI Zoom computes entropy, in part, from the Max Bins in Histogram preference.
Description Values range from -1.0 to 1.0. See Band Ratio on page 30. Hue is often used as a color filter and is measured in degrees from 0 to 360. A value of 0 is red, 120 is green, and 240 is blue. Saturation is often used as a color filter and is measured in floating-point values that range from 0 to 1.0. Intensity often provides a better measure of brightness than using the AVGBAND_x spectral attribute. Intensity is measured in floating-point values from 0 to 1.0.
SATURATION
INTENSITY
Color Space
To compute HSI color space attributes, you must have an input multispectral file with at least three bands. 1. Enable the Color Space option. If the file has wavelength information, ENVI Zoom chooses the default bands to use in computing the color space. If the file does not have wavelength information, ENVI Zoom uses the first three bands to compute color space. Optionally click the Color Space button in the Compute Attributes step to modify the default bands. The Select Input Bands dialog appears. 2. When you click on band names in the bottom part of the Select Input Bands dialog, color gun assignments will automatically cycle through red, green, then blue (in that order). Click the band name you want to assign to red. A red box appears next to the band name. Repeat for the green and blue bands. Colored boxes appear next to the bands to indicate which color is assigned to those bands.
29
Computing Attributes
Band Ratio
ENVI Zoom computes a normalized band ratio between two bands, using the following equation: (B2 - B1) / (B2 + B1 + eps) Where eps is a small number to avoid division by zero. Band ratio values range from -1.0 to 1.0 for non-negative data values. For multispectral data, if you assign the red band to B1 and the near-infrared band to B2, then the BANDRATIO attribute is a measure of normalized difference vegetation index (NDVI). Green vegetation has a high NDVI value. Perform the following steps to compute the BANDRATIO attribute: 1. Enable the Band Ratio option. If the file has wavelength information, ENVI Zoom chooses the default bands to use in computing the band ratio. If the file does not have wavelength information, ENVI Zoom uses the first two bands to compute the band ratio. Optionally click the Band Ratio button in the Compute Attributes step to modify the default bands. The Select Input Bands dialog appears. 2. Select the band you want to assign to Band 1. A 3. Select the band you want to assign to Band 2. A 4. Click OK in the Select Input Bands dialog. icon appears next to this band. icon appears next to this band.
30
In this chapter you will find: Classifying or Exporting, 32 Supervised Classification, 33 Rule-Based Classification, 42 Exporting Classification Results, 48
31
Classifying or Exporting
Classifying or Exporting
The Extract Features task guides you through the process of defining features (such as lakes, fields, or vehicles) and performing object-based classification to assign the objects to a feature, using supervised or rule-based classification. You can then export the resulting classification into a polygon shapefile and/or raster map and view a summary and statistics of your results. When the Extract Features task appears (following Compute Attributes), you are presented with three choices. Select an option, and click Next. Classify by selecting examples: See "Supervised Classification" on page 33. Classify by creating rules: See "Rule-Based Classification" on page 42. Export Vectors: See "Exporting Vectors" on page 32.
Exporting Vectors
You can choose to export vector objects and attributes from the Find Objects task to a shapefile instead of running supervised or rule-based classification. Note: You must choose to compute spatial attributes (see "Computing Attributes" on page 26) for the Export Vectors option to be available. After selecting Export Vectors and clicking Next, the Export Vectors dialog appears. Follow these steps to continue: 1. Enter an output directory and filename for the shapefile. 2. Click Export Attributes if you want to write the computed attributes to a .dbf file associated with the output shapefile. 3. Click Next. After processing is complete, a summary dialog appears with the processing options and settings you used throughout the Feature Extraction workflow (see "Understanding Reports and Statistics" on page 51). 4. Click Finish to exit the Feature Extraction workflow, or click Previous if you need to revisit any step in the workflow.
32
Supervised Classification
Supervised Classification
Supervised classification is the process of using training data (samples of known identity) to assign objects of unknown identity to one or more known features. The more features and training samples you select, the better the results from supervised classification. However, selecting an overwhelming number of training samples will cause poor performance during classification and when previewing classification results. You must define at least two features with at least one training sample each before clicking Next to proceed to the Export task.
To see the boundaries of the individual objects, enable the Show Boundaries option under the Features tab. Following is an example.
33
Supervised Classification
3. To assign an individual object to a feature, click the Select button in the main toolbar and click on a highlighted object to select it. The color of the object changes to the feature color. Continue selecting objects as training data for a feature. The feature name updates to show the number of objects you added. Choose a variety of different sizes and colors of objects that represent a feature of interest. To select multiple objects at once, click and drag the cursor to draw a box around the objects. ENVI Zoom assigns all of the segments that are completely enclosed within the selection box to the feature. Note: Be careful using the selection box because selecting an overwhelming number of training samples will cause poor performance during classification and when previewing classification results. Also, if you created a mask during the Refine step or if you input a mask file at the beginning of the workflow, the objects within the masked area will not be highlighted in color when you move your cursor over them.
Note: You cannot select training samples in images with an arbitrary map projection. 4. To remove an individual object from the selection, click on the object. The feature name updates to show one less object.
34
Supervised Classification
35
Supervised Classification
Training data are tied to the Scale Level, Merge Level, and thresholding values you use in the Find Objects task of the Feature Extraction workflow. So, after saving your training data, you cannot change any of these values and restore the same training data file for use in supervised classification. Each image that you use with restored training data must have the same Scale Level, Merge Level, and thresholding values.
2. Select a training data file (.xml), and click Open. If the file contains workflow parameters that match those of your current image, ENVI Zoom restores and displays the training data. The feature list in the Feature Extraction dialog updates to show the new features. Follow the steps below to restore a training data file for use with subsequent images. The images do not have to have the same spatial dimensions as the original image from which you created the training data file. Note: You can only restore one training data file per image. Also, the image must have the same number of bands as the images used to generate the training data file. For example, you cannot process a multispectral image with a training data file built from a set of panchromatic images. 1. Process each subsequent image separately in ENVI Feature Extraction, using the same Scale Level, Merge Level, and Refine values. 2. In the Supervised Classification dialog, Select a training data file (.xml), and click Open. The feature list in the Feature Extraction dialog updates to show the object count for each feature, and ENVI Zoom loads the attributes from the original source image. Objects are not displayed in your current image if they were derived from a different source image.
36
Supervised Classification
Tip: See the ENVI Tutorials on the ITT Visual Information Solutions website (or on the ENVI Resource DVD that shipped with your ENVI installation) for step-by-step examples.
2. Click Open File, and select one or more point or polygon shapefiles containing ground truth data. The shapefiles are listed in the Select Shapefile for Import dialog. Click OK in this dialog. The vector layers appear in the Image window and Layer Manager and will remain there throughout the rest of the Feature Extraction workflow. An Import Attributes dialog also appears for each shapefile. This dialog is similar to the Vector Attribute Viewer dialog in ENVI Zoom. 3. In the Supervised Classification dialog, select a feature name to which you will add ground truth data. If you have not yet defined any new features (see "Adding and Deleting Features" on page 34), the ground truth data will be added to the default Feature_1. 4. If you opened multiple shapefiles, choose the Import Attributes dialog that contains ground truth data you want to import. In that dialog, select one or more records that represent the feature you are interested in. Click the row numbers to select records. Use Ctrl-click to select multiple, non-adjacent rows; or use Shift-click to select a group of adjacent rows. The vectors associated with the selected records are highlighted in cyan in the Image window. Note: A shapefile may not necessarily represent ground truth data for only one feature; it may describe several different features. For example, you may have one polygon shapefile that contains ground truth data for different land-cover types (forest, agricultural, urban, etc.)
Note: Attributes associated with the ground truth shapefiles (for example, area, perimeter, population, etc.) cannot be used to improve rule-based or supervised classification results (as described in Computing Attributes). Only the spatial locations of the shapefile records are imported into the classification workflow.
37
Supervised Classification
5. Click Import Selected in the Import Attributes dialog. ENVI Zoom adds the selected vector records to the current feature by matching the point or polygon spatial locations with specific objects in the Region Means image. The objects are highlighted with the color assigned to that feature, and the feature name updates to show the number of new objects added. You can delete any unwanted objects or add them to another feature if needed (see "Defining Training Data" on page 33). 6. In the case of polygon shapefiles, all objects in the Region Means image that fall completely underneath the selected polygon will be added to the current feature. Other objects outside of the polygon may also be added if they have the same labels (ID numbers) as the regions within the polygon. This is the default method. You may find that this method adds too many objects to the current feature. Enable the Convert to Centroid option if you want ENVI Zoom to use the centroid of the selected polygons as the basis for adding objects to the current feature. This method treats the centroids of the selected polygons as point records when finding associated objects. Click Import Selected again. The objects associated with the centroid location are highlighted and added to the current feature. 7. To add ground truth data to a different feature, select that feature name in the Supervised Classification dialog. Open a new shapefile, or select different records from your current shapefile (using the corresponding Import Attributes dialog) and add them to your selected feature, using steps 4-6 above.
38
Supervised Classification
Some attributes are more useful when differentiating objects, and classification results may not be as accurate when you use all attributes equally since the irrelevant attributes could introduce noise into the results. Consider using the Auto Select Attributes feature, described in the table below. This feature is particularly useful when you have a large number of objects. Note: ENVI Zoom computes attributes only for purposes of classification; the attributes are not passed to any output shapefiles you create during the Export task. The order of the attributes in the Selected Attributes list does not affect the classification results. Follow these steps to select attributes for classification: 1. Click the Attributes tab in the Feature Extraction dialog. By default, all attributes are automatically added to the Selected Attributes list. 2. To select individual attributes for classification, expand the Spectral, Texture, and Spatial folders to see their respective attributes. Each attribute is shown with an icon. (The "Customized" folder contains the Color Space and Band Ratio attributes if you calculated them for a multispectral image.) Use the following buttons to select or unselect attributes: Button Button Name Select Attribute Unselect Attribute Select All Attributes Unselect All Attributes Auto Select Attributes Description Select an individual attribute, then click this button to move the attribute to the Selected Attributes list. If you select a folder (such as Spatial), this selects all the attributes in that folder. Select an individual attribute from the Selected Attributes list, then click this button to remove the attribute from the Selected Attributes list. Click this button to add all spatial, spectral, texture, and customized (if any) attributes to the Selected Attributes list. Click this button to remove all attributes from the Selected Attributes list.
Click this button if you want ENVI Zoom to determine the best attributes to use for classifying features. The underlying logic is based on the reference below. This button is enabled once you define at least two features with at least two objects each. Reference: An interval based attribute ranking technique. Unpublished report, ITT Visual Information Solutions. A copy of this paper is available from ITT Visual Information Solutions Technical Support.
39
Supervised Classification
2. Select a method from the Classification Algorithm drop-down list, and define the appropriate parameters. (See "K Nearest Neighbor" on page 40 and "Support Vector Machine" on page 40.) To reset parameters to their default values, click Reset. As you adjust the parameters under the Algorithm tab while the Preview option is enabled (see "Previewing Supervised Classification Results" on page 38), click Update to see the changes to classification results in the Preview Portal. 3. Click OK.
K Nearest Neighbor
The K Nearest Neighbor classification method considers the Euclidean distance in n-dimensional space of the target to the elements in the training data, where n is defined by the number of object attributes used during classification. This method is generally more robust than a traditional nearest-neighbor classifier, since the K nearest distances are used as a majority vote to determine which class the target belongs to. The K Nearest Neighbor method is much less sensitive to outliers and noise in the dataset and generally produces a more accurate classification result compared with traditional nearest-neighbor methods. Enter an odd integer value of 3 or higher in the K Parameter field. The default value is 3. The K Parameter is the number of neighbors considered during classification. Experiment with different values to see which gives you the best result, but realize that changing the value changes the classification results considerably. The ideal choice for K Parameter depends on the dataset and the training data you select. Larger values tend to reduce the effect of noise and outliers, but they may cause inaccurate classification. Typically, values of 3, 5, or 7 work well. For example, suppose you have four classes and you set the K Parameter to 3. ENVI Zoom returns the distances from the target to the three nearest neighbors in the training dataset. The distances are 5.0 (class A), 6.0 (class A), and 3.0 (class B). In this case, the target is assigned to class A because it found two close neighbors in class A that "out-vote" the one from class B, even though the class B neighbor is actually closer.
Linear:
Polynomial:
40
Supervised Classification
Sigmoid: 2. If the Kernel Type is Polynomial, set the Degree of Kernel Polynomial to specify the degree used for the SVM classification. The minimum value is 1 (default), and the maximum value is 6. Increasing this parameter more accurately delineates the boundary between classes. A value of 1 represents a first-degree polynomial function, which is essentially a straight line between two classes. A value of 1 works well when you have two very distinctive classes. In most cases, however, you will be working with imagery that has a high degree of variation and mixed pixels. Increasing the polynomial value causes the algorithm to more accurately follow the contours between classes, but you risk fitting the classification to noise. 3. If the Kernel Type is Polynomial or Sigmoid, specify the Bias in Kernel Function for the kernel to use in the SVM algorithm (shown as "r" in the above equations). The default value is 1.00. 4. If the kernel type is Polynomial, Radial Basis Function, or Sigmoid, use the Gamma in Kernel Function field to set the gamma parameter used in the kernel function. This value is a floating-point value greater than 0.01. The default is the inverse of the number of computed attributes. 5. Specify the Penalty Parameter for the SVM algorithm to use. This value is a floating-point value greater than 0.01. The default value is 100.0. The penalty parameter controls the trade-off between allowing training errors and forcing rigid margins. The more you increase this value, the more the parameter suppresses training data from "jumping" classes as you make changes to other parameters. Increasing this value also increases the cost of misclassifying points and causes ENVI to create a more accurate model that may not generalize well. 6. Use the Classification Probability Threshold field to set the probability that is required for the SVM classifier to classify a pixel. Pixels where all rule probabilities are less than this threshold are unclassified. The range is from 0.0 to 1.0. The default is 0.0. Increasing this value results in more unclassified pixels. References: Chang, C.-C. and C.-J. Lin. (2001). LIBSVM: a library for support vector machines. Hsu, C.-W., C.-C. Chang, and C.-J. Lin. (2007). A practical guide to support vector classification. National Taiwan University. http://ntu.csie.org/~cjlin/papers/guide/guide.pdf. Wu, T.-F., C.-J. Lin, and R. C. Weng. (2004). Probability estimates for multi-class classification by pairwise coupling. Journal of Machine Learning Research, 5:975-1005, http://www.csie.ntu.edu.tw/~cjlin/papers/svmprob/svmprob.pdf.
41
Rule-Based Classification
Rule-Based Classification
Rule-based classification is an advanced method that lets you define features by building rules based on object attributes. Rule-based classification is a powerful tool for feature extraction, often performing better than supervised classification for many feature types. Rule-building is primarily based on human knowledge and reasoning about specific feature types: For example, roads are elongated, some buildings approximate a rectangular shape, vegetation has a high NDVI value, and trees are highly textured compared to grass. Taking this concept a step further, you define a rule using one or more conditions; for example, you could define the rule for "lake" as the following: Objects with an area greater than 500 pixels AND Objects with an elongation less than 0.5 AND Objects with a band ratio value less than 0.3 And you could define the rules for "road" as the following: Objects with an elongation greater than 0.9 AND Objects with a compactness less than 0.3 AND Objects with a standard deviation less than 20 Each object represents a data point (sample) in the attributes n-dimensional space. You can define multiple rules (thus building a rule set) for a given feature in cases where the objects assigned to a feature belong to more than one cluster in n-dimensional space. The following figure shows an example 2D plot of the AREA versus AVGBAND_1 attributes:
Using this example, you may need to define multiple rules for the feature type "building" to cover different types of buildings such as small white buildings, buildings with red roofs, etc.
42
Rule-Based Classification
Reference: Jin, X., and S. Paswaters. (2007). A fuzzy rule base system for object-based feature extraction and classification. In Signal Processing, Sensor Fusion, and Target Recognition XVI (I. Kadar, editor). Proceedings of SPIE, Vol. 6567, pp. 65671H1 - 65671H12. To obtain a copy of this paper in PDF format, please contact ITT Visual Information Solutions Technical Support. Tip: See the ENVI Tutorials on the ITT Visual Information Solutions website (or on the ENVI Resource DVD that shipped with your ENVI installation) for step-by-step examples.
Fuzzy Logic
Traditional rule-based classification is based on strict binary rules, for example: objects meeting the rules for "tree" are classified as "tree," objects meeting the rules for "urban" are classified as "urban," and objects meeting neither rule remain unclassified. Fuzzy logic is an important element in ENVI Feature Extraction rule-based classification. Rather than classifying an object as fully "true" or "false" (as in binary rules), fuzzy logic uses a membership function to represent the degree than an object belongs to a feature type. Information extraction from remote sensing data is limited by noisy sensor measurements with limited spectral and spatial resolution, signal degradation from image pre-processing, and imprecise transitions between land-use classes. Most remote sensing images contain mixed pixels that belong to one or more classes. Fuzzy logic helps alleviate this problem by simulating uncertainty or partial information that is consistent with human reasoning. The output of each fuzzy rule is a confidence map, where values represent the degree that an object belongs to the feature type defined by this rule. In classification, the object is assigned to the feature type that has the maximum confidence value. With rule-based classification, you can control the degree of fuzzy logic of each condition when you build rules.
Building Rules
Perform the following steps to build new rules: 1. The Extract Features task begins with one undefined feature (Feature_1) and one undefined rule (indicated by an icon). 2. To begin building a rule, choose one of the following options: Double-click a rule name. Select a rule name and click the Add Attribute to Rule button Right-click on a rule name and select Add Attribute to Rule. The Attribute Selection dialog appears. .
Selecting Attributes
Follow these steps to select attributes for classification:
43
Rule-Based Classification
1. Expand the Spectral, Texture, Spatial, or Customized folders. Each attribute is shown with an icon. 2. Select an attribute name and enable the Show Attribute Image option to view a grayscale image of attribute values among all of the objects in the scene. The attribute image helps you select the appropriate attributes to define a rule for a certain feature. If the objects belonging to the feature have a high contrast relative to the other objects, then the attribute is a good choice for this rule. You can adjust the image transparency to view the underlying image if needed, using the Transparency slider on the main toolbar. You can also use the cursor to roam over objects in the image and view the objects attribute values in the Cursor Value panel. If you select a different attribute, the display will update. 3. Double-click on an attribute name, or select an attribute name and click Next. An interactive histogram dialog appears. The histogram shows the frequency of occurrence (y-axis) of the attribute values (x-axis) for all of the vector objects in the image. 4. To define minimum and/or maximum values for an attribute, click and drag the dashed vertical lines on the histogram. Or, type minimum and maximum values in the provided fields, and press Enter. 5. The Show Rule Confidence Image option is enabled by default. As you adjust the histogram range, the Preview Portal updates to show the relative confidence of each object belonging to a feature. The higher the brightness of an object, the higher the confidence that the object belongs to the feature. If an object is very dark, it likely does not belong to the feature. You can observe the brightness values of the objects in the Cursor Value category of the ENVI Zoom interface. Because of the fuzzy logic applied underneath, you will notice that some objects have a brightness value between 0 and 255. If your rule set only has one rule, any object with a brightness value greater than 255 times the Confidence Threshold value (in the Advanced Settings dialog) will be classified as the feature. The default Confidence Threshold value is 0.4. So if the brightness value of an object is greater than 102, then this object will be classified as the feature using this rule. 6. Move the Fuzzy Tolerance slider bar to adjust the degree of fuzzy logic applied to that rule, to better model the uncertainty inherent in classification. The default value is 5.0 percent, and the maximum value is 20.0 percent. When you adjust the Fuzzy Tolerance to a larger value, more objects will appear in the transition area between feature and non-feature. If you set the Fuzzy Tolerance to 0.0 percent, no fuzzy logic is applied when distinguishing among features. When working with multiple rules or a rule defined by multiple attributes, it is recommended to set the Fuzzy Tolerance to a non-zero value. When you enable fuzzy logic in this manner, ENVI Zoom will not reject the object as a certain feature type using a single binary condition; instead, it considers information from all conditions to make a decision. Suppose an object belongs to the feature type "water" if the mean spectral value of band 1 is less than 50.00 AND the area is larger than 500.00. If an object has a mean spectral value of 30.00 for band 1 AND an area of 499.00, according to binary classification, ENVI Zoom would reject this object as belonging to the feature type "water." Fuzzy logic would allow you to better approximate the uncertainty in human reasoning so that the object would have a very high probability of belonging to the "water" feature type. Following are some tips on changing the value: Click on the slider bar to the right or left of the indicator to move the slider up or down incrementally by a value of 10.0.
44
Rule-Based Classification
Click on the arrows to the right or left of the slider bar to move the slider up or down incrementally by a value of 1.0. Click the up/down arrow keys next to the value field to move the slider up or down incrementally by a value of 0.1. Click the slider, then use the arrow keys (on your keyboard) to increase or decrease the value by 0.1. Click the slider, then press Home to move the slider to 100.0 or End to move the slider to 0.0. Type a value into the provided field and press Enter. 7. From the Membership Function Set Type drop-down list, select S-Type (default) or Linear. Membership functions are mathematical concepts for modeling the underlying data distribution. ENVI Feature Extraction defines two membership function sets to model the fuzzy concepts of "greater than," "less than," and "in between." See Jin and Paswaters (2007) for the theory behind SType and piecewise linear membership function sets. The ideal option depends on the distribution of the input variable values. With the same Fuzzy Tolerance value, the S-type membership function set provides a lesser degree of fuzziness than the linear membership function set. 8. Click the Logic NOT check box to apply an inverse of the attribute values. The confidence image (in the Preview Portal) updates accordingly. 9. This step only applies if you have already defined at least one attribute for this rule. From the AND drop-down list, select a logic method to combine the current condition with the previous condition. The choices are AND (default) or OR. 10. When you are satisfied with the attribute settings, click OK. An icon appears under the rule name in the Feature Extraction dialog to indicate that you have added an attribute to the rule. The icon is followed by a brief summary of the attribute definition.
2. Enter a Rule Weight value between 0 and 1.00 if you want to assign the rule a lower confidence level (if you think the rule is less reliable than others). The default value of 1.00 is sufficient in most cases.
To delete a feature, select a feature name and click the Delete Feature button
To add a new rule to a feature, select a feature name and click the Add Rule to Feature button . Or, right-click on a feature name or rule name under that feature, and select Add Rule to Feature. A new, undefined rule appears under the feature name. To delete a rule, select the rule name and click the Delete Rule button name and select Delete Rule. . Or, right-click on the rule
45
Rule-Based Classification
To start over and define a new rule set, click the New Rule Set button . A warning dialog asks if you want to delete all of your existing rules and features. Click OK if you wish to continue and to delete any previously defined rules. The Extract Features task begins with one undefined feature (Feature_1) and one undefined rule. To load an existing rule set from disk, click the Restore Rule Set button . A file selection dialog appears. Select an XML file (.xml) containing a rule set, and click Open. To save a rule set that you have been working on, click the Save Rule Set As button selection dialog appears. Select an output XML filename (.xml), and click Open. . A file
To display a summary of your current rule sets, click the Display Rule Set button . The Display Rule Set dialog appears with a text summary of the rules you have defined. For example:
Rule Set: #1 (1.000): If area > 630.0000 AND avgband_2 < 307.0000 AND stdband_4 > 100.0000, then object belongs to Tree. #2 (1.000): If tx_variance > 1000.0000, then object belongs to Urban.
To edit attributes, choose one of the following options: Double-click an attribute name. Select an attribute name, and click Edit Attribute. Right-click on an attribute name, and select Edit Attribute. To delete attributes, choose one of the following options: Select an attribute name, and click Delete Attribute. Right-click on an attribute name, and select Delete Attribute.
Advanced Settings
1. From the Feature Extraction dialog, click the Advanced Settings button Settings dialog appears. . The Advanced
2. Enter a Confidence Threshold value. During classification, an object is assigned to the class with the maximum confidence value or it remains unclassified if the maximum confidence value is below the Confidence Threshold. Values range from 0 to 1.00. The default value is 0.40. 3. From the AND Operator drop-down list, select one of the following options to apply to the entire rule set. Assume the membership function value of condition C1 is m1, and the membership function value of condition C2 is m2. min: (default) The confidence value of C1 AND C2 is min(m1, m2). product: The confidence value of C1 AND C2 is m1*m2. 4. From the OR Operator drop-down list, select one of the following options to apply to the entire rule set. Assume the membership function value of condition C1 is m1, and the membership function value of condition C2 is m2. max: (default) The confidence value of C1 OR C2 is max(m1, m2). probabilistic: The confidence value of C1 OR C2 is m1 + m2 - m1*m2.
46
Rule-Based Classification
5. Enter a Default Fuzzy Tolerance value to change the default Fuzzy Tolerance value in the interactive histograms. This is useful if you want to use the same value among all the rules that you define. Values range from 0 to 20 percent. The default value is 5 percent. Changing this value does not affect rules that you have already built. 6. From the Default Membership Function Set Type drop-down list, select S-Type (default) or Linear to define the default membership function set type used in the interactive histograms. This is useful if you want to use the same membership function set type among all the rules that you define. Membership functions are mathematical concepts for modeling the underlying data distribution. The ideal option depends on the distribution of the input variable values. Changing this value does not affect rules that you have already built. See Jin and Paswaters (2007) for the theory behind S-Type and piecewise linear membership function sets. Reference: Jin, X., and S. Paswaters. (2007). A fuzzy rule base system for object-based feature extraction and classification. In Signal Processing, Sensor Fusion, and Target Recognition XVI (I. Kadar, editor). Proceedings of SPIE, Vol. 6567, pp. 65671H1 - 65671H12. To obtain a copy of this paper in PDF format, please contact ITT Visual Information Solutions Technical Support.
47
Smoothing Vectors
The Smooth Vectors option uses the Douglas-Peucker line simplification algorithm: Douglas, D. H., and T. K. Peucker. (1973). Algorithms for the reduction of the number of points required to represent a digitized line or its caricature. Cartographica, Vol. 10, No. 2, pp. 112-122.
48
This algorithm uses the minimum number of vertices to describe a feature at a given scale. It is best suited for generalizing curved features such as rivers and not for structured objects such as buildings. The algorithm starts by identifying the first and last points in a polyline or polygon and drawing an imaginary line between them. For all the points in between, the algorithm identifies the one with the greatest distance (d) to this baseline. If this distance is greater than the Smoothing Threshold (Pixels) value that you specify, the algorithm keeps this point and defines two sub-polylines from the point. The algorithm repeats the process with each sub-polyline until none of the points distances from each successive baseline is greater than the Smoothing Threshold (Pixels). The points that are kept when the iteration finishes describe the new feature.
In ENVI Zoom, a smoothed polygon will have a minimum of five vertices, and a smoothed polyline will have a minimum of four vertices. ENVI Zoom determines how the image is projected and translates the Smoothing Threshold (Pixels) value into map units before applying the smoothing.
49
If the Smooth Vectors on Export preference is set to True, the following options are available in the Export step. See "ENVI Feature Extraction Preferences" on page 60 for more information on this preference. Follow these steps to smooth your vectors: 1. Enable the Smooth Vectors option to generalize all of your polyline and polygon vectors using the Douglas-Peucker line simplification algorithm. You cannot select specific vectors to generalize. 2. Enter a Smoothing Threshold (Pixels) integer value to indicate the level of generalization, if any. The default value is 1. A larger value results in straighter lines and less detail in your polylines and polygons. The maximum value is 99, although values greater than 10 are seldom useful. The following figure shows a comparison of different pixel values:
50
51
A Statistics tab is also available if you exported your classification results to vector shapefiles. The Statistics tab presents a table view of the features you defined. The Statistics tab only describes features that were classified and exported. The following columns are provided: Feature Name: The names assigned to each of your features Feature Count: The total number of polygons, polylines, or points belonging to each feature The following additional columns are provided for polygon features only and are in map units determined by the input image: Total Area Mean Area Maximum Area Minimum Area You can sort the table cells by right-clicking anywhere in the table and selecting Sort by selected column forward (ascending order) or Sort by selected column reverse (descending order).
Saving Reports
You can save all of the information under the Report and Statistics tabs to a text file by clicking Save Text Report. The Save FX Report dialog appears. Select an output filename and location, and click OK.
52
53
54
55
Segmenting Images
If the Preview option is enabled, you can click once in the Image window to select the image layer, then increase the transparency of the image (using the Transparency slider in the main toolbar). This helps you better discern the segments displayed in the Preview Portal. You should ideally choose the highest Scale Level that delineates the boundaries of features as well as possible. If you choose too high of a Scale Level, the boundaries between segments will not be properly delineated and you will lose features of interest. You should ensure that features of interest are not grouped into segments represented by other features. You should also ensure that a feature of interest is not divided into too many small segments (oversegmentation; usually the result of a low Scale Level). If you cannot avoid this problem in the Segment step, then you can use Merge in the second step to improve the delineation of feature boundaries. Throughout the process of segmenting images, merging segments, and refining segments, you can easily create very large segments that represent background objects and are meaningless in the context of classification. Creating vectors from these large regions consumes a lot of memory and results in poor display performance; therefore, ENVI Zoom ignores these large regions during vectorization. If you want to extract very large regions from an image, you should first down-sample the image prior to running ENVI Feature Extraction.
Merging Segments
Merging is an optional step used to aggregate small segments within larger, textured areas such as trees, clouds, or fields, where over-segmentation may be a problem. For example, if your image shows thick vegetation, increasing the Scale Level (in the previous Segment step) may not sufficiently delineate treecovered areas. The results may be over-segmented if you set a small Scale Level value or under-segmented if you set a large Scale Level value. Merging would be a useful option in this case for improving the delineation of tree boundaries. If merging is not a useful option for your image, you can proceed directly to the Refine step by clicking Next in the Merge step (leaving the Merge Level at the default value of 0.0). No merging will be performed.
Refining Segments
When setting thresholds, you may find it helpful to use the Transparency tool to adjust the transparency of the thresholding results in the Preview Portal so that you can see the underlying image.
Computing Attributes
In the Compute Attributes step, band ratio and color space attributes reside in the Customized folder. ENVI Zoom computes attributes only for purposes of supervised or rule-based classification; the attributes are not passed to any output shapefiles you create during the Export task. You must choose to compute spatial attributes if you plan to export segmentation results and for the Export Vectors option to be available in the Extract Features task.
56
Supervised Classification
The more features and training data you select, the better the results from supervised classification. However, selecting an overwhelming number of training data will cause poor performance during classification and when previewing classification results. After defining at least two features with at least one training sample each, you can click the Preview check box in the Extract Features task to view classification results in a Preview Portal. As you add or remove features, select objects, or add attributes, the Preview Portal dynamically updates to reflect the changes to the classification. Disabling the Preview option when selecting training data may improve performance. ENVI Zoom still recomputes classification results whenever you change the training data. As you adjust the parameters under the Algorithm tab while the Preview option is enabled, click Update to see the changes to classification results in the Preview Portal.
57
If you want to use the same training data file for similar images, those images should be from the same sensor under similar environmental conditions. For example, you dont want to use a training data file that you extracted from a Quickbird image with Landsat images. For best results, images should also have the same geographic projection, the same number of bands, and the same workflow parameters (Scale Level, Merge Level, and thresholds).
Rule-Based Classification
If you enable the Show Attribute Image option, you can adjust the image transparency to view the underlying image if needed, using the Transparency slider on the main toolbar. You can also use the cursor to roam over objects in the image and view the objects attribute values in the Cursor Value panel. If you select a different attribute, the display will update. When viewing the rule confidence image, you can observe the brightness values of the objects in the Cursor Value category of the ENVI Zoom interface. Because of the fuzzy logic applied underneath, you will notice that some objects have a brightness value between 0 and 255. If your rule set only has one rule, any object with a brightness value greater than 255 times the Confidence Threshold value (in the Advanced Settings dialog) will be classified as the feature. The default Confidence Threshold value is 0.4. So if the brightness value of an object is greater than 102, then this object will be classified as the feature using this rule. When working with multiple rules or a rule defined by multiple attributes, it is recommended to set the Fuzzy Tolerance to a non-zero value. When you enable fuzzy logic in this manner, ENVI Zoom will not reject the object as a certain feature type using a single binary condition; instead, it considers information from all conditions to make a decision. After defining at least one feature with at least one rule, click the Preview check box in the Extract Features task to view classification results in a Preview Portal. Undefined rules are ignored. You can move the Preview Portal around the image to look at classification results for different areas.
58
Chapter 6: Preferences
59
Chapter 6: Preferences
Preview Foreground Color Default Scale Level Max Bins in Histogram Number of Vectors Per Tile Use Spatial Attributes Use Spectral Attributes Use Textural Attributes Use Color Space Attributes
60
Chapter 6: Preferences
The default value is True, which means the Band Ratio check box is enabled in the Compute Attributes step for multispectral images. Set this preference to False if you do not want to calculate the band ratio attribute during the Feature Extraction workflow. Set the kernel size used to perform texture calculations during vectorization. Use an odd number of 3 or higher. The maximum value is 19. The default value is 3. Larger values provide more information at the expense of slower performance. Set the maximum number of vertices that ENVI Zoom produces for any single polygon during the Compute Attributes step. The default value is 200000. Smaller values cause ENVI Zoom to ignore regions that do not meet the criteria for creating vector polygons. As the value increases, ENVI Zoom tries to include larger regions at the expense of slower performance.
Maximum File Size of Shapefiles (Mbytes) Delete Temporary Directory on Exit Smooth Vectors on Export
Set the approximate maximum file size of shapefiles if you choose to create vector output during the Export task. The default value is 500 MB. Throughout the Feature Extraction workflow, ENVI Zoom creates several temporary files and directories. You can choose to automatically delete these when exiting ENVI Zoom by setting this preference to Yes (the default). Set this preference to True if you want the option to generalize your polyline and polygon vectors using the Douglas-Peucker line simplification algorithm (in the Export step following classification). Set this preference to False if you do not want the smoothing option to appear in the Export step. Set the default number of pixels to use in vector smoothing. This preference only applies if you set the Smooth Vectors on Export preference to True. You can still set the Smoothing Threshold (Pixels) value in the Export dialog, regardless of this preference.
61
Chapter 6: Preferences
62
Chapter 7: ENVI_FX_DOIT
63
ENVI_FX_DOIT
Chapter 7: ENVI_FX_DOIT
ENVI_FX_DOIT
This procedure automates the ENVI Feature Extraction workflow for programmatic access using various segmentation and classification parameters.
Syntax
See the "Syntax" heading in the Overview chapter of the ENVI Reference Guide for a description of the syntax below. ENVI_DOIT, ENVI_FX_DOIT [, A_FID=array] [, A_POS=array] [, BR_BANDS=array] [, CENTERLINE_OPTIONS=array] [, CONF_THRESHOLD=floating point] [, CS_BANDS=array], DIMS=array, FID=file ID [, /EXPORT_ATTRIBUTES] [, /EXPORT_RASTER] [, /INVERSE_MASK] [, KERNEL_SIZE=long integer] [, M_FID=file ID] [, MERGE_LEVEL=floating point], POS=array [, R_FID=variable] [, RASTER_FILENAME=string or string array] [, /RAW_ATTRIBUTES] [, RAW_FILENAME=string] [, REFINE_BAND=integer] [, /REFINE_INVERSE] [, /REFINE_MASK] [, RULESET_FILENAME=string], SCALE_LEVEL=floating point [, SEGMENT_BANDS=array] [, SMOOTHING_THRESHOLD=floating point] [, TD_FILENAME=string] [, THRESHOLD_LOWER=floating point] [, THRESHOLD_UPPER=floating point] [, VECTOR_FILENAME=string] [, VECTOR_OPTIONS=string array]
Keywords
A_FID (optional)
Set this keyword to an array of file IDs for ancillary data files. Use this keyword in conjunction with the A_POS keyword. The number of elements of A_FID must equal the number of elements of A_POS.
A_POS (optional)
Set this keyword to an array of long integers representing band numbers to process in the ancillary data files. Use this keyword in conjunction with the A_FID keyword. Specify bands starting with zero (Band 1=0, Band 2=1, etc.) Each element in the A_POS array corresponds to an element in the A_FID array. For example, suppose you have two ancillary files whose file IDs are 100 and 200. You want to process Band 1 from file ID 200, and you want to process Bands 2, 3, 4, and 5 from file ID 100. Write the code as follows:
A_FID = [200, 100, 100, 100, 100] A_POS = [0, 1, 2, 3, 4]
Or, to process all bands from the same file (100), write the code as follows:
A_FID = [100, 100, 100, 100, 100] A_POS = [0, 1, 2, 3, 4]
64
Chapter 7: ENVI_FX_DOIT
ENVI_FX_DOIT
BR_BANDS (optional)
Set this keyword to a two-element array of long integers representing band numbers used to calculate the Band Ratio attribute, in the following order: [redband, NIRband]. If you do not use this keyword, ENVI Zoom determines the red and near-infrared bands using wavelength information from the input file. If no wavelength information is available, ENVI Zoom uses the first two bands in the input file to calculate the Band Ratio attribute.
CENTERLINE_OPTIONS (optional)
If you export vector results to a polyline shapefile, set this keyword to a five-element array of floating-point values, where each element represents a centerline parameter: [distance, angle, prune, remove spurs, spur threshold] distance [0]: Minimum distance allowed for the weighted medial axis. The default value is 0. This is a unitless parameter; values can be equal to or greater than 0. angle [1]: Minimum angle (in degrees) allowed for the medial axis. Values range from 0 to 180.0 degrees. The default value is 60.0 degrees. prune [2]: This option is set to 1.0 by default, which means that unwanted edges will be removed from the medial axis. Set this array element to 0 if you do not want to enable pruning. remove spurs [3]: This option is set to 1.0 by default, which means that spurs will be removed from polylines. Set this array element to 0 if you do not want to remove spurs. spur threshold [4]: If you set the remove spurs option (array element [3]) to 1, then set the spur threshold element to the maximum spur length. Values range from 0.1 to 1. The default value is 0.5. Following is an example of using this keyword when you want to perform pruning and removing spurs:
centerline_options = [0.0, 60.0, 1.0, 1.0, 0.5]
CONF_THRESHOLD (optional)
Set this keyword to a floating-point value representing the Confidence Threshold parameter used in rulebased classification and in the Support Vector Machine (SVM) method of supervised classification. Values range from 0.0 to 1.0. The default value is 0.0. Note: The default value for this parameter in the Feature Extraction dialog in ENVI Zoom is 0.0 for supervised classification and 0.40 for rule-based classification.
CS_BANDS (optional)
Set this keyword to a three-element array of long integers representing band numbers used to calculate the Color Space attribute, in the following order: [redband, greenband, blueband]. If you do not use this keyword, ENVI Zoom determines the RGB bands using wavelength information from the input file. If no wavelength information is available, ENVI Zoom uses the first three bands in the input file to calculate the Color Space attribute.
65
ENVI_FX_DOIT
Chapter 7: ENVI_FX_DOIT
DIMS
The dimensions keyword is a five-element array of long integers that defines the spatial subset (of a file or array) to use for processing. Nearly every time you specify the keyword FID, you must also specify the spatial subset of the corresponding file (even if the entire file, with no spatial subsetting, is to be processed). DIMS[0]: A pointer to an open ROI; use only in cases where ROIs define the spatial subset. Otherwise, set to -1L. DIMS[1]: The starting sample number. The first x pixel is 0. DIMS[2]: The ending sample number DIMS[3]: The starting line number. The first y pixel is 0. DIMS[4]: The ending line number To process an entire file (with no spatial subsetting), define DIMS as shown in the following code example. This example assumes you have already opened a file using ENVI_SELECT or ENVI_PICKFILE:
envi_file_query, fid, dims=dims
You cannot define DIMS as a pointer to a region of interest (ROI) in any of ENVIs _DOIT library routines. Using the following example code with a _DOIT library routine will result in an error message when you run the program:
roi_ids = ENVI_GET_ROI_IDS() roi_dims = ENVI_GET_ROI_DIMS_PTR(roi_ids[0]) dims= [roi_dims,0,0,0,0]
EXPORT_ATTRIBUTES (optional)
Use this keyword in conjunction with the VECTOR_FILENAME keyword. Set this keyword if you want to write attributes associated with the vector objects (following classification) to the output shapefile (.dbf).
EXPORT_RASTER (optional)
Use this keyword in conjunction with the RASTER_FILENAME keyword. Set this keyword if you want to output classification results to a classification image and/or rule confidence image.
FID
The file ID (FID) is a long-integer scalar with a value greater than 0. An invalid FID has a value of -1. The FID is provided as a named variable by one of several ENVI routines used to open or select a file. Often, the FID is returned from the keyword R_FID in the procedure ENVI_OPEN_FILE. All file processing using ENVIs routines is accomplished by referring to its FID. If you work directly with the file in IDL, the FID is not equivalent to a logical unit number (LUN).
INVERSE_MASK (optional)
Set this keyword if you want to invert the mask specified by the M_FID keyword. Inverting the mask means that Feature Extraction will process the areas with pixel values of 0.
66
Chapter 7: ENVI_FX_DOIT
ENVI_FX_DOIT
KERNEL_SIZE (optional)
Set this keyword to a long-integer odd number representing the size of the kernel used in texture attribute calculations. The default value is 3.
M_FID (optional)
Set this keyword to the file ID of a raster mask image. If you specify this keyword, then Feature Extraction will ignore areas with pixel values of 0 in the mask.
MERGE_LEVEL (optional)
Set this keyword to a floating-point value (between 0.0 and 100.0) for the Merge Level parameter used during segmentation. If the value is 0.0, then no merging will be performed.
POS
Use this keyword to specify an array of band positions, indicating the band numbers on which to perform the operation. This keyword indicates the spectral subset of bands to use in processing. POS is an array of long integers, ranging from 0 to the number of bands minus 1. Specify bands starting with zero (Band 1=0, Band 2=1, etc.) For example, to process only Bands 3 and 4 of a multi-band file, POS=[2, 3]. POS is typically used with individual files. The example code below for ENVI_STATS_DOIT illustrates the use of POS for a single file with four bands of data:
pos=[0,1,2,3] envi_doit, envi_stats_doit, dims=dims, fid=fid, pos=pos, $ comp_flag=3, dmin=dmin, dmax=dmax, mean=mean, stdv=stdv, hist=hist
But what if you need to create an output file consisting of data from different bands, each from different files? Library routines such as CF_DOIT and ENVI_LAYER_STACKING_DOIT can accomplish this, but they use the POS keyword differently. Suppose you have four files, test1, test2, test3, and test4, with corresponding FIDs of fid1, fid2, fid3, and fid4, respectively. In the following example, you want Band 3 from test1 in the first position, Band 2 from test2 in the second position, Band 6 from test3 in the third position, and Band 4 from test4 in the fourth position. The code should be as follows:
fid_array = [fid1,fid2,fid3,fid4] pos=[2,1,5,3] envi_doit, cf_doit, dims=dims, fid=fid_array out_name=test_composite_file
R_FID (optional)
This keyword is a returned variable containing a file ID. One of the following values will be returned: If processing fails for any reason, then R_FID = -1. If you specify the RASTER_FILENAME keyword and processing is successful, R_FID will contain the file ID of the classification image. If you do not specify the RASTER_FILENAME keyword and processing is successful, R_FID will contain the file ID of the input file (R_FID = FID).
67
ENVI_FX_DOIT
Chapter 7: ENVI_FX_DOIT
RASTER_FILENAME (optional)
Use this keyword to specify the filenames of an output classification image and/or rule image when you set the EXPORT_RASTER keyword. If you do not set this keyword, then ENVI does not create output raster files. To create an output classification image only, set RASTER_FILENAME to a string value, for example: RASTER_FILENAME=class.img. To create both classification and rule confidence images, set RASTER_FILENAME to a two-element string array as follows: RASTER_FILENAME=[class.img, rule.img]. To create a rule image only, set RASTER_FILENAME to a two-element string array with the first element as a null string, for example: RASTER_FILENAME=[, rule.img].
RAW_ATTRIBUTES (optional)
Use this keyword in conjunction with the RAW_FILENAME keyword. Set this keyword if you want to output the raw attributes (prior to classification) to the output shapefile attribute file.
RAW_FILENAME (optional)
Set this keyword to a string value with the filename of a shapefile where you can output the raw vectors (prior to classification). If you use this keyword, ENVI_FX_DOIT skips classification and ignores the following keywords: CONF_THRESHOLD, VECTOR_FILENAME, VECTOR_OPTIONS, SMOOTHING_THRESHOLD, and RASTER_FILENAME. Outputting raw vectors requires you to compute attributes, so you still need to specify the RULESET_FILENAME or TD_FILENAME keyword.
REFINE_BAND (optional)
Set this keyword to a long-integer value representing the band of the Region Means image used during the Refine step. You must also specify the THRESHOLD_LOWER and THRESHOLD_UPPER keywords. If you also set the SEGMENT_BANDS keyword, then the Region Means image will only consist of the bands specified by SEGMENT_BANDS instead of all bands in the image. In this case, REFINE_BAND must correspond to one of the bands in the resulting Region Means image rather than a band from the original image.
REFINE_INVERSE (optional)
Set this keyword if you want to invert the mask created during the Refine step (if any). You must set the REFINE_MASK keyword. Inverting the mask means that Feature Extraction will process the areas with pixel values of 0.
REFINE_MASK (optional)
Set this keyword if you want to create a mask during the Refine step. To set this keyword, you must also set the THRESHOLD_LOWER and THRESHOLD_UPPER keywords. Feature Extraction will ignore areas with pixel values of 0 in the mask.
68
Chapter 7: ENVI_FX_DOIT
ENVI_FX_DOIT
RULESET_FILENAME (optional)
Set this keyword to a string value with the filename (.xml) of an input rule set if you are performing rulebased classification. ENVI_FX_DOIT uses this keyword to read in the attributes computed for rule-based classification. Note: You must use the RULESET_FILENAME or TD_FILENAME keyword, but not both.
SCALE_LEVEL
Set this keyword to a floating-point value (between 0.0 and 100.0) for the Scale Level parameter used during segmentation.
SEGMENT_BANDS (optional)
Set this keyword to an array of long integers representing the band numbers used for segmentation. The default is to use all bands in the input image: SEGMENT_BANDS=lindgen(nbands).
SMOOTHING_THRESHOLD (optional)
Set this keyword to a floating-point value (in units of pixels) to use during vector smoothing. The default value is 1.0. Setting this keyword to 0.0 disables vector smoothing. This keyword has no effect if you do not set the VECTOR_FILENAME keyword.
TD_FILENAME (optional)
Set this keyword to a string value with the filename of a training dataset if you are performing supervised classification. ENVI_FX_DOIT uses this keyword to read in the attributes computed for supervised classification. Note: You must use the RULESET_FILENAME or TD_FILENAME keyword, but not both.
THRESHOLD_LOWER (optional)
Set this keyword to a floating-point value representing the low threshold for the Refine step. The default value is 0.0. Note: The Refine step will be performed only if THRESHOLD_LOWER < THRESHOLD_UPPER.
THRESHOLD_UPPER (optional)
Set this keyword to a floating-point value representing the upper threshold for the Refine step. The default value is 0.0.
69
ENVI_FX_DOIT
Chapter 7: ENVI_FX_DOIT
VECTOR_FILENAME (optional)
Set this keyword to a string value with the full path to a file or directory where the vector shapefiles will be output. If you set this keyword to a directory name, then ENVI creates separate shapefiles for each feature and writes them to this directory. If you set this keyword to a filename with a .shp extension, then ENVI creates a single shapefile containing all the features. If you do not set this keyword, then no vectors are created.
VECTOR_OPTIONS (optional)
Set this keyword to a string array indicating the type of vector output desired for each feature. Valid values are Point, Line, or Polygon. The default value is Polygon. The number of elements in this array is determined by the number of features that have been extracted. This keyword has no effect if you did not set the VECTOR_FILENAME keyword. If you set VECTOR_FILENAME to a filename, only the first value in the VECTOR_OPTIONS array is used to determine the output type.
Example
The following example uses ENVI_FX_DOIT to automatically extract water and healthy vegetation from a QuickBird multispectral image of Boulder, Colorado. It uses the files qb_boulder_msi and qb_boulder_msi_ruleset.xml, which are provided in the envidata\feature_extraction directory of the ENVI Resource DVD that shipped with your ENVI software. The example code performs segmentation and merging with no refinement. It computes spatial, spectral, and texture attributes. It performs rule-based classification using an existing rule set (qb_boulder_msi_ruleset.xml) and creates separate, smoothed, polygon shapefiles for the vegetation and water features in the specified output directory.
70
Chapter 7: ENVI_FX_DOIT
ENVI_FX_DOIT
To output the raw vectors to a shapefile in the above example (without performing classification), call ENVI_FX_DOIT as follows. Outputting raw vectors requires you to compute attributes, so you should also specify the RULESET_FILENAME or TD_FILENAME keyword.
71
ENVI_FX_DOIT
Chapter 7: ENVI_FX_DOIT
72
Glossary
ancillary data
Additional datasets of the same geographic area as the base image, which will aid in classification (for example, height data).
attribute image
In rule-based classification, a greyscale image showing values of a given attribute among all the objects in the scene. If the objects belonging to the feature have a high contrast relative to the other objects, then the attribute is a good choice for the rule you are currently building.
attributes
Spatial, spectral, or texture properties of a vector object that can be used to classify the object into a known feature type.
centroid
The center of mass of a polygon. The centroid may not necessarily lie on the polygon; it may fall within a hole in the polyon.
color space
To reduce the spatial resolution of an image in order to improve performance time or reduce the amount of noise in the image. For example, you can down-sample a 10,000 by 10,000 pixel image by a factor of 10 to yield a 1,000 by 1,000 pixel image.
feature
A user-defined geographic phenomenon that can be modeled or represented using geographic datasets. Examples include roads, buildings, grasslands, and water bodies.
73
Glossary
fuzzy logic
Information extraction from remote sensing data is limited by noisy sensor measurements with limited spectral and spatial resolution, signal degradation from image pre-processing, and imprecise transitions between land-use classes. Most remote sensing images contain mixed pixels that belong to one or more class. Fuzzy logic helps alleviate this problem by simulating uncertainty or partial information that is consistent with human reasoning.
ground truth data
Data that represent known feature types within an image, thus providing a true classification for specific areas of the image.
K Nearest Neighbor
A supervised classification method that considers the Euclidean distance in n-dimensional space of the target to the elements in the training data, where n is defined by the number of object attributes used during classification. This method is generally more robust than a traditional nearest-neighbor classifier, since the K nearest distances are used as a majority vote to determine which class the target belongs to. The K Nearest Neighbor method is much less sensitive to outliers and noise in the dataset and generally produces a more accurate classification result compared with traditional nearestneighbor methods.
kernel
A collection of raster datasets that includes specific bands from one base image and multiple ancillary datasets. ENVI Zoom combines the overlapping areas from the various data into one dataset to use in Feature Extraction processing. You can save the layer stack to a file on disk and later restore it for use with Feature Extraction so that you do not have to re-select all of the original data for input.
membership function
The process of aggregating small segments within textured areas such as trees or clouds, where oversegmentation may be a problem. ENVI Zooms merging algorithm iteratively merges adjacent segments based on a combination of spectral and spatial information.
object
A segment with computed attributes, which is assigned through supervised or rule-based classification to a feature.
object-based processing
Remote sensing techniques that classify a set of input objects rather than classifying pixels individually.
pixel-based processing
In remote sensing, the traditional approach to exploitation and classification where each pixel in an image is treated as an independent data point.
74
Glossary
Preview Portal
A floating window positioned over the primary layer displayed in the Image window, which shows real-time segmentation or classification results for that portion of the layer.
Region Means image
A raster file that ENVI Zoom generates after you perform the steps in the Segment, Merge, and Refine steps. It shows the results of the segmentation process; each region is assigned the mean spectral values of all the pixels that belong to that region.
rule confidence image
An image that shows the relative confidence of each object belonging to a feature. The higher the brightness of an object, the higher the confidence that the object belongs to the feature. If an object is very dark, it likely does not belong to the feature.
rule set
A set of criteria that you build, based on human reasoning logic, to define a feature of interest using computed attributes.
rule-based classification
A classification method that lets you define features by building rules based on object attributes. Rulebuilding is primarily based on human knowledge and reasoning about specific feature types; for example, roads are elongated; some buildings approximate a rectangular shape; vegetation has a high NDVI value; trees are highly textured compared with grass, etc. Rule-based classification implements a concept called fuzzy logic to classify features.
segment
A group of neighboring pixels with similar spatial, spectral (brightness and color), and/or texture characteristics.
supervised classification
The process of using training data (samples of known identity) to assign objects of unknown identity to one or more known features.
Support Vector Machine (SVM)
The ENVI Feature Extraction workflow involves three primary tasks: Find Objects (which includes the Segment, Merge, and Refine Steps), Extract Features (classification), and Export.
texture
In image processing, a function of the distribution of the different grey levels in an image. A flat image in which all digital numbers (DNs) are equal is said to have a uniform texture.
thresholding
The rules and limits for distinguishing objects from the background, based on local pixel information. Thresholding is an optional step used to extract point features (for example, airplanes) when oversegmentation is a problem. Thresholding is a raster operation that works with the first band of your Region Means image to group adjacent segments based on their brightness value (digital number or DN). Thresholding works well with features that are in high contrast to their background (for example, bright aircraft against a dark tarmac).
75
Glossary
training data
Objects that you select as representative samples of known features. Training data are used in supervised classification to assign objects of unknown identity to one or more known features.
76
Index
A
ancillary data, 14 attribute images, 44 attributes, 26 band ratio, 29 color space, 29 selecting in supervised classification, 38 spatial, 27 spectral, 28 texture, 29
D
Douglas-Peucker line-simplification algorithm, 48
E
editing feature properties, 34 ENVI_FX_DOIT, 64 export control, 2 Export task, 48 exporting classification results to images, 51 classification results to shapefiles, 48 vector objects to shapefiles, 32 Extract Features task, 32
B
band ratio attribute, 30 base images, 13 batch mode, 64
F
feature extraction, 6 installing and licensing, 10 introduction, 6 workflow, 6 Find Objects task, 20 Full Lambda-Schedule algorithm, 23 fuzzy logic, 43 fuzzy tolerance, 44
C
classification, 32 exporting results to images, 51 exporting results to shapefiles, 48 rule-based, 42 supervised, 33 color space attributes, 29 copyright, 2
G
ground truth data, 37
77
Index
H
HSI color space, 29
selecting attributes, 43
S
scale level, 20 segmenting images, 20 smoothing vectors, 48 spatial attributes, 27 spectral attributes, 28 statistics, 51 supervised classification, 33 adding and deleting features, 34 choosing a method, 39 editing feature properties, 34 exporting results to images, 51 exporting results to shapefiles, 48 ground truth data, 37 K Nearest Neighbor, 40 previewing results, 38 saving and restoring training data, 35 selecting attributes, 38 Support Vector machine, 40 Support Vector Machine classification, 40
K
K Nearest Neighbor classification, 40
L
layer management, 8 layer stacking, 14 legal, 2
M
masks, 15 creating, 16 creating in Refine step, 25 inverse, 16 selecting files, 16 membership function set types, 45 merge level, 22 merging segments, 22
P
preferences, 60 preprocessing in ENVI, 9 preview portals, 20 previewing classification results rule-based, 47 supervised, 38
T
texture attributes, 29 thresholding, 24 tips and tricks, 54 Extract Features task, 57 Find Objects task, 56 general, 54 training data, 33 defining, 33 editing, 36 file format, 35 options for saving and restoring, 35 restoring, 36 saving, 35
R
refining segments, 24 region means images, 21 reports, 51 saving, 52 viewing, 51 rule confidence images, 44 rule sets, 45 adding and deleting, 45 building, 43 displaying, 45 rule-based classification, 42 building rules, 43 editing feature properties, 34 editing rule properties, 45 exporting results to images, 51 exporting results to shapefiles, 48 managing features and rules, 45 previewing results, 47
V
vector smoothing, 48
W
workflow, 6
78