30 lines
593 B
C++
30 lines
593 B
C++
#ifndef CMD_MANAGER
|
|
#define CMD_MANAGER
|
|
|
|
using namespace std;
|
|
|
|
#include <iostream>
|
|
#include <opencv2/opencv.hpp>
|
|
#include <sys/stat.h>
|
|
#include <string>
|
|
#include <vector>
|
|
#include <algorithm>
|
|
|
|
class Cmd {
|
|
public:
|
|
string get_input(int &argc, string argstr);
|
|
|
|
private:
|
|
std::vector<std::string> supportedExt = {
|
|
"jpg", "JPG",
|
|
"jpeg", "JPEG",
|
|
"png", "PNG",
|
|
"tif", "TIF",
|
|
"tiff", "tiff"
|
|
};
|
|
bool in_array(const std::string &value, const std::vector<std::string> &array);
|
|
bool file_exists (const std::string& name);
|
|
bool is_image (const std::string& name);
|
|
};
|
|
|
|
#endif |