X-Boost  2.3.8
datasetin.h
Go to the documentation of this file.
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 _DATASET_IN_H
22 #define _DATASET_IN_H
23 
27 #include <vector>
28 #include <string>
29 
30 #include "Types.h"
31 #include "Image.h"
32 
34 struct datasetobject {
36  int category;
38  float weight;
41 };
42 
44 struct datasetitem {
46  std::string filename;
52  std::vector<datasetobject> object;
53 };
54 
56 class datasetin {
57 public:
58 
59  virtual ~datasetin();
60 
61  virtual bool next(datasetitem & item) = 0;
62 };
63 
64 
66 // datasetin *allocate_in2(const char *filename, int category);
67 
68 #endif
Types involved in boosting.
rect roi
subregion of img where positive lives
Definition: datasetin.h:40
a virtual pure pattern list reader
Definition: datasetin.h:56
image/size TODO namespace
Definition: Types.h:39
item for positive/multiclass
Definition: datasetin.h:34
method to hold an image
an item used for positive
Definition: datasetin.h:44
std::vector< datasetobject > object
List of object.
Definition: datasetin.h:52
size sz
size of image (for precomputed set)
Definition: datasetin.h:48
a rectangle structure
Definition: Types.h:55
int category
category of positive/negative/donotcare class
Definition: datasetin.h:36
std::string filename
filename
Definition: datasetin.h:46
float weight
an initial weight (or multiplication factor)
Definition: datasetin.h:38
bool auto_negative
if the rest of the blob can be used as source for negative
Definition: datasetin.h:50