diff options
Diffstat (limited to 'misc/visp')
-rw-r--r-- | misc/visp/Makefile | 10 | ||||
-rw-r--r-- | misc/visp/files/patch-CMakeLists.txt | 13 | ||||
-rw-r--r-- | misc/visp/files/patch-modules_tracker_mbt_src_depth_vpMbtFaceDepthDense.cpp | 31 |
3 files changed, 49 insertions, 5 deletions
diff --git a/misc/visp/Makefile b/misc/visp/Makefile index a2acb60e216d..8a6c3e7718dc 100644 --- a/misc/visp/Makefile +++ b/misc/visp/Makefile @@ -1,12 +1,13 @@ PORTNAME= visp DISTVERSION= 3.6.0 -PORTREVISION= 9 +PORTREVISION= 12 CATEGORIES= misc MASTER_SITES= https://visp-doc.inria.fr/download/releases/ MAINTAINER= yuri@FreeBSD.org COMMENT= Modular library for visual tracking and visual servoing -WWW= https://visp.inria.fr/ +WWW= https://visp.inria.fr/ \ + https://github.com/lagadic/visp LICENSE= GPLv2+ LICENSE_FILE= ${WRKSRC}/LICENSE.txt @@ -37,6 +38,8 @@ USE_LDCONFIG= yes CMAKE_OFF= WITH_QBDEVICE BUILD_EXAMPLES BUILD_TUTORIALS BUILD_TESTS BUILD_DEMOS +CXXFLAGS+= -I${LOCALBASE}/include/vtk-${VTK_VER} # https://github.com/lagadic/visp/issues/1707 + OPTIONS_DEFINE= COIN OGRE PCL ZBAR OPTIONS_DEFAULT= COIN OGRE PCL ZBAR @@ -51,10 +54,11 @@ OGRE_LIB_DEPENDS= libOgreMain.so:graphics/ogre3d19 PCL_DESC= Include Point Cloud Library support PCL_CMAKE_BOOL= USE_PCL PCL_LIB_DEPENDS= libpcl_common.so:graphics/pcl-pointclouds \ - libvtkCommonCore-9.2.so:math/vtk9 # vtk9 is incurred by pcl-pointclouds + libvtkCommonCore-${VTK_VER}.so:math/vtk${VTK_VER:R} # vtk9 is incurred by pcl-pointclouds ZBAR_DESC= Use ZBAR to read bar codes and QR codes ZBAR_CMAKE_BOOL= USE_ZBAR ZBAR_LIB_DEPENDS= libzbar.so:graphics/zbar +.include <../../math/vtk9/Makefile.version> .include <bsd.port.mk> diff --git a/misc/visp/files/patch-CMakeLists.txt b/misc/visp/files/patch-CMakeLists.txt index 893083431163..f5c75760570d 100644 --- a/misc/visp/files/patch-CMakeLists.txt +++ b/misc/visp/files/patch-CMakeLists.txt @@ -1,8 +1,17 @@ https://github.com/lagadic/visp/issues/423 ---- CMakeLists.txt.orig 2021-03-05 01:09:20 UTC +--- CMakeLists.txt.orig 2023-09-22 05:39:36 UTC +++ CMakeLists.txt -@@ -230,7 +230,7 @@ else() # UNIX +@@ -124,6 +124,8 @@ project(VISP C CXX) + + project(VISP C CXX) + ++find_package(VTK REQUIRED) # workaround for https://gitlab.kitware.com/vtk/vtk/-/issues/19716 ++ + list(APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake") + + include(cmake/VISPUtils.cmake) +@@ -244,7 +246,7 @@ else() # UNIX vp_update(VISP_LIB_INSTALL_PATH "${CMAKE_INSTALL_LIBDIR}") endif() vp_update(VISP_BIN_INSTALL_PATH "${CMAKE_INSTALL_BINDIR}") diff --git a/misc/visp/files/patch-modules_tracker_mbt_src_depth_vpMbtFaceDepthDense.cpp b/misc/visp/files/patch-modules_tracker_mbt_src_depth_vpMbtFaceDepthDense.cpp new file mode 100644 index 000000000000..38198d2375fb --- /dev/null +++ b/misc/visp/files/patch-modules_tracker_mbt_src_depth_vpMbtFaceDepthDense.cpp @@ -0,0 +1,31 @@ +--- modules/tracker/mbt/src/depth/vpMbtFaceDepthDense.cpp.orig 2023-09-22 05:39:36 UTC ++++ modules/tracker/mbt/src/depth/vpMbtFaceDepthDense.cpp +@@ -518,9 +518,15 @@ void vpMbtFaceDepthDense::computeInteractionMatrixAndR + 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); +@@ -542,7 +548,12 @@ void vpMbtFaceDepthDense::computeInteractionMatrixAndR + 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 |