-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathLcBasic.h
50 lines (32 loc) · 938 Bytes
/
LcBasic.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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#ifndef Define_LcBasic
#define Define_LcBasic
#include <cstdio>
#include <cstdlib>
#include <iostream>
#include <cstring>
#include <opencv2/opencv.hpp>
#include <opencv2/flann/config.h>
#include <opencv2/legacy/legacy.hpp> // EM
#include <opencv2/contrib/contrib.hpp> // colormap
#include <opencv2/nonfree/nonfree.hpp> // SIFT
#include <algorithm>
using namespace std;
using namespace cv;
namespace lc
{
void LcMat2Bin( const char * file_name, Mat & src);
void LcBin2Mat( const char * file_name, Mat & ans);
class LcSortElement
{
public:
float element;
int id;
LcSortElement(){;}
//static bool compare( LcSortElement & a, LcSortElement & b);
};
bool LcSortcompare( const LcSortElement & a, const LcSortElement & b);
void argsort( vector<float> & data, vector<int> & id);
void swapMatrix( Mat & src, Mat & dst);
void swapMatrix( Mat & src, Mat & dst, Mat & src_lab, Mat & dst_lab);
};
#endif