|
Darwin
1.10(beta)
|
Holds image, segments and other housekeeping information for an image. More...
Public Member Functions | |
| drwnNNGraphImageData (const string &name) | |
| construct from basename | |
| drwnNNGraphImageData (const cv::Mat &img, const drwnSuperpixelContainer &segments) | |
| construct from image (no labels or name) | |
| const string & | name () const |
| return the name of the image | |
| const cv::Mat & | image () const |
| return the image | |
| const MatrixXi & | labels () const |
| return the labels | |
| const drwnSuperpixelContainer & | segments () const |
| return the superpixel container | |
| drwnSuperpixelContainer & | segments () |
| return the superpixel container | |
| size_t | numSegments () const |
| return the number of superpixels | |
| size_t | height () const |
| return image height | |
| size_t | width () const |
| return image width | |
| unsigned | colour (unsigned segId) const |
| return average colour (as 24-bit unsigned) for a given superpixel | |
| cv::Scalar | rgbColour (unsigned segId) const |
| return average colour (as 8-bit rgb) for a given superpixle | |
| cv::Point | centroid (unsigned segId) const |
| return centroid for a given superpixel | |
| void | setLabels (const MatrixXi &labels) |
| set new labels for this image | |
| vector< VectorXd > | getSegmentLabelMarginals (int numLabels=-1) const |
| calculate segment label distributions | |
Static Public Attributes | |
| static string | imgDir |
| directory to prepend to instance basename for images | |
| static string | imgExt |
| extension to append to instance basename for images | |
| static string | lblDir |
| directory to prepend to instance basename for labels | |
| static string | lblExt |
| extension to append to instance basename for labels | |
| static string | segDir |
| directory to prepend to instance basename for segments | |
| static string | segExt |
| extension to append to instance basename for segments | |
Protected Member Functions | |
| void | cacheSegmentData () |
| cache segments and neighbourhood | |
Protected Attributes | |
| string | _name |
| basename for this image | |
| cv::Mat | _img |
| the RGB image | |
| MatrixXi | _labels |
| pixel labels | |
| drwnSuperpixelContainer | _segments |
| superpixel maps | |
| vector< unsigned > | _colours |
| cached 24-bit colour for visualization | |
| vector< cv::Point > | _centroids |
| superpixel centroids for visualization | |
Holds image, segments and other housekeeping information for an image.
1.8.13