Making mosaic images with ffmpeg
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

39 lines
845 B

#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;
}
}