X-Boost  2.3.8
IntegralChannelFeature.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 _INTEGRAL_CHANNEL_FEATURE_TRAITS_H
22 #define _INTEGRAL_CHANNEL_FEATURE_TRAITS_H
23 
28 #include "Feature/IntegralChannelFeature.h"
29 #include "DataSet.h"
30 #include "Pattern/Pattern.h"
31 #include "SourceDataSet.h"
35 #include "Traits.h"
36 
37 namespace traits {
39  public:
40 
43 
46 
49 
52 
54 
55  // additional traits
56  DECLARE_BASE_TRAITS
57 
58  };
59 }
60 
61 
62 // extendend integral image
63 // param1: PTR (1,1)
64 inline const uint32_t * getData1(const IntegralImageData & data, const IntegralChannelImageParams & params)
65  {
66  return data.data + 1 + params.stride1;
67  }
68 inline const uint32_t * getData1(const IntegralImageData & data, const IntegralChannelImageParams & params, int x0, int y0)
69  {
70  return data.data + 1 + x0 + (1 + y0)* params.stride1;
71  }
72 
73 // param2: STRIDE
74 inline const std::pair<int32_t,int32_t> getData2(const IntegralImageData & data, const IntegralChannelImageParams & params)
75  {
76  return std::pair<int32_t,int32_t>(params.stride1, params.stride2);
77  }
78 
79 
80 #endif
Pattern< IntegralImageData > PatternType
complete type loaded by file
Definition: IntegralChannelFeature.h:48
a descritor based on a integral image
Definition: Pattern.h:39
Definition: FeatureGenerator.h:36
IntegralImageData DataType
Data provided by this Preprocessor.
Definition: IntegralChannelFeature.h:45
this file declare the virtual feature generator for Integral Channel Features
Definition: IntegralChannelImagePreprocessor.h:70
Definition: IntegralChannelFeature.h:38
parameters required to address a channel params
Definition: IntegralChannelImagePreprocessor.h:36
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
IntegralChannelImagePreprocessor PreprocessorType
Preprocessor used to obtain data.
Definition: IntegralChannelFeature.h:42
method to convert an image sample in integral Channels Image
declare a DataSet
IntegralChannelImageParams ParamType
parameters used to store data and use with feature extractor
Definition: IntegralChannelFeature.h:51