-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathImgStore.h
31 lines (23 loc) · 830 Bytes
/
ImgStore.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#ifndef IMGSTORE_H
#define IMGSTORE_H
#include "opencv2/core/core.hpp"
#include <unordered_map>
#include <string>
#include <QPair>
#include "QTCV.h"
class ImgStore{
private:
std::unordered_map<std::string, QPair<cv::Mat,cv::Mat>> _imgStore;
ImgStore();
public:
cv::Mat& getImage(const std::string& imageName);
void addImage(const std::string& imageName, const cv::Mat& img);
cv::Mat& getOriginalImage(const std::string& imageName);
void updateImage(const std::string& imageName, const cv::Mat& img);
bool check_Key(const std::string& imageName);
void deleteImage(const std::string& imageName);
ImgStore(ImgStore const &) = delete;
ImgStore& operator=(ImgStore const &) = delete;
static ImgStore& get();
};
#endif //IMGSTORE_H