Back to FabImage Library website
You are here: Start » Function Reference » Surface » Surface Spatial Transforms » CropSurface_Relative

CropSurface_Relative
Header: | FIL.h |
---|---|
Namespace: | fil |
Module: | Vision3DStandard |
Removes from the surface points that are relatively too distant from their average neighbor points in a local rectangular neighborhood.
Syntax
C++
C#
void fil::CropSurface_Relative ( const fil::Surface& inSurface, ftl::Optional<const fil::Region&> inRoi, const fil::Surface& inBaseSurface, ftl::Optional<float> inMinRelativeHeight, ftl::Optional<float> inMaxRelativeHeight, float inHysteresis, bool inPreserveDimensions, fil::Surface& outSurface, ftl::Optional<fil::Region&> outRejected = ftl::NIL )
Parameters
Name | Type | Range | Default | Description | |
---|---|---|---|---|---|
![]() |
inSurface | const Surface& | Input surface | ||
![]() |
inRoi | Optional<const Region&> | NIL | Region of interest | |
![]() |
inBaseSurface | const Surface& | Heights of this surface are subtracted from inSurface heights before crop | ||
![]() |
inMinRelativeHeight | Optional<float> | NIL | Minimum relative height of a point to be not removed | |
![]() |
inMaxRelativeHeight | Optional<float> | NIL | Maximum relative height of a point to be not removed | |
![]() |
inHysteresis | float | 0.0 - ![]() |
0.0f | Defines how much the threshold criteria are lowered for points neighboring with other not removed points |
![]() |
inPreserveDimensions | bool | False | Flag indicating whether the surface dimensions should be preserved or not | |
![]() |
outSurface | Surface& | |||
![]() |
outRejected | Optional<Region&> | NIL | Region of locations where points are removed |
Optional Outputs
The computation of following outputs can be switched off by passing value ftl::NIL
to these parameters: outRejected.
Read more about Optional Outputs.
Hardware Acceleration
This operation supports automatic parallelization for multicore and multiprocessor systems.
Errors
List of possible exceptions:
Error type | Description |
---|---|
DomainError | Region of interest exceeds an input surface in CropSurface_Relative. |
DomainError | Surface formats are not the same in CropSurface_Relative. |
DomainError | Surface sizes are not equal in CropSurface_Relative. |