void AR_sports::load(const string &path, int number) { if (number!=0) { return; } loadDataset(path); }
void OR_mnistImp::load(const string &path) { loadDataset(path); }
void HPE_parseImp::load(const string &path) { loadDataset(path); }
void PD_caltechImp::load(const string &path) { loadDataset(path); }
void IS_weizmannImp::load(const string &path) { loadDataset(path); }
void TR_svtImp::load(const string &path) { loadDataset(path); }
void MSM_middleburyImp::load(const string &path) { loadDataset(path); }
void MultipleDatasetComparisonSecondExperiment::runExperiment(std::string outputDir) { // Set up the image filters DownsampleFilter dsf(64, 64); // Dataset images are in a 1:1 ratio. GreyscaleFilter gf; std::list<ImageFilterInterface*> filters; filters.push_back(&dsf); filters.push_back(&gf); // Load the reference dataset std::unique_ptr<CachedDataset> referenceDataset = loadDataset( MultipleDatasetComparisonSecondExperiment::TIME_OF_DAY_NOON, MultipleDatasetComparisonSecondExperiment::PASS_BASELINE, filters); std::cout << "Loaded reference dataset... (" << referenceDataset->count() << " images)" << std::endl; // Set up the place recognition object, salience mask generator, and output image PlaceRecognition placerecog; SumOfAbsoluteDifferencesMatcher sadMatcher; cv::Mat diagonalMatrix; float performance; // Create a RapidJson document to write the results into. rapidjson::Document results(rapidjson::kObjectType); // Set some standard criteria for considering two images to have a 'similar' location SimilarityCriteria similarityCriteria(300.0); // For each test time of day, for each pass through, measure the performance // This will match the reference set against itself for (int timeOfDay = MultipleDatasetComparisonSecondExperiment::TIME_OF_DAY_DAWN; timeOfDay <= MultipleDatasetComparisonSecondExperiment::TIME_OF_DAY_SUNSET; ++timeOfDay) { std::string timeOfDayString = getTimeOfDayString(timeOfDay); rapidjson::Value nestedResults(rapidjson::kObjectType); for (int pass = MultipleDatasetComparisonSecondExperiment::PASS_FIRST; pass <= MultipleDatasetComparisonSecondExperiment::PASS_LAST; ++pass) { std::string passString = getPassString(pass); std::unique_ptr<CachedDataset> queryDataset = loadDataset(timeOfDay, pass, filters); std::cout << "Loaded test dataset \"" << timeOfDayString << "\" subset \"" << passString << "\" (" << queryDataset->count() << " images)" << std::endl; performance = placerecog.generateDiagonalMatrix(*referenceDataset, *queryDataset, sadMatcher, similarityCriteria, diagonalMatrix); writeFloatImage(outputDir + "\\diagonal matrix " + timeOfDayString + " " + passString + ".png", diagonalMatrix); std::cout << "Matching accuracy for " << timeOfDayString << " " << passString << ": " << (performance * 100) << "%" << std::endl; nestedResults.AddMember( rapidjson::Value(passString.c_str(), results.GetAllocator()).Move(), performance, results.GetAllocator()); } results.AddMember( rapidjson::Value(timeOfDayString.c_str(), results.GetAllocator()).Move(), nestedResults, results.GetAllocator()); } // Serialze the json output. rapidjson::StringBuffer jsonBuffer; rapidjson::PrettyWriter<rapidjson::StringBuffer> jsonWriter(jsonBuffer); results.Accept(jsonWriter); // Write the json file to a string std::ofstream output(outputDir + "\\multiple comparison results.txt"); output << jsonBuffer.GetString(); output.close(); }
void TRACK_votImpl::load(const string &path) { loadDataset(path); }
void GR_skigImp::load(const string &path) { loadDataset(path); }
void OR_sunImp::load(const string &path) { loadDataset(path); }
void TR_charsImp::load(const string &path) { loadDataset(path); }
void loadCifar() { loadDataset(string(DATASET_LOCATION) + "cifar-10/"); }
void loadCaltech(){ loadDataset(string(DATASET_LOCATION) + "caltech101/"); }
void SLAM_tumindoorImp::load(const string &path) { loadDataset(path); }
void IR_affineImp::load(const string &path) { loadDataset(path); }