Joshua Moerman
10 years ago
2 changed files with 50 additions and 7 deletions
@ -0,0 +1,39 @@ |
|||
#include <fingerprints.hpp> |
|||
#include <read_database.hpp> |
|||
#include <utilities.hpp> |
|||
|
|||
extern "C" { |
|||
#include <libavformat/avformat.h> |
|||
} |
|||
|
|||
#include <iostream> |
|||
|
|||
using namespace std; |
|||
|
|||
template <typename Metric> |
|||
void generate(const string & database_directory) { |
|||
auto const db = read_database<Metric>(database_directory); |
|||
cout << colors::green("Read database: ") << db.size() << endl; |
|||
} |
|||
|
|||
int main(int argc, char * argv[]) { |
|||
if (argc != 3) { |
|||
cerr << "usage: main <dir> <type>\n"; |
|||
return 1; |
|||
} |
|||
|
|||
av_register_all(); |
|||
av_log_set_level(AV_LOG_QUIET); |
|||
|
|||
string const database_directory = argv[1]; |
|||
string const type = argv[2]; |
|||
|
|||
if (type == "rgb") { |
|||
generate<fingerprints::rgb>(database_directory); |
|||
} else if (type == "wvlt_rgb") { |
|||
generate<fingerprints::wvlt_rgb>(database_directory); |
|||
} else { |
|||
cerr << "No known type given\n"; |
|||
return 1; |
|||
} |
|||
} |
Loading…
Reference in new issue