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);