PICCANTE  0.4
The hottest HDR imaging library!
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
pic::ConnectedComponents< T > Class Template Reference

#include <connected_components.hpp>

Public Member Functions

 ConnectedComponents (float thr=0.05f)
 ConnectedComponents. More...
 
uintexecute (Image *imgIn, uint *imgOut, std::vector< LabelOutput > &ret)
 execute More...
 
uintexecute (T *imgIn, int width, int height, uint *imgOut, std::vector< LabelOutput > &ret)
 execute More...
 

Static Public Member Functions

static uintreCount (uint *imgLabel, std::vector< LabelOutput > &labelsList)
 reCount More...
 
static ImageconvertFromIntegerToImage (uint *imgLabel, Image *imgOut, int width, int height)
 convertFromIntegerToImage More...
 
static void computeLabelsListFromImageLabels (uint *labels, int n, std::vector< LabelOutput > &labelsList)
 computeLabelsList More...
 
static uintcomputeImageLabelsFromLabelsList (std::vector< LabelOutput > &labelsList, uint *labels, int n)
 computeImageLabelsFromLabelsList More...
 
static void getMappingLabelsList (std::vector< LabelOutput > &labelsList, std::map< uint, int > &labels_map)
 getMappingLabelsList More...
 
static void computeNeighbors (uint *labels, int width, int height, std::vector< LabelOutput > &labelsList)
 computeNeighbors More...
 
static void mergeIsolatedAreasWithThreshold (uint *labels, int width, int height, std::vector< LabelOutput > &labelsList, int threshold=1)
 mergeIsolatedAreasWithThreshold More...
 

Protected Member Functions

void secondPass (uint *imgOut, std::vector< LabelOutput > &ret, std::set< LabelInfo > &labelEq, int n)
 secondPass More...
 
void track (uint *imgOut, int &label, std::set< LabelInfo > &labelEq, int neighbors[2], int nNeighbors, int ind)
 

Protected Attributes

float thr
 

Constructor & Destructor Documentation

◆ ConnectedComponents()

template<class T>
pic::ConnectedComponents< T >::ConnectedComponents ( float  thr = 0.05f)
inline

ConnectedComponents.

Parameters
thr

Member Function Documentation

◆ computeImageLabelsFromLabelsList()

template<class T>
static uint* pic::ConnectedComponents< T >::computeImageLabelsFromLabelsList ( std::vector< LabelOutput > &  labelsList,
uint labels,
int  n 
)
inlinestatic

computeImageLabelsFromLabelsList

Parameters
labelsList
labels
n
Returns

◆ computeLabelsListFromImageLabels()

template<class T>
static void pic::ConnectedComponents< T >::computeLabelsListFromImageLabels ( uint labels,
int  n,
std::vector< LabelOutput > &  labelsList 
)
inlinestatic

computeLabelsList

Parameters
labels
n
labelsList

◆ computeNeighbors()

template<class T>
static void pic::ConnectedComponents< T >::computeNeighbors ( uint labels,
int  width,
int  height,
std::vector< LabelOutput > &  labelsList 
)
inlinestatic

computeNeighbors

Parameters
labels
width
height
labelsList

◆ convertFromIntegerToImage()

template<class T>
static Image* pic::ConnectedComponents< T >::convertFromIntegerToImage ( uint imgLabel,
Image imgOut,
int  width,
int  height 
)
inlinestatic

convertFromIntegerToImage

Parameters
imgLabel
imgOut
width
height
Returns

◆ execute() [1/2]

template<class T>
uint* pic::ConnectedComponents< T >::execute ( Image imgIn,
uint imgOut,
std::vector< LabelOutput > &  ret 
)
inline

execute

Parameters
imgIn
imgOut
ret

◆ execute() [2/2]

template<class T>
uint* pic::ConnectedComponents< T >::execute ( T *  imgIn,
int  width,
int  height,
uint imgOut,
std::vector< LabelOutput > &  ret 
)
inline

execute

Parameters
imgIn
width
height
imgOut
ret
Returns

◆ getMappingLabelsList()

template<class T>
static void pic::ConnectedComponents< T >::getMappingLabelsList ( std::vector< LabelOutput > &  labelsList,
std::map< uint, int > &  labels_map 
)
inlinestatic

getMappingLabelsList

Parameters
labelsList
labels_map

◆ mergeIsolatedAreasWithThreshold()

template<class T>
static void pic::ConnectedComponents< T >::mergeIsolatedAreasWithThreshold ( uint labels,
int  width,
int  height,
std::vector< LabelOutput > &  labelsList,
int  threshold = 1 
)
inlinestatic

mergeIsolatedAreasWithThreshold

Parameters
labels
width
height
labelsList
threshold

◆ reCount()

template<class T>
static uint* pic::ConnectedComponents< T >::reCount ( uint imgLabel,
std::vector< LabelOutput > &  labelsList 
)
inlinestatic

reCount

Parameters
imgLabel
ret
Returns

◆ secondPass()

template<class T>
void pic::ConnectedComponents< T >::secondPass ( uint imgOut,
std::vector< LabelOutput > &  ret,
std::set< LabelInfo > &  labelEq,
int  n 
)
inlineprotected

secondPass

Parameters
imgOut
labelEq

◆ track()

template<class T>
void pic::ConnectedComponents< T >::track ( uint imgOut,
int &  label,
std::set< LabelInfo > &  labelEq,
int  neighbors[2],
int  nNeighbors,
int  ind 
)
inlineprotected

Member Data Documentation

◆ thr

template<class T>
float pic::ConnectedComponents< T >::thr
protected

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