|
ENVI User's Guide: Interactive Display Functions |
|
Regions of interest (ROIs) are portions of images, either selected graphically or selected by other means such as thresholding. The regions can be irregularly-shaped and are typically used to extract statistics for classification, masking, and other operations. ENVI allows selection of any combination of polygons, points, or vectors as a region of interest. Multiple regions of interest can be defined and drawn in any of the Image, Scroll, or Zoom windows. Regions of Interest can be grown to adjacent pixels that fall within a specified pixel value threshold.
![]() |
| Note ROIs are explicitly related to the spatial size of the image in which they are defined. If you open, or have opened, images of equal spatial size with their associated ROI Tool dialogs, ROIs drawn in one image are displayed in all other image displays of the same spatial size. You can edit or delete shared ROIs from within any of the ROI Tools dialogs. |
You can also add, edit, and create additional ROIs as described in the following sections.
When the ROI Definition function is enabled, actions such as zooming, panning and other display operations are not enabled.
To enable these interactive mouse operated functions without leaving ROI Definition, click the Off toggle button in the ROI Tool dialog.
The following ROI types are available in ENVI:
A single region can contain any combination of the six ROI types. Each type has a different set of mouse button assignments.
The mouse assignments and drawing options are explained in the following sections and summarized in the following table.
| Note If you have multiple images of the same size displayed and their associated ROI Tools dialogs open at the same time, any ROIs drawn in one image display also display in the other images. |
The polygon mode is the default method for ROI definition. Use polygons to outline a region of interest with connected line segments.
Polygon.
| Note For continuous drawing, hold the left mouse button down and move the cursor. |
| Note To erase the last segment defined at any point during the segment selection process, click the middle mouse button. |
| Note You may draw multiple polygons for each ROI. Each successive polygon is drawn as above and its pixels added to the total for the region. When completed, the polygon is filled with a solid color by default. |
Cancel to dismiss the ROI Tool dialog or click New Region to define another region of interest.The polyline mode is similar to the polygon mode except that a multi-segment vector is drawn rather than a closed polygon. The regions enclosed by the defined line segments are not selected and filled upon completion. Only the pixels comprising the line segments themselves are selected.
Polyline.
| Note To erase the entire polyline, click the middle mouse button on any pixel of a previously-defined polyline. |
Cancel to dismiss the ROI Tool dialog or click New Region to define another region of interest.Use the point mode to select or delete individual pixels under the cursor.
| Tip For best results, add Point ROIs in the Zoom window. |
Use the rectangle and ellipse modes to draw rectangles and ellipses as ROIs.
Rectangle or Ellipse.
| Note To draw a square or circle, click and drag while holding the middle mouse button. |
| Note To delete the shape, click the middle mouse button on the rectangle or ellipse. |
Cancel to dismiss the ROI Tool dialog or click New Region to define another region of interest.Use multi part mode to draw ROIs with holes in them, or donut ROIs.
Polygon, Rectangle, or Ellipse.
| Note You cannot draw Multi Part ROIs using point or polyline ROIs. |
Multi Part:On.
| Note The ROI does not become filled in until you click the right mouse button a second time. |
| Note Holes cannot cross the path of any other polygon within its group. |
The base ROI becomes filled in, and the parts are removed to reveal holes in the base ROI.
You can view or edit any ROI properties with the Available Regions of Interest table in the ROI Tool dialog. The table contains the following columns:
You can also set the default ENVI colors for all the ROIs by right-clicking in the Color column title and selecting the Assign default colors option. The right-click menu can also be used to set all the ROIs to the same color.
You can draw multiple regions of interest in any image display window.
| Note If you have multiple images of the same size displayed and their associated ROI Tools dialogs open at the same time, any ROIs drawn in one image display also display in the other images. |
In the ROI Tool dialog, you have many options to choose from when working with ROIs: inputting ASCII points into an ROI, creating multiple regions of interest, reporting ROI statistics, measuring distances and area, reporting the areas of the ROIs, loading, erasing, deleting, plotting means, merging regions, reconciling ROIs, and performing band thresholds to ROIs.
| Note If the ROI displays in more than one image (of the same spatial size), any edits are reflected in all of those images. |
Hiding an ROI removes it from the display, but the region of interest is still defined.
To hide a selected ROI overlay from the selected image, select one or more ROIs in the Available Regions of Interest table, then click Hide ROIs. To re-display these ROIs on the image, click Show ROIs. The Show ROIs dialog appears. This dialog enables you to select which ROIs are re-displayed on the image and in the table.
To hide all ROI overlays from the current display, click Select All then click Hide ROIs.
Use the Tools menu on the Image window menu bar, the Delete button in the ROI Tool dialog, or the Basic Tools menu on the ENVI main menu bar to delete ROIs.
| Warning If the ROI to delete displays in more than one image (for images of the same spatial size), deleting it from one deletes it from all. When the ROIs are deleted, they cannot be recovered unless they are saved to a file. |
To delete a selected ROI, select one or more ROIs in the Available Regions of Interest table then click Delete.
To delete all ROIs listed in the ROI Tool dialog and remove them from the system, click Select All then click Delete.
| Note The ROIs are deleted from all displays of the same spatial size and from their associated ROI Tools dialogs. |
The unsaved ROIs are erased from the displays and deleted from the system. The ROIs do not appear in the ROI Tool dialogs after being deleted.
To delete regions that are not currently displayed:
To center the Zoom window over the first pixel defined in an ROI:
The ROI Statistics Results dialog appears. This dialog is very similar to the Statistics Results dialog (see Producing Statistics Reports) and contains the same functions. However, the ROI Statistics Results dialog also contains additional sections for reporting multiple instances of statistical information:
The File pull-down menu contains the following additional options:
.sta. The statistics report is saved to the specified file when you click OK.
| Tip The resulting text file is tab-delimited for easy import into external spreadsheet programs, such as Excel. |
.sta. The statistics report for each class or region is saved to individual files when you click the OK button. The individual files have the same root name that you specified and are appended with their appropriate ROI number.
| Tip The resulting text file is tab-delimited for easy import into external spreadsheet programs, such as Excel. |
This Stats for pull-down menu button contains a list of the available ROIs. The ROI Statistics Results dialog reports the calculated statistics (in both the plot and text sections) of the ROI specified by this menu. To compare statistics for different ROIs with the current ROI shown in the Statistics Results dialog, use the Options
Copy results to new window option to create a copy of the ROI Statistics Results dialog for the current ROI, then use the Stats for menu to display a different ROI in the newly created dialog.
The Select Plot pull-down button also contains the following additional options:
To display the statistics for all defined regions of interest, choose Select All then click Stats in the ROI Tool dialog. An ROI Statistics Results dialog containing the statistics for all the ROIs appears.
You can grow regions of interest to neighboring pixels using a specified threshold. The threshold is determined by specifying a number of standard deviations away from the mean of the drawn region. You can use either 4 or 8 neighboring pixels to determine the growth pattern. It is calculated using the displayed band for a grayscale display, or the red band for a color display.
| Note All grown regions of interest are output as points, regardless of the starting ROI type. |
| Note Within the current Image window, neighboring pixels that fall within the standard deviation threshold are included in the grown region. Adjacent pixels outside the current Image window, regardless of pixel value, are not included in the ROI. |
Use the Pixel button to convert polygons, ellipses, rectangles, and polylines to a collection of editable points. This allows you to remove single points from polygons, rectangles, etc.
You can input ASCII data points into a new or an existing ROI, select the ROI type, and select the associated map projection information if needed.
| Tip To input the ASCII data points into a new region, click New Region before completing the following procedure. |
Input Points from ASCII.
| Note For polygon and polyline ROIs, the ASCII points define the vertices of the ROI. |
| Note If you select Map Based, select the projection type and enter the zone and datum information as necessary by clicking on the Zone and Datum buttons. |
To load all regions currently defined for all images with the same spatial dimensions as the currently selected display as shown in the Display # field, select Options
Load All Regions.
To merge multiple defined regions of interest into one:
Merge Regions. The Merge ROIs dialog appears with two lists of all defined regions.
Use Intersect Regions to create a point type region of interest that contains only the points where two or more ROIs intersect in an image.
Intersect Regions.
| Note In the ROI Intersection dialog, only select regions that intersect. If a non-intersecting ROI is selected, an error occurs. |
The new ROI appears in the Available Regions of Interest list. It is a point type ROI and displays under any overlying polygon ROIs.
| Tip If you can't see the new point ROI in the Image window, erase all other ROIs and re-display the new ROI. |
| Note You can calculate ROI intersections on-the-fly and use them when building a mask. For more information, see Including ROI Intersections. |
To get a report of the area covered by each ROI in one of these units: meters, kilometers, feet, yards, miles or nautical miles:
The ROI Area Info dialog appears, listing each ROI name and corresponding area. To save ROI Area Information to an ASCII File, perform the following steps.
Use the ROI Measurement Tool to produce a report on the distance between points in a polygon or polyline, and to get perimeter and area measures for polygons, rectangles, and ellipses.
| Note To take measurements of an image without using the ROI functions, see Using the Measurement Tool. |
Measurement Report. The ROI Measurement Report dialog appears with the measurements reported. The measurements differ depending on the active ROI type.
In the ROI Measurement Report dialog, use the Units menu to select the unit the ROI is measured in. The choices are pixels, meters, kilometers, feet, yards, miles, and nautical miles.
In the ROI Measurement Report dialog, use the Area menu to measure the area of the ROI in acres, hectares, or units2 (e.g., meters2). Select Area
Acres or Hectares.
In the ROI Measurement Report dialog, use the Options menu to select whether the measurement information is reported as line segments (the default) or as point coordinates.
To get a listing of the vertices coordinates, select Options
Report as Points. The coordinates are reported as a pixel location (Pixel (x,y)).
To get a listing of the line segment distances, select Options
Report as Segments.
For images that are georeferenced, you may list the coordinates as map coordinates or as latitude and longitude coordinates by selecting Options
Georef Map (x,y) or Georef (Lat/Lon).
To output the list of coordinates to a file, select File
Save Points to ASCII.
In the ROI Measurement Report dialog, use the File menu to save the ROI measurement report to an ASCII file and to close the dialog.
To save the measurement report:
In the ROI Tool dialog, use Reconcile ROIs to apply ROIs defined in one image size to different sized images.
| Note Using Reconcile ROIs, ROIs can only be reconciled to images with the same pixel size as the original image. To reconcile ROIs to an image with a different pixel size, use Reconcile ROIs via Map. |
The ROIs are listed in the ROI Tool dialog and are automatically loaded onto the new image.
Use Reconcile ROIs via Map to use ROIs defined in one georeferenced image in another overlapping georeferenced image, regardless of differences in image or pixel sizes between the two images.
The ROIs are listed in the ROI Tool dialog and automatically loaded onto the new image.
Use Band Threshold to ROI to convert specific image values and ranges of values to Regions of Interest.
The region is listed in the ROI Tool dialog as a Thresh Bandname, where Bandname is the name of the band used to extract the ROI. The number of pixels in the region are also listed.
Use Calculate Buffer Zone to calculate a buffer zone image from the original image. In the resulting buffer zone image, every pixel has a floating point or integer value that is defined as the distance from that pixel to the nearest pixel of the selected ROI. You designate a maximum distance value and the result is that any pixels with a distance larger than that value are set to the maximum distance value.
Calculate Buffer Zone. The Buffer Zone Image Parameters dialog appears.
| Note If the image has more than one ROI associated with it, the Input Buffer Zone ROIs dialog appears. Click on the names of the ROIs to include in the buffer zone image calculation and click OK. |
| Note If you select more than one ROI, the distance calculated is from the pixel to the nearest selected ROI. |
| Note Any pixels with a distance larger than this value is set to the maximum distance value +1. |
Use Create Class Image from ROIs to convert selected ROIs into an ENVI classification image. The class colors are the same as the ROI colors.
Regions of Interest
Create Class Image from ROIs.
Create Class Image from ROIs.
Create Class Image from ROIs.
Region of Interest
Create Class Image from ROIs.
The Classification Image from ROIs dialog appears.
| Note To change the output classification image DN (Digital Number) value of an ROI, click on the ROI and use the arrow toggle buttons to enter a new DN value. |
The resulting classification image filename appears in the Available Bands List.
The Compute ROI Separability option computes the spectral separability between selected ROI pairs for a given input file. Both the Jeffries-Matusita and Transformed Divergence separability measures are reported. These values range from 0 to 2.0 and indicate how well the selected ROI pairs are statistically separate. Values greater than 1.9 indicate that the ROI pairs have good separability. For ROI pairs with lower separability values, you should attempt to improve the separability by editing the ROIs or by selecting new ROIs. For ROI pairs with very low separability values (less than 1), you might want to combine them into a single ROI. For more information, see the following reference:
J.A. Richards, 1999, Remote Sensing Digital Image Analysis, Springer-Verlag, Berlin, p. 240.
The following steps show how you can use the Compute ROI Separability option to compute the spectral separability between selected ROI pairs.
Save Text to ASCII.
Use the File menu in the ROI Tool dialog to save and restore ROI information to an ENVI ROI file (default file extension .roi) and to export ROIs to ENVI vector files (.evf).
To save regions of interest currently in memory to a file:
| Note Only ROIs that were defined in images with the same dimensions as those in the current display appear in the ROI list. ROIs of other dimensions remain in memory. |
roi for consistency).
The ROI is loaded into the display group and ROI Tool dialog of every image of the same spatial size.
You can also restore a saved ROI file from the ENVI main menu bar by selecting Basic Tools
Region of Interest
Restore Saved ROI File. The file selection dialog appears, and you can select your ROI file. A message appears when the file is restored, but no ROIs appear in the image until an ROI Tool is opened.
You can restore multiple selected regions of interest from the Enter ROIs Filenames dialog when restoring saved ROIs.
The selected ROIs are loaded into the display group and ROI Tool dialog of every image of the same spatial size.
To subset an image file based on the bounding box (i.e., the area encompassing) an ROI or group of ROIs currently drawn on an image, follow these steps:
Subset Data via ROIs.
| Note To apply spectral subsetting to the input file, click Spectral Subset. For subsetting details, see Selecting a Spectral Subset. |
The resulting subsetted file is listed in the Available Bands List.
Use Export ROIs to EVF to export ROIs to ENVI vector files (.evf). All of the ROIs selected are exported as separate records in a single layer. If the file associated with the ROI is georeferenced, the vector layer is in the same projection.
Use Export ROIs to n-D Visualizer to export selected ROIs to the n-D Visualizer so you can see the distribution of the points within your ROIs and between your ROIs. This option is very useful for checking the separability of your classes when you use ROIs as input into supervised classifications.
| Note For good classification results using these ROIs, the groups of pixels for the different ROIs should be separate from each other and should not overlap. |
| Note If the pixels overlap, edit the groups of pixels by selecting the appropriate colors from the Class menu to add pixels to an ROI or by selecting White to remove pixels from an ROI. |
Export Class or Export All to export the colored pixels back to the ROI Tool dialog so they can be imported into classifications.For more information and detailed instructions for the n-D Visualizer, see The n-Dimensional Visualizer.
Use Output ROIs to ASCII to output ROIs to an ASCII text file. You can edit the ASCII file format prior to output by selecting the parameters to include in the file.
You can also output map information, latitude and longitudes, and band data values for every ROI location. Prior to output, you can select which parameters to include in the ASCII file. The output is formatted into columns for easy input into spread sheets. For an example of an ROI ASCII file, see Example of ASCII Output.
| Note To select which parameters to output, see the following section. |
You can specify which parameters are included in the ASCII output.
| Note Map and Geo are not available for non-georeferenced data. |
Here is an example of ROIs output to an ASCII file:
;ENVI Output of ROIs (3.4) [Mon Apr 17 17:00:26 2000]
;Number of ROIs: 1
;File Dimension: 512 x 512
;
; ROI name: Region #1
; ROI rgb value: {255, 0, 0}
; ROI npts: 409
; ID X Y Map X Map Y Lat Lon B1 B2
B3 B4 B5 B6
1 179 243 282977.65 4899997.33 44.222839 -107.716970 11 10
9 46 16 10
2 180 243 283006.15 4899997.33 44.222848 -107.716614 9 10
8 47 15 7
3 178 243 282949.15 4899997.33 44.222831 -107.717327 10 10
8 48 14 8
4 178 244 282949.15 4899968.83 44.222574 -107.717315 10 10
8 48 13 6
5 179 244 282977.65 4899968.83 44.222583 -107.716959 10 11
10 46 16 8
6 177 244 282920.65 4899968.83 44.222566 -107.717671 10 10
8 47 13 6
7 180 244 283006.15 4899968.83 44.222591 -107.716602 10 9
8 48 14 6
8 181 244 283034.65 4899968.83 44.222600 -107.716246 9 9
7 48 12 6
9 182 244 283063.15 4899968.83 44.222608 -107.715889 10 10
8 47 14 7
10 183 244 283091.65 4899968.83 44.222617 -107.715533 9 10
7 49 14 6
11 184 244 283120.15 4899968.83 44.222625 -107.715177 9 9
6 50 12 4
12 176 245 282892.15 4899940.33 44.222301 -107.718016 10 10
8 47 15 8
13 177 245 282920.65 4899940.33 44.222310 -107.717660 10 10
8 46 14 8
14 178 245 282949.15 4899940.33 44.222318 -107.717303 10 10
7 48 13 6
15 179 245 282977.65 4899940.33 44.222327 -107.716947 10 10
8 47 15 8
To hide or show the ROI Tool dialog without erasing your ROIs, see Showing and Hiding Overlay Dialogs and Layers.
To close the ROI Tool dialog and quit the function, select File
Cancel.
| Note Newly-created regions of interest are retained in memory even after the ROI Tool dialog is dismissed (unless regions were specifically deleted using the Delete button). |
ENVI Online Help (August 12, 2005)