segmRandom
[ XITE Reference Manual | XITE home ]
Name
segmRandom - Create image with two regions, random border.
Syntax
segmRandom [-xsize <xsize>] [-ysize <ysize>] \\
[-ll <p(l|l)>] [-rl <p(r|l)>] [-ld <p(l|d)>] \\
[-rd <p(r|d)>] [-lr <p(l|r>)] [-rr <p(r|r)>] \\
[-lpv <lpv>] [-rpv <rpv>] [-title <title>] \\
<outimage>
Description
<outimage> is created with two regions, value <lpv>
(left pixel value) on the left part, and <rpv> on the
right. The border separating the regions is made with
a kind of random walk, or 2. order markow process.
The probablity for going in each of the two directions
down-left and down-right given the prevous direction,
are given in the switches -ll, -rl, -ld, -rd, -lr and -rr.
The probability for going down is computed, because the
total probability always is equal one.
The default values are:
-xsize = 256
-ysize = 256
-lpv = 0
-rpv = 1
-ll = 1/3 p(left | left)
-rl = 1/3 p(right | left)
-ld = 1/3 p(left | down)
-rd = 1/3 p(right | down)
-lr = 1/3 p(left | rigth)
-rr = 1/3 p(right | right)
Changing one of the probabilities wil not change any of
the other probabilities.
Restrictions
Left+right probability must be less than or equal one.
(ll+rl<=1) , (ld+rd<=1) and (lr+rr<=1)
Return value
0 : OK.
1 : Error (Usage).
2 : Bad number of arugments.
Author
Martin Torpe Lie, BLAB, ifi, UiO
Examples
segmRandom test.img
segmRandom -xsize 64 -ysize 64 -ll 0.5 -rr 0.5 test.img
Id
$Id: segmRandom.c,v 1.16 1996/11/08 14:05:22 svein Exp $