Image Component Library (ICL)
ChromaAndRGBClassifier.h
Go to the documentation of this file.
1 /********************************************************************
2 ** Image Component Library (ICL) **
3 ** **
4 ** Copyright (C) 2006-2013 CITEC, University of Bielefeld **
5 ** Neuroinformatics Group **
6 ** Website: www.iclcv.org and **
7 ** http://opensource.cit-ec.de/projects/icl **
8 ** **
9 ** File : ICLCore/src/ICLCore/ChromaAndRGBClassifier.h **
10 ** Module : ICLCore **
11 ** Authors: Christof Elbrechter **
12 ** **
13 ** **
14 ** GNU LESSER GENERAL PUBLIC LICENSE **
15 ** This file may be used under the terms of the GNU Lesser General **
16 ** Public License version 3.0 as published by the **
17 ** **
18 ** Free Software Foundation and appearing in the file LICENSE.LGPL **
19 ** included in the packaging of this file. Please review the **
20 ** following information to ensure the license requirements will **
21 ** be met: http://www.gnu.org/licenses/lgpl-3.0.txt **
22 ** **
23 ** The development of this software was supported by the **
24 ** Excellence Cluster EXC 277 Cognitive Interaction Technology. **
25 ** The Excellence Cluster EXC 277 is a grant of the Deutsche **
26 ** Forschungsgemeinschaft (DFG) in the context of the German **
27 ** Excellence Initiative. **
28 ** **
29 ********************************************************************/
30 
31 #pragma once
32 
33 #include <ICLUtils/CompatMacros.h>
35 
36 namespace icl{
37  namespace core{
41 
51  inline bool operator()(icl8u r, icl8u g, icl8u b) const{
52  return c(r,g,b) && ::abs(r-ref[0])<thresh[0] && ::abs(g-ref[1])<thresh[1] && ::abs(b-ref[2])<thresh[2];
53  }
56 
58  icl8u ref[3];
59 
62 
64  void show()const{
65  printf("Combi-Classifier\n");
66  c.show();
67  printf("reference color: %d %d %d \n",ref[0],ref[1],ref[2]);
68  printf("color thresholds: %d %d %d \n",thresh[0],thresh[1],thresh[2]);
69  }
70  };
71  } // namespace core
72 }
icl8u ref[3]
r-g-b reference color
Definition: ChromaAndRGBClassifier.h:58
Combination classifier using RG-chroma. as well as RGB-thresholded reference color classifiation.
Definition: ChromaAndRGBClassifier.h:39
undocument this line if you encounter any issues!
Definition: Any.h:37
Ipp8u icl8u
8Bit unsigned integer type for the ICL
Definition: BasicTypes.h:64
ChromaClassifier c
wrapped ChromaClassifier
Definition: ChromaAndRGBClassifier.h:55
void show() const
shows this classifier to std::out
Definition: ChromaAndRGBClassifier.h:64
bool operator()(icl8u r, icl8u g, icl8u b) const
classifies a given r-g-b-Pixel
Definition: ChromaAndRGBClassifier.h:51
ICLQt_API ImgQ abs(const ImgQ &image)
calls abs ( each pixel)
void show() const
Shows this classifier to std::out.
Definition: ChromaClassifier.h:52
Classifier interface using RG-chromaticity space and two parables.
Definition: ChromaClassifier.h:40
icl8u thresh[3]
r-g-b threshold
Definition: ChromaAndRGBClassifier.h:61