### Process Series

#### Purpose

Image time-series statistics for each pixel in the images

#### Parameters

File list of image names
Image to create

#### Remarks

The following is a list of the time series statistics that can be calculated.

 Max Maximum value Min Minimum value Avg Average value Range Range of values Sum Sum of values Count Number of valid pixels Stddev Standard deviation of values Decloud Temporal smoothing technique Slope Slope of trend-line of values MaxDate When the maximum value occurs MinDate When the minimum value occurs

Some of these functions require additional parameters as well.

See File-name list files for more information (§ 2.7.1.) on how to create a list of image names for this function.

### Process Images Algebra

#### Purpose

Pixel algebra on one or more images

#### Parameters

Equation
Image to create

#### Remarks

If the commands available in Process/Images and Process/Series aren't sufficient for your needs, you can write your own algebraic expression evaluate on a pixel-by-pixel basis on series of images.

This function is used to perform simple algebraic and logic functions on any number of images. It was originally created for applying correction factors to NDVI images. However, there are many other applications. For instance,

@IF(File1>82,File1,2)

where File1 is an NDVI image will mask all water features and assign them to pixel count 2.

The result of a logical operation is 1 (TRUE) or 0 (FALSE). The logical operators are as follows:

 > greater than < less than = equal to >= greater than or equal to <= less than or equal to & and | or <> not equal to

A Equation can be any mix of variables, numbers, and operators (+, -, *, /). Numbers can be any valid integer or floating point number (ie 3.059). Variables must begin with a letter or underscore, but the rest of the variable can contain a mix of numbers, letters, or underscores. Some examples:

 VARIABLES NUMBERS Image_1 30 month 32.083 _01234_ .000009

Once a equation has been input, WinDisp will find all the possible variable names and prompt you for a filename to tie to the variable. Note that any variable can occur as many times as you wish.

