SMIL  0.9
+ Collaboration diagram for Histogram:

Classes

struct  threshLine< T, T_out >
 

Functions

template<class T >
RES_T enhanceContrast (const Image< T > &imIn, Image< T > &imOut, double sat=0.25)
 Enhance contrast.
 
template<class T >
 histogram (const Image< T > &imIn, size_t *h)
 
template<class T >
RES_T histogram (const Image< T > &imIn, const Image< T > &imMask, size_t *h)
 
template<class T >
std::map< T, UINT > histogram (const Image< T > &imIn, bool fullRange=false)
 Image histogram.
 
template<class T >
std::map< T, UINT > histogram (const Image< T > &imIn, const Image< T > &imMask, bool fullRange=false)
 Image histogram with a mask image. More...
 
template<class T >
vector< T > histogramRange (const Image< T > &imIn, double ignorePercent, bool cumulative=true)
 Min and Max values of an histogram ignoring left/right low values (lower than a given height/cumulative height). More...
 
template<class T >
bool IncrementThresholds (vector< double > &thresholdIndexes, map< T, UINT > &hist, UINT threshLevels, double totalFrequency, double &globalMean, vector< double > &classMean, vector< double > &classFrequency)
 
template<class T , class T_out >
vector< T > otsuThreshold (const Image< T > &imIn, Image< T_out > &imOut, UINT nbrThresholds)
 Otsu Threshold. More...
 
template<class T , class T_out >
otsuThreshold (const Image< T > &imIn, Image< T_out > &imOut)
 
template<class T , class T_out >
vector< T > otsuThreshold (const Image< T > &imIn, const Image< T > &imMask, Image< T_out > &imOut, UINT nbrThresholds=1)
 
template<class T >
vector< T > otsuThresholdValues (map< T, UINT > &hist, UINT threshLevels=1)
 Return the different threshold values and the value of the resulting variance between classes.
 
template<class T >
vector< T > otsuThresholdValues (const Image< T > &im, UINT threshLevels=1)
 
template<class T >
vector< T > otsuThresholdValues (const Image< T > &im, const Image< T > &imMask, UINT threshLevels=1)
 
template<class T1 , class T2 >
RES_T stretchHist (const Image< T1 > &imIn, T1 inMinVal, T1 inMaxVal, Image< T2 > &imOut, T2 outMinVal=numeric_limits< T2 >::min(), T2 outMaxVal=numeric_limits< T2 >::max())
 Stretch histogram.
 
template<class T1 , class T2 >
RES_T stretchHist (const Image< T1 > &imIn, Image< T2 > &imOut, T2 outMinVal, T2 outMaxVal)
 
template<class T1 , class T2 >
RES_T stretchHist (const Image< T1 > &imIn, Image< T2 > &imOut)
 
template<class T , class T_out >
RES_T threshold (const Image< T > &imIn, T minVal, T maxVal, T_out trueVal, T_out falseVal, Image< T_out > &imOut)
 Image threshold.
 
template<class T , class T_out >
RES_T threshold (const Image< T > &imIn, T minVal, T maxVal, Image< T_out > &imOut)
 
template<class T , class T_out >
RES_T threshold (const Image< T > &imIn, T minVal, Image< T_out > &imOut)
 
template<class T , class T_out >
RES_T threshold (const Image< T > &imIn, Image< T_out > &imOut)
 

Detailed Description

Function Documentation

std::map<T, UINT> smil::histogram ( const Image< T > &  imIn,
const Image< T > &  imMask,
bool  fullRange = false 
)

Image histogram with a mask image.

Calculates the histogram of the image imIn only for pixels x where imMask(x)!=0

vector<T> smil::histogramRange ( const Image< T > &  imIn,
double  ignorePercent,
bool  cumulative = true 
)

Min and Max values of an histogram ignoring left/right low values (lower than a given height/cumulative height).

If cumulative is true, it stops when the integral of the histogram values reaches ignorePercent * NbrPixels Otherwise, it stops at the first value of the histogram higher than ignorePercent * max(histogram)

vector<T> smil::otsuThreshold ( const Image< T > &  imIn,
Image< T_out > &  imOut,
UINT  nbrThresholds 
)

Otsu Threshold.

Examples:
thresholds.py