Commit 67f9cba1 authored by Jesse Mapel's avatar Jesse Mapel
Browse files

Fixed a bug where specifying multiple algorithms sets in findfeatures...

Fixed a bug where specifying multiple algorithms sets in findfeatures sometimes caused a crash. Fixes #4765

git-svn-id: http://subversion.wr.usgs.gov/repos/prog/isis3/trunk@7604 41f8697f-d340-4b68-9986-7bafba869bb8
parent eef977c2
Loading
Loading
Loading
Loading
+14 −1
Original line number Diff line number Diff line
@@ -73,10 +73,23 @@ class MatchImage {
      m_data->m_duration = ptime;
    }

    MatchImage(const MatchImage &other): m_data(other.m_data) { }



    virtual ~MatchImage() { }

    /**
     * Creates a copy of this MatchImage object with shared image source
     * and a copy of all transformations but empty keypoints, descriptors,
     * and duration.
     */
    MatchImage clone() {
      MatchImage copyImage(*this);
      copyImage.m_data.detach();
      return copyImage;
    }

    inline int size() const {
      return ( m_data->m_keypoints.size() );
    }
@@ -173,7 +186,7 @@ class MatchImage {
                      m_duration(0) { }
        ImageData(const ImageData &other) : QSharedData(other),
                                            m_source(other.m_source), 
                                            m_transforms(), 
                                            m_transforms(other.m_transforms), 
                                            m_keypoints(), 
                                            m_descriptors(), 
                                            m_duration(0) { }
+2 −2
Original line number Diff line number Diff line
@@ -135,8 +135,8 @@ MatchPair RobustMatcher::match(MatchImage &query, MatchImage &train) const {
   const bool onErrorThrow = false;  // Conditions for managed matching

   // Setup
   MatchImage &v_query = query;
   MatchImage &v_train = train;
   MatchImage v_query = query.clone();
   MatchImage v_train = train.clone();
   MatchPair v_pair(v_query, v_train);

   // Render images for matching
+6 −0
Original line number Diff line number Diff line
@@ -1168,6 +1168,12 @@ End_Group
       changed the program version to 1.0 from 0.1.
       References #4556.
    </change>
    <change name="Jesse Mapel" date="2017-04-14"> 
       Corrected a bug where keypoints and descriptors were being overwritten
       when using multiple algorithm specificiations. Added a new clone()
       method to MatchImage and made the MatchImages used by each algorithm
       specification independent. Fixes #4765.
    </change>
  </history> 

  <groups>