Image Component Library (ICL)
Classes | Public Types | Static Public Member Functions | Static Private Member Functions | List of all members
icl::geom::SurfaceFeatureExtractor Class Reference

class for extraction of surface features. More...

#include <SurfaceFeatureExtractor.h>

Classes

struct  SurfaceFeature
 

Public Types

enum  Mode {
  NORMAL_HISTOGRAM = 1, CURVATURE_FACTOR = 2, MEAN_NORMAL = 4, MEAN_POSITION = 8,
  BOUNDING_BOX_3D = 16, BOUNDING_BOX_2D = 32, ALL = 63
}
 
enum  CurvatureFactor { UNDEFINED =0, PLANAR =1, CURVED_1D =2, CURVED_2D =3 }
 

Static Public Member Functions

static SurfaceFeature apply (std::vector< Vec > &points, std::vector< Vec > &normals, int mode=ALL)
 Applies the surface feature calculation for one single surface (please note: no BoundingBox2D) More...
 
static std::vector< SurfaceFeatureapply (core::Img32s labelImage, core::DataSegment< float, 4 > &xyzh, core::DataSegment< float, 4 > &normals, int mode=ALL)
 Applies the surface feature calculation for all segments in the label image. More...
 
static float matchNormalHistograms (core::Img32f &a, core::Img32f &b)
 Calculates the matching score between 0 and 1 for two normal histograms. More...
 

Static Private Member Functions

static SurfaceFeature getInitializedStruct ()
 
static void update (Vec &normal, Vec &point, SurfaceFeature &feature, int mode, int x=0, int y=0)
 
static void finish (SurfaceFeature &feature, int mode)
 

Detailed Description

class for extraction of surface features.

The SurfaceFeatureExtractor class computes normalHistograms, meanNormals, meanPosition, and curvatureFactor(planar, 1D curved, 2D curved) for sets of points.

Member Enumeration Documentation

◆ CurvatureFactor

Enumerator
UNDEFINED 
PLANAR 
CURVED_1D 
CURVED_2D 

◆ Mode

Enumerator
NORMAL_HISTOGRAM 
CURVATURE_FACTOR 
MEAN_NORMAL 
MEAN_POSITION 
BOUNDING_BOX_3D 
BOUNDING_BOX_2D 
ALL 

Member Function Documentation

◆ apply() [1/2]

static SurfaceFeature icl::geom::SurfaceFeatureExtractor::apply ( std::vector< Vec > &  points,
std::vector< Vec > &  normals,
int  mode = ALL 
)
static

Applies the surface feature calculation for one single surface (please note: no BoundingBox2D)

Parameters
pointsthe points xyz
normalsthe corresponding point normals
modethe mode from Mode enum (e.g. A | B)
Returns
the SurfaceFeature struct.

◆ apply() [2/2]

static std::vector<SurfaceFeature> icl::geom::SurfaceFeatureExtractor::apply ( core::Img32s  labelImage,
core::DataSegment< float, 4 > &  xyzh,
core::DataSegment< float, 4 > &  normals,
int  mode = ALL 
)
static

Applies the surface feature calculation for all segments in the label image.

Parameters
labelImagethe label image of the segmentation
xyzhthe xyz pointcloud
normalsthe corresponding point normals
modethe mode from Mode enum (e.g. A | B)
Returns
a vector of SurfaceFeature struct for each segment.

◆ finish()

static void icl::geom::SurfaceFeatureExtractor::finish ( SurfaceFeature feature,
int  mode 
)
staticprivate

◆ getInitializedStruct()

static SurfaceFeature icl::geom::SurfaceFeatureExtractor::getInitializedStruct ( )
staticprivate

◆ matchNormalHistograms()

static float icl::geom::SurfaceFeatureExtractor::matchNormalHistograms ( core::Img32f a,
core::Img32f b 
)
static

Calculates the matching score between 0 and 1 for two normal histograms.

Parameters
athe first normal histogram
bthe second normal histogram
Returns
the matching score between 0 (no matching) and 1 (perfect matching).

◆ update()

static void icl::geom::SurfaceFeatureExtractor::update ( Vec normal,
Vec point,
SurfaceFeature feature,
int  mode,
int  x = 0,
int  y = 0 
)
staticprivate

The documentation for this class was generated from the following file: