Back to Aurora Vision Library website

You are here: Start » Function Reference » Surface » Surface Spatial Transforms » CropSurfaceByNeighborsProximity

CropSurfaceByNeighborsProximity


Header: AVL.h
Namespace: avl
Module: Vision3DStandard

Removes from the surface points that are too distant from their neighbor points.

Syntax

C++
C#
 
void avl::CropSurfaceByNeighborsProximity
(
	const avl::Surface& inSurface,
	atl::Optional<const avl::Region&> inRoi,
	const int inNeighborRadius,
	const float inMaxDistance,
	avl::Metric3D::Type inMetric,
	const float inMinNeighborRatio,
	bool inPreserveDimensions,
	avl::Surface& outSurface,
	atl::Optional<avl::Region&> outRejected = atl::NIL
)

Parameters

Name Type Range Default Description
Input value inSurface const Surface&
Input value inRoi Optional<const Region&> NIL Region of interest
Input value inNeighborRadius const int 1 - 1 Radius of neighbors to search for real neighbors
Input value inMaxDistance const float 0.0 - 2.0f Maximal distance from another point to consider them real neighbors
Input value inMetric Metric3D::Type Z Metric used for measuring distance between points
Input value inMinNeighborRatio const float 0.0 - 1.0 1.0f Fraction of valid neighbors in a given radius that have to be real neighbors
Input value inPreserveDimensions bool False Flag indicating whether the surface dimensions should be preserved or not
Output value outSurface Surface&
Output value outRejected Optional<Region&> NIL Region of locations where points are too distant from their neighbors

Optional Outputs

The computation of following outputs can be switched off by passing value atl::NIL to these parameters: outRejected.

Read more about Optional Outputs.

Errors

List of possible exceptions:

Error type Description
DomainError Incorrect metric in CropSurfaceByNeighborsProximity.
DomainError Region of interest exceeds an input surface in CropSurfaceByNeighborsProximity.