vocabtree  0.0.1
image.hpp
Go to the documentation of this file.
1 #pragma once
2 
3 #include <string>
4 #include <stdint.h>
5 #include <opencv2/opencv.hpp>
6 
7 /// Abstract class representing an image. Implementing classes must provide a way to
8 /// load images and construct image paths for loading features. See tests and benchmarks
9 /// for example implementations of Image.
10 class Image {
11 public:
12  Image(uint64_t image_id);
13 
14  uint64_t id; /// All images are assigned a unique id in the dataset.
15 
16  virtual ~Image();
17 
18  /// Returns the corresponding feature path given a feature name (ex. "sift").
19  virtual std::string feature_path(const std::string &feat_name) const = 0;
20 
21  /// Returns the image location relative to the database data directory.
22  virtual std::string location() const = 0;
23 
24 private:
25 
26 };