libeblearntools
ebl::grid_dataset< Tdata > Class Template Reference

#include <grid_dataset.h>

Inheritance diagram for ebl::grid_dataset< Tdata >:
ebl::dataset< Tdata >

List of all members.

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

Detailed Description

template<class Tdata>
class ebl::grid_dataset< Tdata >

The grid_dataset class divides each input image into a grid, making each resulting patch a new training sample.


Constructor & Destructor Documentation

template<class Tdata >
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.


Member Function Documentation

template<class Tdata >
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.


The documentation for this class was generated from the following files: