From 2d1bd9aba94ffaf7e29294a10082911295c5894e Mon Sep 17 00:00:00 2001 From: MH2033 Date: Tue, 9 Aug 2022 16:50:52 +1000 Subject: [PATCH] Fix opencv sample compile error --- .../module_sample/liveview/test_liveview_entry.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/samples/sample_c++/module_sample/liveview/test_liveview_entry.cpp b/samples/sample_c++/module_sample/liveview/test_liveview_entry.cpp index 13baad13..4382fbe8 100755 --- a/samples/sample_c++/module_sample/liveview/test_liveview_entry.cpp +++ b/samples/sample_c++/module_sample/liveview/test_liveview_entry.cpp @@ -204,8 +204,8 @@ static void DjiUser_ShowRgbImageCallback(CameraRGBImage img, void *userData) cout << " x: " << faces[i].x; cout << " y: " << faces[i].y << endl; - cv::rectangle(mat, cvPoint(faces[i].x, faces[i].y), - cvPoint(faces[i].x + faces[i].width, faces[i].y + faces[i].height), + cv::rectangle(mat, cv::Point(faces[i].x, faces[i].y), + cv::Point(faces[i].x + faces[i].width, faces[i].y + faces[i].height), Scalar(0, 0, 255), 2, 1, 0); } imshow(name, mat); @@ -266,7 +266,7 @@ static void DjiUser_ShowRgbImageCallback(CameraRGBImage img, void *userData) int baseLine = 0; Size labelSize = getTextSize(label, FONT_HERSHEY_SIMPLEX, 0.5, 1, &baseLine); rectangle(mat, Rect(Point(xLeftBottom, yLeftBottom - labelSize.height), - Size(labelSize.width, labelSize.height + baseLine)), Scalar(0, 255, 0), CV_FILLED); + Size(labelSize.width, labelSize.height + baseLine)), Scalar(0, 255, 0), cv::FILLED); putText(mat, label, Point(xLeftBottom, yLeftBottom), FONT_HERSHEY_SIMPLEX, 0.5, Scalar(0, 0, 0)); } }