Image Component Library (ICL)
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
icl::cv::CurvatureExtractor Class Reference

The RegionCurvature class. More...

#include <CurvatureExtractor.h>

Inheritance diagram for icl::cv::CurvatureExtractor:
icl::utils::Uncopyable

Public Types

typedef math::DynMatrix< float > DMatF
 Internal used matrix type. More...
 
typedef std::vector< float > FloatHist
 Histogram type. More...
 
typedef std::vector< utils::PointPointVector
 Array of points. More...
 
typedef std::vector< int > IndexVector
 Internal used index vector. More...
 

Public Member Functions

 CurvatureExtractor (const uint32_t curv_radius, const uint32_t steps=1, const bool thinned_contour=true)
 RegionCurvature Constructor. More...
 
void extractContourCurvature (const PointVector &contour, const core::Img8u &insideLookup, const uint32_t regionLookupId, std::vector< int > &indices, FloatHist &hist, DMatF &dist, DMatF &curvature)
 extractContourCurvature More...
 
void extractRegionCurvature (const std::vector< ImageRegion > &regions, const core::Img8u &insideLookup, const std::vector< uint32_t > &regionLookupIds, std::vector< FloatHist > &curvatureHists)
 extractRegionCurvature computes the curvature historgrams for each ImageRegion in regions. Uses extractContourCurvature() to compute each curvature. More...
 
const std::vector< DMatF > & getDistanceMatrices ()
 getDistanceMatrices More...
 
const std::vector< DMatF > & getCurvatureMatrices ()
 getCurvatureMatrices More...
 
const std::vector< IndexVector > & getUsedIndices ()
 getUsedIndicesMatrices More...
 
uint32_t getCurvatureRadius ()
 getCurvatureRadius More...
 
void setCurvatureRadius (const uint32_t radius)
 setCurvatureRadius More...
 
uint32_t getStepSize ()
 getStepSize More...
 
void setStepSize (const uint32_t steps)
 setStepSize More...
 
bool getUseThinnedContour ()
 getUseThinnedContour More...
 
void setUseThinnedContour (const bool thinned_contour)
 setUseThinnedContour More...
 

Protected Member Functions

int restOp (int x, int y)
 restOp for circle-like rest operations (int only): More...
 

Protected Attributes

uint32_t m_curv_radius
 m_curv_radius Curvature of a point p_i is the sum of relations between the direct distance and geodesic distance of p_i+k to point p_i-k where k < m_curv_radius. More...
 
uint32_t m_steps
 m_steps Steps between points the curvature is computed for. Used for auto-fill indices in extractContourCurvature(). More...
 
bool m_thinned_contour
 Whether use thinned contour of ImageRegions or not. More...
 
std::vector< DMatFm_distances
 Distance matrices for each region. More...
 
std::vector< DMatFm_curvatures
 Curvature matrices for each region. More...
 
std::vector< IndexVectorm_used_indices
 Indices used for each region. See m_steps. More...
 

Additional Inherited Members

- Private Member Functions inherited from icl::utils::Uncopyable
 Uncopyable ()
 Empty base constructor. More...
 

Detailed Description

The RegionCurvature class.

Curvature evaluation from "Contact-free and pose-invariant hand-biometric-based personal identification system using RGB and depth data" by Can Wang, Hong Liu, Xing Liu Journal of Zhejiang University-SCIENCE C (Computers & Electronics) 2014

Member Typedef Documentation

◆ DMatF

Internal used matrix type.

◆ FloatHist

typedef std::vector<float> icl::cv::CurvatureExtractor::FloatHist

Histogram type.

◆ IndexVector

typedef std::vector<int> icl::cv::CurvatureExtractor::IndexVector

Internal used index vector.

◆ PointVector

Array of points.

Constructor & Destructor Documentation

◆ CurvatureExtractor()

icl::cv::CurvatureExtractor::CurvatureExtractor ( const uint32_t  curv_radius,
const uint32_t  steps = 1,
const bool  thinned_contour = true 
)

RegionCurvature Constructor.

Parameters
curv_radiusradius to compute the curvature for each point
stepsused only if the inidecs in extractContourCurvature() are not given. In this case, only each steps' point curvature is computed
thinned_contouruse thinned contour when extractRegionCurvature() is used

Member Function Documentation

◆ extractContourCurvature()

void icl::cv::CurvatureExtractor::extractContourCurvature ( const PointVector contour,
const core::Img8u insideLookup,
const uint32_t  regionLookupId,
std::vector< int > &  indices,
FloatHist hist,
DMatF dist,
DMatF curvature 
)

