Add support to set the threshold for each RGB channel separately

Former-commit-id: 5edb206bb2657e78f711f67625fd5f6164d8296c
This commit is contained in:
johan
2014-03-04 22:04:15 +01:00
parent 4888294e03
commit 5e3cb497fa
9 changed files with 92 additions and 48 deletions

View File

@@ -48,3 +48,10 @@ inline std::ostream& operator<<(std::ostream& os, const ColorRgb& color)
os << "{" << unsigned(color.red) << "," << unsigned(color.green) << "," << unsigned(color.blue) << "}";
return os;
}
/// Compare operator to check if a color is 'smaller' than another color
inline bool operator<(const ColorRgb & lhs, const ColorRgb & rhs)
{
return (lhs.red < rhs.red) && (lhs.green < rhs.green) && (lhs.blue < rhs.blue);
}