Commit 9eed2514 authored by paarongiroux's avatar paarongiroux Committed by Jesse Mapel
Browse files

Findfeatures (#3399)

* Changed match function in Matchmaker to pass in copies of pointers

* Revert "Changed match function in Matchmaker to pass in copies of pointers"

This reverts commit f687eb668f4438245572a0c6a62b50b64846a12f.

* updated match method in MatchMaker to pass in clones of pointers
parent 74152788
Loading
Loading
Loading
Loading
+64 −58
Original line number Diff line number Diff line
@@ -129,18 +129,24 @@ MatcherSolution *MatchMaker::match(const SharedRobustMatcher &matcher) {

  // Pass along logging status
  matcher->setDebugLogger( stream(), isDebug() );
  MatchImage query_copy = m_query.clone();
  QList<MatchImage> trainers_copy;
  for (int i = 0; i < m_trainers.size();i++) {
    trainers_copy.append(m_trainers[i].clone());
  }


  MatcherSolution *m(0);
  if ( m_trainers.size() == 1 ) {
    // Run a pair only matcher
    m = new MatcherSolution(matcher,
                            matcher->match(m_query, m_trainers[0]), 
                            matcher->match(query_copy, trainers_copy[0]),
                            *this /* MatchMaker and/or QLogger */ );
  }
  else {
    // Run the multi-matcher
    m = new MatcherSolution(matcher,
                            matcher->match(m_query, m_trainers), 
                            matcher->match(query_copy, trainers_copy),
                            *this /* MatchMaker and/or QLogger */ );
  }
  return ( m );
+380 −375
Original line number Diff line number Diff line
@@ -1191,6 +1191,11 @@ Group = MatchSolution
       Corrected several errors in documentation. Fixed the MSER algorithm name.
       Fixed AKAZE being flagged as only an extractor. Fixes #4950.
    </change>
    <change name="Aaron Giroux" date="2019-08-14">
      Updated match method in MatchMaker.cpp to use the MatchImage clone()
      method to pass in clones of query and trainers. This avoids pointer issues
      which were mixing up data and causing failures. Fixes #3341.
    </change>
  </history>

  <groups>