RBFINT -- Radial Basis Function Interpolation

Generates a raster image by interpolating image values between specified pixel locations using a Radial Basis Interpolation Algorithm. This program implements the Multi-Quadric and the Thin Plate Spline schemes.

Progress of this program can be monitored. See MONITOR section.

See Also: NNINT, IDINT, GRDPIN

PARAMETERS

RBFINT is controlled by the following global parameters:

Name     Prompt                                  Count     Type
FILI     Database File Name                      1-64      Char
FILO     Output File Name                        1-64      Char
DBVS     Database Vector Segment                 0-1       Int
DBOC     Database Output Channel list            1         Int
DBOW     Database Output Window                  0-4       Int
FLDNME   Attribute Field Name                    0-64      Char
RDELTA   Parameter in Multi-Quadric model only   1         Real
IMETHOD  Interpolation method: MQ/TPS            1-3       Char

FILI

Specifies the name of the GDB file which contains the GDB layer information.

 EASI>FILI="filespec"

FILO

Specifies the name of the GDB raster file to receive the interpolated images.

 EASI>FILO="filespec"
If FILI and FILO are raster files, then FILI can be equal FILO.

DBVS

Specifies the vector segment in which the attribute value or the z coordinate will be used as the basis for interpolation.

 EASI>DBVS=i

DBOC

Specifies the image channel to receive the interpolated result.

 EASI>DBOC=i

DBOW

Specifies a rectangular subset of the image database to be used.

 EASI>DBOW=Xoffset,Yoffset,Xsize,Ysize
 EASI>DBOW=                             | use entire image
The offset + size must not exceed the image size.

FLDNME

Specifies the field which contains the elevation values. If the FLDNME parameter is not specified, it defaults to "Attribute". If the FLDNME parameter is "ZCOORD", then the actual Z-coordinates of the vectors are used. The names are not case sensitive, and the entire name need not be specified. If more than one match exists, the first name is used.

 EASI>FLDNME=              | Use attribute field named "Attribute"
 EASI>FLDNME="zcoord"      | Use z-coordinate of vectors
 EASI>FLDNME="Elevation"   | Use field called "Elevation"

RDELTA

Specifies the model parameter to be used in the Multi-Quadric Interpolation. This parameter takes on any real value between 0.0 and 1.0.

 EASI>RDELTA = r           | Use real value between 0.0 and 1.0

IMETHOD

Specifies the interpolation method to apply. Currently, the supported methods are "MQ" (Multi-Quadric) and "TPS" (Thin Plate Spline).

 EASI>IMETHOD = "MQ"       | Use Multi-Quadric method.
 EASI>IMETHOD = "TPS"      | Use Thin Plate Spline method.

MONITOR

Program progress can be monitored by printing the percentage of completed processing in odometer fashion. A system parameter, MONITOR, controls this activity:

 EASI>MONITOR="ON"           | turn monitor ON  (default)
 EASI>MONITOR="OFF"          | turn monitor OFF (recommended if
                             | running in batch/background mode)

DETAILS

RBFINT is used to read the grey level values for an arbitrary number of pixel locations in order to generate a raster image (DBOC) based upon a selected method of interpolation between the specified grey levels. It adopts the method that is selected by the IMETHOD parameter. The supported methods are: "MQ" (Multi-Quadric) and "TPS" (Thin Plate Spline).

The grey level values are read from either a GDB layer (FILI) or a database vector segment (DBVS) stored on the database FILI.

It is especially important that the user select a parameter value that accurately reflects the type and accuracy of the coordinates being read.

This method is computationally expensive. The coefficients have to be calculated by solving a system of equations. The number of equations is proportional to the size of the data set. Once the coefficients are calculated, the interpolation is calculated. The complexity of this calculation is based on the number of data points related to each point to be interpolated. For example, for N data points on an MxM grid, approximately NxMxM calculations are required to calculate the interpolation.

ALGORITHM

RBFINT implements two separate radial basis function interpolation schemes. These include: Multi-Quadric and Thin Plate Spline. Both interplation schemes are defined by mathematical series (sum of terms).

In the Multi-Quadric scheme, the interpolator is:

            N
f(x, y) = SUM a sqrt[sqr(distance((x , y ), (x, y)) + sqr(r)]

                 j                    j   j
          j = 1
where the a 's are the coefficients defining the particular problem,

           j
(x , y ) are the control points (locations where we know the f values),

  j   j
and the r parameter determines the "shape" of the radial basis functions. The radial basis function being the mathematical expression under the square-root sign.

In the Thin Plate Spline scheme, the interpolator is:

                                   N
f(x, y) = a + a x + a y + 0.5 * SUM b * sqr(R ) * log(R )

            0   1     2                j        j         j
                                 j = 1
where the a , a , a , and b are the coefficients defining the particular

           0   1   2       j
problem and R is the distance between the point (x, y) and the j'th

             j
control point.

For both schemes, RBFINT determines the set of coefficients for the interpolator by solving a system of linear equations defined at a set of control points. Then the result is substituted back into the interpolator and interpolation is computed at any point by summing the series.

Further mathematical justifications on how these interpolators are derived and why they work can be found in the following two papers: "Theory And Applications Of The Multiquadric-Biharmonic Method", Vol. 19, No. 8/9 pp. 163-208, 1990 and "Warping Digital Images Using Thin Plate Splines" in "Pattern Recognition", Vol. 26, No. 2 pp. 375-376, 1993.

EXAMPLE

Example 1

This first example will run the EASI script RSAMVS to create a vector segment with a specified number of sample points picked at random over the area of an image. The value at each sample point is the grey-scale value at the same location on the image. By running the pace program RBFINT over this vector segment with the "IMETHOD" parameter set for either MQ or TPS, we can illustrate what an interpolated image will look like as compared with the original image.

Create a new vector segment with the sample points:

 EASI>FILI="irvine.pix"  | Database file to get image grey-scale
 EASI>FILO="irvine.pix"  | Database file to receive vector segment
 EASI>NSAMPLE=100        | Pick 100 points over the image
 EASI>DBIC=10            | The channel where an image is stored
 EASI>RUN RSAMVS         | Run the program to create a vector segment
Run the interpolation program to get an interpolated image, assuming RSAMVS has created a vector segment with segment number 38 and the original image has dimension 512 pixels X 512 lines offset at (0,0):

 EASI>FILI="irvine.pix"  | Database file to look for sample vector seg.
 EASI>FILO="irvine.pix"  | Database file to output interpolation value
 EASI>VECUNIT="UTM"      | Use UTM georeferencing coordinates
 EASI>DBVS=38            | Sample vector segment number on file
 EASI>DBOC=12            | Channel to write out the interpolated image
 EASI>DBOW=0,0,512,512   | Size of the output image window
 EASI>FLDNME="ZCOORD"    | Sample values stored in Z-coordinate
 EASI>RDELTA=0           | Set RDELTA only if method use is "MQ"
 EASI>IMETHOD="MQ"        | Choose an interpolation scheme (MQ or TPS)
 EASI>RUN RBFINT
The above example illustrates how to run the RBFINT program using a vector segment as input.


About PCI Help Gateway