Back to FabImage Library website
You are here: Start » Function Reference » Region » Region Morphology » TopHatRegion_AnyKernel

TopHatRegion_AnyKernel
Header: | FIL.h |
---|---|
Namespace: | fil |
Module: | FoundationBasic |
Performs a morphological white top hat operation on a region using an arbitrary kernel.
Syntax
C++
C#
void fil::TopHatRegion_AnyKernel ( const fil::Region& inRegion, const fil::Region& inKernel, fil::Region& outRegion )
Parameters
Name | Type | Default | Description | |
---|---|---|---|---|
![]() |
inRegion | const Region& | Input region | |
![]() |
inKernel | const Region& | Kernel shape (any) | |
![]() |
outRegion | Region& | Output region |
Description
Extracts from region small parts. Uses user-defined kernels.
Is performed by running consecutively two filters. OpenRegion to remove small parts from region and RegionDifference to remove rest of the region.
Examples
![]() |
![]() |
Top Hat used to remove bigger parts of region. Region marked white. Source image on the left and result on the right.
Errors
List of possible exceptions:
Error type | Description |
---|---|
DomainError | Empty kernel on input in TopHatRegion_AnyKernel. |