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

Class: strel

Reflect structuring element

Syntax

se2 = reflect(se)

Description

se2 = reflect(se) reflects the structuring element (or array of structuring elements) specified by se. The 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).

Input Arguments

expand all

Structuring element or structuring elements, specified as a strel object or array of strel objects. If se is an array of structuring element objects, then reflect(se) reflects each element of se, and se2 has the same size as se.

Output Arguments

expand all

Reflected structuring element, returned as a strel object or array of structuring elements.

Examples

expand 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: [3×3 logical]
    Dimensionality: 2

Look at the neighborhood.

se.Neighborhood
ans =

  3×3 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: [3×3 logical]
    Dimensionality: 2

Look at the reflected neighborhood.

se2.Neighborhood
ans =

  3×3 logical array

   0   0   0
   0   0   0
   1   0   0

Introduced before R2006a

Was this topic helpful?