Image Component Library (ICL)
|
The RegionCurvature class. More...
#include <CurvatureExtractor.h>
Public Types | |
typedef math::DynMatrix< float > | DMatF |
Internal used matrix type. More... | |
typedef std::vector< float > | FloatHist |
Histogram type. More... | |
typedef std::vector< utils::Point > | PointVector |
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 > ®ions, const core::Img8u &insideLookup, const std::vector< uint32_t > ®ionLookupIds, 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< DMatF > | m_distances |
Distance matrices for each region. More... | |
std::vector< DMatF > | m_curvatures |
Curvature matrices for each region. More... | |
std::vector< IndexVector > | m_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... | |
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
typedef math::DynMatrix<float> icl::cv::CurvatureExtractor::DMatF |
Internal used matrix type.
typedef std::vector<float> icl::cv::CurvatureExtractor::FloatHist |
Histogram type.
typedef std::vector<int> icl::cv::CurvatureExtractor::IndexVector |
Internal used index vector.
typedef std::vector<utils::Point> icl::cv::CurvatureExtractor::PointVector |
Array of points.
icl::cv::CurvatureExtractor::CurvatureExtractor | ( | const uint32_t | curv_radius, |
const uint32_t | steps = 1 , |
||
const bool | thinned_contour = true |
||
) |
RegionCurvature Constructor.
curv_radius | radius to compute the curvature for each point |
steps | used only if the inidecs in extractContourCurvature() are not given. In this case, only each steps' point curvature is computed |
thinned_contour | use thinned contour when extractRegionCurvature() is used |
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.
contour | a vector of points in the contour |
insideLookup | lookup image for the region-contour to decide between a convex or concave curve. The corresponding region in this image should be filled with regionLookupId |
regionLookupId | id used for this region-contour in insideLookup |
indices | indices 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. |
hist | historgram of the curvature for each point in indices |
dist | distance matrix for points in indices |
curvature | curvature matrix for points in indices |
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.
regions | vector of ImageRegions |
insideLookup | lookup image for the image regions to decide between a convex or concave curve. The corresponding regions in this image should be filled with regionLookupIds |
regionLookupIds | region ids used in insideLookup. Must be of the same size as regions |
curvatureHists | will be filled by this function and should contain the curvature histograms for each region in regions. |
|
inline |
getCurvatureMatrices
|
inline |
getCurvatureRadius
|
inline |
getDistanceMatrices
|
inline |
getStepSize
|
inline |
getUsedIndicesMatrices
|
inline |
getUseThinnedContour
|
inlineprotected |
restOp for circle-like rest operations (int only):
x | |
y |
|
inline |
setCurvatureRadius
radius | the discrete radius that is used to compute the curvature |
|
inline |
setStepSize
steps | the steps between the points the curvature is computed for |
|
inline |
setUseThinnedContour
thinned_contour | true if thinned contour is used to extract boundary from ImageRegion |
|
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.
|
protected |
Curvature matrices for each region.
|
protected |
Distance matrices for each region.
|
protected |
m_steps Steps between points the curvature is computed for. Used for auto-fill indices in extractContourCurvature().
|
protected |
Whether use thinned contour of ImageRegions or not.
|
protected |
Indices used for each region. See m_steps.