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
drwnSegImageInstance Class Reference

Encapsulates a single instance of an image for multi-class pixel labeling problems (i.e., image segmentation). More...

Public Member Functions

 drwnSegImageInstance (const char *imgFilename, const char *baseName=NULL)
 create a drwnSegImageInstance from file
 
 drwnSegImageInstance (const cv::Mat &img, const char *baseName=NULL)
 create an existing image
 
 drwnSegImageInstance (const drwnSegImageInstance &instance)
 copy constructor
 
virtual ~drwnSegImageInstance ()
 destructor
 
const cv::Mat & image () const
 returns the colour image
 
const cv::Mat & greyImage () const
 returns a greyscale version of the image
 
const cv::Mat & edgeMap () const
 returns the edge magnitude of the image
 
const string & name () const
 returns the name of the image (if available)
 
int width () const
 returns the width of the image in pixels
 
int height () const
 returns the height of the image in pixels
 
int size () const
 returns the number of pixels in the image
 
int pixel2Indx (const cv::Point &p) const
 convert from image coordinates to pixel index
 
int pixel2Indx (int x, int y) const
 convert from image coordinates to pixel index
 
cv::Point indx2Pixel (int indx) const
 convert from pixel index to image coordinates
 
void clearPixelFeatures ()
 clear cached pixel features or unary terms
 
void appendPixelFeatures ()
 append standard pixel features to cached pixel feature vectors
 
void appendPixelFeatures (drwnSegImagePixelFeatures &featureGenerator)
 append pixel features to cached pixel feature vectors
 
drwnSegImageInstanceoperator= (const drwnSegImageInstance &instance)
 assignment operator
 

Public Attributes

vector< vector< double > > unaries
 cached unary potentials or pixel feature vectors
 
drwnPixelNeighbourContrasts contrast
 neighborhood contrast for pairwise smoothness
 
vector< drwnWeightedPixelEdgeauxEdges
 auxiliary (long range) edges
 
drwnSuperpixelContainer superpixels
 superpixels for features or consistency terms
 
vector< cv::Mat > auxiliaryData
 auxiliary data for certain models (future extensions)
 
MatrixXi pixelLabels
 pixel labels (0 to K-1) and -1 for unknown
 

Protected Member Functions

void initInstance ()
 initialization
 

Protected Attributes

string _baseName
 image identifier
 
cv::Mat _img
 3-channel RGB image of the scene
 
cv::Mat _grayImg
 1-channel greyscale image of the scene
 
cv::Mat _softEdgeImg
 1-channel edgemap image of the scene
 

Detailed Description

Encapsulates a single instance of an image for multi-class pixel labeling problems (i.e., image segmentation).

The data-structure includes basic image features and can be annotated with pixelwise class labels. Negative labels are assumed to be unknown.

See Also
drwnPixelSegModel
Multi-class Image Segmentation

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