vision.MorphologicalBottomHat System object

Package: vision

Bottom-hat filtering on image

Description

The MorphologicalBottomHat object performs bottom-hat filtering on an intensity or binary image. Bottom-hat filtering is the equivalent of subtracting the input image from the result of performing a morphological closing operation on the input image. The bottom-hat filtering object uses flat structuring elements only.

Construction

H = vision.MorphologicalBottomHat returns a bottom-hat filtering object, H, that performs bottom-hat filtering on an intensity or binary image using a predefined neighborhood or structuring element.

H = vision.MorphologicalBottomHat(Name,Value) returns a bottom-hat filtering object, H, with each property set to the specified value. You can specify additional name-value pair arguments in any order as (Name1, Value1,...,NameN,ValueN).

Code Generation Support
Supports MATLAB® Function block: Yes
System Objects in MATLAB Code Generation.
Code Generation Support, Usage Notes, and Limitations.

Properties

ImageType

Specify type of input image or video stream

Specify the type of the input image as Intensity or Binary. The default is Intensity.

NeighborhoodSource

Source of neighborhood values

Specify how to enter neighborhood or structuring element values as one of Property or Input port. If set to Property, use the Neighborhood property to specify the neighborhood or structuring element values. Otherwise, specify the neighborhood using an input to the step method. Note that you can specify structuring elements only by using the Neighborhood property. You can not specify structuring elements as inputs to the step method. The default is Property.

Neighborhood

Neighborhood or structuring element values

This property applies only when you set the NeighborhoodSource property to Property. If specifying a neighborhood, this property must be a matrix or vector of 1s and 0s. If specifying a structuring element, use the strel function. The default is strel('octagon',15).

Methods

cloneCreate morphological bottom hat filter with same property values
getNumInputsNumber of expected inputs to step method
getNumOutputsNumber of outputs from step method
isLockedLocked status for input attributes and non-tunable properties
release Allow property value and input characteristics changes
stepPerform bottom-hat filtering on input image

Examples

Perform bottom-hat filtering on an image.

 I = im2single(imread('blobs.png'));
 hbot = vision.MorphologicalBottomHat('Neighborhood',strel('disk', 5));
 J = step(hbot,I);
 figure;
 subplot(1,2,1),imshow(I); title('Original image');
 subplot(1,2,2),imshow(J); 
 title('Bottom-hat filtered image'); 

Algorithms

This object implements the algorithm, inputs, and outputs described on the Bottom-hat block reference page. The object properties correspond to the block parameters.

Was this topic helpful?