The interaction structure is defined by the list of relative
positions in it. For a specific pixel, conditional to the values of pixels in
these relative positions from it, its value is independent of any other pixel
in the image.
The relative positions are indentified by two integers rx
and ry
representing the "shift" in the x
-axis and y
-axis respectively. As an
example: The relative position (1,0)
representes the pixel in the immediate
right position, while (-1,0)
the left one.
Note that the inclusion of a relative position to the dependence also implies
its opposite direction is not conditionally independent (commutativeness of
dependence), but only one is actually included to the mrfi
object.
To illustrate that, a nearest neighbor dependence structure can be specified
by:
mrfi(1)
Note that it only includes the positions (1,0)
and (0,1)
, but when
visualizing it, for example, mrf2d
understands the opposite directions
are also conditionally dependent, as in
plot(mrfi(1))
.