diff --git a/modules/tracker/mbt/src/depth/vpMbtFaceDepthDense.cpp b/modules/tracker/mbt/src/depth/vpMbtFaceDepthDense.cpp index 8a47b5d437..c6d636bc9e 100644 --- a/modules/tracker/mbt/src/depth/vpMbtFaceDepthDense.cpp +++ b/modules/tracker/mbt/src/depth/vpMbtFaceDepthDense.cpp @@ -606,9 +606,15 @@ void vpMbtFaceDepthDense::computeInteractionMatrixAndResidu(const vpHomogeneousM cv::v_float64x2 vx, vy, vz; cv::v_load_deinterleave(ptr_point_cloud, vx, vy, vz); +#if (VISP_HAVE_OPENCV_VERSION >= 0x040900) + cv::v_float64x2 va1 = cv::v_sub(cv::v_mul(vnz, vy), cv::v_mul(vny, vz)); // vnz*vy - vny*vz + cv::v_float64x2 va2 = cv::v_sub(cv::v_mul(vnx, vz), cv::v_mul(vnz, vx)); // vnx*vz - vnz*vx + cv::v_float64x2 va3 = cv::v_sub(cv::v_mul(vny, vx), cv::v_mul(vnx, vy)); // vny*vx - vnx*vy +#else cv::v_float64x2 va1 = vnz*vy - vny*vz; cv::v_float64x2 va2 = vnx*vz - vnz*vx; cv::v_float64x2 va3 = vny*vx - vnx*vy; +#endif cv::v_float64x2 vnxy = cv::v_combine_low(vnx, vny); cv::v_store(ptr_L, vnxy); @@ -630,7 +636,12 @@ void vpMbtFaceDepthDense::computeInteractionMatrixAndResidu(const vpHomogeneousM cv::v_store(ptr_L, vnxy); ptr_L += 2; +#if (VISP_HAVE_OPENCV_VERSION >= 0x040900) + cv::v_float64x2 verr = cv::v_add(vd, cv::v_muladd(vnx, vx, cv::v_muladd(vny, vy, cv::v_mul(vnz, vz)))); +#else cv::v_float64x2 verr = vd + cv::v_muladd(vnx, vx, cv::v_muladd(vny, vy, vnz*vz)); +#endif + cv::v_store(ptr_error, verr); ptr_error += 2; #elif USE_SSE diff --git a/tutorial/imgproc/hough-transform/tutorial-circle-hough.cpp b/tutorial/imgproc/hough-transform/tutorial-circle-hough.cpp index 0b64f3c3d0..b8a112ca78 100644 --- a/tutorial/imgproc/hough-transform/tutorial-circle-hough.cpp +++ b/tutorial/imgproc/hough-transform/tutorial-circle-hough.cpp @@ -51,10 +51,10 @@ bool run_detection(const vpImage &I_src, vpCircleHoughTransform & #elif (VISP_CXX_STANDARD >= VISP_CXX_STANDARD_11) vpImage *opt_mask = nullptr; std::vector>> *opt_votingPoints = nullptr; - detector.computeVotingMask(I_src, detectedCircles, opt_mask, opt_votingPoints); // Get, if available, the voting points + detector.computeVotingMask(I_src, detectedCircles, &opt_mask, &opt_votingPoints); // Get, if available, the voting points #else vpImage *opt_mask = NULL; - std::vector>> *opt_votingPoints = NULL; + std::vector > > *opt_votingPoints = NULL; detector.computeVotingMask(I_src, detectedCircles, &opt_mask, &opt_votingPoints); // Get, if available, the voting points #endif