Linux Commands Examples

A great documentation place for Linux commands

pgmkernel

generate a convolution kernel


see also : pnmconvol - pnmsmooth

Synopsis

pgmkernel [ -weight w ] width [ height ]


add an example, a script, a trick and tips

: email address (won't be displayed)
: name

Step 2

Thanks for this example ! - It will be moderated and published shortly.

Feel free to post other examples
Oops ! There is a tiny cockup. A damn 404 cockup. Please contact the loosy team who maintains and develops this wonderful site by clicking in the mighty feedback button on the side of the page. Say what happened. Thanks!

examples


no example yet ...

... Feel free to add your own example above to help other Linux-lovers !

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 increase of the kernel size. A better approach could be using a FFT in these cases.


see also

pnmconvol , pnmsmooth


author

Alberto Accomazzi (alberto[:at:]cfa.harvard[:dot:]edu).

How can this site be more helpful to YOU ?


give  feedback