mbknn

[ XITE Reference Manual | XITE home ]

Name

mbknn - multi band k nearest neighbour noise removal

Syntax

 #include <xite/knn.h>

 int mbknn( IMAGE i1, IMAGE i2, int n, int k );

Description

mbknn performs multi band k nearest neighbour noise removal. All bands are filtered simultaneously. Window size n x n, max 31. If n is even, n+1 is used. k is the number of neighbours to average over.

Euclidian distance is used as distance measure.

Restrictions

The bands of i1 and i2 must have pixel type unsigned byte. All bands in both images must have equal size.

Return value

 0 => ok
 1 => bad input pixel type
 2 => bad output pixel type
 3 => bad n value (less than 1 or greater than 31)
 4 => bad k value (less than 1 or g.t. n*n-1)
 5 => different number of bands in i1 and i2.

See also

mbknn(1), knn(3), kncn(3), mbkncn(3)

Author

Tor Lønnestad, BLAB, Ifi, UiO

Id

$Id: mbknn.c,v 1.22 1997/01/10 16:03:53 svein Exp $