
USGS MIPS Imgstats Documentation
This program is one of the XWindows applications that can be executed under the Applications pull-down menu in VISTA. IMGSTATS allows a user to interactively list the DN values of black-and-white or color composite images. Statistics such as the average, standard deviation, variance, median, skew, mode and range are calculated for the area listed and can be written to the print file IMGSTATS.PRT.
Obtaining statistics
There are two ways to obtain a listing within IMGSTATS, using the mouse or the keyboard. Using either method, a green crosshair will appear indicating the center line/sample coordinate from which IMGSTATS will obtain a listing and statistics.
Using the mouse, the user can click mouse button 1 anywhere inside the image(s) displayed or if a listing has already been obtained double clicking mouse button 1 on a DN value within the DN listing Window.
Using the keyboard, the user can enter the line/sample coordinate he/she wants to use as the center of the DN listing. To obtain a listing, type the line and sample coordinate into the text fields under "Line" and "Sample" and then click on the "Center of Window" button.
The listing is displayed in such a way that the selected pixels ' DN is highlighted and is displayed in the middle of Imgstats' listing window.
Note that after each listing, whether obtained via the mouse or the keyboard, the line and sample coordinates of the center DN will be displayed in these input boxes.
Statistics of color composites
When displaying a color composite, listings of each band can be obtained one at a time. The toggle buttons located in the "Listing" section, of the IMGSTATS dialog box, are used to select the channel from which the DN listing and statistical information are obtained. For example; if the Red Channel button is selected, IMGSTATS will display the information for the red channel. To display the information for one of the channels not currently selected, simply select the desired channel and IMGSTATS will automatically display the information for the desired channel. Note, if a black-and-white image is being displayed the "Listing" section will be stipled (greyed out) and unavailable to the user.
Statistical window size
The size of the window used to obtain the listing/statistics is user selectable. By moving the scroll bars in the "Window size" section, the desired information is automatically updated/redisplayed as the user selects new line or sample values. Currently, the minimum number of lines or samples is 1 and maximum number of lines or samples are 89, 63, and 45 for unsigned byte, signed word and floating point images, respectively. The window size is restricted to an odd number of lines and samples. The default window size is 5 lines by 5 samples.
Statistics and the print file
IMGSTATS provides the user with statistical information about the NxM window listed. In addition to the DNs being listed, the following information is also displayed as well as the center line/sample coordinate:
- average
- standard deviation
- variance
- median
- skew
- mode
- range
Saving Results
Once a listing has been displayed, the user may save the statistical information obtained to the print file IMGSTATS.PRT. The name of the current image being listed, the size of the window, the center line/sample coordinate of the selection are also written to the print file. To save, simply select the "Save results" button and a dialog box is displayed. This dialog box allows the user to enter a label identifying the information to be saved. Note, if a label is not entered and the user selects the "OK" button, the desired information is not written to the print file. Note, "Save results" will be stipled (greyed out) and unavailable to the user until an initial listing is performed.
Exiting Imgstats
Selecting the "Exit" option from the pull-down menu will cause this program to terminate.
Examples
Below is a sample print file created by Imgstats.
****************************** imgstats ******************************
Execution date: Fri Nov 1 16:24:18 1996
Id label : sample listing #1
File Name : dka100:[images]peak_tm1
Window Size : 5x5
Center of Window : 387,893
Center DN : 80
Average : 80.0000
Std Deviation : 2.1909
Variance : 4.8000
Median : 80
Skew : 0.0000
Mode : 80
Range : 75 / 83
Id label : sample listing #2
File Name : dka100:[images]peak_tm1
Window Size : 15x15
Center of Window : 787,215
Center DN : 103
Average : 103.2889
Std Deviation : 3.3148
Variance : 10.9877
Median : 103
Skew : 0.2615
Mode : 103
Range : 91 / 111
Id label : new image listing
File Name : dka100:[images]topo32
Window Size : 5x5
Center of Window : 157,112
Center DN : -2.136e+06
Average : 3071382.8900
Std Deviation : 9259454.1378
Variance : 85737490930875.9840
Median : -2.136e+06
Skew : 1.6873
Mode : N/A
Range : -3.601e+06 / 3.088e+07
Connect (00:01:07.00)
CPU (00:00:01.81)
Direct I/O (10)
Page faults (108)
See Also
List
Histdk
Vista