expand_edge
[ XITE Reference Manual | XITE home ]
Name
expand_edge - Expand image by edge mirroring.
Syntax
expand_edge [-0] [-e] [-o] [-z <value>] [-p <size>]
<inimage> <outimage>
Description
expand_edge is used on an image to aviod some types
of edge difficulties.
Expands inimage by size pixels on all four edges,
and writes the result to outimage. If the dimensions
of inimage is n x m, then the dimensions of outimage
will be (n + 2*size) x (m + 2*size).
Imagine placing mirrors on the edges of inimage. These
mirror images are mapped to outimage. Using the default
setting, which is equivalent to specifying -e -p 3,
the result will be like this:
inimage outimage
ihg|ghi xyz|zyx
fed|def . . . uvw|wvu
cba|abc rst|tsr
+------- - - - -------+ ---+------- - - - -------+---
abc rst| cba|abc rst|tsr
def . . . uvw| fed|def . . . uvw|wvu
ghi xyz| ihg|ghi xyz|zyx
| | |
. . . .
. . . .
. . . .
Options
-
-0
- The new pixels are set to 0 instead of being mirror images.
-
-z value
- The new pixels are set to -value instead of being mirror
images.
-
-e
- Even expansion.
-
-o
- Odd expansion. The pixels closest to the edge are not mirrored.
-
-p size
- size specifies the width in pixels of the expanded edge.
Restrictions
inimage must have pixel type unsigned byte.
size must not exceed the smallest of the X dimension
and the Y dimension of inimage.
If both -e and -o options are specified, -e (the default)
is chosen.
See also
expand_edge(3)
Author
Řivind Due Trier, BLAB, Ifi, UiO
Examples
expand_edge mona.img mona_expand.img
expand_edge -0 -o -p 2 mona.img mona_zeroexpand.img
expand_edge -z -255 -p 1 5.binary.img 5.binary_expand.img
Id
$Id: expand_edge.c,v 1.19 1997/01/14 15:47:01 svein Exp $