ImGraph
 All Classes Functions Variables Enumerations Pages
Convertor.h
1 #ifndef _MY_CONVERTOR_HEADER_
2 #define _MY_CONVERTOR_HEADER_
3 
4 #ifdef _WIN32
5 #pragma warning(push)
6 #pragma warning(disable:4996 4251 4275 4800)
7 #endif
8 
9 #include <opencv2/core.hpp>
10 
11 #ifdef _WIN32
12 #pragma warning(pop)
13 #endif
14 
15 #include "blocks/ParamValue.h"
16 
17 namespace charliesoft
18 {
19  namespace MatrixConvertor
20  {
21  cv::Mat convert(cv::Mat src, int outputType);
22  cv::Mat adjustChannels(cv::Mat src, int nbChannels, bool duplicate = true);
23  std::string printElem(cv::Mat src, int x, int y, int channel = 0);
24  double getElem(cv::Mat src, int x, int y, int channel);
25  };
26  namespace StringConvertor
27  {
28  std::string regExExpend(std::string input, std::initializer_list<ParamValue*> list = {});
29  std::string regExExpend(std::string input, std::vector<ParamValue*> list = {},
30  std::map<std::string, ParamValue*> valuesToMatch = std::map<std::string, ParamValue*>());
31  };
32 }
33 
34 #endif