extractContourCurvature

Extracts the curvature histogram out of a given contour.

Parameters
contoura vector of points in the contour
insideLookuplookup image for the region-contour to decide between a convex or concave curve. The corresponding region in this image should be filled with regionLookupId
regionLookupIdid used for this region-contour in insideLookup
indicesindices of the points in contour the curvature should be computed for. Will be auto-filled by this function using m_steps if it is empty.
histhistorgram of the curvature for each point in indices
distdistance matrix for points in indices
curvaturecurvature matrix for points in indices

◆ extractRegionCurvature()

void icl::cv::CurvatureExtractor::extractRegionCurvature ( const std::vector< ImageRegion > &  regions,
const core::Img8u insideLookup,
const std::vector< uint32_t > &  regionLookupIds,
std::vector< FloatHist > &  curvatureHists 
)

extractRegionCurvature computes the curvature historgrams for each ImageRegion in regions. Uses extractContourCurvature() to compute each curvature.

Parameters
regionsvector of ImageRegions
insideLookuplookup image for the image regions to decide between a convex or concave curve. The corresponding regions in this image should be filled with regionLookupIds
regionLookupIdsregion ids used in insideLookup. Must be of the same size as regions
curvatureHistswill be filled by this function and should contain the curvature histograms for each region in regions.

◆ getCurvatureMatrices()

const std::vector< DMatF >& icl::cv::CurvatureExtractor::getCurvatureMatrices ( )
inline

getCurvatureMatrices

Returns
the curvature matrices for each region

◆ getCurvatureRadius()

uint32_t icl::cv::CurvatureExtractor::getCurvatureRadius ( )
inline

getCurvatureRadius

Returns
the discrete radius that is used to compute the curvature

◆ getDistanceMatrices()

const std::vector< DMatF >& icl::cv::CurvatureExtractor::getDistanceMatrices ( )
inline

getDistanceMatrices

Returns
the distance matrices for each region

◆ getStepSize()

uint32_t icl::cv::CurvatureExtractor::getStepSize ( )
inline

getStepSize

Returns
the steps between the points the curvature is computed for

◆ getUsedIndices()

const std::vector< IndexVector >& icl::cv::CurvatureExtractor::getUsedIndices ( )
inline

getUsedIndicesMatrices

Returns
the indices of the points the curvature is computed for

◆ getUseThinnedContour()

bool icl::cv::CurvatureExtractor::getUseThinnedContour ( )
inline

getUseThinnedContour

Returns
true if thinned contour is used to extract boundary from ImageRegion

◆ restOp()

int icl::cv::CurvatureExtractor::restOp ( int  x,
int  y 
)
inlineprotected

restOp for circle-like rest operations (int only):

Parameters
x
y
Returns
r=xy; return r<0 ? y+r : r;

◆ setCurvatureRadius()

void icl::cv::CurvatureExtractor::setCurvatureRadius ( const uint32_t  radius)
inline

setCurvatureRadius

Parameters
radiusthe discrete radius that is used to compute the curvature

◆ setStepSize()

void icl::cv::CurvatureExtractor::setStepSize ( const uint32_t  steps)
inline

setStepSize

Parameters
stepsthe steps between the points the curvature is computed for

◆ setUseThinnedContour()

void icl::cv::CurvatureExtractor::setUseThinnedContour ( const bool  thinned_contour)
inline

setUseThinnedContour

Parameters
thinned_contourtrue if thinned contour is used to extract boundary from ImageRegion

Member Data Documentation

◆ m_curv_radius

uint32_t icl::cv::CurvatureExtractor::m_curv_radius
protected

m_curv_radius Curvature of a point p_i is the sum of relations between the direct distance and geodesic distance of p_i+k to point p_i-k where k < m_curv_radius.

◆ m_curvatures

std::vector< DMatF > icl::cv::CurvatureExtractor::m_curvatures
protected

Curvature matrices for each region.

◆ m_distances

std::vector< DMatF > icl::cv::CurvatureExtractor::m_distances
protected

Distance matrices for each region.

◆ m_steps

uint32_t icl::cv::CurvatureExtractor::m_steps
protected

m_steps Steps between points the curvature is computed for. Used for auto-fill indices in extractContourCurvature().

◆ m_thinned_contour

bool icl::cv::CurvatureExtractor::m_thinned_contour
protected

Whether use thinned contour of ImageRegions or not.

◆ m_used_indices

std::vector< IndexVector > icl::cv::CurvatureExtractor::m_used_indices
protected

Indices used for each region. See m_steps.


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