Public Member Functions | Protected Member Functions | Protected Attributes
mfpf_mr_point_finder_builder Class Reference

Builder for mfpf_mr_point_finder objects. More...

#include <mfpf_mr_point_finder_builder.h>

List of all members.

Public Member Functions

 mfpf_mr_point_finder_builder ()
 Dflt ctor.
 mfpf_mr_point_finder_builder (const mfpf_mr_point_finder_builder &)
 Copy ctor.
mfpf_mr_point_finder_builderoperator= (const mfpf_mr_point_finder_builder &)
 Copy operator.
virtual ~mfpf_mr_point_finder_builder ()
 Destructor.
unsigned size () const
 Number of builders.
const mfpf_point_finder_builderbuilder (unsigned L) const
 Builder at level L.
mfpf_point_finder_builderbuilder (unsigned L)
 Builder at level L.
void set_n_levels (unsigned n)
 Set number of builders. Any existing builders are retained.
void set (const vcl_vector< mfpf_point_finder_builder * > &builders)
 Define builders. Clone of each taken.
void set (const mfpf_point_finder_builder &builder, unsigned n, double step0, double scale_step)
 Set up n builders, with step size step0*scale_step^L.
void set_size_and_levels (const mfpf_point_finder_builder &builder0, double wi, double wj, double scale_step, int min_n_samples, int max_n_samples, double base_pixel_width=1.0)
 Set up multiple builders to cover patch of size wi x wj.
void set_region_size (double wi, double wj)
 Define region size in world co-ordinates.
unsigned image_level (unsigned i, const vgl_vector_2d< double > &u, const vimt_image_pyramid &im_pyr) const
 Select best level for building model using u as basis.
void clear (unsigned n_egs)
 Initialise building.
void get_sample_vector (const vimt_image_pyramid &image_pyr, const vgl_point_2d< double > &p, const vgl_vector_2d< double > &u, unsigned L, vcl_vector< double > &v)
 Get sample image at specified point for level L of the point_finder hierarchy.
void add_example (const vimt_image_pyramid &image_pyr, const vgl_point_2d< double > &p, const vgl_vector_2d< double > &u)
 Add one example to the model.
void build (mfpf_mr_point_finder &)
 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 void print_summary (vcl_ostream &os) const
 Print class 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.

Protected Member Functions

void delete_all ()
 Delete all the builders.

Protected Attributes

vcl_vector
< mfpf_point_finder_builder * > 
builders_
 Set of cost function objects.

Detailed Description

Builder for mfpf_mr_point_finder objects.

Contains a set of mfpf_point_finder_builders, each designed to work at a different resolution.

Definition at line 20 of file mfpf_mr_point_finder_builder.h.


Constructor & Destructor Documentation

mfpf_mr_point_finder_builder::mfpf_mr_point_finder_builder ( )

Dflt ctor.

Definition at line 26 of file mfpf_mr_point_finder_builder.cxx.

mfpf_mr_point_finder_builder::mfpf_mr_point_finder_builder ( const mfpf_mr_point_finder_builder b)

Copy ctor.

Definition at line 31 of file mfpf_mr_point_finder_builder.cxx.

mfpf_mr_point_finder_builder::~mfpf_mr_point_finder_builder ( ) [virtual]

Destructor.

Definition at line 56 of file mfpf_mr_point_finder_builder.cxx.


Member Function Documentation

void mfpf_mr_point_finder_builder::add_example ( const vimt_image_pyramid image_pyr,
const vgl_point_2d< double > &  p,
const vgl_vector_2d< double > &  u 
)

Add one example to the model.

Definition at line 238 of file mfpf_mr_point_finder_builder.cxx.

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

Load class from binary file stream.

Definition at line 337 of file mfpf_mr_point_finder_builder.cxx.

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

Save class to binary file stream.

Definition at line 325 of file mfpf_mr_point_finder_builder.cxx.

void mfpf_mr_point_finder_builder::build ( mfpf_mr_point_finder mr_pf)

Build object from the data supplied in add_example().

Definition at line 270 of file mfpf_mr_point_finder_builder.cxx.

const mfpf_point_finder_builder& mfpf_mr_point_finder_builder::builder ( unsigned  L) const [inline]

Builder at level L.

Definition at line 49 of file mfpf_mr_point_finder_builder.h.