Algebra will also do string comparison. Anything placed in quotes (") Algebra will assume is a string. This can be useful in a batch file where the user may want to fix pixel results for a certain file

Example line from a BATCH FILE

would find the average of THIS_FILE and SOME_FILE if the value of the batch variable FOO is not BADIMAGE.IMG.

### Process Images Compress

#### Purpose

Compress images to reduce overall size

#### Parameters

Image to compress
Image to create
Compression factor

#### Remarks

This technique uses a simplified nearest-neighbor resampling technique to reduce the overall size of an image. Compression factors must be POSITIVE INTEGER values. Basically, the output image will retain every second (or third, fourth, etc.) pixel and line from the input image.

### Process Images Window

#### Purpose

Extract a window out of an image

#### Parameters

Image to window
Image to create
X1 of window
Y1 of window
X2 of window
Y2 of window

#### Remarks

This function is used to extract a portion of a larger image. For example, a window of data covering just Burkina Faso can be extracted from an image covering all of Africa. This reduces the amount of data stored on an analyst's computer.

### Process Images Filter

#### Purpose

Max, Min, or average spatial filter for smoothing

#### Parameters

Image to filter
Image to create
Filter width (1, 3, 5, 7, 9)
Max(1), Min(2), or Avg(3)

#### Remarks

Satellite images are inherently "noisy" or "busy". A "smooth" image may be simpler to understand and explain. Images may be smoothed before being printed. A noisy image may be smoothed before a raster-to-vector conversion.

The filter implemented here is a simple averaging filter. For each pixel in the output image, the average of the corresponding pixel in the input image and all of its neighbors is calculated. The number of neighbors to include is determined by the filter width. A filter width of 3 will include the pixel and its eight nearest neighbors defined by a 3x3 pixel box around the pixel.

### Process Images Difference

#### Purpose

Subtract one image from another

#### Parameters

First image (A-B)
Second image (A-B)
Image to create

#### Remarks

Sutracting one image from another is a very useful way to compare two images. For instance, you can compare current vegetation conditions with previous conditions. This function subtracts the second image from the first image and rescales the result to fit in 8-bits (0-255) according to the equation (256+A-B)/2. In the output image, if count = 128 there is no difference, if count > 128 then the first image has a higher value than the second image, and vice versa.

For quick visual comparisons, File Open Image to display difference images on-the-fly.

### Process Images New

#### Purpose

Create a new, blank image

#### Parameters

New image to create
Width of image
Height of image
Base value (0-255)

#### Remarks

New allows the user to create a new image and specify the initial size and base value. This command is used to create a blank image for Process Images Paste and Process Images Map

Base value is the value you want all the pixels of the new image to be initialized to. Height and Width of image are the height and width in pixels you want the image to be. If you wish to set projection and value-scaling information to the image, use Process Header Edit or Process Header Change Value.

### Process Images Paste

#### Purpose

Paste one image on top of another

#### Parameters

Image to paste
Existing image to paste into

#### Remarks

If you have several small images over different areas that you wish to combine into a large image, you can use Paste. First create a blank image of the total area with Process Images New and edit the header as appropriate with Process Header Edit or Process Header Change Value to set the projection parameters . Make sure that the sub-images will fall entirely within the larger image. Then run paste to paste the smaller images on top of the larger image.

### Process Images Map

#### Purpose

Fill image pixels within map polygon boundaries

#### Parameters

Map file
Existing image to paste map into

#### Remarks

Map can be used to fill polygons on an image based on a map file. If the primary labels in the map file are numbers between 0 and 255, then the polygon will be filled with that value; otherwise, they will be filled with 255. This is essentially a vector to raster conversion. First create a blank image of the total area with Process Images New and edit the header as appropriate with Process Header Edit to set the projection parameters . Alternatively, you can also paste a map into an existing image, or "zero-out" an image in Process Images Algebra with an equation like image*0.

### Process Images Mosaic

#### Purpose

Combine a series of images into a single image

#### Parameters

File list of image names
Image to create

#### Remarks

Join two or more images into a single image. Images must have valid projection information in the image headers. The first image in the series must be the northern-most and western-most image in the series.

See File-name list files for more information (§ 2.7.1.) on how to create a list of image names for this function.

### Process Stats

#### Purpose

Extract statistics from images for map features

#### Parameters

List of image names
Map file
Stats file for results
Window around points (1, 3, 5, 7, 9)

#### New!!!

This function now save statistics in a slightly modified file format. The first row now contains field names derived from the first column of the image-names list. Existing stats files will be modified to fit this new format if additional stats are added to the file.

#### Remarks

The stats functions are used to extract and plot statistics derived from points and polygons within images. The extracted statistics may be imported into spreadsheets and databases to further analyze, model and plot.

Available statistics include:

 Max Maximum value Min Minimum value Avg Average value Stddev Standard deviation of values Range Range of values Count Number of pixels in a polygon within thresholds

For a series of points or polygons, spatial statistics for those features are extracted from a series of images and the results stored in a tabular ASCII file. The points and polygons are read in from a map file. All images in the series should have the same header window and projection parameters because the map masks (pixels to extract statistics from) are only calculated for the first image.

See File-name list files for more information on how to create a list of image names for this function.

The stats file stores the results in quote/comma-delimited ASCII format, one map feature per line, statistics from one image per column. The first row contains field names that are derived from the first column in each row of the file list. Each row starts with the feature name derived from the map file, followed by one value from each image in the file list. Up to 36 statistics (up to 255 characters total) can be stored on one line.

The extracted statistics can be viewed with any ASCII editor, spreadsheet or database application, or with the internal viewer available from File Open Table. The values from a specific column can be used to shade a map with File Open Map or File Retrieve Map. The values can be overlayed on a map with Draw Labels. Time-series graphs can be drawn with View Graph Map Data.

By default, if more than half of the polygon contains pixels outside the relevant thresholds, a value of -9999 is returned. Both the thresholds and the percentage of the polygon that needs to be valid can be modified with the Process Thresholds command.

Image file

#### Remarks

Each image file begins with a 512 byte header containing information on the image, including the image size, projection parameters and optional value-scaling parameters. This command is used to look at the contents of the header and to modify them if desired. See Image headers (§ 4.1.2.) for a detailed description of the header parameters.

See Process Header Change Value for information on how to modify a single image header value.

#### Purpose

Change a single value in an image header

Image file

Variable name
Variable value

#### Remarks

This function can be used to change a single variable in an image header. For instance, after processing an image, you may wish to modify the header to reflect the results of the processing.

The following is a list of valid variable names (see § 4.1.2. for a detailled description) :

• title
• image_type
• projection
• height
• width
• lat_center
• long_center
• x_center
• y_center
• dx
• dy
• parallel1
• parallel2
• lower
• upper
• missing
• m
• b
• decimals

### Process Threshold

#### Purpose

Set upper and lower threshold for valid image values

#### Parameters

Lower threshold (0-255)
Upper threshold (0-255)
% of pixels in polygon [50]

#### Remarks

Thresholds are used by all Process Images, Process Series and Process Stats functions to determine which pixel counts are valid to include in processing.

In a generic image, all possible pixel counts (0-255) are included in the processing functions grouped under the processing menu. For other image types, certain pixel counts are excluded from certain functions. In FEWS NDVI images, for instance, use counts 0 and 1 to store cloud masks, so the thresholds are set automatically to 2-255. The cloud pixels are excluded during processing.

IDA automatically sets default thresholds for each image type prior to processing. If the thresholds set by the THRESHOLD function are 0-0, then the defaults are used, otherwise the user-defined thresholds are used.

WARNING: Once the thresholds are set, they will be used throughout the rest of the current WinDisp session. If the thresholds are saved to the ini file, then they will be used in all successive WinDisp sessions as well. As a precaution, the thresholds should always be reset to 0-0 after processing.

When filtering a FEWS NDVI image, the user may wish to smooth only the land surfaces to avoid averaging coastlines and water together. To do this, set the thresholds to 82-255. 82 is derived from the equation COUNT = (NDVI*256)+82.

If the image type is CALCULATED, then the user can specify these values in the image header with Process Header Edit or Process Header Change Value.

### Process SEDI Automatic

#### Purpose

Automatically calculate interpolated image

#### Parameters

Input SURFER data file
Background image
Positive or negative relationship (P / N)
Number of pixels extracted per station (1, 3, 5, 9, 13)
Delimiter of input SURFER data file
Missing value in input file

Distance between gridlines (kilometers)
Number of nearest stations to use
Output image file
Image type
Slope
Intercept

#### Remarks

This function automatically calculates all three SEDI steps.
Note that two separate commands are created when recording a batch file. Both commands must be included in the order they are created. The commands are:
Process SEDI Automatic A
Process SEDI Automatic B

### Process SEDI Assisted

#### Purpose

Automatically calculate interpolated image using parameter defaults

#### Parameters

Input SURFER data file
Background image
Output image file
Missing value in input file

#### Remarks

This function automatically calculates all three SEDI steps using defaults for most parameters. The defaults are stored in a file called assist.ini which is displayed after processing has completed. The values in assist.ini can be modified and the process repeated with these new values.

### Process SEDI Step 1. Ratio File

#### Purpose

Calculate pixel / parameter ratios.

#### Parameters

Input SURFER data file
Output SURFER data file
Background image
Positive or negative relationship (P / N)
Number of pixels extracted per station (1, 3, 5, 9, 13)
Delimiter of input SURFER data file
Missing value in input file
Keep missing data in output file (y/n)

### Process SEDI Step 2. Grid

#### Purpose

Interpolate a Surfer grid file of ratios from the ratio file.

#### Parameters

Input SURFER data file (from step 1)
Output SURFER grid file
Background image
Distance between gridlines (kilometers)
Number of nearest stations to use
Missing value in input file

### Process SEDI Step 3. Image

#### Purpose

Create an image of estimated values from gridded ratios and pixel values.

#### Parameters

Input SURFER grid file (from step 2)
Output image file
Background image
Positive or negative relationship (P / N)
Image type
Slope
Intercept

### Process Import Ida Luts

#### Purpose

Convert IDA lookup table to WinDisp color table

#### Parameters

Lut name
Pal name (optional)
Color table name

#### Remarks

IDA uses a file called a lookup-table, or LUT, for determining which of the 16 EGA colors to apply to which ranges of pixel counts when displaying an image. An IDA palette, or PAL, was used to modify those 16 colors. In WinDisp, the lookup-table, palette, and legend keys are all combined in an ASCII file called a color table. This command is used to convert IDA lookup tables into WinDisp color tables.

See Color tables for a description of what a color table consists of.

### Process Import Ascii Image

#### Purpose

Import ASCII text file as an image

#### Parameters

Ascii image to import
IDA image to create
Image width
Image height

#### Remarks

Several programs, such as IDRISI, can work with raster images in ASCII text format. Raster ASCII files are easily imported into spreadsheet programs as well. This function converts ASCII text files into IDA image files. The ASCII pixel values should be in the range 0-255. All pixels should be space delimited.

### Process Import Binary Image

#### Purpose

Import raw binary 8-bit image

#### Parameters

Raw 8-bit image to import
IDA image to create
Image width
Image height

#### Remarks

Many raster data files contain just raw data without any attached headers. Headers can be added or stripped off of 8-bit data with these functions.

This function will append raw, 8-bit, binary data onto an IDA image header so the data can be displayed and processed in IDA. If the raw data is padded to some convenient record length, or if ancillary data is attached to the beginning or end of the record, the "number of pixels" parameter should equal the entire length of the record, not just the length of the actual data in the record.

### Process Import Erdas Image

#### Purpose

Import Erdas 7.x LAN or GIS image

#### Parameters

Erdas GIS or LAN to import
Image to create
Red band (for LAN images)
Green band (for LAN images)
Blue band (for LAN images)

#### Remarks

ERDAS is a widely used, robust, medium-sized image processing and raster GIS system, specializing in multispectral image analysis. The ERDAS 7.x image file formats have become something of a standard since they were adopted by ESRI for use in their ArcView system.

Only 4- and 8-bit images are currently supported.

A Platte-Carre (geographic) projection is assumed for all images being imported. If a different projection is used, Process Header Edit should be used to modify the image header accordingly.

See File Open Erdas for more information on displaying ERDAS images directly in WinDisp3.5.

When importing single-band LAN images, a single band of a multi-band LAN image, or a GIS image, the values are imported as is, with no stretching.

When importing multi-band LAN images, one band is assigned to each of the red, green and blue colors. The image values for each band are stretched from the mean +/- 2 standard deviations to the range of 0 to 5 for the color assigned to that band. The result values are added together to create a final result between 0 and 215 according to the formula red + green*6 + blue*36. This technique was adopted from an algorithm used by Idrisi for the same purpose.

To display these multi-band LAN images correctly, you must use a special color table (called ERDASLAN.CLR) This color table has 6 intensities for red, green and blue for a total of 6*6*6=216 colors. The intensities are 0, 51, 102, 153, 204 and 255.
The start of the color table looks like this

 From To Red Grn Blu Legend 0 0 0 0 0 1 1 51 0 0 2 2 102 0 0 3 3 153 0 0 4 4 204 0 0 5 5 255 0 0 6 6 0 51 0 7 7 51 51 0 8 8 102 51 0 9 9 153 51 0 10 10 204 51 0 11 11 255 51 0 12 12 0 102 0 ... 215 215 255 255 255

### Process Import Erdas Trailer

#### Purpose

Convert an ERDAS 7.4 GIS trailer to a WinDisp color table

#### Parameters

ERDAS GIS trailer file to import
Color table to create

#### Remarks

ERDAS stores the color scheme and histogram for GIS files in a separate file with the same name as the GIS file, but with the extension .TRL. This function will convert the color scheme in the trailer into a WinDisp3.5 color table. The color table will contain 256 values, and should only be used when displaying images on a display capable of 256 colors.

### Process Import Idrisi Image

#### Purpose

Import Idrisi image

#### Parameters

Idrisi image to import
IDA image to create

#### Remarks

IDRISI is an inexpensive raster GIS developed by Ron Eastman at Clark University. IDRISI performs many useful GIS functions that complement IDAs functions well, such as zone generation, region aggregation, etc.

This function will only convert IDRISI 8-bit binary file formats.

A Platte-Carre (geographic) projection is assumed for all images being imported. If a different projection is used, the image header should be modified accordingly with Process Header Edit.

### Process Import Idrisi Vector

#### Purpose

Import Idrisi vector map file

#### Parameters

Idrisi vector file to import
IDA map to create

#### Remarks

IDRISI is an inexpensive raster GIS developed by Ron Eastman at Clark University. IDRISI performs many useful GIS functions that complement IDAs functions well, such as zone generation, region aggregation, etc.

### Process Import Surfer Grid

#### Purpose

Import Surfer raster grid

#### Parameters

Surfer grid to import
IDA image to create

#### Remarks

SURFER is a 3-D graphics package developed by Golden Software, Inc. SURFER can be used to plot contours and 3-D perspectives of images. SURFER's GRID functions can produce raster "image" files from point data such as meteorological and agricultural monitoring stations. The GRID functions also support robust mathematical operations similar to Process Images Algebra .

This function converts binary SURFER grid files into IDA images. The z-values in the grid file should be scaled to the range 0-255. The input image will have a generic IDA header attached and should be edited as necessary with Process Header Edit . Please note that if a raster grid was interpolated from point data in the SURFER/GRID function, that grid is in the geographic, or PLATTE-CARRE projection.

### Process Import Surfer Plot

#### Purpose

Import Surfer plot file as bna map file

#### Parameters

Surfer plot to import
IDA map to create
Length of longest side in inches

#### Remarks

SURFER is a 3-D graphics package developed by Golden Software, Inc. SURFER can be used to plot contours and 3-D perspectives of images. SURFER's GRID functions can produce raster "image" files from point data such as meteorological and agricultural monitoring stations. The GRID functions also support robust mathematical operations similar to Process Images Algebra .

SURFER can create HPGL plot files of its contours. These contours can be converted into bna map files and overlayed on images as such. A rough raster-to-vector conversion can be performed by converting an IDA image to a SURFER grid file, contouring it, plotting it, and converting the plot file into a map file.

To convert the plot file from plotter inches back into lat/long coordinates, this function needs to use the header parameters from the IDA image that had been converted to the SURFER grid file that was used to plot the contours. If the contours were not created from a converted image, a dummy image with a PLATTE-CARRE projection should be used.

This is, in fact, a very hokey function that should be used very carefully. ERDAS, IDRISI and ARC/INFO all provide much better raster-vector conversions.

### Process Export Ascii Image

#### Purpose

Export image to ASCII text file

#### Parameters

IDA image to export
ASCII image to create

#### Remarks

Several programs, such as IDRISI, can work with raster images in ASCII text format. Raster ASCII files are easily imported into spreadsheet programs as well. This function converts IDA image files to ASCII text files. Each pixel is represented by a 3 character number in the range 0-255 seperated by a space. Each line of data is seperated by an end-of-line marker (<CR><LF>). If the ASCII file is to be used with a program with a 256 characters/line limitation, the image file should be no more than 64 pixels wide.

### Process Export Binary Image

#### Purpose

Export image to raw, binary 8-bit image

#### Parameters

IDA image to export
Raw 8-bit image to create

#### Remarks

Many raster data files contain just raw data without any attached headers. Headers can be added or stripped off of 8-bit data with these functions.

This function merely creates an 8-bit binary data file without the IDA header.

### Process Export Erdas Image

#### Purpose

Export image to Erdas 7.x lan or gis

#### Parameters

IDA image to export
ERDAS 7.x image to create

#### Remarks

ERDAS is a widely used, robust, medium-sized image processing and raster GIS system, specializing in multispectral image analysis. The ERDAS 7.x image file formats have become something of a standard since they were adopted by ESRI for use in their ArcView system.

The IDA images are converted to 8-bit ERDAS images. The extension should be either .LAN or .GIS. Internally, the file format for GIS and single-band LAN files are identical.

A Platte-Carre (geographic) projection is assumed for all images being exported. If a different projection is used, the ERDAS image header should be modified accordingly.

### Process Export Idrisi Image

#### Purpose

Export image to Idrisi format

#### Parameters

IDA image to export
Idrisi image to create (w/ext)

#### Remarks

IDRISI is an inexpensive raster GIS developed by Ron Eastman at Clark University. IDRISI performs many useful GIS functions that complement IDAs functions well, such as zone generation, region aggregation, etc.

This function creates IDRISI 8-bit binary files.

A Platte-Carre (geographic) projection is assumed for all images being exported. If a different projection is used, the Idrisi image header should be modified accordingly.

### Process Export Idrisi Vector

#### Purpose

Export bna map to Idrisi vector map file

#### Parameters

IDA map to export
Idrisi vector file to create

#### Remarks

IDRISI is an inexpensive raster GIS developed by Ron Eastman at Clark University. IDRISI performs many useful GIS functions that complement IDAs functions well, such as zone generation, region aggregation, etc.

### Process Export Surfer Grid

#### Purpose

Export image to Surfer raster grid

#### Parameters

IDA image to export
Surfer grid to create

#### Remarks

SURFER is a 3-D graphics package developed by Golden Software, Inc. SURFER can be used to plot contours and 3-D perspectives of images. SURFER's GRID functions can produce raster "image" files from point data such as meteorological and agricultural monitoring stations. The GRID functions also support robust mathematical operations similar to Process Images Algebra .

This function converts IDA images into binary Surfer grid files. If the IDA image type is generic, the z-values in the grid will be in the range of 0-255. For other image types, the z-value will be a function of that image type.

If the IDA projection type is Platte-Carre (geographic), then the projection information will be transferred to the grid file. Otherwise, the projection information is ignored.

### Process Export Surfer Blank

#### Purpose

Export bna map file to a Surfer blanking file

#### Parameters

IDA map to export
Surfer blanking file to create
IDA Image to be blanked

#### Remarks

SURFER is a 3-D graphics package developed by Golden Software, Inc. SURFER can be used to plot contours and 3-D perspectives of images. SURFER's GRID functions can produce raster "image" files from point data such as meteorological and agricultural monitoring stations. The GRID functions also support robust mathematical operations similar to Process Images Algebra .

SURFER has the capability to mask out, or "blank", all grid values inside or outside of a polygon. The line segments in the blanking file can also be overlayed on SURFER contour and surface plots in much the same way as maps are overlayed on images in WinDisp. This function converts bna map files into SURFER blanking files. The blanking file is specific to grid files created from images with the same window and projection parameters. These parameters are extracted from the reference image file header. All map features to be converted should lie ENTIRELY within the boundaries of the reference image.

### Process Reproject

#### Purpose

Convert the projection of an image

#### Parameters

Image to reproject
Reference image in output projection
New image to create

#### Remarks

This function can be used to convert an image from one projection to another. Because the projection parameters are stored in the image header, a sample image header with the correct output projection is used as a reference image. If you do not have an image in the correct projection, one can be created with Process Images New and then the appropriate parameters entered into the header with Process Header Edit . See Image headers for a list of supported projection types.

This manual was prepared by the Global Information and Early Warning System of the United Nations Food and Agriculture Organization