Fortgeschrittenenpraktikum
image.h
1 #ifndef IMAGE_H
2 #define IMAGE_H
3 
7 class Image {
8 public:
9  Image(
10  std::string filename,
11  int n
12  );
13 
18  Graph graph();
19 
20  /*
21  * Writes segements into segments.png
22  */
23  void writeSegments(
24  std::vector<Graph::vertex_descriptor> master_nodes,
25  std::vector<std::vector<Graph::vertex_descriptor>> segments,
26  Graph& g
27  );
28 
29  uint32_t pixelToSuperpixel(uint32_t x, uint32_t y);
30 
31 private:
32  unsigned int width;
33  unsigned int height;
34  unsigned int superpixelcount;
35  uint32_t* segmentation;
36  std::vector<double> avgcolor;
37  std::string filename;
38 };
39 
40 #endif
Graph graph()
Creates a Boost graph consisting of the generated superpixels The number of adjacent pixels between s...
Definition: image.cpp:97
void writeSegments(std::vector< Graph::vertex_descriptor > master_nodes, std::vector< std::vector< Graph::vertex_descriptor >> segments, Graph &g)
Definition: image.cpp:144
Image(std::string filename, int n)
Definition: image.cpp:9
Class representing png image.
Definition: image.h:7