Public Member Functions | Private Member Functions | Private Attributes | Friends
pano::MoleculeGlob Class Reference

#include <MoleculeProcessor.h>

Inheritance diagram for pano::MoleculeGlob:
Inheritance graph
[legend]

List of all members.

Public Member Functions

cv::Ptr< ImageAtomaddAtomToGlob (cv::Ptr< ModelFitter > fitter, const ImageAtom &atom)
void addMolecule (cv::Ptr< ImageMolecule > molecule)
void addPrefittedPairs (const std::list< AtomPair > &pairs, cv::Ptr< ImageAtom > atom=cv::Ptr< ImageAtom >())
 attach pairs to a MoleculeGlobber
void addPrefittedPairs (const std::vector< AtomPair > &pairs, cv::Ptr< ImageAtom > atom=cv::Ptr< ImageAtom >())
 attach pairs to a MoleculeGlobber
void batchFindAndSetTrinsics ()
virtual void deserialize (const cv::FileNode &fn)
cv::Ptr< ImageMoleculegetBiggestMolecule () const
 Returns the Molecule with the most Atoms This function searchs the set of molecules associated with this glob, and returns the one that contains the most atoms.
Globber getGlobber (cv::Ptr< ModelFitter > fitter)
cv::Ptr< ImageMoleculegetMerged () const
const std::set< cv::Ptr
< ImageMolecule > > & 
getMolecules () const
std::set< cv::Ptr
< ImageMolecule > > & 
getMolecules ()
cv::Ptr< ImageAtomminDistAtom (const ImageAtom &atom) const
float minDistToAtom (const ImageAtom &atom) const
 MoleculeGlob ()
void overideDirectory (std::string directory)
cv::Ptr< ImageAtomqueryAtomToGlob (cv::Ptr< ModelFitter > fitter, const ImageAtom &atom, std::list< AtomPair > &pairs, bool clone=true)
void reset ()
 This will remove all the molecules from the glob.
virtual void serialize (cv::FileStorage &fs) const
void setMatcher (cv::Ptr< cv::DescriptorMatcher > matcher)
void truncateMolecules (cv::Ptr< ImageMolecule > mol_in=cv::Ptr< ImageMolecule >())
 given a pointer to a molecule - this deletes all other molecules from the Glob and keeps only the given molecule
virtual int version () const

Private Member Functions

void addAtomDescriptors (cv::Ptr< ImageAtom > atom)
void generateMasks (const ImageAtom &atom, std::vector< cv::Mat > &masks) const

Private Attributes

std::vector< cv::Mat > all_descriptions_
std::map< int, int > atom_uids_idxs_
std::vector< cv::Ptr< ImageAtom > > atoms_
cv::Ptr< cv::DescriptorMatcher > matcher_
std::set< cv::Ptr
< ImageMolecule > > 
molecules
int uid_count_

Friends

struct PairGlobber

Detailed Description

A collection of Molecules that are easy to add atoms too and handles matching and merging of multiple molecules

Definition at line 110 of file MoleculeProcessor.h.


Constructor & Destructor Documentation

Definition at line 191 of file MoleculeProcessor.cpp.


Member Function Documentation

void pano::MoleculeGlob::addAtomDescriptors ( cv::Ptr< ImageAtom atom) [private]

Definition at line 392 of file MoleculeProcessor.cpp.

Ptr< ImageAtom > pano::MoleculeGlob::addAtomToGlob ( cv::Ptr< ModelFitter fitter,
const ImageAtom atom 
)

This adds the atom to the glob given the fitter, internally this calls MoleculeProcessor::queryWithAtom and only adds it to a molecule if the fitter result is "good" if the result is bad then this creates a new molecule in the glob - containing the unmatched atom.

Definition at line 429 of file MoleculeProcessor.cpp.

void pano::MoleculeGlob::addMolecule ( cv::Ptr< ImageMolecule molecule) [inline]

Definition at line 185 of file MoleculeProcessor.h.

void pano::MoleculeGlob::addPrefittedPairs ( const std::list< AtomPair > &  pairs,
cv::Ptr< ImageAtom atom = cv::Ptr<ImageAtom>() 
)

attach pairs to a MoleculeGlobber

Definition at line 520 of file MoleculeProcessor.cpp.

void pano::MoleculeGlob::addPrefittedPairs ( const std::vector< AtomPair > &  pairs,
cv::Ptr< ImageAtom atom = cv::Ptr<ImageAtom>() 
)

attach pairs to a MoleculeGlobber

Definition at line 526 of file MoleculeProcessor.cpp.

Definition at line 624 of file MoleculeProcessor.cpp.

