Generate a convolution kernel to be used with `pnmconvol`.
pgmkernel {{width}} {{height}} > {{path/to/output.pgm}}pgmkernel {{size}} > {{path/to/output.pgm}}pgmkernel {{-w|-weight}} {{value}} {{width}} {{height}} > {{path/to/output.pgm}}pgmkernel(1) General Commands Manual pgmkernel(1) NAME pgmkernel - generate a convolution kernel SYNOPSIS pgmkernel [ -weight w ] width [ height ] DESCRIPTION Generates 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. The output PGM file is always written out in ASCII format. OPTIONS The optional -weight flag should be a real number greater than -1. The default value is 6.0. BUGS The computation time is proportional to width * height. This increases rapidly with the inβ crease of the kernel size. A better approach could be using a FFT in these cases. SEE ALSO pnmconvol(1), pnmsmooth(1) AUTHOR Alberto Accomazzi (alberto AT cfa.edu). 10 December 1992 pgmkernel(1)
Generated by phpman v4.9.22-1-g1b0fcb4 · Markdown · JSON · MCP Author: Che Dong Under GNU General Public License
2026-07-05 15:21 @216.73.216.52
CrawledBy Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)