mfpf_point_finder_builder& mfpf_mr_point_finder_builder::builder ( unsigned  L) [inline]

Builder at level L.

Definition at line 53 of file mfpf_mr_point_finder_builder.h.

void mfpf_mr_point_finder_builder::clear ( unsigned  n_egs)

Initialise building.

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

Definition at line 199 of file mfpf_mr_point_finder_builder.cxx.

void mfpf_mr_point_finder_builder::delete_all ( ) [protected]

Delete all the builders.

Definition at line 62 of file mfpf_mr_point_finder_builder.cxx.

void mfpf_mr_point_finder_builder::get_sample_vector ( const vimt_image_pyramid image_pyr,
const vgl_point_2d< double > &  p,
const vgl_vector_2d< double > &  u,
unsigned  L,
vcl_vector< double > &  v 
)

Get sample image at specified point for level L of the point_finder hierarchy.

Definition at line 205 of file mfpf_mr_point_finder_builder.cxx.

unsigned mfpf_mr_point_finder_builder::image_level ( unsigned  i,
const vgl_vector_2d< double > &  u,
const vimt_image_pyramid im_pyr 
) const

Select best level for building model using u as basis.

Selects pyramid level with pixel sizes best matching the model pixel size at given basis vector u.

Definition at line 164 of file mfpf_mr_point_finder_builder.cxx.

vcl_string mfpf_mr_point_finder_builder::is_a ( ) const [virtual]

Name of the class.

Definition at line 299 of file mfpf_mr_point_finder_builder.cxx.

mfpf_mr_point_finder_builder & mfpf_mr_point_finder_builder::operator= ( const mfpf_mr_point_finder_builder b)

Copy operator.

Required to deal with correct cloning of builders

Definition at line 37 of file mfpf_mr_point_finder_builder.cxx.

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

Print class to os.

Definition at line 305 of file mfpf_mr_point_finder_builder.cxx.

void mfpf_mr_point_finder_builder::set ( const vcl_vector< mfpf_point_finder_builder * > &  builders)

Define builders. Clone of each taken.

Define point builders. Clone of each taken.

Definition at line 71 of file mfpf_mr_point_finder_builder.cxx.

void mfpf_mr_point_finder_builder::set ( const mfpf_point_finder_builder builder0,
unsigned  n,
double  step0,
double  scale_step 
)

Set up n builders, with step size step0*scale_step^L.

Takes clones of builder and sets up step sizes. Top level search parameters retained. Finer res models have search area and scale/angle ranges set to allow efficient refinement.

Definition at line 94 of file mfpf_mr_point_finder_builder.cxx.

void mfpf_mr_point_finder_builder::set_n_levels ( unsigned  n)

Set number of builders. Any existing builders are retained.

Definition at line 81 of file mfpf_mr_point_finder_builder.cxx.

void mfpf_mr_point_finder_builder::set_region_size ( double  wi,
double  wj 
)

Define region size in world co-ordinates.

Sets up ROI in each model to cover given box (in world coords), with ref point at centre. Assumes that models exist and have step size defined.

Sets up ROI in each model to cover given box (in world coords), with ref point at centre.

Definition at line 126 of file mfpf_mr_point_finder_builder.cxx.

void mfpf_mr_point_finder_builder::set_size_and_levels ( const mfpf_point_finder_builder builder0,
double  wi,
double  wj,
double  scale_step,
int  min_n_samples,
int  max_n_samples,
double  base_pixel_width = 1.0 
)

Set up multiple builders to cover patch of size wi x wj.

Patch defined in world co-ords. Selects suitable scales and levels so that region is covered and at any given level the model width (in number of samples) is in the range [min_n_samples,max_n_samples].

Parameters:
base_pixel_widthPixel width in base image

Definition at line 134 of file mfpf_mr_point_finder_builder.cxx.

unsigned mfpf_mr_point_finder_builder::size ( ) const [inline]

Number of builders.

Definition at line 46 of file mfpf_mr_point_finder_builder.h.

short mfpf_mr_point_finder_builder::version_no ( ) const

Version number for I/O.

Definition at line 289 of file mfpf_mr_point_finder_builder.cxx.


Member Data Documentation

Set of cost function objects.

Definition at line 25 of file mfpf_mr_point_finder_builder.h.


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