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.


Class: strel

Translate structuring element


SE2 = translate(SE,V)


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.


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.

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

Introduced before R2006a

Was this topic helpful?