From 5f4b48da34b28006779938515178ca9180e70a08 Mon Sep 17 00:00:00 2001 From: Tomoaki Teshima Date: Wed, 31 Jan 2018 18:22:09 +0900 Subject: [PATCH] fix build error on Visual Studio 2013 and earlier --- modules/features2d/src/fast.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/features2d/src/fast.cpp b/modules/features2d/src/fast.cpp index 1e8c72778f..0f2a0cbc9c 100644 --- a/modules/features2d/src/fast.cpp +++ b/modules/features2d/src/fast.cpp @@ -445,12 +445,12 @@ static inline int hal_FAST(cv::Mat& src, std::vector& keypoints, int t cv::KeyPoint kpt(0, 0, 7.f, -1, 0); - uint32_t uthreshold = (uint32_t) threshold; + unsigned uthreshold = (unsigned) threshold; int ofs = 3; int stride = (int)suppressedScores.step; - const uint8_t* pscore = suppressedScores.data; + const unsigned char* pscore = suppressedScores.data; keypoints.clear(); @@ -459,11 +459,11 @@ static inline int hal_FAST(cv::Mat& src, std::vector& keypoints, int t kpt.pt.y = (float)(y); for (int x = ofs; x + ofs < suppressedScores.cols; ++x) { - uint32_t score = pscore[y * stride + x]; + unsigned score = pscore[y * stride + x]; if (score > uthreshold) { kpt.pt.x = (float)(x); - kpt.response = (nonmax_suppression != 0) ? (float)((int32_t)score - 1) : 0.f; + kpt.response = (nonmax_suppression != 0) ? (float)((int)score - 1) : 0.f; keypoints.push_back(kpt); } }