pgmkernelSection: User Commands (1)
Updated: 10 December 1992
Index | Return to Main Contents
NAMEpgmkernel - generate a convolution kernel
SYNOPSISpgmkernel [ -weight w ] width [ height ]
DESCRIPTIONGenerates a portable graymap array of size width x height (or width x width if height is not specified) to be used as a convolution file by 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 w is a coefficient specified via the -weight flag, and width and height are the X and Y filter sizes.
OPTIONSThe optional -weight flag should be a real number greater than -1. The default value is 6.0.
BUGSThe 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.
SEE ALSOpnmconvol(1), pnmsmooth(1)
AUTHORAlberto Accomazzi (firstname.lastname@example.org).
Return to Main Contents