Commit c7f2e2a2 authored by bitsun's avatar bitsun Committed by Alexander Alekhin
Browse files

Merge pull request #2074 from bitsun:master

* fix rectifyPatch bug when patch orientation is not extracted
parent f6d0e94e
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -364,9 +364,10 @@ static void rectifyPatch( const Mat& image, const KeyPoint& kp,
    }
    else
    {
        const float s = scale_factor * (float)kp.size / (float)patchSize;
        float M_[] = {
          1.f,  0.f, -1.f * patchSize/2.0f + kp.pt.x,
          0.f,  1.f, -1.f * patchSize/2.0f + kp.pt.y
          s,  0.f, -s * patchSize/2.0f + kp.pt.x,
          0.f,  s, -s * patchSize/2.0f + kp.pt.y
      };
      M = Mat( 2, 3, CV_32FC1, M_ ).clone();
    }