File: //usr/share/doc/netpbm-10.35.58/userguide/pgmkernel.html
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML><HEAD><TITLE>Pgmkernel User Manual</TITLE></HEAD>
<BODY>
<H1>pgmkernel</H1>
Updated: 10 December 1992
<BR>
<A HREF="#index">Table Contents</A>
<A NAME="lbAB"> </A>
<H2>NAME</H2>
pgmkernel - generate a convolution kernel
<A NAME="lbAC"> </A>
<H2>SYNOPSIS</H2>
<B>pgmkernel</B> [<B>-weight</B> <I>w</I>] <I>width </I> [<I>height </I>]
<A NAME="lbAD"> </A>
<H2>DESCRIPTION</H2>
<p>This program is part of <a href="index.html">Netpbm</a>.
<p><b>pgmkernel</b> generates a convolution kernel that you can use
with <b>pnmconvol</b>. The kernel is one where the weight of each location
is inversely proportional to its distance from the center of the kernel.
<p><b>pgmkernel</b> generates a PGM image of size <I>width</I> by
<I>height</I> (or <I>width</I> by <I>width</I> if you don't specify
<I>height</I>.
<p><b>pgmkernel</b> computes the convolution function K as follows.
<blockquote>
K(i,j) = 1 / ( 1 + w * sqrt(i^2 + j^2))
</blockquote>
where <I>w</I> is a coefficient specified via the <b>-weight</b>
option. <i>i</i> and <i>j</i> are measured in pixels. K is zero
everywhere beyond the specified kernel width and height.
<P><b>pgmkernel</b> generates the output PGM file in the Plain (text)
variation of PGM.
<A NAME="lbAE"> </A>
<H2>OPTIONS</H2>
The optional <b>-weight</b> value should be a real number greater than
-1. The default value is 6.0.
<A NAME="lbAF"> </A>
<H2>LIMITATIONS</H2>
<P>The computation time is proportional to <I>width</I>*<I>height</I>.
This increases rapidly with the increase of the kernel size. A better
approach could be using a FFT in these cases.
<A NAME="lbAG"> </A>
<H2>SEE ALSO</H2>
<A HREF="pnmconvol.html">pnmconvol</A>,
<A HREF="pnmsmooth.html">pnmsmooth</A>
<A HREF="pamgauss.html">pamgauss</A>
<A HREF="pgm.html">pgm</A>
<A NAME="lbAH"> </A>
<H2>AUTHOR</H2>
Alberto Accomazzi (<A
HREF="mailto:alberto@cfa.harvard.edu">alberto@cfa.harvard.edu</A>).
<HR>
<A NAME="index"> </A>
<H2>Table Of Contents</H2>
<UL>
<LI><A HREF="#lbAB">NAME</A>
<LI><A HREF="#lbAC">SYNOPSIS</A>
<LI><A HREF="#lbAD">DESCRIPTION</A>
<LI><A HREF="#lbAE">OPTIONS</A>
<LI><A HREF="#lbAF">BUGS</A>
<LI><A HREF="#lbAG">SEE ALSO</A>
<LI><A HREF="#lbAH">AUTHOR</A>
</UL>
</BODY>
</HTML>