Main Page   Namespace List   Class Hierarchy   Compound List   File List   Compound Members   File Members   Related Pages  

BestBlocks Class Reference

#include <bestblocks.h>

Inheritance diagram for BestBlocks:

BestBlocks2 BestBlocks3 List of all members.

Detailed Description

Helper class for assigning best (largest) block to each picture and track when constructing a new StitchGraph. The blocks that win out are then actually inserted as vertices into the graph.


Public Methods

 BestBlocks (const std::vector< PointGraph * > &columns, std::vector< Picture * > &pictures, int startRow)
void terminateBlocks (std::vector< BlockInfo > &activeBlocks, const int newRow)
void generate ()
virtual void insert (BlockInfo &b)
void createVertices (StitchGraph &result, bool doVerify)
 Only call this function. All others are subroutines.


Static Public Methods

void selfTest ()

Public Attributes

const std::vector< PointGraph * > & columns
std::vector< Picture * > & pictures
fl::Matrix< bool > pointview
fl::Vector< int > startCount
fl::Vector< int > stopCount
std::set< BlockInfoblocks
std::vector< std::set< BlockInfo
>::iterator > 
rowBlocks
std::vector< std::set< BlockInfo
>::iterator > 
columnBlocks

Static Public Attributes

int minViews = 4
bool trace = false


Constructor & Destructor Documentation

BestBlocks::BestBlocks const std::vector< PointGraph * > &    columns,
std::vector< Picture * > &    pictures,
int    startRow
 

Step 1 -- Collect counts of tracks for each start and stop position and build pointview matrix.


Member Function Documentation

void BestBlocks::createVertices StitchGraph   result,
bool    doVerify
 

Only call this function. All others are subroutines.

Reimplemented in BestBlocks2.

void BestBlocks::generate  
 

Step 2 -- Scan start and stop information, delineating blocks as we go.

void BestBlocks::insert BlockInfo   b [virtual]
 

Adds the given block to the list of blocks that will be turned into StitchVertex entries, but only if the block carries needed iformation.

This function works in two stages. The first calculates how necessary the block is, and the second stage actually inserts the block (if needed), updating accounting information in the process.

We judge a block based on two criteria. One is whether the block is needed to cover an otherwise uncovered row or column (ie: frame or track). Included in this criterion is covering a row or column with the largest possible block. The other criterion is whether the block can cover more rows or columns than another block that is already deployed.

Reimplemented in BestBlocks3.

void BestBlocks::selfTest   [static]
 

Creates a simple blocking problem and runs this class against it. Can be called from main().

This function should be deleted once the blocking code is completely stable.

void BestBlocks::terminateBlocks std::vector< BlockInfo > &    activeBlocks,
const int    newRow
 


Member Data Documentation

std::set<BlockInfo> BestBlocks::blocks
 

std::vector<std::set<BlockInfo>::iterator> BestBlocks::columnBlocks
 

const std::vector<PointGraph *>& BestBlocks::columns
 

int BestBlocks::minViews = 4 [static]
 

std::vector<Picture *>& BestBlocks::pictures
 

fl::Matrix<bool> BestBlocks::pointview
 

std::vector<std::set<BlockInfo>::iterator> BestBlocks::rowBlocks
 

fl::Vector<int> BestBlocks::startCount
 

fl::Vector<int> BestBlocks::stopCount
 

bool BestBlocks::trace = false [static]
 


The documentation for this class was generated from the following files:
Generated on Fri Dec 17 10:13:09 2004 for 3d by doxygen1.2.18