-
Notifications
You must be signed in to change notification settings - Fork 285
/
cudaSiftD.h
58 lines (42 loc) · 1.56 KB
/
cudaSiftD.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
51
52
53
54
55
56
57
58
//********************************************************//
// CUDA SIFT extractor by Marten Bjorkman aka Celebrandil //
//********************************************************//
#ifndef CUDASIFTD_H
#define CUDASIFTD_H
#define NUM_SCALES 5
// Scale down thread block width
#define SCALEDOWN_W 64 // 60
// Scale down thread block height
#define SCALEDOWN_H 16 // 8
// Scale up thread block width
#define SCALEUP_W 64
// Scale up thread block height
#define SCALEUP_H 8
// Find point thread block width
#define MINMAX_W 30 //32
// Find point thread block height
#define MINMAX_H 8 //16
// Laplace thread block width
#define LAPLACE_W 128 // 56
// Laplace rows per thread
#define LAPLACE_H 4
// Number of laplace scales
#define LAPLACE_S (NUM_SCALES+3)
// Laplace filter kernel radius
#define LAPLACE_R 4
#define LOWPASS_W 24 //56
#define LOWPASS_H 32 //16
#define LOWPASS_R 4
//====================== Number of threads ====================//
// ScaleDown: SCALEDOWN_W + 4
// LaplaceMulti: (LAPLACE_W+2*LAPLACE_R)*LAPLACE_S
// FindPointsMulti: MINMAX_W + 2
// ComputeOrientations: 128
// ExtractSiftDescriptors: 256
//====================== Number of blocks ====================//
// ScaleDown: (width/SCALEDOWN_W) * (height/SCALEDOWN_H)
// LaplceMulti: (width+2*LAPLACE_R)/LAPLACE_W * height
// FindPointsMulti: (width/MINMAX_W)*NUM_SCALES * (height/MINMAX_H)
// ComputeOrientations: numpts
// ExtractSiftDescriptors: numpts
#endif