From 77fa8d9d5a743f4f7b92a2c82e7d1b2bd053e26a Mon Sep 17 00:00:00 2001 From: Eric Zavesky Date: Mon, 15 Feb 2016 05:37:54 -0600 Subject: [PATCH] - fix windows-based warnings for type casts --- .../features2D/AKAZE_tracking/planar_tracking.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/samples/cpp/tutorial_code/features2D/AKAZE_tracking/planar_tracking.cpp b/samples/cpp/tutorial_code/features2D/AKAZE_tracking/planar_tracking.cpp index dfeb63d192..c407c8611d 100755 --- a/samples/cpp/tutorial_code/features2D/AKAZE_tracking/planar_tracking.cpp +++ b/samples/cpp/tutorial_code/features2D/AKAZE_tracking/planar_tracking.cpp @@ -47,8 +47,8 @@ void Tracker::setFirstFrame(const Mat frame, vector bb, string title, S const Point* ptContain = { &ptMask[0] }; int iSize = static_cast(bb.size()); for (size_t i=0; i(bb[i].x); + ptMask[i].y = static_cast(bb[i].y); } first_frame = frame.clone(); cv::Mat matMask = cv::Mat::zeros(frame.size(), CV_8UC1); @@ -172,10 +172,10 @@ int main(int argc, char **argv) vector bb; if (argc < 4) { //attempt to alow GUI selection cv::Rect2d uBox = selectROI(video_name, frame); - bb.push_back(cv::Point2f(uBox.x, uBox.y)); - bb.push_back(cv::Point2f(uBox.x+uBox.width, uBox.y)); - bb.push_back(cv::Point2f(uBox.x+uBox.width, uBox.y+uBox.height)); - bb.push_back(cv::Point2f(uBox.x, uBox.y+uBox.height)); + bb.push_back(cv::Point2f(static_cast(uBox.x), static_cast(uBox.y))); + bb.push_back(cv::Point2f(static_cast(uBox.x+uBox.width), static_cast(uBox.y))); + bb.push_back(cv::Point2f(static_cast(uBox.x+uBox.width), static_cast(uBox.y+uBox.height))); + bb.push_back(cv::Point2f(static_cast(uBox.x), static_cast(uBox.y+uBox.height))); } else { FileStorage fs(argv[3], FileStorage::READ);