Tutorial
Many G'MIC commands decide how to write an output pixel by accessing a neighborhood of input pixels, usually centered around the pixel in question. (See convolve, blur, deriche). In principle, the neighborhood may be arbitrarily large, in practice it is a ball or sphere just a few pixels across. All this is well and good so long as we deal with images of infinite extent, but computer manufacturers behave badly when asked to provide such capacity, so as a practical matter, images have both finite extent and, therefore, edges. Difficulties arise with edges. At some point, a part of a neigborhood won't exist because the pixels are off an edge. How does one access a pixel that is not there? |
Flag | Name | Condition |
0 | dirichlet | Off-border pixels are considered a constant black. Named for Peter Gustav Lejeune Dirichlet. In particular, see Dirichlet Boundary Condition. |
1 | neumann | The values of border pixels are presumed to extend infinity. Named for Carl Gottfried Neumann. In particular, see Neumann Boundary Condition. |
2 | cyclic | The right hand border wraps to the left, the top to the bottom, so that pixels on the opposite edge neighbor each other. The image is a torus. See Periodic Boundary Conditions. |
3 | mirror | The value of virtual pixels past the border form a mirror image of the actual pixels approaching the border. |
G'MIC is an open-source software distributed under the
CeCILL free software licenses (LGPL-like and/or
GPL-compatible).
Copyrights (C) Since July 2008,
David Tschumperlé - GREYC UMR CNRS 6072, Image Team.