diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2019-12-15 18:09:03 +0000 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2019-12-15 18:09:03 +0000 |
commit | 7bc9c63c9da678a7e6fceb095d56c634afd22c56 (patch) | |
tree | 4a67d50a439e9af63947e5f8b6ba3719af98b6c9 /dev-ros/opencv_apps | |
parent | b284a3168fa91a038925d2ecf5e4791011ea5e7d (diff) |
gentoo resync : 15.12.2019
Diffstat (limited to 'dev-ros/opencv_apps')
-rw-r--r-- | dev-ros/opencv_apps/Manifest | 5 | ||||
-rw-r--r-- | dev-ros/opencv_apps/files/ocv4.patch | 118 | ||||
-rw-r--r-- | dev-ros/opencv_apps/opencv_apps-2.0.1.ebuild (renamed from dev-ros/opencv_apps/opencv_apps-2.0.0-r1.ebuild) | 3 |
3 files changed, 123 insertions, 3 deletions
diff --git a/dev-ros/opencv_apps/Manifest b/dev-ros/opencv_apps/Manifest index e06c88af8385..63c2973bd22a 100644 --- a/dev-ros/opencv_apps/Manifest +++ b/dev-ros/opencv_apps/Manifest @@ -1,4 +1,5 @@ -DIST opencv_apps-2.0.0.tar.gz 81204 BLAKE2B cd8fbcbde0213b6f5aca61dc1e9aa9740cc9d726c9d139e2888cc42d777e13f5923b4e19d2efd732797cadeb352ea26edbddab58e5d09cd7ba4571fe60649d73 SHA512 5b89ced226bfcd186de94a4bf3a9cf94d80b117a726609f58bf7331b0b3ba62ad9d4b72c4d6f0d1332000665e9aacc0e7f6dd26defda6914fa8696b586996798 -EBUILD opencv_apps-2.0.0-r1.ebuild 684 BLAKE2B 137307ff871a7f5aa7003692e977c6957beb772f0c8f8dfdc43f6c44849b951f4ef434e8063d6130b881b313a2f4f9f07b51112fd77d732b9a2c71438d0988af SHA512 1314179ad9e8f67931fe1f38585a52cb3799436b2f245bbb48b746b154cf8a4ae9eeceb3e174e25f7617ebb5e47ceea6593b48f38b3789c26386e23a273c10d0 +AUX ocv4.patch 5101 BLAKE2B 1f298695f9c0dd46dad07c6495975043e9031ee5e19fdb886a512861a04bfa3029427213db00af9f6e68ef678c1a172e6ffdaf671bfa9a108f17d58204dd5bf9 SHA512 a24a4a510a501caafaa78a9a856724e3bdf8b9ea70cbf41da7b6b96e18a013b08f01660289e4cb0e77567c9ae6fbabf751cbbefef6ba391a37ecb6b09cb1c373 +DIST opencv_apps-2.0.1.tar.gz 83497 BLAKE2B 31d0447696716ba623e64e69dc269491c4a943125c90c33ac2e495ce2a64f417758e0a142f36c5dde9032475abee516fecf9e227bbe977706f1a89ea02a3daad SHA512 db263bb49f1b083cfd84f325911da804c3a2c8b3db7f3a2ce697a4fe2dde2b692a2b1921bd32aecb19d67c93f7bf6809340c418b6bf4619ebd7beed1469838da +EBUILD opencv_apps-2.0.1.ebuild 718 BLAKE2B ed7aac7cf21fac146d6128c05699646ed4290e425146fbb85e398368155d799581a0e46ef55d6b462a8e626cad8486f773224dd7c1b763495df77dc9fe821061 SHA512 0a17c17195a8bbe8dd61b52f4135413374536f1cf1c271a47623bc2da940a273842e836d0cacba183efa50d1891ee3ad2767393a0090440422a2eb80a8dad679 EBUILD opencv_apps-9999.ebuild 684 BLAKE2B 137307ff871a7f5aa7003692e977c6957beb772f0c8f8dfdc43f6c44849b951f4ef434e8063d6130b881b313a2f4f9f07b51112fd77d732b9a2c71438d0988af SHA512 1314179ad9e8f67931fe1f38585a52cb3799436b2f245bbb48b746b154cf8a4ae9eeceb3e174e25f7617ebb5e47ceea6593b48f38b3789c26386e23a273c10d0 MISC metadata.xml 342 BLAKE2B 41ebd1d903bb2c2be8df58a29062ae314becf1e29b309369eb8295f49760e35800d2164de2d9088b90716432d04b5290123f1a1110175250348301e12afe3f26 SHA512 ebd8a1fd0c584bd4dbbcbdd6e396c288a50d68916d357f030dfaf13ec8204c0bf8a4c98f740952400e43ce5d6f112a0865086484de1a8abdd088d39e79f74693 diff --git a/dev-ros/opencv_apps/files/ocv4.patch b/dev-ros/opencv_apps/files/ocv4.patch new file mode 100644 index 000000000000..48954535e0a0 --- /dev/null +++ b/dev-ros/opencv_apps/files/ocv4.patch @@ -0,0 +1,118 @@ +From 357fc3f20d0a2252b6a0a6cab8a6ae6cf79b8565 Mon Sep 17 00:00:00 2001 +From: Jochen Sprickerhof <git@jochen.sprickerhof.de> +Date: Wed, 23 Oct 2019 22:15:57 +0200 +Subject: [PATCH] Support OpenCV 4 + +--- + src/nodelet/face_recognition_nodelet.cpp | 18 +++++++++++++++--- + src/nodelet/segment_objects_nodelet.cpp | 4 ++++ + src/nodelet/simple_flow_nodelet.cpp | 4 ++-- + 3 files changed, 21 insertions(+), 5 deletions(-) + +Index: opencv_apps-2.0.1/src/nodelet/face_recognition_nodelet.cpp +=================================================================== +--- opencv_apps-2.0.1.orig/src/nodelet/face_recognition_nodelet.cpp ++++ opencv_apps-2.0.1/src/nodelet/face_recognition_nodelet.cpp +@@ -229,7 +229,11 @@ public: + fs::path file_path = cit->path(); + try + { ++#if CV_MAJOR_VERSION > 3 ++ cv::Mat img = cv::imread(file_path.string(), cv::IMREAD_COLOR); ++#else + cv::Mat img = cv::imread(file_path.string(), CV_LOAD_IMAGE_COLOR); ++#endif + labels.push_back(label); + images.push_back(img); + } +@@ -327,7 +331,11 @@ class FaceRecognitionNodelet : public op + int(face.face.height + face.face.height * face_padding_)); + cv::Scalar color(0.0, 0.0, 255.0); + int boldness = 2; ++#if CV_MAJOR_VERSION > 3 ++ cv::rectangle(img, r.tl(), r.br(), color, boldness, cv::LINE_AA); ++#else + cv::rectangle(img, r.tl(), r.br(), color, boldness, CV_AA); ++#endif + + double font_scale = 1.5; + int text_height = 20; +@@ -338,7 +346,11 @@ class FaceRecognitionNodelet : public op + text_bl = r.br() + cv::Point(-r.width, text_height); + std::stringstream ss; + ss << face.label << " (" << std::fixed << std::setprecision(2) << face.confidence << ")"; ++#if CV_MAJOR_VERSION > 3 ++ cv::putText(img, ss.str(), text_bl, cv::FONT_HERSHEY_PLAIN, font_scale, color, boldness, cv::LINE_AA); ++#else + cv::putText(img, ss.str(), text_bl, cv::FONT_HERSHEY_PLAIN, font_scale, color, boldness, CV_AA); ++#endif + } + + void extractImage(const cv::Mat& img, const opencv_apps::Rect& rect, cv::Mat& ret, double padding = 0.0) +@@ -548,7 +560,7 @@ class FaceRecognitionNodelet : public op + if (config.model_method == "eigen") + { + // https://docs.opencv.org/3.3.1/da/d60/tutorial_face_main.html +-#if CV_MAJOR_VERSION >= 3 && CV_MINOR_VERSION >= 3 ++#if CV_MAJOR_VERSION > 3 || (CV_MAJOR_VERSION >= 3 && CV_MINOR_VERSION >= 3) + model_ = face::EigenFaceRecognizer::create(config.model_num_components, config.model_threshold); + #else + model_ = face::createEigenFaceRecognizer(config.model_num_components, config.model_threshold); +@@ -556,7 +568,7 @@ class FaceRecognitionNodelet : public op + } + else if (config.model_method == "fisher") + { +-#if CV_MAJOR_VERSION >= 3 && CV_MINOR_VERSION >= 3 ++#if CV_MAJOR_VERSION > 3 || (CV_MAJOR_VERSION >= 3 && CV_MINOR_VERSION >= 3) + model_ = face::FisherFaceRecognizer::create(config.model_num_components, config.model_threshold); + #else + model_ = face::createFisherFaceRecognizer(config.model_num_components, config.model_threshold); +@@ -564,7 +576,7 @@ class FaceRecognitionNodelet : public op + } + else if (config.model_method == "LBPH") + { +-#if CV_MAJOR_VERSION >= 3 && CV_MINOR_VERSION >= 3 ++#if CV_MAJOR_VERSION > 3 || (CV_MAJOR_VERSION >= 3 && CV_MINOR_VERSION >= 3) + model_ = face::LBPHFaceRecognizer::create(config.lbph_radius, config.lbph_neighbors, config.lbph_grid_x, + config.lbph_grid_y); + #else +Index: opencv_apps-2.0.1/src/nodelet/segment_objects_nodelet.cpp +=================================================================== +--- opencv_apps-2.0.1.orig/src/nodelet/segment_objects_nodelet.cpp ++++ opencv_apps-2.0.1/src/nodelet/segment_objects_nodelet.cpp +@@ -179,7 +179,11 @@ class SegmentObjectsNodelet : public ope + } + } + cv::Scalar color(0, 0, 255); ++#if CV_MAJOR_VERSION > 3 ++ cv::drawContours(out_frame, contours, largest_comp, color, cv::FILLED, 8, hierarchy); ++#else + cv::drawContours(out_frame, contours, largest_comp, color, CV_FILLED, 8, hierarchy); ++#endif + + std_msgs::Float64 area_msg; + area_msg.data = max_area; +Index: opencv_apps-2.0.1/src/nodelet/simple_flow_nodelet.cpp +=================================================================== +--- opencv_apps-2.0.1.orig/src/nodelet/simple_flow_nodelet.cpp ++++ opencv_apps-2.0.1/src/nodelet/simple_flow_nodelet.cpp +@@ -46,7 +46,7 @@ + #include <opencv2/highgui/highgui.hpp> + #include <opencv2/imgproc/imgproc.hpp> + #include <opencv2/video/tracking.hpp> +-#if CV_MAJOR_VERSION == 3 ++#if CV_MAJOR_VERSION >= 3 + #include <opencv2/optflow.hpp> + #endif + +@@ -163,8 +163,8 @@ class SimpleFlowNodelet : public opencv_ + } + + float start = (float)cv::getTickCount(); +-#if CV_MAJOR_VERSION == 3 +- cv::optflow::calcOpticalFlowSF(gray, prevGray, ++#if CV_MAJOR_VERSION >= 3 ++ cv::optflow::calcOpticalFlowSF(gray, prevGray, + #else + cv::calcOpticalFlowSF(gray, prevGray, + #endif diff --git a/dev-ros/opencv_apps/opencv_apps-2.0.0-r1.ebuild b/dev-ros/opencv_apps/opencv_apps-2.0.1.ebuild index ddf09bbd814e..74105169c2d5 100644 --- a/dev-ros/opencv_apps/opencv_apps-2.0.0-r1.ebuild +++ b/dev-ros/opencv_apps/opencv_apps-2.0.1.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2017 Gentoo Foundation +# Copyright 1999-2019 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=5 @@ -27,3 +27,4 @@ RDEPEND=" dev-libs/boost:= " DEPEND="${RDEPEND}" +PATCHES=( "${FILESDIR}/ocv4.patch" ) |