1. NAME▲

pgmkernel - generate a convolution kernel

2. SYNOPSIS ▲

pgmkernel [

-weight w] width[ height]

3. DESCRIPTION ▲

Generates a portable graymap array of size widthx height(or widthx widthif heightis not specified) to be used as a convolution file by

R pnmconvol . The data in the convolution array K are computed according to the formula:

K(i,j) = 1 / ( 1 + w * sqrt((i-width/2)^2 + (j-height/2)^2))

where wis a coefficient specified via the -weightflag, and widthand heightare the X and Y filter sizes.

The output PGM file is always written out in ASCII format.

4. OPTIONS ▲

The optional -weightflag should be a real number greater than -1. The default value is 6.0.

5. BUGS ▲

The computation time is proportional to width* height . This increases rapidly with the increase of the kernel size. A better approach could be using a FFT in these cases.

6. SEE ALSO ▲

7. AUTHOR ▲

Alberto Accomazzi ().