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

Merge pull request #2074 from bitsun:master

* fix rectifyPatch bug when patch orientation is not extracted
parent f6d0e94e
......@@ -364,9 +364,10 @@ static void rectifyPatch( const Mat& image, const KeyPoint& kp,
}
else
{
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
const float s = scale_factor * (float)kp.size / (float)patchSize;
float M_[] = {
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();
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment