Skip to content

Commit

Permalink
fix filter params
Browse files Browse the repository at this point in the history
  • Loading branch information
petrukhinandrew committed Oct 13, 2024
1 parent 6e41a85 commit c42ed31
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ add_subdirectory(libs)

project(Photogrammetry)

set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD 11)

# OpenMP позволит распараллеливать циклы на все ядра процессора простыми директивами
find_package(OpenMP)
Expand Down
4 changes: 2 additions & 2 deletions src/phg/matching/descriptor_matcher.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
void phg::DescriptorMatcher::filterMatchesRatioTest(const std::vector<std::vector<cv::DMatch> > &matches,
std::vector<cv::DMatch> &filtered_matches) {
filtered_matches.clear();
float c = 0.7;
float c = 0.6;
for (auto match: matches) {
if (match[0].distance <= c * match[1].distance) {
filtered_matches.push_back(match[0]);
Expand Down Expand Up @@ -40,7 +40,7 @@ void phg::DescriptorMatcher::filterMatchesClusters(const std::vector<cv::DMatch>

// размерность всего 2, так что точное KD-дерево
std::shared_ptr<cv::flann::IndexParams> index_params = flannKdTreeIndexParams(1);
std::shared_ptr<cv::flann::SearchParams> search_params = flannKsTreeSearchParams(35);
std::shared_ptr<cv::flann::SearchParams> search_params = flannKsTreeSearchParams(n_matches);

std::shared_ptr<cv::flann::Index> index_query = flannKdTreeIndex(points_query, index_params);
std::shared_ptr<cv::flann::Index> index_train = flannKdTreeIndex(points_train, index_params);
Expand Down

0 comments on commit c42ed31

Please sign in to comment.