29 #include "drwnPixelNeighbourContrasts.h"
30 #include "drwnSuperpixelContainer.h"
31 #include "drwnSegImagePixelFeatures.h"
35 using namespace Eigen;
80 inline const cv::Mat&
image()
const {
return _img; }
82 inline const cv::Mat&
greyImage()
const {
return _grayImg; }
84 inline const cv::Mat&
edgeMap()
const {
return _softEdgeImg; }
86 inline const string &
name()
const {
return _baseName; }
89 inline int width()
const {
return _img.cols; }
91 inline int height()
const {
return _img.rows; }
93 inline int size()
const {
return (_img.cols * _img.rows); }
99 inline int pixel2Indx(
int x,
int y)
const {
return y * _img.cols + x; }
102 return cv::Point(indx % _img.cols, indx / _img.cols);
106 void clearPixelFeatures();
110 appendPixelFeatures(g);
vector< vector< double > > unaries
cached unary potentials or pixel feature vectors
Definition: drwnSegImageInstance.h:56
vector< cv::Mat > auxiliaryData
auxiliary data for certain models (future extensions)
Definition: drwnSegImageInstance.h:64
int width() const
returns the width of the image in pixels
Definition: drwnSegImageInstance.h:89
Encapsulates a single instance of an image for multi-class pixel labeling problems (i...
Definition: drwnSegImageInstance.h:47
int pixel2Indx(int x, int y) const
convert from image coordinates to pixel index
Definition: drwnSegImageInstance.h:99
int height() const
returns the height of the image in pixels
Definition: drwnSegImageInstance.h:91
int pixel2Indx(const cv::Point &p) const
convert from image coordinates to pixel index
Definition: drwnSegImageInstance.h:97
int size() const
returns the number of pixels in the image
Definition: drwnSegImageInstance.h:93
Holds multiple oversegmentations for a given image.
Definition: drwnSuperpixelContainer.h:91
const cv::Mat & image() const
returns the colour image
Definition: drwnSegImageInstance.h:80
const cv::Mat & edgeMap() const
returns the edge magnitude of the image
Definition: drwnSegImageInstance.h:84
Interface for generating per-pixel features for a drwnSegImageInstance object.
Definition: drwnSegImagePixelFeatures.h:49
Convenience class for holding pixel contrast weights.
Definition: drwnPixelNeighbourContrasts.h:30
MatrixXi pixelLabels
pixel labels (0 to K-1) and -1 for unknown
Definition: drwnSegImageInstance.h:67
vector< drwnWeightedPixelEdge > auxEdges
auxiliary (long range) edges
Definition: drwnSegImageInstance.h:60
Standard per-pixel filterbank features with option to read auxiliary features from a file...
Definition: drwnSegImagePixelFeatures.h:83
drwnPixelNeighbourContrasts contrast
neighborhood contrast for pairwise smoothness
Definition: drwnSegImageInstance.h:57
void appendPixelFeatures()
append standard pixel features to cached pixel feature vectors
Definition: drwnSegImageInstance.h:108
drwnSuperpixelContainer superpixels
superpixels for features or consistency terms
Definition: drwnSegImageInstance.h:63
const cv::Mat & greyImage() const
returns a greyscale version of the image
Definition: drwnSegImageInstance.h:82
string _baseName
image identifier
Definition: drwnSegImageInstance.h:49
cv::Mat _grayImg
1-channel greyscale image of the scene
Definition: drwnSegImageInstance.h:51
cv::Mat _img
3-channel RGB image of the scene
Definition: drwnSegImageInstance.h:50
const string & name() const
returns the name of the image (if available)
Definition: drwnSegImageInstance.h:86
cv::Mat _softEdgeImg
1-channel edgemap image of the scene
Definition: drwnSegImageInstance.h:52
Computer vision utility functions (not dependent on OpenCV functions, but may use OpenCV data structu...
cv::Point indx2Pixel(int indx) const
convert from pixel index to image coordinates
Definition: drwnSegImageInstance.h:101