DGtal 1.3.0
Loading...
Searching...
No Matches
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

◆ operator()()

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

Definition at line 102 of file BasicColorToScalarFunctors.h.

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

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


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