recipes-support: opencv: Update recipes to new BSP release imx_5.4.70_2.3.0
Signed-off-by: Mike Engel <Mike.Engel@digi.com>
This commit is contained in:
parent
7d19618a05
commit
27896e296f
|
|
@ -1,4 +1,4 @@
|
|||
From 85b882b4ceb57fe6538f47af58d0a970923fde0e Mon Sep 17 00:00:00 2001
|
||||
From 9b4959b97d2e95d4b49cf6ca2a3fce3cdb484f2d Mon Sep 17 00:00:00 2001
|
||||
From: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
|
||||
Date: Thu, 31 Mar 2016 00:20:15 +0200
|
||||
Subject: [PATCH] 3rdparty/ippicv: Use pre-downloaded ipp
|
||||
|
|
@ -11,10 +11,10 @@ Signed-off-by: Ismo Puustinen <ismo.puustinen@intel.com>
|
|||
1 file changed, 1 insertion(+), 14 deletions(-)
|
||||
|
||||
diff --git a/3rdparty/ippicv/ippicv.cmake b/3rdparty/ippicv/ippicv.cmake
|
||||
index ae8748c..305abdb 100644
|
||||
index 257af6fcc6..f88460450f 100644
|
||||
--- a/3rdparty/ippicv/ippicv.cmake
|
||||
+++ b/3rdparty/ippicv/ippicv.cmake
|
||||
@@ -39,18 +39,5 @@ function(download_ippicv root_var)
|
||||
@@ -34,18 +34,5 @@ function(download_ippicv root_var)
|
||||
endif()
|
||||
|
||||
set(THE_ROOT "${OpenCV_BINARY_DIR}/3rdparty/ippicv")
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
From 9659f5a1e75fc29c9879c301767bba72ecf9042a Mon Sep 17 00:00:00 2001
|
||||
From 66e50ee69fa9ee2469d349100e70d8b296c4b4dc Mon Sep 17 00:00:00 2001
|
||||
From: Khem Raj <raj.khem@gmail.com>
|
||||
Date: Tue, 11 Sep 2018 00:21:18 -0700
|
||||
Subject: [PATCH] Dont use isystem
|
||||
|
|
@ -14,7 +14,7 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
|||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/cmake/OpenCVPCHSupport.cmake b/cmake/OpenCVPCHSupport.cmake
|
||||
index 59bc826..055dfce 100644
|
||||
index 08cd06def4..46c9c02da3 100644
|
||||
--- a/cmake/OpenCVPCHSupport.cmake
|
||||
+++ b/cmake/OpenCVPCHSupport.cmake
|
||||
@@ -18,6 +18,8 @@ IF(CV_GCC)
|
||||
|
|
|
|||
|
|
@ -0,0 +1,42 @@
|
|||
From 11bbf909e08594628bd757d989ae34cf1bfe200b Mon Sep 17 00:00:00 2001
|
||||
From: Mingli Yu <mingli.yu@windriver.com>
|
||||
Date: Thu, 18 Jun 2020 05:51:38 +0000
|
||||
Subject: [PATCH] Make ts module external
|
||||
|
||||
Make ts module external
|
||||
|
||||
Reference: https://github.com/qbonnard/opencv/commit/6b229c5834cb9a0930425e762a6c7b03244d7abb
|
||||
|
||||
Upstream-Status: Submitted [https://github.com/opencv/opencv/issues/8408]
|
||||
|
||||
Signed-off-by: Mingli Yu <mingli.yu@windriver.com>
|
||||
---
|
||||
modules/ts/CMakeLists.txt | 5 +----
|
||||
1 file changed, 1 insertion(+), 4 deletions(-)
|
||||
|
||||
diff --git a/modules/ts/CMakeLists.txt b/modules/ts/CMakeLists.txt
|
||||
index f95bed0793..66f315bcca 100644
|
||||
--- a/modules/ts/CMakeLists.txt
|
||||
+++ b/modules/ts/CMakeLists.txt
|
||||
@@ -4,9 +4,6 @@ if(NOT BUILD_opencv_ts AND NOT BUILD_TESTS AND NOT BUILD_PERF_TESTS)
|
||||
ocv_module_disable(ts)
|
||||
endif()
|
||||
|
||||
-set(OPENCV_MODULE_TYPE STATIC)
|
||||
-set(OPENCV_MODULE_IS_PART_OF_WORLD FALSE)
|
||||
-
|
||||
if(WINRT)
|
||||
# WINRT doesn't have access to environment variables
|
||||
# so adding corresponding macros during CMake run
|
||||
@@ -16,7 +13,7 @@ endif()
|
||||
|
||||
ocv_warnings_disable(CMAKE_CXX_FLAGS -Wundef)
|
||||
|
||||
-ocv_add_module(ts INTERNAL opencv_core opencv_imgproc opencv_imgcodecs opencv_videoio opencv_highgui)
|
||||
+ocv_add_module(ts opencv_core opencv_imgproc opencv_imgcodecs opencv_videoio opencv_highgui)
|
||||
|
||||
ocv_glob_module_sources()
|
||||
ocv_module_include_directories()
|
||||
--
|
||||
2.24.1
|
||||
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
From fe27d0e2341683606704115949d16250e4cacbfa Mon Sep 17 00:00:00 2001
|
||||
From e4ec6cea72da9e9ae5ba57140fa2f5c63f1f8295 Mon Sep 17 00:00:00 2001
|
||||
From: Jason Wessel <jason.wessel@windriver.com>
|
||||
Date: Wed, 9 May 2018 13:33:59 -0700
|
||||
Subject: [PATCH] Temporarliy work around deprecated ffmpeg RAW function
|
||||
|
|
@ -11,10 +11,10 @@ Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
|
|||
1 file changed, 8 insertions(+)
|
||||
|
||||
diff --git a/modules/videoio/src/cap_ffmpeg_impl.hpp b/modules/videoio/src/cap_ffmpeg_impl.hpp
|
||||
index 0d360ad..566df66 100644
|
||||
index 6dca724a89..ae55dd4555 100644
|
||||
--- a/modules/videoio/src/cap_ffmpeg_impl.hpp
|
||||
+++ b/modules/videoio/src/cap_ffmpeg_impl.hpp
|
||||
@@ -736,6 +736,14 @@ struct ImplMutex::Impl
|
||||
@@ -774,6 +774,14 @@ struct ImplMutex::Impl
|
||||
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,31 @@
|
|||
From 59fafe6e39759e193b5764b36b4c5a93da352123 Mon Sep 17 00:00:00 2001
|
||||
From: Khem Raj <raj.khem@gmail.com>
|
||||
Date: Tue, 18 Aug 2020 00:36:49 -0700
|
||||
Subject: [PATCH] Use -Os to compile tinyxml2.cpp
|
||||
|
||||
This workarounds issue [1] seen on riscv with gcc
|
||||
|
||||
[1] https://github.com/riscv/riscv-gnu-toolchain/issues/624
|
||||
|
||||
Upstream-Status: Inappropriate [ OE-Specific ]
|
||||
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||
---
|
||||
modules/datasets/CMakeLists.txt | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/modules/datasets/CMakeLists.txt b/modules/datasets/CMakeLists.txt
|
||||
index 56ca9e310..99b7a33f6 100644
|
||||
--- a/modules/datasets/CMakeLists.txt
|
||||
+++ b/modules/datasets/CMakeLists.txt
|
||||
@@ -2,7 +2,7 @@ set(the_description "datasets framework")
|
||||
|
||||
set(filter_srcs "${CMAKE_CURRENT_LIST_DIR}/src/tinyxml2/tinyxml2.cpp")
|
||||
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
|
||||
- ocv_append_source_files_cxx_compiler_options(filter_srcs "-Wno-suggest-override") # GCC
|
||||
+ ocv_append_source_files_cxx_compiler_options(filter_srcs "-Wno-suggest-override -Os") # GCC
|
||||
elseif(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
|
||||
ocv_append_source_files_cxx_compiler_options(filter_srcs "-Wno-inconsistent-missing-override") # Clang
|
||||
endif()
|
||||
--
|
||||
2.28.0
|
||||
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
From 867caccc358266f7021f076fc8c8e41bf048782c Mon Sep 17 00:00:00 2001
|
||||
From f42c9b8c7bafcadc7e95fb25a391707f970eb426 Mon Sep 17 00:00:00 2001
|
||||
From: Huang Qiyu <huangqy.fnst@cn.fujitsu.com>
|
||||
Date: Fri, 19 May 2017 04:27:50 +0900
|
||||
Subject: [PATCH] To fix errors as following:
|
||||
|
|
@ -21,10 +21,10 @@ Signed-off-by: Ismo Puustinen <ismo.puustinen@intel.com>
|
|||
3 files changed, 4 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/modules/ts/include/opencv2/ts.hpp b/modules/ts/include/opencv2/ts.hpp
|
||||
index b9d6b74..f1ee7ee 100644
|
||||
index ed7491a89a..80919d13ee 100644
|
||||
--- a/modules/ts/include/opencv2/ts.hpp
|
||||
+++ b/modules/ts/include/opencv2/ts.hpp
|
||||
@@ -622,7 +622,7 @@ protected:
|
||||
@@ -728,7 +728,7 @@ protected:
|
||||
}
|
||||
};
|
||||
|
||||
|
|
@ -33,7 +33,7 @@ index b9d6b74..f1ee7ee 100644
|
|||
|
||||
struct DefaultRngAuto
|
||||
{
|
||||
@@ -685,7 +685,7 @@ private:
|
||||
@@ -791,7 +791,7 @@ private:
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
|
@ -43,7 +43,7 @@ index b9d6b74..f1ee7ee 100644
|
|||
#define CV_TEST_INIT0_NOOP (void)0
|
||||
|
||||
diff --git a/modules/ts/include/opencv2/ts/ocl_test.hpp b/modules/ts/include/opencv2/ts/ocl_test.hpp
|
||||
index 11572e9..438112e 100644
|
||||
index 11572e9f48..438112e2aa 100644
|
||||
--- a/modules/ts/include/opencv2/ts/ocl_test.hpp
|
||||
+++ b/modules/ts/include/opencv2/ts/ocl_test.hpp
|
||||
@@ -82,7 +82,7 @@ inline UMat ToUMat(InputArray src)
|
||||
|
|
@ -56,7 +56,7 @@ index 11572e9..438112e 100644
|
|||
#define MAX_VALUE 357
|
||||
|
||||
diff --git a/modules/ts/include/opencv2/ts/ts_ext.hpp b/modules/ts/include/opencv2/ts/ts_ext.hpp
|
||||
index b5cea3e..e5b0b4b 100644
|
||||
index b2a4cac241..b94c681c0c 100644
|
||||
--- a/modules/ts/include/opencv2/ts/ts_ext.hpp
|
||||
+++ b/modules/ts/include/opencv2/ts/ts_ext.hpp
|
||||
@@ -9,7 +9,7 @@
|
||||
|
|
|
|||
|
|
@ -1,24 +1,24 @@
|
|||
From 3c4daafb54f961e376104a461ca7ec114ff0331a Mon Sep 17 00:00:00 2001
|
||||
From: Ludek Slosarcik <ludek.slosarcik@nxp.com>
|
||||
Date: Fri, 14 Feb 2020 15:46:50 +0100
|
||||
Subject: [PATCH] opencv_dnn: added video device for 2 examples, and change text labels
|
||||
|
||||
Signed-off-by: Ludek Slosarcik <ludek.slosarcik@nxp.com>
|
||||
|
||||
Upstream-Status: Pending
|
||||
---
|
||||
samples/cpp/logistic_regression.cpp | 2 +-
|
||||
samples/dnn/classification.cpp | 7 ++++---
|
||||
samples/dnn/object_detection.cpp | 10 +++++-----
|
||||
samples/dnn/segmentation.cpp | 2 +-
|
||||
samples/dnn/text_detection.cpp | 5 +++--
|
||||
5 files changed, 14 insertions(+), 12 deletions(-)
|
||||
|
||||
diff --git a/samples/cpp/logistic_regression.cpp b/samples/cpp/logistic_regression.cpp
|
||||
index 365b32e523..5dca6b3835 100644
|
||||
--- a/samples/cpp/logistic_regression.cpp
|
||||
+++ b/samples/cpp/logistic_regression.cpp
|
||||
@@ -83,7 +83,7 @@ static float calculateAccuracyPercent(const Mat &original, const Mat &predicted)
|
||||
From 3c4daafb54f961e376104a461ca7ec114ff0331a Mon Sep 17 00:00:00 2001
|
||||
From: Ludek Slosarcik <ludek.slosarcik@nxp.com>
|
||||
Date: Fri, 14 Feb 2020 15:46:50 +0100
|
||||
Subject: [PATCH] opencv_dnn: added video device for 2 examples, and change text labels
|
||||
|
||||
Signed-off-by: Ludek Slosarcik <ludek.slosarcik@nxp.com>
|
||||
|
||||
Upstream-Status: Pending
|
||||
---
|
||||
samples/cpp/logistic_regression.cpp | 2 +-
|
||||
samples/dnn/classification.cpp | 7 ++++---
|
||||
samples/dnn/object_detection.cpp | 10 +++++-----
|
||||
samples/dnn/segmentation.cpp | 2 +-
|
||||
samples/dnn/text_detection.cpp | 5 +++--
|
||||
5 files changed, 14 insertions(+), 12 deletions(-)
|
||||
|
||||
Index: git/samples/cpp/logistic_regression.cpp
|
||||
===================================================================
|
||||
--- git.orig/samples/cpp/logistic_regression.cpp
|
||||
+++ git/samples/cpp/logistic_regression.cpp
|
||||
@@ -83,7 +83,7 @@ static float calculateAccuracyPercent(co
|
||||
|
||||
int main()
|
||||
{
|
||||
|
|
@ -27,10 +27,10 @@ index 365b32e523..5dca6b3835 100644
|
|||
cout << "**********************************************************************" << endl;
|
||||
cout << filename
|
||||
<< " contains digits 0 and 1 of 20 samples each, collected on an Android device" << endl;
|
||||
diff --git a/samples/dnn/classification.cpp b/samples/dnn/classification.cpp
|
||||
index 0ae9e6ed94..0a290a8f33 100644
|
||||
--- a/samples/dnn/classification.cpp
|
||||
+++ b/samples/dnn/classification.cpp
|
||||
Index: git/samples/dnn/classification.cpp
|
||||
===================================================================
|
||||
--- git.orig/samples/dnn/classification.cpp
|
||||
+++ git/samples/dnn/classification.cpp
|
||||
@@ -11,6 +11,7 @@ std::string keys =
|
||||
"{ help h | | Print help message. }"
|
||||
"{ @alias | | An alias name of model to extract preprocessing parameters from models.yml file. }"
|
||||
|
|
@ -64,11 +64,11 @@ index 0ae9e6ed94..0a290a8f33 100644
|
|||
|
||||
imshow(kWinName, frame);
|
||||
}
|
||||
diff --git a/samples/dnn/object_detection.cpp b/samples/dnn/object_detection.cpp
|
||||
index 83ed10db5d..6fa8e08ad8 100644
|
||||
--- a/samples/dnn/object_detection.cpp
|
||||
+++ b/samples/dnn/object_detection.cpp
|
||||
@@ -250,13 +250,13 @@ int main(int argc, char** argv)
|
||||
Index: git/samples/dnn/object_detection.cpp
|
||||
===================================================================
|
||||
--- git.orig/samples/dnn/object_detection.cpp
|
||||
+++ git/samples/dnn/object_detection.cpp
|
||||
@@ -251,13 +251,13 @@ int main(int argc, char** argv)
|
||||
if (predictionsQueue.counter > 1)
|
||||
{
|
||||
std::string label = format("Camera: %.2f FPS", framesQueue.getFPS());
|
||||
|
|
@ -85,7 +85,7 @@ index 83ed10db5d..6fa8e08ad8 100644
|
|||
}
|
||||
imshow(kWinName, frame);
|
||||
}
|
||||
@@ -292,7 +292,7 @@ int main(int argc, char** argv)
|
||||
@@ -293,7 +293,7 @@ int main(int argc, char** argv)
|
||||
double freq = getTickFrequency() / 1000;
|
||||
double t = net.getPerfProfile(layersTimes) / freq;
|
||||
std::string label = format("Inference time: %.2f ms", t);
|
||||
|
|
@ -94,7 +94,7 @@ index 83ed10db5d..6fa8e08ad8 100644
|
|||
|
||||
imshow(kWinName, frame);
|
||||
}
|
||||
@@ -424,7 +424,7 @@ void drawPred(int classId, float conf, int left, int top, int right, int bottom,
|
||||
@@ -462,7 +462,7 @@ void drawPred(int classId, float conf, i
|
||||
top = max(top, labelSize.height);
|
||||
rectangle(frame, Point(left, top - labelSize.height),
|
||||
Point(left + labelSize.width, top + baseLine), Scalar::all(255), FILLED);
|
||||
|
|
@ -103,10 +103,10 @@ index 83ed10db5d..6fa8e08ad8 100644
|
|||
}
|
||||
|
||||
void callback(int pos, void*)
|
||||
diff --git a/samples/dnn/segmentation.cpp b/samples/dnn/segmentation.cpp
|
||||
index d9fbad8974..2e0c6908d5 100644
|
||||
--- a/samples/dnn/segmentation.cpp
|
||||
+++ b/samples/dnn/segmentation.cpp
|
||||
Index: git/samples/dnn/segmentation.cpp
|
||||
===================================================================
|
||||
--- git.orig/samples/dnn/segmentation.cpp
|
||||
+++ git/samples/dnn/segmentation.cpp
|
||||
@@ -157,7 +157,7 @@ int main(int argc, char** argv)
|
||||
double freq = getTickFrequency() / 1000;
|
||||
double t = net.getPerfProfile(layersTimes) / freq;
|
||||
|
|
@ -116,36 +116,33 @@ index d9fbad8974..2e0c6908d5 100644
|
|||
|
||||
imshow(kWinName, frame);
|
||||
if (!classes.empty())
|
||||
diff --git a/samples/dnn/text_detection.cpp b/samples/dnn/text_detection.cpp
|
||||
index e7b0f237d3..00cd22e144 100644
|
||||
--- a/samples/dnn/text_detection.cpp
|
||||
+++ b/samples/dnn/text_detection.cpp
|
||||
@@ -8,6 +8,7 @@ using namespace cv::dnn;
|
||||
Index: git/samples/dnn/text_detection.cpp
|
||||
===================================================================
|
||||
--- git.orig/samples/dnn/text_detection.cpp
|
||||
+++ git/samples/dnn/text_detection.cpp
|
||||
@@ -25,6 +25,7 @@ using namespace cv::dnn;
|
||||
const char* keys =
|
||||
"{ help h | | Print help message. }"
|
||||
"{ input i | | Path to input image or video file. Skip this argument to capture frames from a camera.}"
|
||||
+ "{ device | 0 | camera device number. }"
|
||||
"{ model m | | Path to a binary .pb file contains trained network.}"
|
||||
"{ model m | | Path to a binary .pb file contains trained detector network.}"
|
||||
"{ ocr | | Path to a binary .pb or .onnx file contains trained recognition network.}"
|
||||
"{ width | 320 | Preprocess input image by resizing to a specific width. It should be multiple by 32. }"
|
||||
"{ height | 320 | Preprocess input image by resizing to a specific height. It should be multiple by 32. }"
|
||||
@@ -51,7 +52,7 @@ int main(int argc, char** argv)
|
||||
if (parser.has("input"))
|
||||
cap.open(parser.get<String>("input"));
|
||||
else
|
||||
- cap.open(0);
|
||||
+ cap.open(parser.get<int>("device"));
|
||||
@@ -75,7 +76,7 @@ int main(int argc, char** argv)
|
||||
|
||||
// Open a video file or an image file or a camera stream.
|
||||
VideoCapture cap;
|
||||
- bool openSuccess = parser.has("input") ? cap.open(parser.get<String>("input")) : cap.open(0);
|
||||
+ bool openSuccess = parser.has("input") ? cap.open(parser.get<String>("input")) : cap.open(parser.get<int>("device"));
|
||||
CV_Assert(openSuccess);
|
||||
|
||||
static const std::string kWinName = "EAST: An Efficient and Accurate Scene Text Detector";
|
||||
namedWindow(kWinName, WINDOW_NORMAL);
|
||||
@@ -109,7 +110,7 @@ int main(int argc, char** argv)
|
||||
double freq = getTickFrequency() / 1000;
|
||||
double t = net.getPerfProfile(layersTimes) / freq;
|
||||
std::string label = format("Inference time: %.2f ms", t);
|
||||
@@ -156,7 +157,7 @@ int main(int argc, char** argv)
|
||||
|
||||
// Put efficiency information.
|
||||
std::string label = format("Inference time: %.2f ms", tickMeter.getTimeMilli());
|
||||
- putText(frame, label, Point(0, 15), FONT_HERSHEY_SIMPLEX, 0.5, Scalar(0, 255, 0));
|
||||
+ putText(frame, label, Point(0, 20), FONT_HERSHEY_SIMPLEX, 0.8, Scalar(0, 0, 255), 2, 8, false);
|
||||
|
||||
imshow(kWinName, frame);
|
||||
}
|
||||
--
|
||||
2.17.1
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,12 +1,16 @@
|
|||
From: Arturo Buzarra <arturo.buzarra@digi.com>
|
||||
Date: Thu, 16 Apr 2020 09:15:06 +0200
|
||||
Subject: [PATCH] This CMake module will download files during do_configure.
|
||||
This is bad as it means we can't do offline builds.
|
||||
From b18a280fab06a680d9f831bf8b462647f3cb6214 Mon Sep 17 00:00:00 2001
|
||||
From: Ross Burton <ross.burton@intel.com>
|
||||
Date: Thu, 9 Jan 2020 16:24:24 +0000
|
||||
Subject: [PATCH] opencv: abort configure if we need to download
|
||||
|
||||
This CMake module will download files during do_configure. This is bad as it
|
||||
means we can't do offline builds.
|
||||
|
||||
Add an option to disallow downloads by emitting a fatal error.
|
||||
|
||||
Upstream-Status: Pending
|
||||
Signed-off-by: Ross Burton <ross.burton@intel.com>
|
||||
|
||||
---
|
||||
cmake/OpenCVDownload.cmake | 6 ++++++
|
||||
1 file changed, 6 insertions(+)
|
||||
|
|
@ -18,13 +22,13 @@ index 63cf6d3238..4acf477f70 100644
|
|||
@@ -14,6 +14,7 @@
|
||||
# RELATIVE_URL - if set, then URL is treated as a base, and FILENAME will be appended to it
|
||||
# Note: uses OPENCV_DOWNLOAD_PATH folder as cache, default is <opencv>/.cache
|
||||
|
||||
|
||||
+set(OPENCV_ALLOW_DOWNLOADS ON CACHE BOOL "Allow downloads")
|
||||
set(HELP_OPENCV_DOWNLOAD_PATH "Cache directory for downloaded files")
|
||||
if(DEFINED ENV{OPENCV_DOWNLOAD_PATH})
|
||||
set(OPENCV_DOWNLOAD_PATH "$ENV{OPENCV_DOWNLOAD_PATH}" CACHE PATH "${HELP_OPENCV_DOWNLOAD_PATH}")
|
||||
@@ -156,6 +157,11 @@ function(ocv_download)
|
||||
|
||||
|
||||
# Download
|
||||
if(NOT EXISTS "${CACHE_CANDIDATE}")
|
||||
+ if(NOT OPENCV_ALLOW_DOWNLOADS)
|
||||
|
|
|
|||
|
|
@ -0,0 +1,217 @@
|
|||
SUMMARY = "Opencv : The Open Computer Vision Library"
|
||||
HOMEPAGE = "http://opencv.org/"
|
||||
SECTION = "libs"
|
||||
|
||||
LICENSE = "BSD-3-Clause"
|
||||
LIC_FILES_CHKSUM = "file://LICENSE;md5=19598330421859a6dd353a4318091ac7"
|
||||
|
||||
ARM_INSTRUCTION_SET_armv4 = "arm"
|
||||
ARM_INSTRUCTION_SET_armv5 = "arm"
|
||||
|
||||
DEPENDS = "libtool swig-native bzip2 zlib glib-2.0 libwebp"
|
||||
|
||||
SRCREV_opencv = "c3bb57afeaf030f10939204d48d7c2a3842f4293"
|
||||
SRCREV_contrib = "5fae4082cc493efa5cb7a7486f9e009618a5198b"
|
||||
SRCREV_ipp = "a56b6ac6f030c312b2dce17430eef13aed9af274"
|
||||
SRCREV_boostdesc = "34e4206aef44d50e6bbcd0ab06354b52e7466d26"
|
||||
SRCREV_vgg = "fccf7cd6a4b12079f73bbfb21745f9babcd4eb1d"
|
||||
SRCREV_face = "8afa57abc8229d611c4937165d20e2a2d9fc5a12"
|
||||
|
||||
def ipp_filename(d):
|
||||
import re
|
||||
arch = d.getVar('TARGET_ARCH')
|
||||
if re.match("i.86$", arch):
|
||||
return "ippicv_2020_lnx_ia32_20191018_general.tgz"
|
||||
else:
|
||||
return "ippicv_2020_lnx_intel64_20191018_general.tgz"
|
||||
|
||||
def ipp_md5sum(d):
|
||||
import re
|
||||
arch = d.getVar('TARGET_ARCH')
|
||||
if re.match("i.86$", arch):
|
||||
return "ad189a940fb60eb71f291321322fe3e8"
|
||||
else:
|
||||
return "7421de0095c7a39162ae13a6098782f9"
|
||||
|
||||
IPP_FILENAME = "${@ipp_filename(d)}"
|
||||
IPP_MD5 = "${@ipp_md5sum(d)}"
|
||||
|
||||
SRCREV_FORMAT = "opencv_contrib_ipp_boostdesc_vgg"
|
||||
SRC_URI = "git://github.com/opencv/opencv.git;name=opencv \
|
||||
git://github.com/opencv/opencv_contrib.git;destsuffix=contrib;name=contrib \
|
||||
git://github.com/opencv/opencv_3rdparty.git;branch=ippicv/master_20191018;destsuffix=ipp;name=ipp \
|
||||
git://github.com/opencv/opencv_3rdparty.git;branch=contrib_xfeatures2d_boostdesc_20161012;destsuffix=boostdesc;name=boostdesc \
|
||||
git://github.com/opencv/opencv_3rdparty.git;branch=contrib_xfeatures2d_vgg_20160317;destsuffix=vgg;name=vgg \
|
||||
git://github.com/opencv/opencv_3rdparty.git;branch=contrib_face_alignment_20170818;destsuffix=face;name=face \
|
||||
file://0001-3rdparty-ippicv-Use-pre-downloaded-ipp.patch \
|
||||
file://0003-To-fix-errors-as-following.patch \
|
||||
file://0001-Temporarliy-work-around-deprecated-ffmpeg-RAW-functi.patch \
|
||||
file://0001-Dont-use-isystem.patch \
|
||||
file://download.patch \
|
||||
file://0001-Make-ts-module-external.patch \
|
||||
"
|
||||
SRC_URI_append_riscv64 = " file://0001-Use-Os-to-compile-tinyxml2.cpp.patch;patchdir=../contrib"
|
||||
|
||||
S = "${WORKDIR}/git"
|
||||
|
||||
# OpenCV wants to download more files during configure. We download these in
|
||||
# do_fetch and construct a source cache in the format it expects
|
||||
OPENCV_DLDIR = "${WORKDIR}/downloads"
|
||||
|
||||
do_unpack_extra() {
|
||||
tar xzf ${WORKDIR}/ipp/ippicv/${IPP_FILENAME} -C ${WORKDIR}
|
||||
|
||||
md5() {
|
||||
# Return the MD5 of $1
|
||||
echo $(md5sum $1 | cut -d' ' -f1)
|
||||
}
|
||||
cache() {
|
||||
TAG=$1
|
||||
shift
|
||||
mkdir --parents ${OPENCV_DLDIR}/$TAG
|
||||
for F in $*; do
|
||||
DEST=${OPENCV_DLDIR}/$TAG/$(md5 $F)-$(basename $F)
|
||||
test -e $DEST || ln -s $F $DEST
|
||||
done
|
||||
}
|
||||
cache xfeatures2d/boostdesc ${WORKDIR}/boostdesc/*.i
|
||||
cache xfeatures2d/vgg ${WORKDIR}/vgg/*.i
|
||||
cache data ${WORKDIR}/face/*.dat
|
||||
}
|
||||
addtask unpack_extra after do_unpack before do_patch
|
||||
|
||||
CMAKE_VERBOSE = "VERBOSE=1"
|
||||
|
||||
EXTRA_OECMAKE = "-DOPENCV_EXTRA_MODULES_PATH=${WORKDIR}/contrib/modules \
|
||||
-DWITH_1394=OFF \
|
||||
-DENABLE_PRECOMPILED_HEADERS=OFF \
|
||||
-DCMAKE_SKIP_RPATH=ON \
|
||||
-DOPENCV_ICV_HASH=${IPP_MD5} \
|
||||
-DIPPROOT=${WORKDIR}/ippicv_lnx \
|
||||
-DOPENCV_GENERATE_PKGCONFIG=ON \
|
||||
-DOPENCV_DOWNLOAD_PATH=${OPENCV_DLDIR} \
|
||||
-DOPENCV_ALLOW_DOWNLOADS=OFF \
|
||||
${@bb.utils.contains("TARGET_CC_ARCH", "-msse3", "-DENABLE_SSE=1 -DENABLE_SSE2=1 -DENABLE_SSE3=1 -DENABLE_SSSE3=1", "", d)} \
|
||||
${@bb.utils.contains("TARGET_CC_ARCH", "-msse4.1", "-DENABLE_SSE=1 -DENABLE_SSE2=1 -DENABLE_SSE3=1 -DENABLE_SSSE3=1 -DENABLE_SSE41=1", "", d)} \
|
||||
${@bb.utils.contains("TARGET_CC_ARCH", "-msse4.2", "-DENABLE_SSE=1 -DENABLE_SSE2=1 -DENABLE_SSE3=1 -DENABLE_SSSE3=1 -DENABLE_SSE41=1 -DENABLE_SSE42=1", "", d)} \
|
||||
"
|
||||
EXTRA_OECMAKE_append_x86 = " -DX86=ON"
|
||||
|
||||
PACKAGECONFIG ??= "gapi python3 eigen jpeg png tiff v4l libv4l gstreamer samples tbb gphoto2 \
|
||||
${@bb.utils.contains("DISTRO_FEATURES", "x11", "gtk", "", d)} \
|
||||
${@bb.utils.contains("LICENSE_FLAGS_WHITELIST", "commercial", "libav", "", d)}"
|
||||
|
||||
PACKAGECONFIG[gapi] = "-DWITH_ADE=ON -Dade_DIR=${STAGING_LIBDIR},-DWITH_ADE=OFF,ade"
|
||||
PACKAGECONFIG[amdblas] = "-DWITH_OPENCLAMDBLAS=ON,-DWITH_OPENCLAMDBLAS=OFF,libclamdblas,"
|
||||
PACKAGECONFIG[amdfft] = "-DWITH_OPENCLAMDFFT=ON,-DWITH_OPENCLAMDFFT=OFF,libclamdfft,"
|
||||
PACKAGECONFIG[dnn] = "-DBUILD_opencv_dnn=ON -DPROTOBUF_UPDATE_FILES=ON -DBUILD_PROTOBUF=OFF,-DBUILD_opencv_dnn=OFF,protobuf protobuf-native,"
|
||||
PACKAGECONFIG[eigen] = "-DWITH_EIGEN=ON,-DWITH_EIGEN=OFF,libeigen gflags glog,"
|
||||
PACKAGECONFIG[freetype] = "-DBUILD_opencv_freetype=ON,-DBUILD_opencv_freetype=OFF,freetype,"
|
||||
PACKAGECONFIG[gphoto2] = "-DWITH_GPHOTO2=ON,-DWITH_GPHOTO2=OFF,libgphoto2,"
|
||||
PACKAGECONFIG[gstreamer] = "-DWITH_GSTREAMER=ON,-DWITH_GSTREAMER=OFF,gstreamer1.0 gstreamer1.0-plugins-base,"
|
||||
PACKAGECONFIG[gtk] = "-DWITH_GTK=ON,-DWITH_GTK=OFF,gtk+3,"
|
||||
PACKAGECONFIG[jasper] = "-DWITH_JASPER=ON,-DWITH_JASPER=OFF,jasper,"
|
||||
PACKAGECONFIG[java] = "-DJAVA_INCLUDE_PATH=${JAVA_HOME}/include -DJAVA_INCLUDE_PATH2=${JAVA_HOME}/include/linux -DJAVA_AWT_INCLUDE_PATH=${JAVA_HOME}/include -DJAVA_AWT_LIBRARY=${JAVA_HOME}/lib/amd64/libjawt.so -DJAVA_JVM_LIBRARY=${JAVA_HOME}/lib/amd64/server/libjvm.so,,ant-native fastjar-native openjdk-8-native,"
|
||||
PACKAGECONFIG[jpeg] = "-DWITH_JPEG=ON,-DWITH_JPEG=OFF,jpeg,"
|
||||
PACKAGECONFIG[libav] = "-DWITH_FFMPEG=ON,-DWITH_FFMPEG=OFF,libav,"
|
||||
PACKAGECONFIG[libv4l] = "-DWITH_LIBV4L=ON,-DWITH_LIBV4L=OFF,v4l-utils,"
|
||||
PACKAGECONFIG[opencl] = "-DWITH_OPENCL=ON,-DWITH_OPENCL=OFF,opencl-headers virtual/opencl-icd,"
|
||||
PACKAGECONFIG[oracle-java] = "-DJAVA_INCLUDE_PATH=${ORACLE_JAVA_HOME}/include -DJAVA_INCLUDE_PATH2=${ORACLE_JAVA_HOME}/include/linux -DJAVA_AWT_INCLUDE_PATH=${ORACLE_JAVA_HOME}/include -DJAVA_AWT_LIBRARY=${ORACLE_JAVA_HOME}/lib/amd64/libjawt.so -DJAVA_JVM_LIBRARY=${ORACLE_JAVA_HOME}/lib/amd64/server/libjvm.so,,ant-native oracle-jse-jdk oracle-jse-jdk-native,"
|
||||
PACKAGECONFIG[png] = "-DWITH_PNG=ON,-DWITH_PNG=OFF,libpng,"
|
||||
PACKAGECONFIG[python2] = "-DPYTHON2_NUMPY_INCLUDE_DIRS:PATH=${STAGING_LIBDIR}/${PYTHON_DIR}/site-packages/numpy/core/include,,python-numpy,"
|
||||
PACKAGECONFIG[python3] = "-DPYTHON3_NUMPY_INCLUDE_DIRS:PATH=${STAGING_LIBDIR}/${PYTHON_DIR}/site-packages/numpy/core/include,,python3-numpy,"
|
||||
PACKAGECONFIG[samples] = "-DBUILD_EXAMPLES=ON -DINSTALL_PYTHON_EXAMPLES=ON,-DBUILD_EXAMPLES=OFF,,"
|
||||
PACKAGECONFIG[tbb] = "-DWITH_TBB=ON,-DWITH_TBB=OFF,tbb,"
|
||||
PACKAGECONFIG[text] = "-DBUILD_opencv_text=ON,-DBUILD_opencv_text=OFF,tesseract,"
|
||||
PACKAGECONFIG[tiff] = "-DWITH_TIFF=ON,-DWITH_TIFF=OFF,tiff,"
|
||||
PACKAGECONFIG[v4l] = "-DWITH_V4L=ON,-DWITH_V4L=OFF,v4l-utils,"
|
||||
|
||||
inherit pkgconfig cmake
|
||||
|
||||
inherit ${@bb.utils.contains('PACKAGECONFIG', 'python3', 'distutils3-base', '', d)}
|
||||
inherit ${@bb.utils.contains('PACKAGECONFIG', 'python2', 'distutils-base', '', d)}
|
||||
|
||||
export PYTHON_CSPEC="-I${STAGING_INCDIR}/${PYTHON_DIR}"
|
||||
export PYTHON="${STAGING_BINDIR_NATIVE}/${@bb.utils.contains('PACKAGECONFIG', 'python3', 'python3', 'python', d)}"
|
||||
export ORACLE_JAVA_HOME="${STAGING_DIR_NATIVE}/usr/bin/java"
|
||||
export JAVA_HOME="${STAGING_DIR_NATIVE}/usr/lib/jvm/openjdk-8-native"
|
||||
export ANT_DIR="${STAGING_DIR_NATIVE}/usr/share/ant/"
|
||||
|
||||
TARGET_CC_ARCH += "-I${S}/include "
|
||||
|
||||
PACKAGES += "${@bb.utils.contains('PACKAGECONFIG', 'samples', '${PN}-samples', '', d)} \
|
||||
${@bb.utils.contains('PACKAGECONFIG', 'oracle-java', '${PN}-java', '', d)} \
|
||||
${@bb.utils.contains('PACKAGECONFIG', 'java', '${PN}-java', '', d)} \
|
||||
${@bb.utils.contains('PACKAGECONFIG', 'python2', 'python-${BPN}', '', d)} \
|
||||
${@bb.utils.contains('PACKAGECONFIG', 'python3', 'python3-${BPN}', '', d)} \
|
||||
${PN}-apps"
|
||||
|
||||
python populate_packages_prepend () {
|
||||
cv_libdir = d.expand('${libdir}')
|
||||
do_split_packages(d, cv_libdir, '^lib(.*)\.so$', 'lib%s-dev', 'OpenCV %s development package', extra_depends='${PN}-dev', allow_links=True)
|
||||
do_split_packages(d, cv_libdir, '^lib(.*)\.la$', 'lib%s-dev', 'OpenCV %s development package', extra_depends='${PN}-dev')
|
||||
do_split_packages(d, cv_libdir, '^lib(.*)\.a$', 'lib%s-dev', 'OpenCV %s development package', extra_depends='${PN}-dev')
|
||||
do_split_packages(d, cv_libdir, '^lib(.*)\.so\.*', 'lib%s', 'OpenCV %s library', extra_depends='', allow_links=True)
|
||||
|
||||
pn = d.getVar('PN')
|
||||
metapkg = pn + '-dev'
|
||||
d.setVar('ALLOW_EMPTY_' + metapkg, "1")
|
||||
blacklist = [ metapkg ]
|
||||
metapkg_rdepends = [ ]
|
||||
packages = d.getVar('PACKAGES').split()
|
||||
for pkg in packages[1:]:
|
||||
if not pkg in blacklist and not pkg in metapkg_rdepends and pkg.endswith('-dev'):
|
||||
metapkg_rdepends.append(pkg)
|
||||
d.setVar('RRECOMMENDS_' + metapkg, ' '.join(metapkg_rdepends))
|
||||
|
||||
metapkg = pn
|
||||
d.setVar('ALLOW_EMPTY_' + metapkg, "1")
|
||||
blacklist = [ metapkg, "libopencv-ts" ]
|
||||
metapkg_rdepends = [ ]
|
||||
for pkg in packages[1:]:
|
||||
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'):
|
||||
metapkg_rdepends.append(pkg)
|
||||
d.setVar('RDEPENDS_' + metapkg, ' '.join(metapkg_rdepends))
|
||||
}
|
||||
|
||||
PACKAGES_DYNAMIC += "^libopencv-.*"
|
||||
|
||||
FILES_${PN} = ""
|
||||
FILES_${PN}-dbg += "${datadir}/OpenCV/java/.debug/* ${datadir}/OpenCV/samples/bin/.debug/*"
|
||||
FILES_${PN}-dev = "${includedir} ${libdir}/pkgconfig ${libdir}/cmake/opencv4/*.cmake"
|
||||
FILES_${PN}-staticdev += "${libdir}/opencv4/3rdparty/*.a"
|
||||
FILES_${PN}-apps = "${bindir}/* ${datadir}/opencv4 ${datadir}/licenses"
|
||||
FILES_${PN}-java = "${datadir}/OpenCV/java"
|
||||
FILES_${PN}-samples = "${datadir}/opencv4/samples/"
|
||||
|
||||
INSANE_SKIP_${PN}-java = "libdir"
|
||||
INSANE_SKIP_${PN}-dbg = "libdir"
|
||||
|
||||
ALLOW_EMPTY_${PN} = "1"
|
||||
|
||||
SUMMARY_python-opencv = "Python bindings to opencv"
|
||||
FILES_python-opencv = "${PYTHON_SITEPACKAGES_DIR}/*"
|
||||
RDEPENDS_python-opencv = "python-core python-numpy"
|
||||
|
||||
SUMMARY_python3-opencv = "Python bindings to opencv"
|
||||
FILES_python3-opencv = "${PYTHON_SITEPACKAGES_DIR}/*"
|
||||
RDEPENDS_python3-opencv = "python3-core python3-numpy"
|
||||
|
||||
RDEPENDS_${PN}-apps = "bash"
|
||||
|
||||
do_compile_prepend() {
|
||||
# remove the build host info to improve reproducibility
|
||||
if [ -f ${WORKDIR}/build/modules/core/version_string.inc ]; then
|
||||
sed -i "s#${WORKDIR}#/workdir#g" ${WORKDIR}/build/modules/core/version_string.inc
|
||||
fi
|
||||
}
|
||||
|
||||
do_install_append() {
|
||||
# Move Python files into correct library folder (for multilib build)
|
||||
if [ "$libdir" != "/usr/lib" -a -d ${D}/usr/lib ]; then
|
||||
mv ${D}/usr/lib/* ${D}/${libdir}/
|
||||
rm -rf ${D}/usr/lib
|
||||
fi
|
||||
}
|
||||
|
||||
TOOLCHAIN = "gcc"
|
||||
|
|
@ -1,10 +1,10 @@
|
|||
require recipes-support/opencv/opencv_4.1.0.bb
|
||||
require opencv_4.4.0.bb
|
||||
|
||||
LIC_FILES_CHKSUM = "file://LICENSE;md5=014935351b2df6f3094bf25de8d50ed8"
|
||||
LIC_FILES_CHKSUM = "file://LICENSE;md5=19598330421859a6dd353a4318091ac7"
|
||||
|
||||
SRCREV_opencv = "7187501b6bc89e111f4dd5694b58151ca98b7d9a"
|
||||
SRCREV_contrib = "65abc7090dedc84bbedec4dfd143f0340e52114f"
|
||||
SRCREV_extra = "322b475403899abc2411c4fbf68318afa77d3191"
|
||||
SRCREV_opencv = "3dbe28a38b6f7d1e24572e2533044adfe4287a40"
|
||||
SRCREV_contrib = "5fae4082cc493efa5cb7a7486f9e009618a5198b"
|
||||
SRCREV_extra = "65796edadce27ed013e3deeedb3c081ff527e4ec"
|
||||
SRC_URI[tinydnn.md5sum] = "adb1c512e09ca2c7a6faef36f9c53e59"
|
||||
SRC_URI[tinydnn.sha256sum] = "e2c61ce8c5debaa644121179e9dbdcf83f497f39de853f8dd5175846505aa18b"
|
||||
SRCREV_FORMAT_append = "_extra"
|
||||
|
|
@ -14,16 +14,15 @@ SRC_URI_remove = " \
|
|||
file://0002-Make-opencv-ts-create-share-library-intead-of-static.patch \
|
||||
"
|
||||
OPENCV_SRC ?= "git://source.codeaurora.org/external/imx/opencv-imx.git;protocol=https"
|
||||
SRCBRANCH = "4.2.0_imx"
|
||||
SRCBRANCH = "4.4.0_imx"
|
||||
SRC_URI =+ "${OPENCV_SRC};branch=${SRCBRANCH};name=opencv"
|
||||
SRC_URI += " \
|
||||
git://github.com/opencv/opencv_extra.git;destsuffix=extra;name=extra \
|
||||
https://github.com/tiny-dnn/tiny-dnn/archive/v1.0.0a3.tar.gz;destsuffix=git/3rdparty/tinydnn/tiny-dnn-1.0.0a3;name=tinydnn;unpack=false \
|
||||
file://uselocalxfeatures.patch;patchdir=../contrib/ \
|
||||
file://OpenCV_DNN_examples.patch \
|
||||
file://0001-Add-smaller-version-of-download_models.py.patch;patchdir=../extra \
|
||||
"
|
||||
PV = "4.2.0.imx"
|
||||
PV = "4.4.0.imx"
|
||||
|
||||
PACKAGECONFIG_remove = "eigen"
|
||||
PACKAGECONFIG_append_mx8 = " dnn text"
|
||||
|
|
@ -32,6 +31,7 @@ PACKAGECONFIG_OPENCL_mx8 = "opencl"
|
|||
PACKAGECONFIG_OPENCL_mx8dxl = ""
|
||||
PACKAGECONFIG_OPENCL_mx8phantomdxl = ""
|
||||
PACKAGECONFIG_OPENCL_mx8mm = ""
|
||||
PACKAGECONFIG_OPENCL_mx8mnlite = ""
|
||||
PACKAGECONFIG_append = " ${PACKAGECONFIG_OPENCL}"
|
||||
|
||||
PACKAGECONFIG[openvx] = "-DWITH_OPENVX=ON -DOPENVX_ROOT=${STAGING_LIBDIR} -DOPENVX_LIB_CANDIDATES='OpenVX;OpenVXU',-DWITH_OPENVX=OFF,virtual/libopenvx,"
|
||||
|
|
@ -41,9 +41,6 @@ PACKAGECONFIG[test] = "-DBUILD_TESTS=ON -DINSTALL_TESTS=ON -DOPENCV_TEST_DATA_PA
|
|||
do_unpack_extra_append() {
|
||||
mkdir -p ${S}/3rdparty/tinydnn/
|
||||
tar xzf ${WORKDIR}/v1.0.0a3.tar.gz -C ${S}/3rdparty/tinydnn/
|
||||
# Workaround to fix build issue
|
||||
cp ${WORKDIR}/vgg/*.i ${WORKDIR}/contrib/modules/xfeatures2d/src
|
||||
cp ${WORKDIR}/boostdesc/*.i ${WORKDIR}/contrib/modules/xfeatures2d/src
|
||||
}
|
||||
|
||||
do_install_append() {
|
||||
Loading…
Reference in New Issue