diff options
author | Jerry Lin | 2018-11-03 23:38:17 +0800 |
---|---|---|
committer | Jerry Lin | 2018-11-03 23:38:17 +0800 |
commit | bc9f203c9c5cf833ede855b0da95189280b652e7 (patch) | |
tree | 8d85a90270c69c9ae44f958ad0547b767494f82f | |
parent | 4f56ed3cf06e1428fe07b7eb802a9231965b067e (diff) | |
download | aur-ros-indigo-opencv-apps.tar.gz |
Update version to 2.0.0. Fix compatibility with OpenCV 3.4.
-rw-r--r-- | .SRCINFO | 12 | ||||
-rw-r--r-- | PKGBUILD | 21 | ||||
-rw-r--r-- | fix-ambiguous-call.patch | 13 | ||||
-rw-r--r-- | fix-opencv-3.4-compatibility.patch | 29 |
4 files changed, 66 insertions, 9 deletions
@@ -1,8 +1,6 @@ -# Generated by mksrcinfo v8 -# Sun Jun 12 18:30:31 UTC 2016 pkgbase = ros-indigo-opencv-apps pkgdesc = ROS - The opencv_apps package, most of code is taken from https://github.com/Itseez/opencv/tree/master/samples/cpp. - pkgver = 1.11.13 + pkgver = 2.0.0 pkgrel = 1 url = http://www.ros.org/ arch = any @@ -26,8 +24,12 @@ pkgbase = ros-indigo-opencv-apps depends = ros-indigo-std-srvs depends = ros-indigo-image-transport depends = ros-indigo-dynamic-reconfigure - source = ros-indigo-opencv-apps-1.11.13-0.tar.gz::https://github.com/ros-perception/opencv_apps-release/archive/release/indigo/opencv_apps/1.11.13-0.tar.gz - sha256sums = 1d1a10f8452dcdeba3737da18968c03cfc91505e40a1f246d3b30e4658550c5f + source = ros-indigo-opencv-apps-2.0.0-0.tar.gz::https://github.com/ros-perception/opencv_apps-release/archive/release/indigo/opencv_apps/2.0.0-0.tar.gz + source = fix-ambiguous-call.patch + source = fix-opencv-3.4-compatibility.patch + sha256sums = 612961c8611df5e2cc5a9583a586928cf69c17979c92fc724c31714f7979e788 + sha256sums = 6e76ccb1c620cfb9e7509f4b1e93fcd3ba320ee1122658762b250ae51f8de7e6 + sha256sums = 8f7bb79462901ea9b4c9da610557d4720e281fcba98ed8ee7e6d9d3b47141f80 pkgname = ros-indigo-opencv-apps @@ -4,7 +4,7 @@ pkgdesc="ROS - The opencv_apps package, most of code is taken from https://githu url='http://www.ros.org/' pkgname='ros-indigo-opencv-apps' -pkgver='1.11.13' +pkgver='2.0.0' _pkgver_patch=0 arch=('any') pkgrel=1 @@ -39,9 +39,22 @@ depends=(${ros_depends[@]}) # sha256sums=('SKIP') # Tarball version (faster download) -_dir="opencv_apps-release-release-indigo-opencv_apps-${pkgver}-${_pkgver_patch}" -source=("${pkgname}-${pkgver}-${_pkgver_patch}.tar.gz"::"https://github.com/ros-perception/opencv_apps-release/archive/release/indigo/opencv_apps/${pkgver}-${_pkgver_patch}.tar.gz") -sha256sums=('1d1a10f8452dcdeba3737da18968c03cfc91505e40a1f246d3b30e4658550c5f') +_dir="opencv_apps-release-release-indigo-opencv_apps" +source=( + "${pkgname}-${pkgver}-${_pkgver_patch}.tar.gz"::"https://github.com/ros-perception/opencv_apps-release/archive/release/indigo/opencv_apps/${pkgver}-${_pkgver_patch}.tar.gz" + 'fix-ambiguous-call.patch' + 'fix-opencv-3.4-compatibility.patch' +) +sha256sums=('612961c8611df5e2cc5a9583a586928cf69c17979c92fc724c31714f7979e788' + '6e76ccb1c620cfb9e7509f4b1e93fcd3ba320ee1122658762b250ae51f8de7e6' + '8f7bb79462901ea9b4c9da610557d4720e281fcba98ed8ee7e6d9d3b47141f80') + +prepare () { + cd ${srcdir}/${_dir} + patch -Np1 -i ${srcdir}/fix-ambiguous-call.patch + patch -Np1 -i ${srcdir}/fix-opencv-3.4-compatibility.patch +} + build() { # Use ROS environment variables diff --git a/fix-ambiguous-call.patch b/fix-ambiguous-call.patch new file mode 100644 index 000000000000..e17ca54ff572 --- /dev/null +++ b/fix-ambiguous-call.patch @@ -0,0 +1,13 @@ +diff --git a/src/nodelet/lk_flow_nodelet.cpp b/src/nodelet/lk_flow_nodelet.cpp +index 24825ad..533e5ab 100644 +--- a/src/nodelet/lk_flow_nodelet.cpp ++++ b/src/nodelet/lk_flow_nodelet.cpp +@@ -159,7 +159,7 @@ class LKFlowNodelet : public opencv_apps::Nodelet + if( needToInit ) + { + // automatic initialization +- cv::goodFeaturesToTrack(gray, points[1], MAX_COUNT, 0.01, 10, cv::Mat(), 3, 0, 0.04); ++ cv::goodFeaturesToTrack(gray, points[1], MAX_COUNT, 0.01, 10, cv::Mat(), 3, false, 0.04); + cv::cornerSubPix(gray, points[1], subPixWinSize, cv::Size(-1,-1), termcrit); + addRemovePt = false; + } diff --git a/fix-opencv-3.4-compatibility.patch b/fix-opencv-3.4-compatibility.patch new file mode 100644 index 000000000000..9fa4ad634aa2 --- /dev/null +++ b/fix-opencv-3.4-compatibility.patch @@ -0,0 +1,29 @@ +diff --git a/src/nodelet/face_recognition_nodelet.cpp b/src/nodelet/face_recognition_nodelet.cpp +index 24b8051..340e393 100644 +--- a/src/nodelet/face_recognition_nodelet.cpp ++++ b/src/nodelet/face_recognition_nodelet.cpp +@@ -463,16 +463,16 @@ namespace face_recognition { + if (need_recreate_model) { + try { + if (config.model_method == "eigen") { +- model_ = face::createEigenFaceRecognizer(config.model_num_components, +- config.model_threshold); ++ model_ = face::EigenFaceRecognizer::create(config.model_num_components, ++ config.model_threshold); + } else if (config.model_method == "fisher") { +- model_ = face::createFisherFaceRecognizer(config.model_num_components, +- config.model_threshold); ++ model_ = face::FisherFaceRecognizer::create(config.model_num_components, ++ config.model_threshold); + } else if (config.model_method == "LBPH") { +- model_ = face::createLBPHFaceRecognizer(config.lbph_radius, +- config.lbph_neighbors, +- config.lbph_grid_x, +- config.lbph_grid_y); ++ model_ = face::LBPHFaceRecognizer::create(config.lbph_radius, ++ config.lbph_neighbors, ++ config.lbph_grid_x, ++ config.lbph_grid_y); + } + need_retrain = true; + } catch (cv::Exception &e) { |