52 #include <visp3/core/vpImage.h>
53 #include <visp3/core/vpHistogramPeak.h>
54 #include <visp3/core/vpHistogramValey.h>
55 #include <visp3/core/vpColor.h>
57 #ifdef VISP_BUILD_DEPRECATED_FUNCTIONS
58 # include <visp3/core/vpList.h>
146 return histogram[level];
149 std::stringstream ss;
150 ss <<
"Level is > to size (" << size <<
") !";
176 return histogram[level];
179 std::stringstream ss;
180 ss <<
"Level is > to size (" << size <<
") !";
203 inline unsigned get(
const unsigned char level)
const
206 return histogram[level];
209 std::stringstream ss;
210 ss <<
"Level is > to size (" << size <<
") !";
231 inline void set(
const unsigned char level,
unsigned int value)
234 histogram[level] = value;
236 std::stringstream ss;
237 ss <<
"Level is > to size (" << size <<
") !";
245 const unsigned int maxValue_=0);
247 void smooth(
const unsigned int fsize = 3);
248 unsigned getPeaks(std::list<vpHistogramPeak> & peaks);
249 unsigned getPeaks(
unsigned char dist,
252 bool getPeaks(
unsigned char dist,
256 unsigned getValey(std::list<vpHistogramValey> & valey);
260 unsigned getValey(
unsigned char dist,
264 unsigned sort(std::list<vpHistogramPeak> & peaks);
266 bool write(
const std::string &filename);
267 bool write(
const char *filename);
309 void init(
unsigned size = 256);
311 unsigned int *histogram;
Class to define colors available for display functionnalities.
error that can be emited by ViSP classes.
Class to compute a gray level image histogram.
Declaration of the peak (maximum value) in a gray level image histogram.
unsigned operator[](const unsigned char level) const
unsigned operator()(const unsigned char level) const
static const vpColor white
Declaration of the valey (minimum value) in a gray level image histogram.
void set(const unsigned char level, unsigned int value)