![]() |
Visual Servoing Platform
version 3.6.1 under development (2025-02-28)
|
#include <visp3/rbt/vpColorHistogram.h>
Classes | |
class | Builder |
Public Member Functions | |
vpColorHistogram () | |
vpColorHistogram (unsigned int N) | |
void | setBinNumber (unsigned int N) |
unsigned int | getBinNumber () const |
unsigned int | getNumPixels () const |
void | build (const vpImage< vpRGBa > &image, const vpImage< bool > &mask) |
void | build (const std::vector< unsigned int > &counts) |
void | merge (const vpColorHistogram &other, float alpha) |
void | computeProbas (const vpImage< vpRGBa > &image, vpImage< float > &proba) const |
void | computeProbas (const vpImage< vpRGBa > &image, vpImage< float > &proba, const vpRect &bb) const |
unsigned int | colorToIndex (const vpRGBa &p) const |
double | probability (const vpRGBa &color) const |
double | kl (const vpColorHistogram &other) const |
double | jsd (const vpColorHistogram &other) const |
double | hellinger (const vpColorHistogram &other) const |
Static Public Member Functions | |
static void | computeSplitHistograms (const vpImage< vpRGBa > &image, const vpImage< bool > &mask, vpColorHistogram &inMask, vpColorHistogram &outsideMask) |
static void | computeSplitHistograms (const vpImage< vpRGBa > &image, const vpImage< bool > &mask, const vpRect &bbInside, vpColorHistogram &insideMask, vpColorHistogram &outsideMask) |
Definition at line 52 of file vpColorHistogram.h.
vpColorHistogram::vpColorHistogram | ( | ) |
Definition at line 54 of file vpColorHistogram.cpp.
vpColorHistogram::vpColorHistogram | ( | unsigned int | N | ) |
Definition at line 57 of file vpColorHistogram.cpp.
References setBinNumber().
void vpColorHistogram::build | ( | const std::vector< unsigned int > & | counts | ) |
Definition at line 93 of file vpColorHistogram.cpp.
References vpException::dimensionError.
Definition at line 75 of file vpColorHistogram.cpp.
References vpImage< Type >::bitmap, colorToIndex(), and vpImage< Type >::getSize().
Referenced by computeSplitHistograms().
|
inline |
Definition at line 95 of file vpColorHistogram.h.
References vpRGBa::B, vpRGBa::G, and vpRGBa::R.
Referenced by build(), computeProbas(), and computeSplitHistograms().
void vpColorHistogram::computeProbas | ( | const vpImage< vpRGBa > & | image, |
vpImage< float > & | proba | ||
) | const |
Definition at line 121 of file vpColorHistogram.cpp.
References vpImage< Type >::bitmap, colorToIndex(), vpImage< Type >::getHeight(), vpImage< Type >::getSize(), vpImage< Type >::getWidth(), and vpImage< Type >::resize().
Referenced by vpColorHistogramMask::updateMask().
void vpColorHistogram::computeProbas | ( | const vpImage< vpRGBa > & | image, |
vpImage< float > & | proba, | ||
const vpRect & | bb | ||
) | const |
Definition at line 131 of file vpColorHistogram.cpp.
References colorToIndex(), vpRect::getBottom(), vpImage< Type >::getHeight(), vpRect::getLeft(), vpRect::getRight(), vpRect::getTop(), vpImage< Type >::getWidth(), and vpImage< Type >::resize().
|
static |
Definition at line 218 of file vpColorHistogram.cpp.
References vpException::badValue, vpImage< Type >::bitmap, build(), colorToIndex(), vpRect::getBottom(), vpRect::getLeft(), vpRect::getRight(), vpImage< Type >::getSize(), vpRect::getTop(), and vpImage< Type >::getWidth().
|
static |
Definition at line 187 of file vpColorHistogram.cpp.
References vpException::badValue, vpImage< Type >::bitmap, build(), colorToIndex(), and vpImage< Type >::getSize().
Referenced by vpColorHistogramMask::updateMask().
|
inline |
Definition at line 81 of file vpColorHistogram.h.
Referenced by vpColorHistogram::Builder::build().
|
inline |
Definition at line 83 of file vpColorHistogram.h.
Referenced by vpColorHistogramMask::updateMask().
double vpColorHistogram::hellinger | ( | const vpColorHistogram & | other | ) | const |
Definition at line 176 of file vpColorHistogram.cpp.
double vpColorHistogram::jsd | ( | const vpColorHistogram & | other | ) | const |
Definition at line 165 of file vpColorHistogram.cpp.
References kl().
double vpColorHistogram::kl | ( | const vpColorHistogram & | other | ) | const |
Definition at line 151 of file vpColorHistogram.cpp.
References vpException::badValue.
Referenced by jsd().
void vpColorHistogram::merge | ( | const vpColorHistogram & | other, |
float | alpha | ||
) |
Definition at line 108 of file vpColorHistogram.cpp.
References vpException::badValue.
Referenced by vpColorHistogramMask::updateMask().
|
inline |
Definition at line 100 of file vpColorHistogram.h.
void vpColorHistogram::setBinNumber | ( | unsigned int | N | ) |
Change the number of bins per color component that the histogram has After calling this method, the histogram will be reset and the values will not be kept.
N | the number of bins per RGB component: the histogram will have N^3 bins in total. N should be a power of 2 between 1 and 128 |
Definition at line 62 of file vpColorHistogram.cpp.
References vpException::badValue.
Referenced by vpColorHistogram().