From 2d1ef5eea8f57cc8520dbd489fa7dade5218c2bb Mon Sep 17 00:00:00 2001 From: Vadim Pisarevsky Date: Thu, 15 Mar 2012 15:38:54 +0000 Subject: [PATCH] fixed build on VS2010 --- modules/features2d/src/orb.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/features2d/src/orb.cpp b/modules/features2d/src/orb.cpp index 377801e1d6..ae4f234c1b 100644 --- a/modules/features2d/src/orb.cpp +++ b/modules/features2d/src/orb.cpp @@ -57,7 +57,7 @@ HarrisResponses(const Mat& img, vector& pts, int blockSize, float harr size_t ptidx, ptsize = pts.size(); const uchar* ptr00 = img.ptr(); - size_t step = img.step/img.elemSize1(); + int step = (int)(img.step/img.elemSize1()); int r = blockSize/2; float scale = (1 << 2) * blockSize * 255.0f; @@ -662,7 +662,7 @@ static void computeKeyPoints(const vector& imagePyramid, int v, v0, vmax = cvFloor(halfPatchSize * sqrt(2.f) / 2 + 1); int vmin = cvCeil(halfPatchSize * sqrt(2.f) / 2); for (v = 0; v <= vmax; ++v) - umax[v] = cvRound(sqrt(halfPatchSize * halfPatchSize - v * v)); + umax[v] = cvRound(sqrt((double)halfPatchSize * halfPatchSize - v * v)); // Make sure we are symmetric for (v = halfPatchSize, v0 = 0; v >= vmin; --v)