-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcompute_asift_matches.h
79 lines (70 loc) · 2.88 KB
/
compute_asift_matches.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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
// Copyright (c) 2008-2011, Guoshen Yu <[email protected]>
// Copyright (c) 2008-2011, Jean-Michel Morel <[email protected]>
//
// WARNING:
// This file implements an algorithm possibly linked to the patent
//
// Jean-Michel Morel and Guoshen Yu, Method and device for the invariant
// affine recognition recognition of shapes (WO/2009/150361), patent pending.
//
// This file is made available for the exclusive aim of serving as
// scientific tool to verify of the soundness and
// completeness of the algorithm description. Compilation,
// execution and redistribution of this file may violate exclusive
// patents rights in certain countries.
// The situation being different for every country and changing
// over time, it is your responsibility to determine which patent
// rights restrictions apply to you before you compile, use,
// modify, or redistribute this file. A patent lawyer is qualified
// to make this determination.
// If and only if they don't conflict with any patent terms, you
// can benefit from the following license terms attached to this
// file.
//
// This program is provided for scientific and educational only:
// you can use and/or modify it for these purposes, but you are
// not allowed to redistribute this work or derivative works in
// source or executable form. A license must be obtained from the
// patent right holders for any other use.
//
//
//*------------------------ compute_asift_matches-- -------------------------*/
// Match the ASIFT keypoints.
//
// Please report bugs and/or send comments to Guoshen Yu [email protected]
//
// Reference: J.M. Morel and G.Yu, ASIFT: A New Framework for Fully Affine Invariant Image
// Comparison, SIAM Journal on Imaging Sciences, vol. 2, issue 2, pp. 438-469, 2009.
// Reference: ASIFT online demo (You can try ASIFT with your own images online.)
// http://www.ipol.im/pub/algo/my_affine_sift/
/*---------------------------------------------------------------------------*/
#include "library.h"
#include "demo_lib_sift.h"
#include "frot.h"
#include "fproj.h"
#include <vector>
#include <sys/types.h>
#include <dirent.h>
using namespace std;
int compute_asift_matches(int num_of_tilts1,
int num_of_tilts2,
int w1,
int h1,
int w2,
int h2,
int verb,
vector< vector< keypointslist > >& keys1,
vector< vector< keypointslist > >& keys2,
matchingslist &matchings,
siftPar &siftparameters,
const int min_matching);
void write_keypoints(const char* filename,
int num_keys,
vector< vector< keypointslist > >& keys,
float zoom);
void read_keypoints(const char* filename,
vector< vector< keypointslist > >& keys,
float& zoom);
void get_dir_content(char* path, std::vector<std::string>& fileNames,
bool goDown = true);
void make_keys_all_vector(int num_tilt, vector< vector< keypointslist > >& keys_all);