You are here: Start » Function Reference » Region Morphology » RegionHitAndMissTransform
RegionHitAndMissTransform
Performs a hit-and-miss transformation on a region using arbitrary kernels.
Header: | AVL.h |
---|
Syntax
void avl::RegionHitAndMissTransform ( const avl::Region& inRegion, const avl::Region& inHitKernel, atl::Optional<const avl::Location&> inHitKernelAnchor, const avl::Region& inMissKernel, atl::Optional<const avl::Location&> inMissKernelAnchor, avl::Region& outRegion )
Parameters
Name | Type | Default | Description | |
---|---|---|---|---|
inRegion | const Region& | Input region | ||
inHitKernel | const Region& | The kernel of pixels that should be present | ||
inHitKernelAnchor | Optional<const Location&> | NIL | Location withing inHitKernel, defining its center | |
inMissKernel | const Region& | The kernel of pixels that should be missing | ||
inMissKernelAnchor | Optional<const Location&> | NIL | Location withing inMissKernel, defining its center | |
outRegion | Region& | Output region |
Description
The operation performs a hit-and-miss transformation. Similarly to other region morphology operations, hit-and-miss is conducted using a shape called kernel (or structuring element). In this particular case, there are two kernels: inHitKernel and inMissKernel. Both of them are repeatedly centered at each location within the dimensions of the input region. Then, pixel location L is added to the resulting region if and only if all of the inHitKernel pixels centered at L lie inside and all of the inMissKernel pixels centered at L lie outside the input region.
Examples
Errors
Error type | Description |
---|---|
DomainError | Inconsistent regions dimensions in RegionHitAndMissTransform. |
See Also
- DilateRegion_AnyKernel – Performs a morphological dilation on a region using an arbitrary kernel.
- ErodeRegion_AnyKernel – Performs a morphological erosion on a region using an arbitrary kernel.