# mmsetrans
Translate a structuring element

## Synopsis

Bo = mmsetrans( Bi, t )

Implemented in Python.

### Input

Bi | Structuring Element
t | Image coordinate

### Output

Bo | Structuring Element

## Description

mmsetrans translates a structuring element by a specific value.

## Examples

    >>> b1 = mmseline(5)

    >>> mmseshow(b1)

    array([0, 0, 0, 0, 1, 1, 1, 1, 1],'1')

    >>> b2 = mmsetrans(b1,[2,-2])

    >>> mmseshow(b2)

    array([[0, 0, 0, 0, 0],
           [0, 0, 0, 0, 0],
           [0, 0, 0, 0, 0],
           [0, 0, 0, 0, 0],
           [1, 1, 1, 1, 1]],'1')

## Equation

Flat structuring element:

## Source Code

    def mmsetrans(Bi, t):
        x,v=mmmat2set(Bi)
        Bo = mmset2mat((x+t,v))
        Bo = Bo.astype(Bi.typecode())
        return Bo

## See also

mmdil | Dilate an image by a structuring element.
mmseshow | Display a structuring element as an image.
mmero | Erode an image by a structuring element.
mmsesum | N-1 iterative Minkowski additions
mmseunion | Union of structuring elements

[`mmsesum`] [Up] [`mmsereflect`] |
Copyright (c) 2003, Roberto A. Lotufo, UNICAMP-University of Campinas; Rubens C. Machado, CenPRA-Renato Archer Research Center.