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