Image Processing Toolbox    
imopen

Open an image

Syntax

Description

IM2 = imopen(IM,SE) performs morphological opening on the grayscale or binary image IM with the structuring element SE. The argument SE must be a single structuring element object, as opposed to an array of objects.

IM2 = imopen(IM,NHOOD) performs opening with the structuring element strel(NHOOD), where NHOOD is an array of 0's and 1's that specifies the structuring element neighborhood.

Class Support

IM can be any numeric or logical class and any dimension, and must be nonsparse. If IM is logical, then SE must be flat. IM2 has the same class as IM.

Example

This example uses imopen to filter out the smaller objects in an image.

  1. Read the image into the MATLAB workspace and threshold it.
  2. Create a disk-shaped structuring element and open the image.

See Also

imclose, imdilate, imerode, strel


  imnoise impixel