Documentation

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

se — Structuring element or structuring elementsstrel object or array of strel objects.

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

se2 — Reflected structuring element or structuring elementsstrel object or array of strel objects

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

Examples

expand all

Reflect a Structuring Element

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 =

     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 =

     0     0     0
     0     0     0
     1     0     0

Introduced before R2006a

Was this topic helpful?