Public Member Functions | Private Member Functions | Private Attributes
mfpf_pose_predictor_builder Class Reference

Trains regressor in an mfpf_pose_predictor. More...

#include <mfpf_pose_predictor_builder.h>

List of all members.

Public Member Functions

 mfpf_pose_predictor_builder ()
virtual ~mfpf_pose_predictor_builder ()
void set_sampling (const mfpf_pose_predictor &)
 Define sampling region and method.
void set_n_per_eg (unsigned n)
 Define number of samples per training image.
virtual void clear (unsigned n_egs)
 Initialise building.
virtual void add_example (const vimt_image_2d_of< float > &image, const mfpf_pose &pose)
 Add one example to the model.
virtual void build (mfpf_pose_predictor &)
 Build object from the data supplied in add_example().
short version_no () const
 Version number for I/O.
virtual vcl_string is_a () const
 Name of the class.
virtual
mfpf_pose_predictor_builder
clone () const
 Create a copy on the heap and return base class pointer.
virtual void print_summary (vcl_ostream &os) const
 Print class to os.
void print_shape (vcl_ostream &os) const
 Prints ASCII representation of shape to os.
virtual void b_write (vsl_b_ostream &bfs) const
 Save class to binary file stream.
virtual void b_read (vsl_b_istream &bfs)
 Load class from binary file stream.
bool operator== (const mfpf_pose_predictor_builder &nc) const
 Test equality.

Private Member Functions

void set_defaults ()
 Define default values.

Private Attributes

mfpf_pose_predictor sampler_
 Pose predictor object used to do image sampling.
vnl_random rand_
 Random number generator for offsets.
unsigned n_per_eg_
 Number of random samples to use per example.
vnl_matrix< double > samples_
 Samples (one per row).
vnl_matrix< double > poses_
 Pose vectors for each sample (one per row).
unsigned ci_
 Current index into samples_/poses_.

Detailed Description

Trains regressor in an mfpf_pose_predictor.

Object set up with a pose predictor which has been partially initialised so as to allow calculation of the image samples. Given a set of training images, this samples at random displacements and trains a linear regressor to predict the given displacement. The internal pose predictor is just used to do the image sampling (to reduce code duplication).

Definition at line 21 of file mfpf_pose_predictor_builder.h.


Constructor & Destructor Documentation

mfpf_pose_predictor_builder::mfpf_pose_predictor_builder ( )

Definition at line 19 of file mfpf_pose_predictor_builder.cxx.

mfpf_pose_predictor_builder::~mfpf_pose_predictor_builder ( ) [virtual]

Definition at line 42 of file mfpf_pose_predictor_builder.cxx.


Member Function Documentation

void mfpf_pose_predictor_builder::add_example ( const vimt_image_2d_of< float > &  image,
const mfpf_pose pose 
) [virtual]

Add one example to the model.

Definition at line 76 of file mfpf_pose_predictor_builder.cxx.

void mfpf_pose_predictor_builder::b_read ( vsl_b_istream bfs) [virtual]

Load class from binary file stream.

Definition at line 220 of file mfpf_pose_predictor_builder.cxx.

void mfpf_pose_predictor_builder::b_write ( vsl_b_ostream bfs) const [virtual]

Save class to binary file stream.

Definition at line 209 of file mfpf_pose_predictor_builder.cxx.

void mfpf_pose_predictor_builder::build ( mfpf_pose_predictor p) [virtual]

Build object from the data supplied in add_example().

Definition at line 140 of file mfpf_pose_predictor_builder.cxx.

void mfpf_pose_predictor_builder::clear ( unsigned  n_egs) [virtual]

Initialise building.

Must be called before any calls to add_example(...)

Definition at line 55 of file mfpf_pose_predictor_builder.cxx.

mfpf_pose_predictor_builder * mfpf_pose_predictor_builder::clone ( ) const [virtual]

Create a copy on the heap and return base class pointer.

Definition at line 188 of file mfpf_pose_predictor_builder.cxx.

vcl_string mfpf_pose_predictor_builder::is_a ( ) const [virtual]

Name of the class.

Definition at line 182 of file mfpf_pose_predictor_builder.cxx.

bool mfpf_pose_predictor_builder::operator== ( const mfpf_pose_predictor_builder nc) const

Test equality.

Definition at line 240 of file mfpf_pose_predictor_builder.cxx.

void mfpf_pose_predictor_builder::print_shape ( vcl_ostream &  os) const

Prints ASCII representation of shape to os.

void mfpf_pose_predictor_builder::print_summary ( vcl_ostream &  os) const [virtual]

Print class to os.

Definition at line 197 of file mfpf_pose_predictor_builder.cxx.

void mfpf_pose_predictor_builder::set_defaults ( ) [private]

Define default values.

Definition at line 25 of file mfpf_pose_predictor_builder.cxx.

void mfpf_pose_predictor_builder::set_n_per_eg ( unsigned  n)

Define number of samples per training image.

Definition at line 32 of file mfpf_pose_predictor_builder.cxx.

void mfpf_pose_predictor_builder::set_sampling ( const mfpf_pose_predictor pp)

Define sampling region and method.

Supplied predictor is partially initialised

Definition at line 48 of file mfpf_pose_predictor_builder.cxx.

short mfpf_pose_predictor_builder::version_no ( ) const

Version number for I/O.

Definition at line 203 of file mfpf_pose_predictor_builder.cxx.


Member Data Documentation

Current index into samples_/poses_.

Definition at line 40 of file mfpf_pose_predictor_builder.h.

Number of random samples to use per example.

Definition at line 31 of file mfpf_pose_predictor_builder.h.

Pose vectors for each sample (one per row).

Definition at line 37 of file mfpf_pose_predictor_builder.h.

Random number generator for offsets.

Definition at line 28 of file mfpf_pose_predictor_builder.h.

Pose predictor object used to do image sampling.

Definition at line 25 of file mfpf_pose_predictor_builder.h.

Samples (one per row).

Definition at line 34 of file mfpf_pose_predictor_builder.h.


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