DGtal  0.9.3beta
Public Member Functions
DGtal::functors::MeanChannels Struct Reference

#include <DGtal/io/colormaps/BasicColorToScalarFunctors.h>

Public Member Functions

unsigned char operator() (const Color &aCol) const
 

Detailed Description

Basic color to scalar functor which returns the mean of the three channel values.

Definition at line 99 of file BasicColorToScalarFunctors.h.

Member Function Documentation

unsigned char DGtal::functors::MeanChannels::operator() ( const Color aCol) const
inline

Definition at line 102 of file BasicColorToScalarFunctors.h.

References DGtal::Color::blue(), DGtal::Color::green(), and DGtal::Color::red().

103  {
104  return static_cast<unsigned char>( ((int)aCol.green() + (int)aCol.blue() + (int)aCol.red()) / 3);
105  }

The documentation for this struct was generated from the following file: