Skip to content

Commit

Permalink
Merge branch 'master' into feat_cht_masks
Browse files Browse the repository at this point in the history
  • Loading branch information
rlagneau committed Jan 19, 2024
2 parents c2028e1 + ebfa260 commit 6eb21f4
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
11 changes: 11 additions & 0 deletions modules/tracker/mbt/src/depth/vpMbtFaceDepthDense.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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
Expand Down
4 changes: 2 additions & 2 deletions tutorial/imgproc/hough-transform/tutorial-circle-hough.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,10 @@ bool run_detection(const vpImage<unsigned char> &I_src, vpCircleHoughTransform &
#elif (VISP_CXX_STANDARD >= VISP_CXX_STANDARD_11)
vpImage<bool> *opt_mask = nullptr;
std::vector<std::vector<std::pair<unsigned int, unsigned int>>> *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<bool> *opt_mask = NULL;
std::vector<std::vector<std::pair<unsigned int, unsigned int>>> *opt_votingPoints = NULL;
std::vector<std::vector<std::pair<unsigned int, unsigned int> > > *opt_votingPoints = NULL;
detector.computeVotingMask(I_src, detectedCircles, &opt_mask, &opt_votingPoints); // Get, if available, the voting points
#endif

Expand Down

0 comments on commit 6eb21f4

Please sign in to comment.