Darwin  1.10(beta)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | List of all members
drwnNNGraphImage Class Reference

Holds nodes (superpixels) for a single image. More...

Inheritance diagram for drwnNNGraphImage:
drwnPersistentRecord

Public Member Functions

 drwnNNGraphImage ()
 default constructor
 
 drwnNNGraphImage (const string &name, unsigned n=0)
 constructor with n nodes
 
 drwnNNGraphImage (const drwnNNGraphImageData &image)
 constructor from image data
 
 ~drwnNNGraphImage ()
 destructor
 
const string & name () const
 return the name of the image
 
size_t numNodes () const
 return the number of nodes (superpixels)
 
void clearNodes ()
 clear all nodes (including features and labels) and out-going edges
 
void clearEdges ()
 clears all out-going edges (matches) for this image
 
void initialize (const string &name, unsigned n=0)
 initialize number of nodes (no features or labels)
 
virtual void initialize (const drwnNNGraphImageData &image)
 initialize nodes with features and labels from image data
 
void transformNodeFeatures (const drwnFeatureTransform &xform)
 arbitrary feature transformation
 
void appendNodeFeatures (const drwnNNGraphImageData &image, const cv::Mat &features)
 append node features derived from pixel features
 
void appendNodeFeatures (const drwnNNGraphImageData &image, const vector< cv::Mat > &features)
 append a set of node features derived from pixel features
 
size_t numBytesOnDisk () const
 number of bytes needed on disk
 
bool read (istream &is)
 read from a stream (deserialization)
 
bool write (ostream &os) const
 write to a stream (serialization)
 
drwnNNGraphImage clone (bool bWithFeatures=true) const
 clone the image (with or without node features)
 
const drwnNNGraphNodeoperator[] (unsigned segId) const
 returns const reference to the node for superpixel segId
 
drwnNNGraphNodeoperator[] (unsigned segId)
 returns reference to the node for superpixel segId
 

Public Attributes

bool bSourceMatchable
 Include this image during update (initialize, propagate, local, search, and enrichment). If false the outgoing edges from all nodes in this image are fixed.
 
bool bTargetMatchable
 Allow other image to match to this one. If false no new edges will be created that end at any node in this image (but existing incoming edges may be removed). During updates this has the effect of putting this image in the same equivalence class as all any other image.
 
int32_t eqvClass
 Equivalence class for this image. If negative (which is the default) the image is considered to be in its own equivalence class. Images in the same equivalence class will not be matched when learning the superpixel graph.
 

Protected Member Functions

virtual void cacheNodeNeighbourhoods (const drwnNNGraphImageData &image)
 cache the spatial neighbours for each node
 
virtual void cacheNodeFeatures (const drwnNNGraphImageData &image)
 cache (standard) node features
 
virtual void cacheNodeLabels (const drwnNNGraphImageData &image)
 cache node labels
 

Protected Attributes

string _name
 basename for this image
 
vector< drwnNNGraphNode_nodes
 nodes associated with this image
 

Detailed Description

Holds nodes (superpixels) for a single image.


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