void pano::MoleculeGlob::deserialize ( const cv::FileNode &  fn) [virtual]

Implements pano::serializable.

Definition at line 638 of file MoleculeProcessor.cpp.

void pano::MoleculeGlob::generateMasks ( const ImageAtom atom,
std::vector< cv::Mat > &  masks 
) const [private]

Definition at line 419 of file MoleculeProcessor.cpp.

Returns the Molecule with the most Atoms This function searchs the set of molecules associated with this glob, and returns the one that contains the most atoms.

this is meaningful because Molecules produced with MoleculeGlob are guarenteed to only have atoms that are interconnected.

Definition at line 532 of file MoleculeProcessor.cpp.

Globber pano::MoleculeGlob::getGlobber ( cv::Ptr< ModelFitter fitter) [inline]

convience function for greating a Globber functor that is assocatiated with this MoleculeGlob MoleculeGlob glob; for_each(atoms.begin(),atoms.end(),glob.getGlobber(fitter));

the Globber is used to add atoms to the MoleculeGlob basically calls addAtomToGlob for each atom passed to the Globber operator() function.

Definition at line 146 of file MoleculeProcessor.h.

Definition at line 561 of file MoleculeProcessor.cpp.

const std::set<cv::Ptr<ImageMolecule> >& pano::MoleculeGlob::getMolecules ( ) const [inline]

this returns the set of ImageMolecules upon which this glob is based.

Definition at line 192 of file MoleculeProcessor.h.

Definition at line 199 of file MoleculeProcessor.h.

cv::Ptr< ImageAtom > pano::MoleculeGlob::minDistAtom ( const ImageAtom atom) const

get glob atom that is closest to the input atom

Definition at line 204 of file MoleculeProcessor.cpp.

float pano::MoleculeGlob::minDistToAtom ( const ImageAtom atom) const

Definition at line 196 of file MoleculeProcessor.cpp.

void pano::MoleculeGlob::overideDirectory ( std::string  directory)

Definition at line 654 of file MoleculeProcessor.cpp.

Ptr< ImageAtom > pano::MoleculeGlob::queryAtomToGlob ( cv::Ptr< ModelFitter fitter,
const ImageAtom atom,
std::list< AtomPair > &  pairs,
bool  clone = true 
)

see if atom fits the glob

Definition at line 346 of file MoleculeProcessor.cpp.

void pano::MoleculeGlob::reset ( ) [inline]

This will remove all the molecules from the glob.

Definition at line 180 of file MoleculeProcessor.h.

void pano::MoleculeGlob::serialize ( cv::FileStorage &  fs) const [virtual]

Implements pano::serializable.

Definition at line 629 of file MoleculeProcessor.cpp.

void pano::MoleculeGlob::setMatcher ( cv::Ptr< cv::DescriptorMatcher >  matcher)

Definition at line 414 of file MoleculeProcessor.cpp.

void pano::MoleculeGlob::truncateMolecules ( cv::Ptr< ImageMolecule mol_in = cv::Ptr<ImageMolecule>())

given a pointer to a molecule - this deletes all other molecules from the Glob and keeps only the given molecule

Parameters:
mol_inis an optional pointer to the ImageMolecule to keep, the default value - NULL - will truncate all but the largest ImageMolecule - given by getBiggestMolecule()

Definition at line 551 of file MoleculeProcessor.cpp.

virtual int pano::MoleculeGlob::version ( ) const [inline, virtual]

Implements pano::serializable.

Definition at line 211 of file MoleculeProcessor.h.


Friends And Related Function Documentation

friend struct PairGlobber [friend]

Definition at line 227 of file MoleculeProcessor.h.


Member Data Documentation

std::vector<cv::Mat> pano::MoleculeGlob::all_descriptions_ [private]

Definition at line 231 of file MoleculeProcessor.h.

std::map<int,int> pano::MoleculeGlob::atom_uids_idxs_ [private]

Definition at line 230 of file MoleculeProcessor.h.

std::vector<cv::Ptr<ImageAtom> > pano::MoleculeGlob::atoms_ [private]

Definition at line 229 of file MoleculeProcessor.h.

cv::Ptr<cv::DescriptorMatcher> pano::MoleculeGlob::matcher_ [private]

Definition at line 232 of file MoleculeProcessor.h.

MoleculeGlob holds all the molecules by cv::Ptr in a set.

Definition at line 225 of file MoleculeProcessor.h.

Definition at line 226 of file MoleculeProcessor.h.


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


pano_core
Author(s): Ethan Rublee
autogenerated on Mon Oct 6 2014 08:04:39