diff options
9 files changed, 93 insertions, 590 deletions
diff --git a/meta-oe/recipes-support/opencv/opencv/0001-3rdparty-ippicv-Use-pre-downloaded-ipp.patch b/meta-oe/recipes-support/opencv/opencv/0001-3rdparty-ippicv-Use-pre-downloaded-ipp.patch index 1077d05be5..4d76ad40ce 100644 --- a/meta-oe/recipes-support/opencv/opencv/0001-3rdparty-ippicv-Use-pre-downloaded-ipp.patch +++ b/meta-oe/recipes-support/opencv/opencv/0001-3rdparty-ippicv-Use-pre-downloaded-ipp.patch | |||
| @@ -1,28 +1,38 @@ | |||
| 1 | From 049f931207631aa54af55a2917318d032b2ef3fa Mon Sep 17 00:00:00 2001 | 1 | From 4801a057730632225337d7f6d26b9335e6b9b078 Mon Sep 17 00:00:00 2001 |
| 2 | From: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com> | 2 | From: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com> |
| 3 | Date: Thu, 31 Mar 2016 00:20:15 +0200 | 3 | Date: Thu, 31 Mar 2016 00:20:15 +0200 |
| 4 | Subject: [PATCH] 3rdparty/ippicv: Use pre-downloaded ipp | 4 | Subject: [PATCH] 3rdparty/ippicv: Use pre-downloaded ipp |
| 5 | 5 | ||
| 6 | Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com> | 6 | Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com> |
| 7 | Signed-off-by: Ismo Puustinen <ismo.puustinen@intel.com> | ||
| 7 | --- | 8 | --- |
| 8 | 3rdparty/ippicv/downloader.cmake | 2 ++ | 9 | 3rdparty/ippicv/ippicv.cmake | 15 +-------------- |
| 9 | 1 file changed, 2 insertions(+) | 10 | 1 file changed, 1 insertion(+), 14 deletions(-) |
| 10 | 11 | ||
| 11 | diff --git a/3rdparty/ippicv/downloader.cmake b/3rdparty/ippicv/downloader.cmake | 12 | diff --git a/3rdparty/ippicv/ippicv.cmake b/3rdparty/ippicv/ippicv.cmake |
| 12 | index a6016dbe10bc..af4062c8e95e 100644 | 13 | index d601da4bb..f6fc1098c 100644 |
| 13 | --- a/3rdparty/ippicv/downloader.cmake | 14 | --- a/3rdparty/ippicv/ippicv.cmake |
| 14 | +++ b/3rdparty/ippicv/downloader.cmake | 15 | +++ b/3rdparty/ippicv/ippicv.cmake |
| 15 | @@ -31,8 +31,10 @@ function(_icv_downloader) | 16 | @@ -39,18 +39,5 @@ function(download_ippicv root_var) |
| 16 | return() # Not supported | ||
| 17 | endif() | 17 | endif() |
| 18 | 18 | ||
| 19 | + if(NOT DEFINED OPENCV_ICV_PATH) | 19 | set(THE_ROOT "${OpenCV_BINARY_DIR}/3rdparty/ippicv") |
| 20 | set(OPENCV_ICV_UNPACK_PATH "${CMAKE_BINARY_DIR}/3rdparty/ippicv") | 20 | - ocv_download(FILENAME ${OPENCV_ICV_NAME} |
| 21 | set(OPENCV_ICV_PATH "${OPENCV_ICV_UNPACK_PATH}${OPENCV_ICV_PACKAGE_SUBDIR}") | 21 | - HASH ${OPENCV_ICV_HASH} |
| 22 | + endif() | 22 | - URL |
| 23 | 23 | - "${OPENCV_IPPICV_URL}" | |
| 24 | if(DEFINED OPENCV_ICV_PACKAGE_DOWNLOADED | 24 | - "$ENV{OPENCV_IPPICV_URL}" |
| 25 | AND OPENCV_ICV_PACKAGE_DOWNLOADED STREQUAL OPENCV_ICV_PACKAGE_HASH | 25 | - "https://raw.githubusercontent.com/opencv/opencv_3rdparty/${IPPICV_COMMIT}/ippicv/" |
| 26 | - DESTINATION_DIR "${THE_ROOT}" | ||
| 27 | - ID IPPICV | ||
| 28 | - STATUS res | ||
| 29 | - UNPACK RELATIVE_URL) | ||
| 30 | - | ||
| 31 | - if(res) | ||
| 32 | - set(${root_var} "${THE_ROOT}/${OPENCV_ICV_PACKAGE_SUBDIR}" PARENT_SCOPE) | ||
| 33 | - endif() | ||
| 34 | + set(${root_var} "${THE_ROOT}/${OPENCV_ICV_PACKAGE_SUBDIR}" PARENT_SCOPE) | ||
| 35 | endfunction() | ||
| 26 | -- | 36 | -- |
| 27 | 2.8.0.rc3 | 37 | 2.13.4 |
| 28 | 38 | ||
diff --git a/meta-oe/recipes-support/opencv/opencv/0001-Revert-cuda-fix-fp16-compilation.patch b/meta-oe/recipes-support/opencv/opencv/0001-Revert-cuda-fix-fp16-compilation.patch deleted file mode 100644 index 507d7968a0..0000000000 --- a/meta-oe/recipes-support/opencv/opencv/0001-Revert-cuda-fix-fp16-compilation.patch +++ /dev/null | |||
| @@ -1,27 +0,0 @@ | |||
| 1 | From 69f9707678190f6a0948a547dce948251f972676 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Randy MacLeod <Randy.MacLeod@windriver.com> | ||
| 3 | Date: Wed, 26 Apr 2017 14:57:30 -0400 | ||
| 4 | Subject: [PATCH 1/2] Revert "cuda: fix fp16 compilation" | ||
| 5 | |||
| 6 | This reverts commit 12e00827be40576b686ea4438a6e6ef85208743d. | ||
| 7 | --- | ||
| 8 | modules/core/include/opencv2/core/cvdef.h | 3 +-- | ||
| 9 | 1 file changed, 1 insertion(+), 2 deletions(-) | ||
| 10 | |||
| 11 | diff --git a/modules/core/include/opencv2/core/cvdef.h b/modules/core/include/opencv2/core/cvdef.h | ||
| 12 | index 699b166..efc24ca 100644 | ||
| 13 | --- a/modules/core/include/opencv2/core/cvdef.h | ||
| 14 | +++ b/modules/core/include/opencv2/core/cvdef.h | ||
| 15 | @@ -303,8 +303,7 @@ enum CpuFeatures { | ||
| 16 | #define CV_2PI 6.283185307179586476925286766559 | ||
| 17 | #define CV_LOG2 0.69314718055994530941723212145818 | ||
| 18 | |||
| 19 | -#if defined __ARM_FP16_FORMAT_IEEE \ | ||
| 20 | - && !defined __CUDACC__ | ||
| 21 | +#if defined (__ARM_FP16_FORMAT_IEEE) | ||
| 22 | # define CV_FP16_TYPE 1 | ||
| 23 | #else | ||
| 24 | # define CV_FP16_TYPE 0 | ||
| 25 | -- | ||
| 26 | 2.9.3 | ||
| 27 | |||
diff --git a/meta-oe/recipes-support/opencv/opencv/0001-tracking-make-opencv_dnn-dependancy-optional.patch b/meta-oe/recipes-support/opencv/opencv/0001-tracking-make-opencv_dnn-dependancy-optional.patch deleted file mode 100644 index fba43eba75..0000000000 --- a/meta-oe/recipes-support/opencv/opencv/0001-tracking-make-opencv_dnn-dependancy-optional.patch +++ /dev/null | |||
| @@ -1,243 +0,0 @@ | |||
| 1 | From 69f86025978b9bbbefa54a7248316a859773aeaf Mon Sep 17 00:00:00 2001 | ||
| 2 | From: berak <px1704@web.de> | ||
| 3 | Date: Sat, 4 Mar 2017 12:38:50 +0100 | ||
| 4 | Subject: [PATCH] tracking: make opencv_dnn dependancy optional | ||
| 5 | |||
| 6 | Upstream-status: Backport [https://github.com/opencv/opencv_contrib/commit/43925b60d392fbd01d6b0449713f010f9babe448] | ||
| 7 | Signed-off-by: Ismo Puustinen <ismo.puustinen@intel.com> | ||
| 8 | |||
| 9 | --- | ||
| 10 | modules/tracking/CMakeLists.txt | 3 +-- | ||
| 11 | modules/tracking/samples/goturnTracker.cpp | 22 +++++++++++++++++++--- | ||
| 12 | modules/tracking/samples/multiTracker_dataset.cpp | 1 + | ||
| 13 | modules/tracking/samples/tracker_dataset.cpp | 1 + | ||
| 14 | modules/tracking/src/gtrTracker.cpp | 11 ++++++++++- | ||
| 15 | modules/tracking/src/gtrTracker.hpp | 12 ++++++++---- | ||
| 16 | modules/tracking/src/gtrUtils.cpp | 6 +++--- | ||
| 17 | modules/tracking/src/gtrUtils.hpp | 5 ++--- | ||
| 18 | modules/tracking/src/tracker.cpp | 1 + | ||
| 19 | 9 files changed, 46 insertions(+), 16 deletions(-) | ||
| 20 | |||
| 21 | diff --git a/modules/tracking/CMakeLists.txt b/modules/tracking/CMakeLists.txt | ||
| 22 | index a8b3183..d27f999 100644 | ||
| 23 | --- a/modules/tracking/CMakeLists.txt | ||
| 24 | +++ b/modules/tracking/CMakeLists.txt | ||
| 25 | @@ -1,2 +1 @@ | ||
| 26 | -set(the_description "Tracking API") | ||
| 27 | -ocv_define_module(tracking opencv_imgproc opencv_core opencv_video opencv_highgui opencv_dnn opencv_plot OPTIONAL opencv_datasets WRAP python) | ||
| 28 | \ No newline at end of file | ||
| 29 | +ocv_define_module(tracking opencv_imgproc opencv_core opencv_video opencv_highgui opencv_plot OPTIONAL opencv_dnn opencv_datasets WRAP python) | ||
| 30 | diff --git a/modules/tracking/samples/goturnTracker.cpp b/modules/tracking/samples/goturnTracker.cpp | ||
| 31 | index 389771e..1e6632d 100644 | ||
| 32 | --- a/modules/tracking/samples/goturnTracker.cpp | ||
| 33 | +++ b/modules/tracking/samples/goturnTracker.cpp | ||
| 34 | @@ -45,6 +45,9 @@ | ||
| 35 | //1 - Train you own GOTURN model using <https://github.com/Auron-X/GOTURN_Training_Toolkit> | ||
| 36 | //2 - Download pretrained caffemodel from <https://github.com/opencv/opencv_extra> | ||
| 37 | |||
| 38 | +#include "opencv2/opencv_modules.hpp" | ||
| 39 | +#if defined(HAVE_OPENCV_DNN) && defined(HAVE_OPENCV_DATASETS) | ||
| 40 | + | ||
| 41 | #include "opencv2/datasets/track_alov.hpp" | ||
| 42 | #include <opencv2/core/utility.hpp> | ||
| 43 | #include <opencv2/tracking.hpp> | ||
| 44 | @@ -65,8 +68,8 @@ static bool startSelection = false; | ||
| 45 | Rect2d boundingBox; | ||
| 46 | |||
| 47 | static const char* keys = | ||
| 48 | -{ "{@dataset_path |true| Dataset path }" | ||
| 49 | -"{@dataset_id |1| Dataset ID }" | ||
| 50 | +{ "{@dataset_path || Dataset path }" | ||
| 51 | + "{@dataset_id |1| Dataset ID }" | ||
| 52 | }; | ||
| 53 | |||
| 54 | static void onMouse(int event, int x, int y, int, void*) | ||
| 55 | @@ -144,9 +147,14 @@ int main(int argc, char *argv[]) | ||
| 56 | Ptr<cv::datasets::TRACK_alov> dataset = TRACK_alov::create(); | ||
| 57 | dataset->load(datasetRootPath); | ||
| 58 | dataset->initDataset(datasetID); | ||
| 59 | - | ||
| 60 | //Read first frame | ||
| 61 | dataset->getNextFrame(frame); | ||
| 62 | + if (frame.empty()) | ||
| 63 | + { | ||
| 64 | + cout << "invalid dataset: " << datasetRootPath << endl; | ||
| 65 | + return -2; | ||
| 66 | + } | ||
| 67 | + | ||
| 68 | frame.copyTo(image); | ||
| 69 | rectangle(image, boundingBox, Scalar(255, 0, 0), 2, 1); | ||
| 70 | imshow("GOTURN Tracking", image); | ||
| 71 | @@ -215,3 +223,11 @@ int main(int argc, char *argv[]) | ||
| 72 | |||
| 73 | return 0; | ||
| 74 | } | ||
| 75 | + | ||
| 76 | +#else // ! HAVE_OPENCV_DNN && HAVE_OPENCV_DATASETS | ||
| 77 | +#include <opencv2/core.hpp> | ||
| 78 | +int main() { | ||
| 79 | + CV_Error(cv::Error::StsNotImplemented , "this sample needs to be built with opencv_datasets and opencv_dnn !"); | ||
| 80 | + return -1; | ||
| 81 | +} | ||
| 82 | +#endif | ||
| 83 | diff --git a/modules/tracking/samples/multiTracker_dataset.cpp b/modules/tracking/samples/multiTracker_dataset.cpp | ||
| 84 | index 2826b19..b5c27da 100644 | ||
| 85 | --- a/modules/tracking/samples/multiTracker_dataset.cpp | ||
| 86 | +++ b/modules/tracking/samples/multiTracker_dataset.cpp | ||
| 87 | @@ -234,6 +234,7 @@ int main(int argc, char *argv[]) | ||
| 88 | } | ||
| 89 | |||
| 90 | #else // ! HAVE_OPENCV_DATASETS | ||
| 91 | +#include <opencv2/core.hpp> | ||
| 92 | int main() { | ||
| 93 | CV_Error(cv::Error::StsNotImplemented , "this sample needs to be built with opencv_datasets !"); | ||
| 94 | return -1; | ||
| 95 | diff --git a/modules/tracking/samples/tracker_dataset.cpp b/modules/tracking/samples/tracker_dataset.cpp | ||
| 96 | index 8b7832a..6178105 100644 | ||
| 97 | --- a/modules/tracking/samples/tracker_dataset.cpp | ||
| 98 | +++ b/modules/tracking/samples/tracker_dataset.cpp | ||
| 99 | @@ -234,6 +234,7 @@ int main(int argc, char *argv[]) | ||
| 100 | |||
| 101 | |||
| 102 | #else // ! HAVE_OPENCV_DATASETS | ||
| 103 | +#include <opencv2/core.hpp> | ||
| 104 | int main() { | ||
| 105 | CV_Error(cv::Error::StsNotImplemented , "this sample needs to be built with opencv_datasets !"); | ||
| 106 | return -1; | ||
| 107 | diff --git a/modules/tracking/src/gtrTracker.cpp b/modules/tracking/src/gtrTracker.cpp | ||
| 108 | index 58debfd..4904f47 100644 | ||
| 109 | --- a/modules/tracking/src/gtrTracker.cpp | ||
| 110 | +++ b/modules/tracking/src/gtrTracker.cpp | ||
| 111 | @@ -38,7 +38,7 @@ | ||
| 112 | // the use of this software, even if advised of the possibility of such damage. | ||
| 113 | // | ||
| 114 | //M*/ | ||
| 115 | - | ||
| 116 | +#include "opencv2/opencv_modules.hpp" | ||
| 117 | #include "gtrTracker.hpp" | ||
| 118 | |||
| 119 | |||
| 120 | @@ -54,9 +54,16 @@ void TrackerGOTURN::Params::write(cv::FileStorage& /*fs*/) const {} | ||
| 121 | |||
| 122 | Ptr<TrackerGOTURN> TrackerGOTURN::createTracker(const TrackerGOTURN::Params ¶meters) | ||
| 123 | { | ||
| 124 | +#ifdef HAVE_OPENCV_DNN | ||
| 125 | return Ptr<gtr::TrackerGOTURNImpl>(new gtr::TrackerGOTURNImpl(parameters)); | ||
| 126 | +#else | ||
| 127 | + (void)(parameters); | ||
| 128 | + CV_ErrorNoReturn(cv::Error::StsNotImplemented , "to use GOTURN, the tracking module needs to be built with opencv_dnn !"); | ||
| 129 | +#endif | ||
| 130 | } | ||
| 131 | |||
| 132 | + | ||
| 133 | +#ifdef HAVE_OPENCV_DNN | ||
| 134 | namespace gtr | ||
| 135 | { | ||
| 136 | |||
| 137 | @@ -183,9 +190,11 @@ bool TrackerGOTURNImpl::updateImpl(const Mat& image, Rect2d& boundingBox) | ||
| 138 | //Set new model image and BB from current frame | ||
| 139 | ((TrackerGOTURNModel*)static_cast<TrackerModel*>(model))->setImage(curFrame); | ||
| 140 | ((TrackerGOTURNModel*)static_cast<TrackerModel*>(model))->setBoudingBox(curBB); | ||
| 141 | + | ||
| 142 | return true; | ||
| 143 | } | ||
| 144 | |||
| 145 | } | ||
| 146 | +#endif // OPENCV_HAVE_DNN | ||
| 147 | |||
| 148 | } | ||
| 149 | diff --git a/modules/tracking/src/gtrTracker.hpp b/modules/tracking/src/gtrTracker.hpp | ||
| 150 | index 34f2c48..21ae3d9 100644 | ||
| 151 | --- a/modules/tracking/src/gtrTracker.hpp | ||
| 152 | +++ b/modules/tracking/src/gtrTracker.hpp | ||
| 153 | @@ -45,11 +45,15 @@ | ||
| 154 | |||
| 155 | #include "precomp.hpp" | ||
| 156 | #include "opencv2/video/tracking.hpp" | ||
| 157 | -#include "opencv2/dnn.hpp" | ||
| 158 | #include "gtrUtils.hpp" | ||
| 159 | #include "opencv2/imgproc.hpp" | ||
| 160 | -#include<algorithm> | ||
| 161 | -#include<limits.h> | ||
| 162 | + | ||
| 163 | +#include <algorithm> | ||
| 164 | +#include <limits.h> | ||
| 165 | + | ||
| 166 | +#include "opencv2/opencv_modules.hpp" | ||
| 167 | +#ifdef HAVE_OPENCV_DNN | ||
| 168 | +#include "opencv2/dnn.hpp" | ||
| 169 | |||
| 170 | namespace cv | ||
| 171 | { | ||
| 172 | @@ -72,5 +76,5 @@ public: | ||
| 173 | |||
| 174 | } | ||
| 175 | } | ||
| 176 | - | ||
| 177 | +#endif | ||
| 178 | #endif | ||
| 179 | diff --git a/modules/tracking/src/gtrUtils.cpp b/modules/tracking/src/gtrUtils.cpp | ||
| 180 | index 0df1197..e80dda1 100644 | ||
| 181 | --- a/modules/tracking/src/gtrUtils.cpp | ||
| 182 | +++ b/modules/tracking/src/gtrUtils.cpp | ||
| 183 | @@ -58,7 +58,7 @@ double generateRandomLaplacian(double b, double m) | ||
| 184 | return m - b*log(n); | ||
| 185 | } | ||
| 186 | |||
| 187 | -Rect2f anno2rect(vector<Point2f> annoBB) | ||
| 188 | +Rect2f anno2rect(std::vector<Point2f> annoBB) | ||
| 189 | { | ||
| 190 | Rect2f rectBB; | ||
| 191 | rectBB.x = min(annoBB[0].x, annoBB[1].x); | ||
| 192 | @@ -69,9 +69,9 @@ Rect2f anno2rect(vector<Point2f> annoBB) | ||
| 193 | return rectBB; | ||
| 194 | } | ||
| 195 | |||
| 196 | -vector <TrainingSample> gatherFrameSamples(Mat prevFrame, Mat currFrame, Rect2f prevBB, Rect2f currBB) | ||
| 197 | +std::vector <TrainingSample> gatherFrameSamples(Mat prevFrame, Mat currFrame, Rect2f prevBB, Rect2f currBB) | ||
| 198 | { | ||
| 199 | - vector <TrainingSample> trainingSamples; | ||
| 200 | + std::vector <TrainingSample> trainingSamples; | ||
| 201 | Point2f currCenter, prevCenter; | ||
| 202 | Rect2f targetPatchRect, searchPatchRect; | ||
| 203 | Mat targetPatch, searchPatch; | ||
| 204 | diff --git a/modules/tracking/src/gtrUtils.hpp b/modules/tracking/src/gtrUtils.hpp | ||
| 205 | index 8f388be..41aad21 100644 | ||
| 206 | --- a/modules/tracking/src/gtrUtils.hpp | ||
| 207 | +++ b/modules/tracking/src/gtrUtils.hpp | ||
| 208 | @@ -4,7 +4,6 @@ | ||
| 209 | #include "precomp.hpp" | ||
| 210 | #include <vector> | ||
| 211 | #include "opencv2/highgui.hpp" | ||
| 212 | -#include <opencv2/datasets/track_alov.hpp> | ||
| 213 | |||
| 214 | namespace cv | ||
| 215 | { | ||
| 216 | @@ -50,10 +49,10 @@ struct TrainingSample | ||
| 217 | double generateRandomLaplacian(double b, double m); | ||
| 218 | |||
| 219 | //Convert ALOV300++ anno coordinates to Rectangle BB | ||
| 220 | -Rect2f anno2rect(vector<Point2f> annoBB); | ||
| 221 | +Rect2f anno2rect(std::vector<Point2f> annoBB); | ||
| 222 | |||
| 223 | //Gather samples from random video frame | ||
| 224 | -vector <TrainingSample> gatherFrameSamples(Mat prevFrame, Mat currFrame, Rect2f prevBB, Rect2f currBB); | ||
| 225 | +std::vector <TrainingSample> gatherFrameSamples(Mat prevFrame, Mat currFrame, Rect2f prevBB, Rect2f currBB); | ||
| 226 | |||
| 227 | } | ||
| 228 | } | ||
| 229 | diff --git a/modules/tracking/src/tracker.cpp b/modules/tracking/src/tracker.cpp | ||
| 230 | index 8127f2a..b96aca8 100644 | ||
| 231 | --- a/modules/tracking/src/tracker.cpp | ||
| 232 | +++ b/modules/tracking/src/tracker.cpp | ||
| 233 | @@ -112,6 +112,7 @@ Ptr<Tracker> Tracker::create( const String& trackerType ) | ||
| 234 | BOILERPLATE_CODE("TLD",TrackerTLD); | ||
| 235 | BOILERPLATE_CODE("KCF",TrackerKCF); | ||
| 236 | BOILERPLATE_CODE("GOTURN", TrackerGOTURN); | ||
| 237 | + | ||
| 238 | return Ptr<Tracker>(); | ||
| 239 | } | ||
| 240 | |||
| 241 | -- | ||
| 242 | 2.9.4 | ||
| 243 | |||
diff --git a/meta-oe/recipes-support/opencv/opencv/0001-Make-opencv-ts-create-share-library-intead-of-static.patch b/meta-oe/recipes-support/opencv/opencv/0002-Make-opencv-ts-create-share-library-intead-of-static.patch index 05ec41fd80..a845505a85 100644 --- a/meta-oe/recipes-support/opencv/opencv/0001-Make-opencv-ts-create-share-library-intead-of-static.patch +++ b/meta-oe/recipes-support/opencv/opencv/0002-Make-opencv-ts-create-share-library-intead-of-static.patch | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | From 49d1f7c40a5d097f23671318045ac54bc07846cf Mon Sep 17 00:00:00 2001 | 1 | From 350525293aef65490e80104ddd99e1b21c5d54b0 Mon Sep 17 00:00:00 2001 |
| 2 | From: Bian Naimeng <biannm@cn.fujitsu.com> | 2 | From: Bian Naimeng <biannm@cn.fujitsu.com> |
| 3 | Date: Wed, 19 Apr 2017 03:11:37 +0900 | 3 | Date: Wed, 19 Apr 2017 03:11:37 +0900 |
| 4 | Subject: [PATCH] Make opencv-ts create share library intead of static. | 4 | Subject: [PATCH 2/3] Make opencv-ts create share library intead of static. |
| 5 | 5 | ||
| 6 | Signed-off-by: Lei Maohui <leimaohui@cn.fujitsu.com> | 6 | Signed-off-by: Lei Maohui <leimaohui@cn.fujitsu.com> |
| 7 | --- | 7 | --- |
| @@ -9,10 +9,10 @@ Signed-off-by: Lei Maohui <leimaohui@cn.fujitsu.com> | |||
| 9 | 1 file changed, 1 insertion(+), 1 deletion(-) | 9 | 1 file changed, 1 insertion(+), 1 deletion(-) |
| 10 | 10 | ||
| 11 | diff --git a/modules/ts/CMakeLists.txt b/modules/ts/CMakeLists.txt | 11 | diff --git a/modules/ts/CMakeLists.txt b/modules/ts/CMakeLists.txt |
| 12 | index bb56da2..7bb4ce9 100644 | 12 | index f95bed079..ee67858df 100644 |
| 13 | --- a/modules/ts/CMakeLists.txt | 13 | --- a/modules/ts/CMakeLists.txt |
| 14 | +++ b/modules/ts/CMakeLists.txt | 14 | +++ b/modules/ts/CMakeLists.txt |
| 15 | @@ -4,7 +4,7 @@ if(IOS) | 15 | @@ -4,7 +4,7 @@ if(NOT BUILD_opencv_ts AND NOT BUILD_TESTS AND NOT BUILD_PERF_TESTS) |
| 16 | ocv_module_disable(ts) | 16 | ocv_module_disable(ts) |
| 17 | endif() | 17 | endif() |
| 18 | 18 | ||
| @@ -20,7 +20,7 @@ index bb56da2..7bb4ce9 100644 | |||
| 20 | +#set(OPENCV_MODULE_TYPE STATIC) | 20 | +#set(OPENCV_MODULE_TYPE STATIC) |
| 21 | set(OPENCV_MODULE_IS_PART_OF_WORLD FALSE) | 21 | set(OPENCV_MODULE_IS_PART_OF_WORLD FALSE) |
| 22 | 22 | ||
| 23 | ocv_warnings_disable(CMAKE_CXX_FLAGS -Wundef) | 23 | if(WINRT) |
| 24 | -- | 24 | -- |
| 25 | 1.8.4.2 | 25 | 2.13.4 |
| 26 | 26 | ||
diff --git a/meta-oe/recipes-support/opencv/opencv/0002-Revert-check-FP16-build-condition-correctly.patch b/meta-oe/recipes-support/opencv/opencv/0002-Revert-check-FP16-build-condition-correctly.patch deleted file mode 100644 index d1950a9361..0000000000 --- a/meta-oe/recipes-support/opencv/opencv/0002-Revert-check-FP16-build-condition-correctly.patch +++ /dev/null | |||
| @@ -1,245 +0,0 @@ | |||
| 1 | From 9108e39e5584ef9b41f80751639b4ec72b3e9538 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Randy MacLeod <Randy.MacLeod@windriver.com> | ||
| 3 | Date: Wed, 26 Apr 2017 15:00:32 -0400 | ||
| 4 | Subject: [PATCH 2/2] Revert "check FP16 build condition correctly" | ||
| 5 | |||
| 6 | This reverts commit c7cb116dc08441fe56cf82d5b21f929e5b674c13. | ||
| 7 | |||
| 8 | Fix up revert conflicts to take previous behaviour. | ||
| 9 | --- | ||
| 10 | cmake/OpenCVCompilerOptions.cmake | 45 +++++++++-------------- | ||
| 11 | modules/core/include/opencv2/core/cvdef.h | 2 +- | ||
| 12 | modules/core/src/convert.cpp | 11 +++--- | ||
| 13 | modules/core/test/test_intrin.cpp | 60 ++++++++++++++----------------- | ||
| 14 | 4 files changed, 48 insertions(+), 70 deletions(-) | ||
| 15 | |||
| 16 | diff --git a/cmake/OpenCVCompilerOptions.cmake b/cmake/OpenCVCompilerOptions.cmake | ||
| 17 | index 5bb0479..4b19fdb 100644 | ||
| 18 | --- a/cmake/OpenCVCompilerOptions.cmake | ||
| 19 | +++ b/cmake/OpenCVCompilerOptions.cmake | ||
| 20 | @@ -185,7 +185,7 @@ if(CMAKE_COMPILER_IS_GNUCXX) | ||
| 21 | add_extra_compiler_option("-mfp16-format=ieee") | ||
| 22 | endif(ARM) | ||
| 23 | if(ENABLE_NEON) | ||
| 24 | - add_extra_compiler_option("-mfpu=neon") | ||
| 25 | + add_extra_compiler_option("-mfpu=neon-fp16") | ||
| 26 | endif() | ||
| 27 | if(ENABLE_VFPV3 AND NOT ENABLE_NEON) | ||
| 28 | add_extra_compiler_option("-mfpu=vfpv3") | ||
| 29 | @@ -370,34 +370,6 @@ if(CMAKE_COMPILER_IS_GNUCXX AND CMAKE_OPENCV_GCC_VERSION_NUM GREATER 399) | ||
| 30 | add_extra_compiler_option(-fvisibility-inlines-hidden) | ||
| 31 | endif() | ||
| 32 | |||
| 33 | -if(NOT OPENCV_FP16_DISABLE AND NOT IOS) | ||
| 34 | - if(ARM AND ENABLE_NEON) | ||
| 35 | - set(FP16_OPTION "-mfpu=neon-fp16") | ||
| 36 | - elseif((X86 OR X86_64) AND NOT MSVC AND ENABLE_AVX) | ||
| 37 | - set(FP16_OPTION "-mf16c") | ||
| 38 | - endif() | ||
| 39 | - try_compile(__VALID_FP16 | ||
| 40 | - "${OpenCV_BINARY_DIR}" | ||
| 41 | - "${OpenCV_SOURCE_DIR}/cmake/checks/fp16.cpp" | ||
| 42 | - COMPILE_DEFINITIONS "-DCHECK_FP16" "${FP16_OPTION}" | ||
| 43 | - OUTPUT_VARIABLE TRY_OUT | ||
| 44 | - ) | ||
| 45 | - if(NOT __VALID_FP16) | ||
| 46 | - if((X86 OR X86_64) AND NOT MSVC AND NOT ENABLE_AVX) | ||
| 47 | - # GCC enables AVX when mf16c is passed | ||
| 48 | - message(STATUS "FP16: Feature disabled") | ||
| 49 | - else() | ||
| 50 | - message(STATUS "FP16: Compiler support is not available") | ||
| 51 | - endif() | ||
| 52 | - else() | ||
| 53 | - message(STATUS "FP16: Compiler support is available") | ||
| 54 | - set(HAVE_FP16 1) | ||
| 55 | - if(NOT ${FP16_OPTION} STREQUAL "") | ||
| 56 | - add_extra_compiler_option(${FP16_OPTION}) | ||
| 57 | - endif() | ||
| 58 | - endif() | ||
| 59 | -endif() | ||
| 60 | - | ||
| 61 | #combine all "extra" options | ||
| 62 | set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OPENCV_EXTRA_FLAGS} ${OPENCV_EXTRA_C_FLAGS}") | ||
| 63 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OPENCV_EXTRA_FLAGS} ${OPENCV_EXTRA_CXX_FLAGS}") | ||
| 64 | @@ -450,6 +422,21 @@ if(MSVC) | ||
| 65 | endif() | ||
| 66 | endif() | ||
| 67 | |||
| 68 | +if(NOT OPENCV_FP16_DISABLE) | ||
| 69 | + try_compile(__VALID_FP16 | ||
| 70 | + "${OpenCV_BINARY_DIR}" | ||
| 71 | + "${OpenCV_SOURCE_DIR}/cmake/checks/fp16.cpp" | ||
| 72 | + COMPILE_DEFINITIONS "-DCHECK_FP16" | ||
| 73 | + OUTPUT_VARIABLE TRY_OUT | ||
| 74 | + ) | ||
| 75 | + if(NOT __VALID_FP16) | ||
| 76 | + message(STATUS "FP16: Compiler support is not available") | ||
| 77 | + else() | ||
| 78 | + message(STATUS "FP16: Compiler support is available") | ||
| 79 | + set(HAVE_FP16 1) | ||
| 80 | + endif() | ||
| 81 | +endif() | ||
| 82 | + | ||
| 83 | if(APPLE AND NOT CMAKE_CROSSCOMPILING AND NOT DEFINED ENV{LDFLAGS} AND EXISTS "/usr/local/lib") | ||
| 84 | link_directories("/usr/local/lib") | ||
| 85 | endif() | ||
| 86 | diff --git a/modules/core/include/opencv2/core/cvdef.h b/modules/core/include/opencv2/core/cvdef.h | ||
| 87 | index efc24ca..a10936b 100644 | ||
| 88 | --- a/modules/core/include/opencv2/core/cvdef.h | ||
| 89 | +++ b/modules/core/include/opencv2/core/cvdef.h | ||
| 90 | @@ -312,7 +312,7 @@ enum CpuFeatures { | ||
| 91 | typedef union Cv16suf | ||
| 92 | { | ||
| 93 | short i; | ||
| 94 | -#if CV_FP16_TYPE | ||
| 95 | +#if ( defined (__arm__) || defined (__aarch64__) ) && !defined (__CUDACC__) && ( defined (__GNUC__) && ( ( ( 4 <= __GNUC__ ) && ( 7 <= __GNUC__ ) ) || ( 5 <= __GNUC__ ) ) ) | ||
| 96 | __fp16 h; | ||
| 97 | #endif | ||
| 98 | struct _fp16Format | ||
| 99 | diff --git a/modules/core/src/convert.cpp b/modules/core/src/convert.cpp | ||
| 100 | index e04d89e..46db26f 100644 | ||
| 101 | --- a/modules/core/src/convert.cpp | ||
| 102 | +++ b/modules/core/src/convert.cpp | ||
| 103 | @@ -44,7 +44,6 @@ | ||
| 104 | #include "precomp.hpp" | ||
| 105 | |||
| 106 | #include "opencl_kernels_core.hpp" | ||
| 107 | -#include "opencv2/core/hal/intrin.hpp" | ||
| 108 | |||
| 109 | #include "opencv2/core/openvx/ovx_defs.hpp" | ||
| 110 | |||
| 111 | @@ -4382,7 +4381,7 @@ struct Cvt_SIMD<float, int> | ||
| 112 | |||
| 113 | #endif | ||
| 114 | |||
| 115 | -#if !CV_FP16_TYPE | ||
| 116 | +#if !( ( defined (__arm__) || defined (__aarch64__) ) && ( defined (__GNUC__) && ( ( ( 4 <= __GNUC__ ) && ( 7 <= __GNUC__ ) ) || ( 5 <= __GNUC__ ) ) ) ) | ||
| 117 | // const numbers for floating points format | ||
| 118 | const unsigned int kShiftSignificand = 13; | ||
| 119 | const unsigned int kMaskFp16Significand = 0x3ff; | ||
| 120 | @@ -4390,7 +4389,7 @@ const unsigned int kBiasFp16Exponent = 15; | ||
| 121 | const unsigned int kBiasFp32Exponent = 127; | ||
| 122 | #endif | ||
| 123 | |||
| 124 | -#if CV_FP16_TYPE | ||
| 125 | +#if ( defined (__arm__) || defined (__aarch64__) ) && ( defined (__GNUC__) && ( ( ( 4 <= __GNUC__ ) && ( 7 <= __GNUC__ ) ) || ( 5 <= __GNUC__ ) ) ) | ||
| 126 | static float convertFp16SW(short fp16) | ||
| 127 | { | ||
| 128 | // Fp16 -> Fp32 | ||
| 129 | @@ -4452,7 +4451,7 @@ static float convertFp16SW(short fp16) | ||
| 130 | } | ||
| 131 | #endif | ||
| 132 | |||
| 133 | -#if CV_FP16_TYPE | ||
| 134 | +#if ( defined (__arm__) || defined (__aarch64__) ) && ( defined (__GNUC__) && ( ( ( 4 <= __GNUC__ ) && ( 7 <= __GNUC__ ) ) || ( 5 <= __GNUC__ ) ) ) | ||
| 135 | static short convertFp16SW(float fp32) | ||
| 136 | { | ||
| 137 | // Fp32 -> Fp16 | ||
| 138 | @@ -4560,7 +4559,7 @@ cvtScaleHalf_<float, short>( const float* src, size_t sstep, short* dst, size_t | ||
| 139 | if ( ( (intptr_t)dst & 0xf ) == 0 ) | ||
| 140 | #endif | ||
| 141 | { | ||
| 142 | -#if CV_FP16 && CV_SIMD128 | ||
| 143 | +#if CV_FP16 | ||
| 144 | for ( ; x <= size.width - 4; x += 4) | ||
| 145 | { | ||
| 146 | v_float32x4 v_src = v_load(src + x); | ||
| 147 | @@ -4606,7 +4605,7 @@ cvtScaleHalf_<short, float>( const short* src, size_t sstep, float* dst, size_t | ||
| 148 | if ( ( (intptr_t)src & 0xf ) == 0 ) | ||
| 149 | #endif | ||
| 150 | { | ||
| 151 | -#if CV_FP16 && CV_SIMD128 | ||
| 152 | +#if CV_FP16 | ||
| 153 | for ( ; x <= size.width - 4; x += 4) | ||
| 154 | { | ||
| 155 | v_float16x4 v_src = v_load_f16(src + x); | ||
| 156 | diff --git a/modules/core/test/test_intrin.cpp b/modules/core/test/test_intrin.cpp | ||
| 157 | index 66b2083..7349d48 100644 | ||
| 158 | --- a/modules/core/test/test_intrin.cpp | ||
| 159 | +++ b/modules/core/test/test_intrin.cpp | ||
| 160 | @@ -729,56 +729,48 @@ template<typename R> struct TheTest | ||
| 161 | return *this; | ||
| 162 | } | ||
| 163 | |||
| 164 | +#if CV_FP16 | ||
| 165 | TheTest & test_loadstore_fp16() | ||
| 166 | { | ||
| 167 | -#if CV_FP16 | ||
| 168 | AlignedData<R> data; | ||
| 169 | AlignedData<R> out; | ||
| 170 | |||
| 171 | - if(checkHardwareSupport(CV_CPU_FP16)) | ||
| 172 | - { | ||
| 173 | - // check if addresses are aligned and unaligned respectively | ||
| 174 | - EXPECT_EQ((size_t)0, (size_t)&data.a.d % 16); | ||
| 175 | - EXPECT_NE((size_t)0, (size_t)&data.u.d % 16); | ||
| 176 | - EXPECT_EQ((size_t)0, (size_t)&out.a.d % 16); | ||
| 177 | - EXPECT_NE((size_t)0, (size_t)&out.u.d % 16); | ||
| 178 | - | ||
| 179 | - // check some initialization methods | ||
| 180 | - R r1 = data.u; | ||
| 181 | - R r2 = v_load_f16(data.a.d); | ||
| 182 | - R r3(r2); | ||
| 183 | - EXPECT_EQ(data.u[0], r1.get0()); | ||
| 184 | - EXPECT_EQ(data.a[0], r2.get0()); | ||
| 185 | - EXPECT_EQ(data.a[0], r3.get0()); | ||
| 186 | - | ||
| 187 | - // check some store methods | ||
| 188 | - out.a.clear(); | ||
| 189 | - v_store_f16(out.a.d, r1); | ||
| 190 | - EXPECT_EQ(data.a, out.a); | ||
| 191 | - } | ||
| 192 | + // check if addresses are aligned and unaligned respectively | ||
| 193 | + EXPECT_EQ((size_t)0, (size_t)&data.a.d % 16); | ||
| 194 | + EXPECT_NE((size_t)0, (size_t)&data.u.d % 16); | ||
| 195 | + EXPECT_EQ((size_t)0, (size_t)&out.a.d % 16); | ||
| 196 | + EXPECT_NE((size_t)0, (size_t)&out.u.d % 16); | ||
| 197 | + | ||
| 198 | + // check some initialization methods | ||
| 199 | + R r1 = data.u; | ||
| 200 | + R r2 = v_load_f16(data.a.d); | ||
| 201 | + R r3(r2); | ||
| 202 | + EXPECT_EQ(data.u[0], r1.get0()); | ||
| 203 | + EXPECT_EQ(data.a[0], r2.get0()); | ||
| 204 | + EXPECT_EQ(data.a[0], r3.get0()); | ||
| 205 | + | ||
| 206 | + // check some store methods | ||
| 207 | + out.a.clear(); | ||
| 208 | + v_store_f16(out.a.d, r1); | ||
| 209 | + EXPECT_EQ(data.a, out.a); | ||
| 210 | |||
| 211 | return *this; | ||
| 212 | -#endif | ||
| 213 | } | ||
| 214 | |||
| 215 | TheTest & test_float_cvt_fp16() | ||
| 216 | { | ||
| 217 | -#if CV_FP16 | ||
| 218 | AlignedData<v_float32x4> data; | ||
| 219 | |||
| 220 | - if(checkHardwareSupport(CV_CPU_FP16)) | ||
| 221 | - { | ||
| 222 | - // check conversion | ||
| 223 | - v_float32x4 r1 = v_load(data.a.d); | ||
| 224 | - v_float16x4 r2 = v_cvt_f16(r1); | ||
| 225 | - v_float32x4 r3 = v_cvt_f32(r2); | ||
| 226 | - EXPECT_EQ(0x3c00, r2.get0()); | ||
| 227 | - EXPECT_EQ(r3.get0(), r1.get0()); | ||
| 228 | - } | ||
| 229 | + // check conversion | ||
| 230 | + v_float32x4 r1 = v_load(data.a.d); | ||
| 231 | + v_float16x4 r2 = v_cvt_f16(r1); | ||
| 232 | + v_float32x4 r3 = v_cvt_f32(r2); | ||
| 233 | + EXPECT_EQ(0x3c00, r2.get0()); | ||
| 234 | + EXPECT_EQ(r3.get0(), r1.get0()); | ||
| 235 | |||
| 236 | return *this; | ||
| 237 | -#endif | ||
| 238 | } | ||
| 239 | +#endif | ||
| 240 | |||
| 241 | }; | ||
| 242 | |||
| 243 | -- | ||
| 244 | 2.9.3 | ||
| 245 | |||
diff --git a/meta-oe/recipes-support/opencv/opencv/0001-To-fix-errors-as-following.patch b/meta-oe/recipes-support/opencv/opencv/0003-To-fix-errors-as-following.patch index 9c1b9b3aec..a22b04a905 100644 --- a/meta-oe/recipes-support/opencv/opencv/0001-To-fix-errors-as-following.patch +++ b/meta-oe/recipes-support/opencv/opencv/0003-To-fix-errors-as-following.patch | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | From a4abe478bf4514ec95aa10b2d6f258647ce325f5 Mon Sep 17 00:00:00 2001 | 1 | From ace48a628dca34d742615598afeef42ed323a029 Mon Sep 17 00:00:00 2001 |
| 2 | From: Huang Qiyu <huangqy.fnst@cn.fujitsu.com> | 2 | From: Huang Qiyu <huangqy.fnst@cn.fujitsu.com> |
| 3 | Date: Fri, 19 May 2017 04:27:50 +0900 | 3 | Date: Fri, 19 May 2017 04:27:50 +0900 |
| 4 | Subject: [PATCH] To fix errors as following: | 4 | Subject: [PATCH 3/3] To fix errors as following: |
| 5 | 5 | ||
| 6 | "test_main.cpp:45: undefined reference to `parseCustomOptions(int, char**)'" | 6 | "test_main.cpp:45: undefined reference to `parseCustomOptions(int, char**)'" |
| 7 | "perf_abs.cpp:13: undefined reference to `cvtest::param_seed'" | 7 | "perf_abs.cpp:13: undefined reference to `cvtest::param_seed'" |
| @@ -20,10 +20,10 @@ Signed-off-by: Ismo Puustinen <ismo.puustinen@intel.com> | |||
| 20 | 3 files changed, 5 insertions(+), 5 deletions(-) | 20 | 3 files changed, 5 insertions(+), 5 deletions(-) |
| 21 | 21 | ||
| 22 | diff --git a/modules/ts/include/opencv2/ts.hpp b/modules/ts/include/opencv2/ts.hpp | 22 | diff --git a/modules/ts/include/opencv2/ts.hpp b/modules/ts/include/opencv2/ts.hpp |
| 23 | index c573905..230f598 100644 | 23 | index 41a76b13e..205646140 100644 |
| 24 | --- a/modules/ts/include/opencv2/ts.hpp | 24 | --- a/modules/ts/include/opencv2/ts.hpp |
| 25 | +++ b/modules/ts/include/opencv2/ts.hpp | 25 | +++ b/modules/ts/include/opencv2/ts.hpp |
| 26 | @@ -539,7 +539,7 @@ protected: | 26 | @@ -555,7 +555,7 @@ protected: |
| 27 | } | 27 | } |
| 28 | }; | 28 | }; |
| 29 | 29 | ||
| @@ -32,7 +32,7 @@ index c573905..230f598 100644 | |||
| 32 | 32 | ||
| 33 | struct CV_EXPORTS DefaultRngAuto | 33 | struct CV_EXPORTS DefaultRngAuto |
| 34 | { | 34 | { |
| 35 | @@ -595,14 +595,14 @@ CV_EXPORTS std::string findDataFile(const std::string& relative_path, bool requi | 35 | @@ -611,14 +611,14 @@ CV_EXPORTS std::string findDataFile(const std::string& relative_path, bool requi |
| 36 | 36 | ||
| 37 | #ifdef HAVE_OPENCL | 37 | #ifdef HAVE_OPENCL |
| 38 | namespace ocl { | 38 | namespace ocl { |
| @@ -47,13 +47,13 @@ index c573905..230f598 100644 | |||
| 47 | -void parseCustomOptions(int argc, char **argv); | 47 | -void parseCustomOptions(int argc, char **argv); |
| 48 | +CV_EXPORTS void parseCustomOptions(int argc, char **argv); | 48 | +CV_EXPORTS void parseCustomOptions(int argc, char **argv); |
| 49 | 49 | ||
| 50 | #define CV_TEST_MAIN(resourcesubdir, ...) \ | 50 | #define CV_TEST_INIT0_NOOP (void)0 |
| 51 | int main(int argc, char **argv) \ | 51 | |
| 52 | diff --git a/modules/ts/include/opencv2/ts/ocl_test.hpp b/modules/ts/include/opencv2/ts/ocl_test.hpp | 52 | diff --git a/modules/ts/include/opencv2/ts/ocl_test.hpp b/modules/ts/include/opencv2/ts/ocl_test.hpp |
| 53 | index c967cd7..ff35b40 100644 | 53 | index 54b33ece8..ef56bf9ef 100644 |
| 54 | --- a/modules/ts/include/opencv2/ts/ocl_test.hpp | 54 | --- a/modules/ts/include/opencv2/ts/ocl_test.hpp |
| 55 | +++ b/modules/ts/include/opencv2/ts/ocl_test.hpp | 55 | +++ b/modules/ts/include/opencv2/ts/ocl_test.hpp |
| 56 | @@ -84,7 +84,7 @@ inline UMat ToUMat(InputArray src) | 56 | @@ -82,7 +82,7 @@ inline UMat ToUMat(InputArray src) |
| 57 | return dst; | 57 | return dst; |
| 58 | } | 58 | } |
| 59 | 59 | ||
| @@ -63,7 +63,7 @@ index c967cd7..ff35b40 100644 | |||
| 63 | #define MAX_VALUE 357 | 63 | #define MAX_VALUE 357 |
| 64 | 64 | ||
| 65 | diff --git a/modules/ts/include/opencv2/ts/ts_ext.hpp b/modules/ts/include/opencv2/ts/ts_ext.hpp | 65 | diff --git a/modules/ts/include/opencv2/ts/ts_ext.hpp b/modules/ts/include/opencv2/ts/ts_ext.hpp |
| 66 | index 05ccc63..8075065 100644 | 66 | index 0bdd346dd..2cd34dfce 100644 |
| 67 | --- a/modules/ts/include/opencv2/ts/ts_ext.hpp | 67 | --- a/modules/ts/include/opencv2/ts/ts_ext.hpp |
| 68 | +++ b/modules/ts/include/opencv2/ts/ts_ext.hpp | 68 | +++ b/modules/ts/include/opencv2/ts/ts_ext.hpp |
| 69 | @@ -9,7 +9,7 @@ | 69 | @@ -9,7 +9,7 @@ |
| @@ -76,5 +76,5 @@ index 05ccc63..8075065 100644 | |||
| 76 | 76 | ||
| 77 | #define CV_TEST_INIT \ | 77 | #define CV_TEST_INIT \ |
| 78 | -- | 78 | -- |
| 79 | 2.9.4 | 79 | 2.13.4 |
| 80 | 80 | ||
diff --git a/meta-oe/recipes-support/opencv/opencv/uselocalxfeatures.patch b/meta-oe/recipes-support/opencv/opencv/uselocalxfeatures.patch index a2db48d7c9..fc273a8911 100644 --- a/meta-oe/recipes-support/opencv/opencv/uselocalxfeatures.patch +++ b/meta-oe/recipes-support/opencv/opencv/uselocalxfeatures.patch | |||
| @@ -1,12 +1,20 @@ | |||
| 1 | diff --git a/modules/xfeatures2d/CMakeLists.txt b/modules/xfeatures2d/CMakeLists.txt | 1 | diff --git a/modules/xfeatures2d/CMakeLists.txt b/modules/xfeatures2d/CMakeLists.txt |
| 2 | index f295bddaed66..6086e75ec37b 100644 | 2 | index e1755595..c7009c47 100644 |
| 3 | --- a/modules/xfeatures2d/CMakeLists.txt | 3 | --- a/modules/xfeatures2d/CMakeLists.txt |
| 4 | +++ b/modules/xfeatures2d/CMakeLists.txt | 4 | +++ b/modules/xfeatures2d/CMakeLists.txt |
| 5 | @@ -1,5 +1,5 @@ | 5 | @@ -5,10 +5,10 @@ ocv_define_module(xfeatures2d opencv_core opencv_imgproc opencv_features2d openc |
| 6 | set(the_description "Contributed/Experimental Algorithms for Salient 2D Features Detection") | 6 | include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/download_vgg.cmake) |
| 7 | ocv_define_module(xfeatures2d opencv_core opencv_imgproc opencv_features2d opencv_calib3d opencv_shape opencv_highgui opencv_videoio opencv_ml | 7 | include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/download_boostdesc.cmake) |
| 8 | OPTIONAL opencv_cudaarithm WRAP python java) | 8 | set(DOWNLOAD_DIR "${OpenCV_BINARY_DIR}/downloads/xfeatures2d") |
| 9 | -include(cmake/download_vgg.cmake) | 9 | -download_boost_descriptors("${DOWNLOAD_DIR}" boost_status) |
| 10 | -include(cmake/download_boostdesc.cmake) | 10 | -download_vgg_descriptors("${DOWNLOAD_DIR}" vgg_status) |
| 11 | +#include(cmake/download_vgg.cmake) | 11 | -if(NOT boost_status OR NOT vgg_status) |
| 12 | +#include(cmake/download_boostdesc.cmake) | 12 | - ocv_module_disable(xfeatures2d) |
| 13 | -endif() | ||
| 14 | +#download_boost_descriptors("${DOWNLOAD_DIR}" boost_status) | ||
| 15 | +#download_vgg_descriptors("${DOWNLOAD_DIR}" vgg_status) | ||
| 16 | +#if(NOT boost_status OR NOT vgg_status) | ||
| 17 | +# ocv_module_disable(xfeatures2d) | ||
| 18 | +#endif() | ||
| 19 | |||
| 20 | ocv_module_include_directories("${DOWNLOAD_DIR}") | ||
diff --git a/meta-oe/recipes-support/opencv/opencv/useoeprotobuf.patch b/meta-oe/recipes-support/opencv/opencv/useoeprotobuf.patch deleted file mode 100644 index 3068bd44d8..0000000000 --- a/meta-oe/recipes-support/opencv/opencv/useoeprotobuf.patch +++ /dev/null | |||
| @@ -1,13 +0,0 @@ | |||
| 1 | diff --git a/modules/dnn/cmake/OpenCVFindLibProtobuf.cmake b/modules/dnn/cmake/OpenCVFindLibProtobuf.cmake | ||
| 2 | index eb2a729cc2eb..8717736484de 100644 | ||
| 3 | --- a/modules/dnn/cmake/OpenCVFindLibProtobuf.cmake | ||
| 4 | +++ b/modules/dnn/cmake/OpenCVFindLibProtobuf.cmake | ||
| 5 | @@ -24,7 +24,7 @@ if(NOT BUILD_PROTOBUF AND NOT (DEFINED PROTOBUF_INCLUDE_DIR AND DEFINED PROTOBUF | ||
| 6 | find_package(Protobuf QUIET) | ||
| 7 | endif() | ||
| 8 | |||
| 9 | -if(PROTOBUF_FOUND) | ||
| 10 | +if(PROTOBUF_FOUND OR (DEFINED PROTOBUF_INCLUDE_DIR AND DEFINED PROTOBUF_LIBRARIES)) | ||
| 11 | # nothing | ||
| 12 | else() | ||
| 13 | include(${CMAKE_CURRENT_LIST_DIR}/download_protobuf.cmake) | ||
diff --git a/meta-oe/recipes-support/opencv/opencv_3.2.bb b/meta-oe/recipes-support/opencv/opencv_3.3.bb index fc62e99755..a6a1302711 100644 --- a/meta-oe/recipes-support/opencv/opencv_3.2.bb +++ b/meta-oe/recipes-support/opencv/opencv_3.3.bb | |||
| @@ -10,38 +10,52 @@ ARM_INSTRUCTION_SET_armv5 = "arm" | |||
| 10 | 10 | ||
| 11 | DEPENDS = "libtool swig-native bzip2 zlib glib-2.0 libwebp" | 11 | DEPENDS = "libtool swig-native bzip2 zlib glib-2.0 libwebp" |
| 12 | 12 | ||
| 13 | SRCREV_opencv = "70bbf17b133496bd7d54d034b0f94bd869e0e810" | 13 | SRCREV_opencv = "87c27a074db9f6d9d60513f351daa903606ca370" |
| 14 | SRCREV_contrib = "86342522b0eb2b16fa851c020cc4e0fef4e010b7" | 14 | SRCREV_contrib = "2a9d1b22ed76eb22fad1a5edf6faf4d05f207b13" |
| 15 | SRCREV_ipp = "81a676001ca8075ada498583e4166079e5744668" | 15 | SRCREV_ipp = "a62e20676a60ee0ad6581e217fe7e4bada3b95db" |
| 16 | SRCREV_bootdesc = "34e4206aef44d50e6bbcd0ab06354b52e7466d26" | 16 | SRCREV_boostdesc = "34e4206aef44d50e6bbcd0ab06354b52e7466d26" |
| 17 | SRCREV_vgg = "fccf7cd6a4b12079f73bbfb21745f9babcd4eb1d" | 17 | SRCREV_vgg = "fccf7cd6a4b12079f73bbfb21745f9babcd4eb1d" |
| 18 | IPP_MD5 = "808b791a6eac9ed78d32a7666804320e" | ||
| 19 | 18 | ||
| 20 | SRCREV_FORMAT = "opencv" | 19 | def ipp_filename(d): |
| 20 | import re | ||
| 21 | arch = d.getVar('TARGET_ARCH', True) | ||
| 22 | if re.match("i.86$", arch): | ||
| 23 | return "ippicv_2017u2_lnx_ia32_20170418.tgz" | ||
| 24 | else: | ||
| 25 | return "ippicv_2017u2_lnx_intel64_20170418.tgz" | ||
| 26 | |||
| 27 | def ipp_md5sum(d): | ||
| 28 | import re | ||
| 29 | arch = d.getVar('TARGET_ARCH', True) | ||
| 30 | if re.match("i.86$", arch): | ||
| 31 | return "f2cece00d802d4dea86df52ed095257e" | ||
| 32 | else: | ||
| 33 | return "808b791a6eac9ed78d32a7666804320e" | ||
| 34 | |||
| 35 | IPP_FILENAME = "${@ipp_filename(d)}" | ||
| 36 | IPP_MD5 = "${@ipp_md5sum(d)}" | ||
| 37 | |||
| 38 | SRCREV_FORMAT = "opencv_contrib_ipp_boostdesc_vgg" | ||
| 21 | SRC_URI = "git://github.com/opencv/opencv.git;name=opencv \ | 39 | SRC_URI = "git://github.com/opencv/opencv.git;name=opencv \ |
| 22 | git://github.com/opencv/opencv_contrib.git;destsuffix=contrib;name=contrib \ | 40 | git://github.com/opencv/opencv_contrib.git;destsuffix=contrib;name=contrib \ |
| 23 | git://github.com/opencv/opencv_3rdparty.git;branch=ippicv/master_20151201;destsuffix=ipp;name=ipp \ | 41 | git://github.com/opencv/opencv_3rdparty.git;branch=ippicv/master_20170418;destsuffix=ipp;name=ipp \ |
| 24 | git://github.com/opencv/opencv_3rdparty.git;branch=contrib_xfeatures2d_boostdesc_20161012;destsuffix=bootdesc;name=bootdesc \ | 42 | git://github.com/opencv/opencv_3rdparty.git;branch=contrib_xfeatures2d_boostdesc_20161012;destsuffix=boostdesc;name=boostdesc \ |
| 25 | git://github.com/opencv/opencv_3rdparty.git;branch=contrib_xfeatures2d_vgg_20160317;destsuffix=vgg;name=vgg \ | 43 | git://github.com/opencv/opencv_3rdparty.git;branch=contrib_xfeatures2d_vgg_20160317;destsuffix=vgg;name=vgg \ |
| 26 | file://0001-3rdparty-ippicv-Use-pre-downloaded-ipp.patch \ | 44 | file://0001-3rdparty-ippicv-Use-pre-downloaded-ipp.patch \ |
| 27 | file://fixpkgconfig.patch \ | 45 | file://fixpkgconfig.patch \ |
| 28 | file://uselocalxfeatures.patch;patchdir=../contrib/ \ | 46 | file://uselocalxfeatures.patch;patchdir=../contrib/ \ |
| 29 | file://useoeprotobuf.patch;patchdir=../contrib/ \ | 47 | file://0002-Make-opencv-ts-create-share-library-intead-of-static.patch \ |
| 30 | file://0001-Revert-cuda-fix-fp16-compilation.patch \ | 48 | file://0003-To-fix-errors-as-following.patch \ |
| 31 | file://0002-Revert-check-FP16-build-condition-correctly.patch \ | ||
| 32 | file://0001-Make-opencv-ts-create-share-library-intead-of-static.patch \ | ||
| 33 | file://0001-To-fix-errors-as-following.patch \ | ||
| 34 | file://0001-tracking-make-opencv_dnn-dependancy-optional.patch;patchdir=../contrib/ \ | ||
| 35 | " | 49 | " |
| 36 | 50 | ||
| 37 | PV = "3.2+git${SRCPV}" | 51 | PV = "3.3+git${SRCPV}" |
| 38 | 52 | ||
| 39 | S = "${WORKDIR}/git" | 53 | S = "${WORKDIR}/git" |
| 40 | 54 | ||
| 41 | do_unpack_extra() { | 55 | do_unpack_extra() { |
| 42 | tar xzf ${WORKDIR}/ipp/ippicv/ippicv_linux_20151201.tgz -C ${WORKDIR} | 56 | tar xzf ${WORKDIR}/ipp/ippicv/${IPP_FILENAME} -C ${WORKDIR} |
| 43 | cp ${WORKDIR}/vgg/*.i ${WORKDIR}/contrib/modules/xfeatures2d/src | 57 | cp ${WORKDIR}/vgg/*.i ${WORKDIR}/contrib/modules/xfeatures2d/src |
| 44 | cp ${WORKDIR}/bootdesc/*.i ${WORKDIR}/contrib/modules/xfeatures2d/src | 58 | cp ${WORKDIR}/boostdesc/*.i ${WORKDIR}/contrib/modules/xfeatures2d/src |
| 45 | } | 59 | } |
| 46 | addtask unpack_extra after do_unpack before do_patch | 60 | addtask unpack_extra after do_unpack before do_patch |
| 47 | 61 | ||
| @@ -64,7 +78,7 @@ PACKAGECONFIG ??= "python3 eigen jpeg png tiff v4l libv4l gstreamer samples tbb | |||
| 64 | 78 | ||
| 65 | PACKAGECONFIG[amdblas] = "-DWITH_OPENCLAMDBLAS=ON,-DWITH_OPENCLAMDBLAS=OFF,libclamdblas," | 79 | PACKAGECONFIG[amdblas] = "-DWITH_OPENCLAMDBLAS=ON,-DWITH_OPENCLAMDBLAS=OFF,libclamdblas," |
| 66 | PACKAGECONFIG[amdfft] = "-DWITH_OPENCLAMDFFT=ON,-DWITH_OPENCLAMDFFT=OFF,libclamdfft," | 80 | PACKAGECONFIG[amdfft] = "-DWITH_OPENCLAMDFFT=ON,-DWITH_OPENCLAMDFFT=OFF,libclamdfft," |
| 67 | PACKAGECONFIG[dnn] = "-DBUILD_opencv_dnn=ON -DUPDATE_PROTO_FILES=ON -DBUILD_PROTOBUF=OFF,-DBUILD_opencv_dnn=OFF,protobuf protobuf-native," | 81 | PACKAGECONFIG[dnn] = "-DBUILD_opencv_dnn=ON -DPROTOBUF_UPDATE_FILES=ON -DBUILD_PROTOBUF=OFF,-DBUILD_opencv_dnn=OFF,protobuf protobuf-native," |
| 68 | PACKAGECONFIG[eigen] = "-DWITH_EIGEN=ON,-DWITH_EIGEN=OFF,libeigen gflags glog," | 82 | PACKAGECONFIG[eigen] = "-DWITH_EIGEN=ON,-DWITH_EIGEN=OFF,libeigen gflags glog," |
| 69 | PACKAGECONFIG[freetype] = "-DBUILD_opencv_freetype=ON,-DBUILD_opencv_freetype=OFF,freetype," | 83 | PACKAGECONFIG[freetype] = "-DBUILD_opencv_freetype=ON,-DBUILD_opencv_freetype=OFF,freetype," |
| 70 | PACKAGECONFIG[gphoto2] = "-DWITH_GPHOTO2=ON,-DWITH_GPHOTO2=OFF,libgphoto2," | 84 | PACKAGECONFIG[gphoto2] = "-DWITH_GPHOTO2=ON,-DWITH_GPHOTO2=OFF,libgphoto2," |
| @@ -132,7 +146,6 @@ python populate_packages_prepend () { | |||
| 132 | if not pkg in blacklist and not pkg in metapkg_rdepends and not pkg.endswith('-dev') and not pkg.endswith('-dbg') and not pkg.endswith('-doc') and not pkg.endswith('-locale') and not pkg.endswith('-staticdev'): | 146 | if not pkg in blacklist and not pkg in metapkg_rdepends and not pkg.endswith('-dev') and not pkg.endswith('-dbg') and not pkg.endswith('-doc') and not pkg.endswith('-locale') and not pkg.endswith('-staticdev'): |
| 133 | metapkg_rdepends.append(pkg) | 147 | metapkg_rdepends.append(pkg) |
| 134 | d.setVar('RDEPENDS_' + metapkg, ' '.join(metapkg_rdepends)) | 148 | d.setVar('RDEPENDS_' + metapkg, ' '.join(metapkg_rdepends)) |
| 135 | |||
| 136 | } | 149 | } |
| 137 | 150 | ||
| 138 | PACKAGES_DYNAMIC += "^libopencv-.*" | 151 | PACKAGES_DYNAMIC += "^libopencv-.*" |
