Documentation

This is machine translation

Translated by Microsoft
Mouse over text to see original. Click the button below to return to the English verison of the page.

translate

Class: strel

Translate structuring element

Syntax

SE2 = translate(SE,V)

Description

SE2 = translate(SE,V) translates the structuring element SE in N-D space. V is an N-element vector containing the offsets of the desired translation in each dimension.

Input Arguments

expand all

Structuring element, specified as a strel object.

Translation offsets, specified as a numeric vector.

Output Arguments

expand all

Translated structuring element, returned as a strel object.

Examples

expand all

Read an image into the workspace.

I = imread('cameraman.tif');

Create a structuring element and translate it down and to the right by 25 pixels.

se = translate(strel(1), [25 25]);

Dilate the image using the translated structuring element.

J = imdilate(I,se);

Display the original image and the translated image.

figure
imshow(I), title('Original')
figure
imshow(J), title('Translated');

Introduced before R2006a

Was this topic helpful?