IPSDK  4_1_0_2
IPSDK : Image Processing Software Development Kit
HistogramUtils.h
Go to the documentation of this file.
1 // HistogramUtils.h:
3 // -----------------
4 //
14 
15 #ifndef __IPSDKMATH_HISTOGRAMUTILS_H__
16 #define __IPSDKMATH_HISTOGRAMUTILS_H__
17 
19 #include <IPSDKUtil/BaseTypes.h>
22 #include <boost/filesystem/path.hpp>
23 #include <iostream>
24 
25 namespace ipsdk {
26 namespace math {
27 
30 
36 computeHistogramRange(const ipBool bDataIntegral,
37  const ipReal64 firstHistoValue,
38  const ipReal64 lastHistoValue);
39 
47 computeHistogramNbClasses(const ipBool bDataIntegral,
48  const ipReal64 firstHistoValue,
49  const ipReal64 lastHistoValue,
50  const ipReal64 binWidth);
51 
59 computeHistogramBinWidth(const ipBool bDataIntegral,
60  const ipReal64 firstHistoValue,
61  const ipReal64 lastHistoValue,
62  const ipUInt32 nbClasses);
63 
68 IPSDKMATH_API void
69 computeHistogramBoundsInfo(const ipUInt32 nbClasses,
70  const eHistogramOutOfBoundsPolicy& outOfBoundsPolicy,
71  ipUInt32& lowerOutOfBoundsBinIdx,
72  ipUInt32& upperOutOfBoundsBinIdx,
73  ipUInt32& inBoundsBinOffset,
74  ipUInt32& nbBins);
75 
79 computeHistogramNbBins(const ipUInt32 nbClasses,
80  const eHistogramOutOfBoundsPolicy& outOfBoundsPolicy);
81 
86 IPSDKMATH_API void
87 exportToCsv(const boost::filesystem::path& filePath,
88  const ipsdk::math::BaseHistogram& histogram);
89 
91 IPSDKMATH_API bool
93  const ipsdk::math::HistogramExtrema& extrema2);
94 
96 IPSDKMATH_API std::ostream&
97 operator<< (std::ostream& os,
98  const ipsdk::math::HistogramExtrema& extrema);
99 
101 IPSDKMATH_API std::ostream&
102 operator<< (std::ostream& os,
103  const ipsdk::math::HistogramGaussianCurveFit& gaussianCurveFit);
104 
106 IPSDKMATH_API std::ostream&
107 operator<< (std::ostream& os,
108  const ipsdk::math::BaseHistogram& histogram);
109 
112 
113 } // end of namespace math
114 
117 
120 
123 
124 } // end of namespace ipsdk
125 
126 #endif // __IPSDKMATH_HISTOGRAMUTILS_H__
Definition of import/export macro for library.
IPSDKMATH_API void computeHistogramBoundsInfo(const ipUInt32 nbClasses, const eHistogramOutOfBoundsPolicy &outOfBoundsPolicy, ipUInt32 &lowerOutOfBoundsBinIdx, ipUInt32 &upperOutOfBoundsBinIdx, ipUInt32 &inBoundsBinOffset, ipUInt32 &nbBins)
function allowing to deduce histogram bound policies from a global enumerate value ...
Main namespace for IPSDK library.
Definition: AlgorithmFunctionEfficiency.h:22
IPSDKMATH_API ipUInt32 computeHistogramNbClasses(const ipBool bDataIntegral, const ipReal64 firstHistoValue, const ipReal64 lastHistoValue, const ipReal64 binWidth)
function allowing to compute number of classes associated to an histogram
IPSDK_DECLARE_SERIAL_ENUM(IPSDKBaseData, eDiscreteOrientation2d)
serialization operators for eDiscreteOrientation2d enumerate
IPSDKMATH_API ipReal64 computeHistogramRange(const ipBool bDataIntegral, const ipReal64 firstHistoValue, const ipReal64 lastHistoValue)
function allowing to compute range associated to an histogram
IPSDKMATH_API void exportToCsv(const boost::filesystem::path &filePath, const ipsdk::math::BaseHistogram &histogram)
function allowing to export histogram data to a csv file
double ipReal64
Base types definition.
Definition: BaseTypes.h:57
IPSDKMATH_API bool operator==(const ipsdk::math::HistogramExtrema &extrema1, const ipsdk::math::HistogramExtrema &extrema2)
operator allowing to compare histogram extrema
structure allowing to encapsulate histogram extrema information
Definition: HistogramTypes.h:55
Macro allowing to declare serialization for a given enumerate.
Base class for histogram data management.
Definition: BaseHistogram.h:40
Base types for multiplatform compatibility.
#define IPSDKMATH_API
Import/Export macro for library IPSDKMath.
Definition: IPSDKMathExports.h:27
structure allowing to encapsulate gaussian curve fit information
Definition: HistogramTypes.h:100
IPSDKMATH_API std::ostream & operator<<(std::ostream &os, const EstimationConfig &config)
output operator on EstimationConfig
bool ipBool
Base types definition.
Definition: BaseTypes.h:47
Predefined types for histogram management.
eHistogramOutOfBoundsPolicy
enumerate use to describe histogram policy used to process out of bounds data
Definition: HistogramTypes.h:37
IPSDKMATH_API ipReal64 computeHistogramBinWidth(const ipBool bDataIntegral, const ipReal64 firstHistoValue, const ipReal64 lastHistoValue, const ipUInt32 nbClasses)
function allowing to compute bin width associated to an histogram
IPSDKMATH_API ipUInt32 computeHistogramNbBins(const ipUInt32 nbClasses, const eHistogramOutOfBoundsPolicy &outOfBoundsPolicy)
function allowing to compute number of bins associated to an histogram
uint32_t ipUInt32
Base types definition.
Definition: BaseTypes.h:53