-
Notifications
You must be signed in to change notification settings - Fork 3
/
desccm.h
49 lines (38 loc) · 1.21 KB
/
desccm.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
#ifndef DESCCM_H
#define DESCCM_H
#include "abstractdescriptor.h"
#include "cimage.h"
/******************************
* Color Moment is used as local descriptor for keypoint
* After several runs of experiment, it simply does not work
* I just keep it here. Should not be used, it is highly indistinctive
*
******************************/
class DescCM : public AbstractDescriptor
{
private:
static const int CM_NUM;
static const int PatchSize;
float *CMfeats;
float *block;
float *descPatch; //3 channels
int bl_size;
int desc_patch_size;
public:
DescCM(DESC desc);
virtual ~DescCM();
public:
//bool setupImage(CImage *srcImg);
bool reShape();
bool reShape(const int channel,const int width,const int height);
int buildDescriptor(const int kpnum,vector<KeyPoint*> &kps,const char *descfn,const float resize_rate);
int buildPatchView(const int kpnum,vector<KeyPoint*> &kps,const char *descfn,const float resize_rate)
{
return 1;
}
void getLocalColorMoment(const float *patch);
void getLocalColorMoment(CImage *myimg,const int height,const int width);
void RGB2LUV(const float RGB[],float LUV[]);
static void test();
};
#endif // DESCCM_H