Public Member Functions | Static Public Member Functions | Protected Attributes | Private Attributes
mipa_ms_block_normaliser Class Reference

Independently normalise (non-overlapping) blocks within a region. More...

#include <mipa_ms_block_normaliser.h>

Inheritance diagram for mipa_ms_block_normaliser:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 mipa_ms_block_normaliser ()
 mipa_ms_block_normaliser (const mipa_block_normaliser &lbn, unsigned nscales, bool include_overall_histogram)
virtual void normalise (vnl_vector< double > &v) const
 Apply transform independently to each block (at multi-scales).
virtual vcl_string is_a () const
 Name of the class.
virtual mipa_vector_normaliserclone () const
 Create a copy on the heap and return base class pointer.
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.
virtual void config_from_stream (vcl_istream &is, const mbl_read_props_type &extra_props)
 Initialise from a text stream.
void set_nscales (unsigned n)
void set_include_overall_histogram (bool bIn)
unsigned nscales () const
bool include_overall_histogram () const
const mipa_vector_normalisernormaliser () const
 The actual normaliser.
void set_normaliser (const mipa_vector_normaliser &norm)
 Set the actual normaliser.
virtual void normalise (vnl_vector< double > &sample, unsigned) const
 Normalise the sample, preserving the direction of each nfeatures-sized sub-vector.
void set_region (unsigned ni, unsigned nj)
void set_nbins (unsigned nA)
void set_nc_per_block (unsigned block_size)
unsigned nA () const
unsigned ni_region () const
unsigned nj_region () const
unsigned nc_per_block () const

Static Public Member Functions

static vcl_auto_ptr
< mipa_vector_normaliser
new_normaliser_from_stream (vcl_istream &is, const mbl_read_props_type &extra_props)
 Create a concrete mipa_vector_normaliser-derived object, from a text specification.

Protected Attributes

unsigned ni_region_
 Number of x cells in region.
unsigned nj_region_
 Number of y cells in region.
unsigned nc_per_block_
 Number of cells per block.
unsigned nA_
 Number of histogram bins per cell.

Private Attributes

unsigned nscales_
 Number of SIFT-like scales at which the histogram cells are combined.
bool include_overall_histogram_
 Is there an overall histogram (over all cells) included at the end.

Detailed Description

Independently normalise (non-overlapping) blocks within a region.

(e.g. as in simplified R-HOG without overlap)

Definition at line 18 of file mipa_ms_block_normaliser.h.


Constructor & Destructor Documentation

mipa_ms_block_normaliser::mipa_ms_block_normaliser ( ) [inline]

Definition at line 28 of file mipa_ms_block_normaliser.h.

mipa_ms_block_normaliser::mipa_ms_block_normaliser ( const mipa_block_normaliser lbn,
unsigned  nscales,
bool  include_overall_histogram 
) [inline]

Definition at line 32 of file mipa_ms_block_normaliser.h.


Member Function Documentation

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

Load class from binary file stream.

Reimplemented from mipa_block_normaliser.

Definition at line 102 of file mipa_ms_block_normaliser.cxx.

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

Save class to binary file stream.

Reimplemented from mipa_block_normaliser.

Definition at line 89 of file mipa_ms_block_normaliser.cxx.

mipa_vector_normaliser * mipa_ms_block_normaliser::clone ( ) const [virtual]

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

Reimplemented from mipa_block_normaliser.

Definition at line 69 of file mipa_ms_block_normaliser.cxx.

void mipa_ms_block_normaliser::config_from_stream ( vcl_istream &  is,
const mbl_read_props_type extra_props 
) [virtual]

Initialise from a text stream.

syntax

   {
     normaliser: mipa_l2norm_vector_normaliser
     ni: 16
     nj: 16
     nA: 20;
     nc_per_block: 4
     include_overall_histogram: true
     nscales: 2
   }
   

The next non-ws character in the stream should be a '{' syntax

   {
     nscales: 2
     include_overall_histogram: true
     normaliser: mipa_l2norm_vector_normaliser
     ni: 16
     nj: 16
     nc_per_block: 4
   }
   

Reimplemented from mipa_block_normaliser.

Definition at line 140 of file mipa_ms_block_normaliser.cxx.

bool mipa_ms_block_normaliser::include_overall_histogram ( ) const [inline]

