Fortgeschrittenenpraktikum
Public Member Functions | Private Attributes | List of all members
Image Class Reference

Class representing png image. More...

#include <image.h>

Public Member Functions

 Image (std::string filename, int n)
 
Graph graph ()
 Creates a Boost graph consisting of the generated superpixels The number of adjacent pixels between superpixels is stored as edge weight.
 
void writeSegments (std::vector< Graph::vertex_descriptor > master_nodes, std::vector< std::vector< Graph::vertex_descriptor >> segments, Graph &g)
 
uint32_t pixelToSuperpixel (uint32_t x, uint32_t y)
 

Private Attributes

unsigned int width
 
unsigned int height
 
unsigned int superpixelcount
 
uint32_t * segmentation
 
std::vector< double > avgcolor
 
std::string filename
 

Detailed Description

Class representing png image.

Constructor & Destructor Documentation

Image::Image ( std::string  filename,
int  n 
)
Parameters
filenamePNG image to read
ndesired number of superpixels

Member Function Documentation

void Image::writeSegments ( std::vector< Graph::vertex_descriptor >  master_nodes,
std::vector< std::vector< Graph::vertex_descriptor >>  segments,
Graph &  g 
)
Parameters
master_nodesmaster nodes of all segments
segmentsoptimal segmentation, where each segment is a vector consisting of the superpixels contained in it
gthe graph of superpixels

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