Gamma ISP: Reference Manual


interp_ad

ANSI-C program: interp_ad.c

NAME
interp_ad - Weighted interpolation of gaps in 2D data using adaptive interpolati

SYNOPSIS
interp_ad <data_in> <data_out> <width> [r_max] [np_min] [np_max] [w_mode] [type] [cp_data]
 

<data_in> (input) 2D raster data with gaps
<data_out> (output) data with gaps filled by interpolation
<width> number of samples/row
[r_max] maximum interpolation window radius (default(-): 16)
[np_min] minimum number of points used for the interpolation (default(-): 16)
[np_max] maximum number of points used for the interpolation (default(-): 16)
[w_mode] weighting mode: 0:constant, 1: 1-(r/r_max),  2: 1-(r/r_max)**2,  3: exp(-2.*SQR(r/r_max))  (default(-): 1-(r/r_max))
[type] input/output data format: 0:FCOMPLEX, 1:SCOMPLEX, 2:FLOAT, 3:INT, 4:SHORT (default(-): float)
[cp_data] 0: do not copy input data values to output 1: copy input data values to output (default)

EXAMPLE
interp_ad 01608_02109.unw 01608_02109.unw_fill 2456 16 8 16 2 2

Missing values can be filled in a 2-D raster data file using this program. In the example gaps in an unwrapped phase image are filled using linear weighted interpolation. The command line parameters specify that at least 8 points and at most 16 points are required for the interpolation. The search region has a radius of 16 pixels. The weights used in the interpolation are 1-(r/r_max)**2.

DESCRIPTION
Fills gaps in image data of various data formats using weighted linear interpolation. The interpolation window varies in size adaptively. The main application of interp_ad is in filling missing values in spatially incomplete unwrapped phase images. interp_ad   is also used to to interpolate smoothed offset measurements for use with program SLC_interp_map.

The data formats supported include: fcomplex, scomplex, float, int, and short. Gaps in the input data are indicated by the corresponding NULL value (0.0, 0, etc.).
To fill in an identified gap available data near the gap are sought and interpolated. The search for valid data values is restricted to a maximum radius of r_max sample spacings. A minimum number of valid points are required and a maximum number of valid points are accepted for the interpolation. This makes the effective interpolation window size adaptive .

The advantage of the adaptive window size is that larger gaps can be filled (interpolated) using a large window, but at the same time small gaps are filled using a small window, which reduces the filtering effect of the interpolation.

The interpolation uses a weighted sum of the points in the vicinity of the desired point weighted by a function of distance. The user has the option to select a function that is uniform, linear, inverse square, or inverse exponential. The weight is related is a function of the ratio of the distance between the center of the interpolation window and the search radius. If there are less than the minimum required number of valid points in the region defined by the sarch radius, the output value is set to the NULL value.

The last parameter cp_data can be used to prevent copying of the the input data to the output file. In this case, the locally smoothed values are saved for the entire image. This is advantageous for smoothing offset maps obtained using offset_pwr and  offset_SLC, that usually have gaps.

DIAGNOSTICS
All messages are generally self-explanatory.

SEE ALSO
SLC_interp_map, offset_pwr, offset_SLCoffset_fit, and OFF_par.


©Copyrights for Documentation, and Reference Manual by Gamma Remote Sensing, 2006.
UW, CW, last change 2-May-2006 clw.