Definition at line 79 of file mipa_ms_block_normaliser.h.

vcl_string mipa_ms_block_normaliser::is_a ( ) const [virtual]

Name of the class.

Reimplemented from mipa_block_normaliser.

Definition at line 62 of file mipa_ms_block_normaliser.cxx.

unsigned mipa_block_normaliser::nA ( ) const [inline, inherited]

Definition at line 87 of file mipa_block_normaliser.h.

unsigned mipa_block_normaliser::nc_per_block ( ) const [inline, inherited]

Definition at line 90 of file mipa_block_normaliser.h.

vcl_auto_ptr< mipa_vector_normaliser > mipa_vector_normaliser::new_normaliser_from_stream ( vcl_istream &  is,
const mbl_read_props_type extra_props 
) [static, inherited]

Create a concrete mipa_vector_normaliser-derived object, from a text specification.

Definition at line 48 of file mipa_vector_normaliser.cxx.

unsigned mipa_block_normaliser::ni_region ( ) const [inline, inherited]

Definition at line 88 of file mipa_block_normaliser.h.

unsigned mipa_block_normaliser::nj_region ( ) const [inline, inherited]

Definition at line 89 of file mipa_block_normaliser.h.

virtual void mipa_vector_normaliser::normalise ( vnl_vector< double > &  sample,
unsigned   
) const [inline, virtual, inherited]

Normalise the sample, preserving the direction of each nfeatures-sized sub-vector.

The default implementation assumes that this direction would be preserved anyway.

Definition at line 30 of file mipa_vector_normaliser.h.

void mipa_ms_block_normaliser::normalise ( vnl_vector< double > &  v) const [virtual]

Apply transform independently to each block (at multi-scales).

Apply transform to texture vector.

Reimplemented from mipa_block_normaliser.

Definition at line 18 of file mipa_ms_block_normaliser.cxx.

const mipa_vector_normaliser& mipa_block_normaliser::normaliser ( ) const [inline, inherited]

The actual normaliser.

Definition at line 43 of file mipa_block_normaliser.h.

unsigned mipa_ms_block_normaliser::nscales ( ) const [inline]

Definition at line 77 of file mipa_ms_block_normaliser.h.

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

Print class to os.

Reimplemented from mipa_block_normaliser.

Definition at line 77 of file mipa_ms_block_normaliser.cxx.

void mipa_ms_block_normaliser::set_include_overall_histogram ( bool  bIn) [inline]

Definition at line 74 of file mipa_ms_block_normaliser.h.

void mipa_block_normaliser::set_nbins ( unsigned  nA) [inline, inherited]

Definition at line 82 of file mipa_block_normaliser.h.

void mipa_block_normaliser::set_nc_per_block ( unsigned  block_size) [inline, inherited]

Definition at line 84 of file mipa_block_normaliser.h.

void mipa_block_normaliser::set_normaliser ( const mipa_vector_normaliser norm) [inline, inherited]

Set the actual normaliser.

Definition at line 46 of file mipa_block_normaliser.h.

void mipa_ms_block_normaliser::set_nscales ( unsigned  n) [inline]

Definition at line 71 of file mipa_ms_block_normaliser.h.

void mipa_block_normaliser::set_region ( unsigned  ni,
unsigned  nj 
) [inline, inherited]

Definition at line 80 of file mipa_block_normaliser.h.


Member Data Documentation

Is there an overall histogram (over all cells) included at the end.

Definition at line 24 of file mipa_ms_block_normaliser.h.

unsigned mipa_block_normaliser::nA_ [protected, inherited]

Number of histogram bins per cell.

Definition at line 35 of file mipa_block_normaliser.h.

unsigned mipa_block_normaliser::nc_per_block_ [protected, inherited]

Number of cells per block.

Definition at line 32 of file mipa_block_normaliser.h.

unsigned mipa_block_normaliser::ni_region_ [protected, inherited]

Number of x cells in region.

Definition at line 27 of file mipa_block_normaliser.h.

unsigned mipa_block_normaliser::nj_region_ [protected, inherited]

Number of y cells in region.

Definition at line 29 of file mipa_block_normaliser.h.

Number of SIFT-like scales at which the histogram cells are combined.

Definition at line 21 of file mipa_ms_block_normaliser.h.


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