1. Computing & Technology
Linux / Unix Command: pgmkernel
Command Library

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.  

SEE ALSO

pnmconvol(1), pnmsmooth(1)  

Important: Use the man command (% man) to see how a command is used on your particular computer.

>> Linux/Unix Command Library

>> Shell Command Library

Discuss in my forum

©2012 About.com. All rights reserved.

A part of The New York Times Company.