forked from Celebrandil/CudaSift
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathcudaSift.h
More file actions
38 lines (33 loc) · 1.11 KB
/
cudaSift.h
File metadata and controls
38 lines (33 loc) · 1.11 KB
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
#ifndef CUDASIFT_H
#define CUDASIFT_H
#include "cudaImage.h"
typedef struct {
float xpos;
float ypos;
float scale;
float sharpness;
float edgeness;
float orientation;
float score;
float ambiguity;
int match;
float match_xpos;
float match_ypos;
float match_error;
float empty[4];
float data[128];
} SiftPoint;
typedef struct {
int numPts; // Number of available Sift points
int maxPts; // Number of allocated Sift points
SiftPoint *h_data; // Host (CPU) data
SiftPoint *d_data; // Device (GPU) data
} SiftData;
void InitCuda();
void ExtractSift(SiftData &siftData, CudaImage &img, int numOctaves, double initBlur, float thresh, float lowestScale = 0.0f, float subsampling = 1.0f);
void InitSiftData(SiftData &data, int num = 1024, bool host = false, bool dev = true);
void FreeSiftData(SiftData &data);
void PrintSiftData(SiftData &data);
double MatchSiftData(SiftData &data1, SiftData &data2);
double FindHomography(SiftData &data, float *homography, int *numMatches, int numLoops = 1000, float minScore = 0.85f, float maxAmbiguity = 0.95f, float thresh = 5.0f);
#endif