Top-hat

执行上流社会的过滤on intensity or binary images

Library

Morphological Operations

visionmorphops

  • Top-hat block

Description

The Top-hat block performs top-hat filtering on an intensity or binary image using a predefined neighborhood or structuring element. Top-hat filtering is the equivalent of subtracting the result of performing a morphological opening operation on the input image from the input image itself. This block uses flat structuring elements only.

Port Input/Output Supported Data Types Complex Values Supported

I

Vector or matrix of intensity values

  • Double-precision floating point

  • Single-precision floating point

  • Fixed point

  • Boolean

  • 8-, 16-, and 32-bit signed integer

  • 8-, 16-, and 32-bit unsigned integer

No

Nhood

Matrix or vector of 1s and 0s that represents the neighborhood values

Boolean

No

Output

Scalar, vector, or matrix that represents the filtered image

Same as I port

No

If your input image is a binary image, for theInput image typeparameter, selectBinary. If your input image is an intensity image, selectIntensity.

Use theNeighborhood or structuring element sourceparameter to specify how to enter your neighborhood or structuring element values. If you selectSpecify via dialog,Neighborhood or structuring elementparameter appears in the dialog box. If you selectInput port,Nhood port appears on the block. Use this port to enter your neighborhood values as a matrix or vector of 1s and 0s. Choose your structuring element so that it matches the shapes you want to remove from your image. You can only specify a it using the dialog box.

Use theNeighborhood or structuring elementparameter to define the region the block moves throughout the image. Specify a neighborhood by entering a matrix or vector of 1s and 0s. Specify a structuring element with thestrelfunction from the Image Processing Toolbox™. If the structuring element is decomposable into smaller elements, the block executes at higher speeds due to the use of a more efficient algorithm.

Parameters

Input image type

If your input image is a binary image, selectBinary. If your input image is an intensity image, selectIntensity.

Neighborhood or structuring element source

Specify how to enter your neighborhood or structuring element values. SelectSpecify via dialogto enter the values in the dialog box. SelectInput portto use the Nhood port to specify the neighborhood values. You can only specify a structuring element using the dialog box.

Neighborhood or structuring element

如果你指定一个社区,这parameter must be a matrix or vector of 1s and 0s. If you are specifying a structuring element, use thestrelfunction from the Image Processing Toolbox. This parameter is visible if, for theNeighborhood or structuring element sourceparameter, you selectSpecify via dialog.

See Also

Bottom-hat

Computer Vision Toolbox™ software

Closing

Computer Vision Toolbox software

Dilation

Computer Vision Toolbox software

Erosion

Computer Vision Toolbox software

Label

Computer Vision Toolbox software

Opening

Computer Vision Toolbox software

imtophat

Image Processing Toolbox software

strel

Image Processing Toolbox software

Extended Capabilities

C/C++ Code Generation
Generate C and C++ code using Simulink® Coder™.

Introduced before R2006a