kfill

From DavinciWiki
(Redirected from thm.kfill)
Jump to: navigation, search


Description

Same as thm.kfill

Fills in null points of a 2 dimensional float array by linear interpolation of nearest neighbors.

This algorithm looks in four directions only, takes the closest points to the fill point for interpolation. This preserves 'shadows' and regional information.

Arguments and Return Values

Arguments: A 2 dimensional numeric data array, a 2 dimensional weight array and iterations

Return Value: The input image filled in

Usage

Syntax: kfill(picture = VAL, weight = VAL [, iterations = INT])

'weight' defines the weighting of points in the interpolation algorithm. The weight array is typically produced by weight_array and defines a 1/r or 1/(r^N) dependence.

Set iterations to limit the maximum number of pixels away nearest neighbor must be to be valid.

kfill() will fill all pixels containing the value 0.

Examples

dv> image 
320x240x1 array of byte, bip format [76,800 bytes]

dv> wt=weight_array(7,2)
Division by zero, 1 times
15x15x1 array of float, bsq format [900 bytes]

dv> filled = kfill(image,wt)
Done in 4 iterations.

320x240x1 array of float, bsq format [307,200 bytes]

Images

Images in order are: original, weight array and filled image

jfjll.png kfillwt.png kfilled.png

DavinciWiki Mini-Nav Bar

Contents


Contact Developers

  • davinci-dev [AT] mars.asu.edu

All other topics

  • See navigation on the left

Related Functions

Recent Core Changes

Modified On: 01-14-2008

Personal tools