Visual Servoing Platform version 3.7.0
Loading...
Searching...
No Matches
vpHistogramValey Class Reference

#include <vpHistogramValey.h>

Inheritance diagram for vpHistogramValey:

Public Member Functions

 vpHistogramValey ()
 vpHistogramValey (unsigned char lvl, unsigned val)
 vpHistogramValey (const vpHistogramValey &v)
vpHistogramValeyoperator= (const vpHistogramValey &v)
bool operator== (const vpHistogramValey &v) const
void setLevel (unsigned char lvl)
void setValue (unsigned val)
void set (unsigned char lvl, unsigned val)
unsigned char getLevel () const
unsigned getValue () const

Private Member Functions

bool operator== (const vpHistogramPeak &p) const

Friends

VISP_EXPORT std::ostream & operator<< (std::ostream &s, const vpHistogramValey &v)

Detailed Description

Declaration of the valey (minimum value) in a gray level image histogram.

A valey is internally represented as a gray level and a value. The value represents the number of pixels having the gray level.

Examples
histogram.cpp.

Definition at line 59 of file vpHistogramValey.h.

Constructor & Destructor Documentation

◆ vpHistogramValey() [1/3]

vpHistogramValey::vpHistogramValey ( )
inline

Definition at line 62 of file vpHistogramValey.h.

References vpHistogramPeak::vpHistogramPeak().

Referenced by operator<<, operator=(), operator==(), and vpHistogramValey().

◆ vpHistogramValey() [2/3]

vpHistogramValey::vpHistogramValey ( unsigned char lvl,
unsigned val )
inline

Definition at line 64 of file vpHistogramValey.h.

References vpHistogramPeak::vpHistogramPeak().

◆ vpHistogramValey() [3/3]

vpHistogramValey::vpHistogramValey ( const vpHistogramValey & v)
inline

Definition at line 66 of file vpHistogramValey.h.

References vpHistogramPeak::vpHistogramPeak(), and vpHistogramValey().

Member Function Documentation

◆ getLevel()

unsigned char vpHistogramValey::getLevel ( ) const
inline

Get the valey gray level. The number of pixels having this gray level is available through getValue().

Returns
Location of the valey or gray level.
See also
getValue()
Examples
histogram.cpp.

Definition at line 119 of file vpHistogramValey.h.

References vpHistogramPeak::level.

◆ getValue()

unsigned vpHistogramValey::getValue ( ) const
inline

Get the valey number of pixels having a same gray level. The corresponding gray level is available through getLevel().

Returns
Number of pixels having the same location or gray level.
See also
getLevel()
Examples
histogram.cpp.

Definition at line 130 of file vpHistogramValey.h.

References vpHistogramPeak::value.

◆ operator=()

BEGIN_VISP_NAMESPACE vpHistogramValey & vpHistogramValey::operator= ( const vpHistogramValey & v)

Copy operator.

Parameters
v: Histogram valey to copy.
vpHistogramValey v1(0, 255);
vpHistogramValey v2 = v1; // Valey p2 is set to 0, 255

Definition at line 55 of file vpHistogramValey.cpp.

References setLevel(), setValue(), and vpHistogramValey().

◆ operator==()

bool vpHistogramValey::operator== ( const vpHistogramValey & v) const

Comparison operator.

Parameters
v: Gray level histogram valey to compar.

Definition at line 70 of file vpHistogramValey.cpp.

References vpHistogramPeak::level, vpHistogramPeak::value, and vpHistogramValey().

◆ set()

void vpHistogramValey::set ( unsigned char lvl,
unsigned val )
inline

Set the valey gray level and number of pixels at this location.

Parameters
lvl: Location of the valey or gray level.
val: Number of pixels having the same location or gray level.
See also
setLevel(), setValue()

Definition at line 103 of file vpHistogramValey.h.

References vpHistogramPeak::level, and vpHistogramPeak::value.

Referenced by vpHistogram::getPeaks(), vpHistogram::getValey(), and vpHistogram::getValey().

◆ setLevel()

void vpHistogramValey::setLevel ( unsigned char lvl)
inline

Set the valey gray level. To set the number of pixels having this gray level use setValue().

Parameters
lvl: Location of the valey or gray level.
See also
setValue(), set()

Definition at line 81 of file vpHistogramValey.h.

References vpHistogramPeak::level.

Referenced by operator=().

◆ setValue()

void vpHistogramValey::setValue ( unsigned val)
inline

Set the valey number of pixels having a same gray level. To set the gray level of this valey use setLevel().

Parameters
val: Number of pixels having the same location or gray level.
See also
setPosition(), set()

Definition at line 92 of file vpHistogramValey.h.

References vpHistogramPeak::value.

Referenced by operator=().

◆ operator<<

VISP_EXPORT std::ostream & operator<< ( std::ostream & s,
const vpHistogramValey & v )
friend

std::cout a valey

Definition at line 79 of file vpHistogramValey.cpp.

References operator<<, and vpHistogramValey().

Referenced by operator<<.