libeblearntools
|
#include <grid_dataset.h>
Public Member Functions | |
grid_dataset (const char *name, const char *inroot=NULL, uint cellh=32, uint cellw=32) | |
virtual | ~grid_dataset () |
Destructor. | |
virtual intg | count_samples () |
count how many samples are present in dataset files to be compiled. | |
virtual bool | add_data (idx< Tdata > &d, const string &class_name, const char *filename=NULL, const rect< int > *r=NULL, pair< uint, uint > *center=NULL) |
Protected Attributes | |
uint | cell_height |
uint | cell_width |
The grid_dataset class divides each input image into a grid, making each resulting patch a new training sample.
ebl::grid_dataset< Tdata >::grid_dataset | ( | const char * | name, |
const char * | inroot = NULL , |
||
uint | cellh = 32 , |
||
uint | cellw = 32 |
||
) |
Initialize the dataset's name and other internal variables, but does not allocate data matrices, user must call alloc for that effect. outdims are the target output dimensions of each sample. inroot is the root directory from which we extract data. ignore_diff ignores difficult objects if true.
bool ebl::grid_dataset< Tdata >::add_data | ( | idx< Tdata > & | d, |
const string & | class_name, | ||
const char * | filename = NULL , |
||
const rect< int > * | r = NULL , |
||
pair< uint, uint > * | center = NULL |
||
) | [virtual] |
add sample d to the data with label class_name (and converting from Toriginal to Tdata type). r is an optional region of interest rectangle in the image d.