| Products & Services | Solutions | Academia | Support | User Community | Company |
| Download Product Updates | | | Get Pricing | | | Trial Software |
| Documentation → Image Processing Toolbox |
| Contents | Index |
| Learn more about Image Processing Toolbox |
IM2 = imopen(IM,SE)
IM2 = imopen(IM,NHOOD)
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. The morphological open operation is an erosion followed by a dilation, using the same structuring element for both operations.
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.
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.
Remove the smaller objects in an image.
Read the image into the MATLAB workspace and display it.
I = imread('snowflakes.png');
imshow(I)

Create a disk-shaped structuring element with a radius of 5 pixels.
se = strel('disk',5);Remove snowflakes having a radius less than 5 pixels by opening it with the disk-shaped structuring element created in step 2.
I_opened = imopen(I,se); figure, imshow(I_opened,[])

imclose, imdilate, imerode, strel
![]() | imnoise | imoverview | ![]() |

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.
| © 1984-2009- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |