From d5b15d65236ac52fc1109eefcc7071f920cbcf72 Mon Sep 17 00:00:00 2001 From: Andrey Kamaev Date: Thu, 24 Jan 2013 16:15:34 +0400 Subject: [PATCH] Fix ocl build warnings --- modules/ocl/test/test_arithm.cpp | 4 ++-- samples/ocl/facedetect.cpp | 2 +- samples/ocl/surf_matcher.cpp | 8 ++++---- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/modules/ocl/test/test_arithm.cpp b/modules/ocl/test/test_arithm.cpp index bebbc6971..82fcb65ca 100644 --- a/modules/ocl/test/test_arithm.cpp +++ b/modules/ocl/test/test_arithm.cpp @@ -1110,8 +1110,8 @@ TEST_P(Phase, Mat) for(int j = 0; j < LOOP_TIMES; j++) { random_roi(); - cv::phase(mat1_roi, mat2_roi, dst_roi, angelInDegrees); - cv::ocl::phase(gmat1, gmat2, gdst, angelInDegrees); + cv::phase(mat1_roi, mat2_roi, dst_roi, angelInDegrees ? true : false); + cv::ocl::phase(gmat1, gmat2, gdst, angelInDegrees ? true : false); cv::Mat cpu_dst; gdst_whole.download(cpu_dst); diff --git a/samples/ocl/facedetect.cpp b/samples/ocl/facedetect.cpp index e901aa869..16017b928 100644 --- a/samples/ocl/facedetect.cpp +++ b/samples/ocl/facedetect.cpp @@ -180,7 +180,7 @@ _cleanup_: } void detectAndDraw( Mat& img, - cv::ocl::OclCascadeClassifier& cascade, CascadeClassifier& nestedCascade, + cv::ocl::OclCascadeClassifier& cascade, CascadeClassifier&, double scale) { int i = 0; diff --git a/samples/ocl/surf_matcher.cpp b/samples/ocl/surf_matcher.cpp index 7cee6281e..8462300ed 100644 --- a/samples/ocl/surf_matcher.cpp +++ b/samples/ocl/surf_matcher.cpp @@ -217,10 +217,10 @@ int main(int argc, char* argv[]) perspectiveTransform( obj_corners, scene_corners, H); //-- Draw lines between the corners (the mapped object in the scene - image_2 ) - line( img_matches, scene_corners[0] + Point2f( cpu_img1.cols, 0), scene_corners[1] + Point2f( cpu_img1.cols, 0), Scalar( 0, 255, 0), 4 ); - line( img_matches, scene_corners[1] + Point2f( cpu_img1.cols, 0), scene_corners[2] + Point2f( cpu_img1.cols, 0), Scalar( 0, 255, 0), 4 ); - line( img_matches, scene_corners[2] + Point2f( cpu_img1.cols, 0), scene_corners[3] + Point2f( cpu_img1.cols, 0), Scalar( 0, 255, 0), 4 ); - line( img_matches, scene_corners[3] + Point2f( cpu_img1.cols, 0), scene_corners[0] + Point2f( cpu_img1.cols, 0), Scalar( 0, 255, 0), 4 ); + line( img_matches, scene_corners[0] + Point2f( (float)cpu_img1.cols, 0), scene_corners[1] + Point2f( (float)cpu_img1.cols, 0), Scalar( 0, 255, 0), 4 ); + line( img_matches, scene_corners[1] + Point2f( (float)cpu_img1.cols, 0), scene_corners[2] + Point2f( (float)cpu_img1.cols, 0), Scalar( 0, 255, 0), 4 ); + line( img_matches, scene_corners[2] + Point2f( (float)cpu_img1.cols, 0), scene_corners[3] + Point2f( (float)cpu_img1.cols, 0), Scalar( 0, 255, 0), 4 ); + line( img_matches, scene_corners[3] + Point2f( (float)cpu_img1.cols, 0), scene_corners[0] + Point2f( (float)cpu_img1.cols, 0), Scalar( 0, 255, 0), 4 ); //-- Show detected matches namedWindow("ocl surf matches", 0);