Documentation

This is machine translation

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

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

reflect

Reflect structuring element

Syntax

SE2 = reflect(SE)

Description

example

SE2 = reflect(SE) reflects the structuring element (or structuring elements) specified by SE. This method reflects the structuring element through its center. The effect is the same as if you rotated the structuring element's domain 180 degrees around its center (for a 2-D structuring element).

Examples

collapse all

Create a structuring element.

se = strel([0 0 1; 0 0 0; 0 0 0])
se = 
strel is a arbitrary shaped structuring element with properties:

      Neighborhood: [3x3 logical]
    Dimensionality: 2

Look at the neighborhood.

se.Neighborhood
ans = 3x3 logical array
   0   0   1
   0   0   0
   0   0   0

Reflect it.

se2 = reflect(se)
se2 = 
strel is a arbitrary shaped structuring element with properties:

      Neighborhood: [3x3 logical]
    Dimensionality: 2

Look at the reflected neighborhood.

se2.Neighborhood
ans = 3x3 logical array
   0   0   0
   0   0   0
   1   0   0

Create offset strel structuring element.

se = offsetstrel('ball', 5, 6.5)
se = 
offsetstrel is a ball shaped offset structuring element with properties:

            Offset: [11x11 double]
    Dimensionality: 2

Reflect the structuring element.

se2 = se.reflect()
se2 = 
offsetstrel is a ball shaped offset structuring element with properties:

            Offset: [11x11 double]
    Dimensionality: 2

Input Arguments

collapse all

Structuring element, specified as a strel or offsetstrel object or array of objects. If SE is an array of structuring element objects, then reflect reflects each element of SE.

Output Arguments

collapse all

Reflected structuring elements, returned as a strel or offsetstrel object or array of objects. SE2 has the same size as SE.

See Also

Introduced before R2006a

Was this topic helpful?