Skip to content

Commit

Permalink
fixed issues with loading features and directories
Browse files Browse the repository at this point in the history
  • Loading branch information
ovysotska committed Nov 24, 2017
1 parent fe1fc48 commit e9b77f3
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ std::vector<iBinarizableFeature::Ptr> loadFeatures(
iBinarizableFeature::Ptr(new CnnFeature);
// [VGG] Uncomment this to use vgg features
// iBinarizableFeature::Ptr(new VggFeature);
featurePtr->loadFromFile(path2folder + featureNames[i]);
featurePtr->loadFromFile(featureNames[i]);
featurePtrs.push_back(featurePtr);
fprintf(stderr, ".");
}
Expand Down
2 changes: 1 addition & 1 deletion apps/create_cost_matrix/create_cost_matrix.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ FeatureBuffer loadFeatures(const std::string &path2folder,
printf("Loading features\n");
for (size_t i = 0; i < featureNames.size(); ++i) {
iFeature::Ptr featurePtr = factory.createFeature();
featurePtr->loadFromFile(path2folder + featureNames[i]);
featurePtr->loadFromFile(featureNames[i]);
buffer.addFeature(i, featurePtr);
fprintf(stderr, ".");
}
Expand Down
2 changes: 1 addition & 1 deletion apps/estimate_similar_places/estimate_similar_places.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ std::vector<iBinarizableFeature::Ptr> readFeatures(
iBinarizableFeature::Ptr featurePtr =
// iBinarizableFeature::Ptr(new CnnFeatureMean);
iBinarizableFeature::Ptr(new VggFeatureMean);
featurePtr->loadFromFile(path2folder + featureNames[i]);
featurePtr->loadFromFile(featureNames[i]);
v.push_back(featurePtr);
std::cerr << ".";
}
Expand Down
4 changes: 2 additions & 2 deletions apps/feature_based_matching/feature_based_matching_dh.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,8 @@ int main(int argc, char *argv[]) {
QApplication::translate("toplevel", "Olga's awesome viewer"));

MatchViewer *matchViewer = new MatchViewer();
matchViewer->setQuImageDirectory(parser.path2quImg);
matchViewer->setRefImageDirectory(parser.path2refImg);
matchViewer->setQueryImages(parser.path2quImg);
matchViewer->setRefImages(parser.path2refImg);
matchViewer->setImageExtension(parser.imgExt);
matchViewer->setDatabase(onlineDatabasePtr);

Expand Down
6 changes: 3 additions & 3 deletions apps/feature_based_matching/feature_based_matching_lsh.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ std::vector<iBinarizableFeature::Ptr> loadFeatures(
iBinarizableFeature::Ptr(new CnnFeatureMean);
// [VGG] Uncomment this to use vgg features
// iBinarizableFeature::Ptr(new VggFeatureMean);
featurePtr->loadFromFile(path2folder + featureNames[i]);
featurePtr->loadFromFile(featureNames[i]);
featurePtrs.push_back(featurePtr);
fprintf(stderr, ".");
}
Expand Down Expand Up @@ -115,8 +115,8 @@ int main(int argc, char *argv[]) {
QApplication::translate("toplevel", "Olga's awesome viewer"));

MatchViewer *matchViewer = new MatchViewer();
matchViewer->setQuImageDirectory(parser.path2quImg);
matchViewer->setRefImageDirectory(parser.path2refImg);
matchViewer->setQueryImages(parser.path2quImg);
matchViewer->setRefImages(parser.path2refImg);
matchViewer->setImageExtension(parser.imgExt);
matchViewer->setDatabase(onlineDatabasePtr);

Expand Down
2 changes: 1 addition & 1 deletion apps/hash_features/hash_features.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ void hashDimensions(const std::string &path2folder,
iBinarizableFeature::Ptr featurePtr =
iBinarizableFeature::Ptr(new CnnFeature);
// iBinarizableFeature::Ptr(new VggFeature);
featurePtr->loadFromFile(path2folder + featureNames[i]);
featurePtr->loadFromFile(featureNames[i]);
featurePtrs.push_back(featurePtr);
fprintf(stderr, ".");
}
Expand Down
2 changes: 1 addition & 1 deletion test/test_dimension_hashing.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ TEST(DimensionHashing, hashFeature) {

// for (size_t i = 0; i < featureNames.size(); ++i) {
// BinaryFeature::Ptr featurePtr = BinaryFeature::Ptr(new BinaryFeature);
// featurePtr->loadFromFile(path2folder + featureNames[i]);
// featurePtr->loadFromFile(featureNames[i]);
// featurePtr->binarize();
// featurePtrs.push_back(featurePtr);
// fprintf(stderr, ".");
Expand Down

0 comments on commit e9b77f3

Please sign in to comment.