X-Boost  2.3.8
HaarFeature.h
1 /* XBoost: Ada-Boost and Friends on Haar/ICF/HOG Features, Library and ToolBox
2  *
3  * Copyright (c) 2008-2014 Paolo Medici <medici@ce.unipr.it>
4  *
5  * This library is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Lesser General Public
7  * License as published by the Free Software Foundation; either
8  * version 2 of the License, or (at your option) any later version.
9  *
10  * This library is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  * Lesser General Public License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public
16  * License along with this library; if not, write to the
17  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18  * Boston, MA 02111-1307, USA.
19  */
20 
21 #ifndef _HAAR_FEATURE_TRAITS_H
22 #define _HAAR_FEATURE_TRAITS_H
23 
28 #include "Feature/HaarFeature.h"
29 #include "DataSet.h"
30 #include "Pattern/Pattern.h"
31 #include "SourceDataSet.h"
35 #include "Traits.h"
36 
37 namespace traits {
38  class HaarFeature {
39  public:
40 
43 
46 
49 
52 
55 
56  // additional traits
57  DECLARE_BASE_TRAITS
58 
59  };
60 }
61 
62 
63 // extendend integral image
64 // param1: PTR (1,1)
65 inline const uint32_t * getData1(const IntegralImageData & data, const IntegralImageParams & params)
66  {
67  return data.data + 1 + params.stride;//param.width+1
68  }
69 
70 inline const uint32_t * getData1(const IntegralImageData & data, const IntegralImageParams & params, int x0, int y0)
71  {
72  return data.data + 1 + x0 + (1 + y0)* params.stride;
73  }
74 
75 
76 // param2: STRIDE
77 inline const int32_t getData2(const IntegralImageData & data, const IntegralImageParams & params)
78  {
79  return params.stride;
80  }
81 
82 #endif
Pattern< IntegralImageData > PatternType
complete type loaded by file
Definition: HaarFeature.h:48
Definition: IntegralImagePreprocessors.h:36
this file generates all the possible haar feature
a descritor based on a integral image
Definition: Pattern.h:39
IntegralImageParams ParamType
parameters used to store data and use with feature extractor
Definition: HaarFeature.h:51
IntegralImageData DataType
Data provided by this Preprocessor.
Definition: HaarFeature.h:45
Definition: FeatureGenerator.h:36
HaarFeatureGenerator FeatureGeneratorType
feature extractor on Aggreagator
Definition: HaarFeature.h:54
method to convert an image sample in integral image preprocessors
Definition: HaarFeature.h:38
implement the generic pattern object
declare the SourceDataSet template class
il dato IntegralImage e' pressoche' equivalente a quello di RawData < uint32_t >
Definition: IntegralImageData.h:52
declare DECLARE_BASE_TRAITS traits
declare a DataSet
IntegralImagePreprocessor PreprocessorType
Preprocessor used to obtain data.
Definition: HaarFeature.h:42
parameters required to access to integral image and to create features
Definition: IntegralImageData.h:31