aboutsummaryrefslogtreecommitdiffstats
path: root/recipes-support
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-support')
-rw-r--r--recipes-support/opencv/opencv/0001-3rdparty-ippicv-Use-pre-downloaded-ipp.patch1
-rw-r--r--recipes-support/opencv/opencv/0001-Add-missing-header-for-LIBAVCODEC_VERSION_INT.patch26
-rw-r--r--recipes-support/opencv/opencv/0001-Add-smaller-version-of-download_models.py.patch1
-rw-r--r--recipes-support/opencv/opencv/0001-Temporarliy-work-around-deprecated-ffmpeg-RAW-functi.patch1
-rw-r--r--recipes-support/opencv/opencv/0003-To-fix-errors-as-following.patch1
-rw-r--r--recipes-support/opencv/opencv/OpenCV_DNN_examples.patch26
-rw-r--r--recipes-support/opencv/opencv/fix-build-with-protobuf-v22.patch408
-rw-r--r--recipes-support/opencv/opencv_4.6.0.imx.bb (renamed from recipes-support/opencv/opencv_4.5.2.imx.bb)103
8 files changed, 508 insertions, 59 deletions
diff --git a/recipes-support/opencv/opencv/0001-3rdparty-ippicv-Use-pre-downloaded-ipp.patch b/recipes-support/opencv/opencv/0001-3rdparty-ippicv-Use-pre-downloaded-ipp.patch
index 9e6a6137..b1b00623 100644
--- a/recipes-support/opencv/opencv/0001-3rdparty-ippicv-Use-pre-downloaded-ipp.patch
+++ b/recipes-support/opencv/opencv/0001-3rdparty-ippicv-Use-pre-downloaded-ipp.patch
@@ -3,6 +3,7 @@ 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
+Upstream-Status: Pending
Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
Signed-off-by: Ismo Puustinen <ismo.puustinen@intel.com>
diff --git a/recipes-support/opencv/opencv/0001-Add-missing-header-for-LIBAVCODEC_VERSION_INT.patch b/recipes-support/opencv/opencv/0001-Add-missing-header-for-LIBAVCODEC_VERSION_INT.patch
new file mode 100644
index 00000000..59da6ab3
--- /dev/null
+++ b/recipes-support/opencv/opencv/0001-Add-missing-header-for-LIBAVCODEC_VERSION_INT.patch
@@ -0,0 +1,26 @@
+From d6bdd0a91eb0ed57688c0af5ba5088cf0afdc0a0 Mon Sep 17 00:00:00 2001
+From: Jochen Sprickerhof <jspricke@debian.org>
+Date: Mon, 8 Aug 2022 21:10:13 +0200
+Subject: [PATCH] Add missing header for LIBAVCODEC_VERSION_INT
+
+Upstream-Status: Backport [https://github.com/opencv/opencv/pull/22357]
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ modules/videoio/src/ffmpeg_codecs.hpp | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/modules/videoio/src/ffmpeg_codecs.hpp b/modules/videoio/src/ffmpeg_codecs.hpp
+index 61788e0345..faad2596ed 100644
+--- a/modules/videoio/src/ffmpeg_codecs.hpp
++++ b/modules/videoio/src/ffmpeg_codecs.hpp
+@@ -60,6 +60,7 @@ extern "C" {
+ #include <errno.h>
+ #endif
+
++#include <libavcodec/version.h>
+ #include <libavformat/avformat.h>
+
+ #ifdef __cplusplus
+--
+2.38.1
+
diff --git a/recipes-support/opencv/opencv/0001-Add-smaller-version-of-download_models.py.patch b/recipes-support/opencv/opencv/0001-Add-smaller-version-of-download_models.py.patch
index 0aabee29..46232ec5 100644
--- a/recipes-support/opencv/opencv/0001-Add-smaller-version-of-download_models.py.patch
+++ b/recipes-support/opencv/opencv/0001-Add-smaller-version-of-download_models.py.patch
@@ -3,6 +3,7 @@ From: Tom Hochstein <tom.hochstein@nxp.com>
Date: Tue, 1 Sep 2020 14:57:07 -0500
Subject: [PATCH] Add smaller version of download_models.py
+Upstream-Status: Pending
Signed-off-by: Tom Hochstein <tom.hochstein@nxp.com>
---
testdata/dnn/download_models_basic.py | 159 ++++++++++++++++++++++++++
diff --git a/recipes-support/opencv/opencv/0001-Temporarliy-work-around-deprecated-ffmpeg-RAW-functi.patch b/recipes-support/opencv/opencv/0001-Temporarliy-work-around-deprecated-ffmpeg-RAW-functi.patch
index 1e47f8b1..aa7d335e 100644
--- a/recipes-support/opencv/opencv/0001-Temporarliy-work-around-deprecated-ffmpeg-RAW-functi.patch
+++ b/recipes-support/opencv/opencv/0001-Temporarliy-work-around-deprecated-ffmpeg-RAW-functi.patch
@@ -4,6 +4,7 @@ Date: Wed, 9 May 2018 13:33:59 -0700
Subject: [PATCH] Temporarliy work around deprecated ffmpeg RAW function
compile failure until next uprev
+Upstream-Status: Inappropriate [platform specific]
Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
---
diff --git a/recipes-support/opencv/opencv/0003-To-fix-errors-as-following.patch b/recipes-support/opencv/opencv/0003-To-fix-errors-as-following.patch
index bb47ef2b..d39c0582 100644
--- a/recipes-support/opencv/opencv/0003-To-fix-errors-as-following.patch
+++ b/recipes-support/opencv/opencv/0003-To-fix-errors-as-following.patch
@@ -7,6 +7,7 @@ Subject: [PATCH] To fix errors as following:
"perf_abs.cpp:13: undefined reference to `cvtest::param_seed'"
"test_superres.cpp:270: undefined reference to `checkIppStatus()'"
+Upstream-Status: Pending
Signed-off-by: Huang Qiyu <huangqy.fnst@cn.fujitsu.com>
Also add the visibility changes for certain OpenCL-related functions in
diff --git a/recipes-support/opencv/opencv/OpenCV_DNN_examples.patch b/recipes-support/opencv/opencv/OpenCV_DNN_examples.patch
index 0e83e994..ef7831a5 100644
--- a/recipes-support/opencv/opencv/OpenCV_DNN_examples.patch
+++ b/recipes-support/opencv/opencv/OpenCV_DNN_examples.patch
@@ -31,7 +31,7 @@ Index: git/samples/dnn/classification.cpp
===================================================================
--- git.orig/samples/dnn/classification.cpp
+++ git/samples/dnn/classification.cpp
-@@ -11,6 +11,7 @@ std::string keys =
+@@ -12,6 +12,7 @@ std::string keys =
"{ help h | | Print help message. }"
"{ @alias | | An alias name of model to extract preprocessing parameters from models.yml file. }"
"{ zoo | models.yml | An optional path to file with preprocessing parameters }"
@@ -39,7 +39,7 @@ Index: git/samples/dnn/classification.cpp
"{ input i | | Path to input image or video file. Skip this argument to capture frames from a camera.}"
"{ initial_width | 0 | Preprocess input image by initial resizing to a specific width.}"
"{ initial_height | 0 | Preprocess input image by initial resizing to a specific height.}"
-@@ -102,7 +103,7 @@ int main(int argc, char** argv)
+@@ -113,7 +114,7 @@ int main(int argc, char** argv)
if (parser.has("input"))
cap.open(parser.get<String>("input"));
else
@@ -48,19 +48,21 @@ Index: git/samples/dnn/classification.cpp
//! [Open a video file or an image file or a camera stream]
// Process frames.
-@@ -151,13 +152,13 @@ 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);
+@@ -195,14 +196,14 @@ int main(int argc, char** argv)
+ }
+ std::string label = format("Inference time of 1 round: %.2f ms", t1);
+ std::string label2 = format("Average time of 200 rounds: %.2f ms", timeRecorder.getTimeMilli()/200);
- putText(frame, label, Point(0, 15), FONT_HERSHEY_SIMPLEX, 0.5, Scalar(0, 255, 0));
+- putText(frame, label2, Point(0, 35), 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);
++ putText(frame, label2, Point(0, 45), FONT_HERSHEY_SIMPLEX, 0.8, Scalar(0, 0, 255), 2, 8, false);
// Print predicted class.
label = format("%s: %.4f", (classes.empty() ? format("Class #%d", classId).c_str() :
classes[classId].c_str()),
confidence);
-- putText(frame, label, Point(0, 40), FONT_HERSHEY_SIMPLEX, 0.5, Scalar(0, 255, 0));
-+ putText(frame, label, Point(0, 45), FONT_HERSHEY_SIMPLEX, 0.8, Scalar(0, 0, 255), 2, 8, false);
+- putText(frame, label, Point(0, 55), FONT_HERSHEY_SIMPLEX, 0.5, Scalar(0, 255, 0));
++ putText(frame, label, Point(0, 70), FONT_HERSHEY_SIMPLEX, 0.8, Scalar(0, 0, 255), 2, 8, false);
imshow(kWinName, frame);
}
@@ -68,7 +70,7 @@ 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)
+@@ -260,13 +260,13 @@ int main(int argc, char** argv)
if (predictionsQueue.counter > 1)
{
std::string label = format("Camera: %.2f FPS", framesQueue.getFPS());
@@ -85,7 +87,7 @@ Index: git/samples/dnn/object_detection.cpp
}
imshow(kWinName, frame);
}
-@@ -293,7 +293,7 @@ int main(int argc, char** argv)
+@@ -302,7 +302,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 +96,7 @@ Index: git/samples/dnn/object_detection.cpp
imshow(kWinName, frame);
}
-@@ -462,7 +462,7 @@ void drawPred(int classId, float conf, i
+@@ -471,7 +471,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);
@@ -107,7 +109,7 @@ 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)
+@@ -162,7 +162,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);
diff --git a/recipes-support/opencv/opencv/fix-build-with-protobuf-v22.patch b/recipes-support/opencv/opencv/fix-build-with-protobuf-v22.patch
new file mode 100644
index 00000000..3538f24b
--- /dev/null
+++ b/recipes-support/opencv/opencv/fix-build-with-protobuf-v22.patch
@@ -0,0 +1,408 @@
+From 5e4150826fea6f37276f348c65d94ce4847d1211 Mon Sep 17 00:00:00 2001
+From: Kumataro <Kumataro@users.noreply.github.com>
+Date: Sat, 7 Oct 2023 10:11:25 +0900
+Subject: [PATCH] 3rdparty: supporting protobuf v22 and later
+
+Upstream-Status: Submitted [https://github.com/opencv/opencv/pull/24372]
+---
+ cmake/OpenCVFindProtobuf.cmake | 37 ++++++++++++++++++++++++++++++++++
+ modules/dnn/CMakeLists.txt | 9 +++++++++
+ 2 files changed, 46 insertions(+)
+
+diff --git a/cmake/OpenCVFindProtobuf.cmake b/cmake/OpenCVFindProtobuf.cmake
+index 8835347d1d..9bd5c28db8 100644
+--- a/cmake/OpenCVFindProtobuf.cmake
++++ b/cmake/OpenCVFindProtobuf.cmake
+@@ -67,6 +67,38 @@ else()
+ endif()
+ endif()
+
++# See https://github.com/opencv/opencv/issues/24369
++# In Protocol Buffers v22.0 and later drops C++11 support and depends abseil-cpp.
++# Details: https://protobuf.dev/news/2022-08-03/
++# And if std::text_view is in abseil-cpp requests C++17 and later.
++if(HAVE_PROTOBUF)
++ if("${Protobuf_VERSION}" MATCHES [[[0-9]+.([0-9]+).[0-9]+]])
++ string(COMPARE GREATER_EQUAL "${CMAKE_MATCH_1}" "22" REQUEST_ABSL)
++
++ if(REQUEST_ABSL)
++ string(COMPARE GREATER_EQUAL "${CMAKE_CXX_STANDARD}" "17" USED_AFTER_CXX17)
++ if(NOT USED_AFTER_CXX17)
++ message("CMAKE_CXX_STANDARD : ${CMAKE_CXX_STANDARD}")
++ message("protobuf : ${Protobuf_VERSION}")
++ message(FATAL_ERROR "protobuf(v22 and later) and abseil-cpp request CMAKE_CXX_STANDARD=17 and later.")
++ endif()
++
++ ocv_check_modules(ABSL_STRINGS absl_strings)
++ if(NOT ABSL_STRINGS_FOUND)
++ message(FATAL_ERROR "protobuf(v22 and later) requests abseil-cpp(strings), but missing.")
++ endif()
++
++ ocv_check_modules(ABSL_LOG absl_log)
++ if(NOT ABSL_LOG_FOUND)
++ message(FATAL_ERROR "protobuf(v22 and later) requests abseil-cpp(log), but missing.")
++ endif()
++
++ endif()
++ else()
++ message(FATAL_ERROR "Protobuf version(${Protobuf_VERSION}) is unexpected to split.")
++ endif()
++endif()
++
+ if(HAVE_PROTOBUF AND PROTOBUF_UPDATE_FILES AND NOT COMMAND PROTOBUF_GENERATE_CPP)
+ message(FATAL_ERROR "Can't configure protobuf dependency (BUILD_PROTOBUF=${BUILD_PROTOBUF} PROTOBUF_UPDATE_FILES=${PROTOBUF_UPDATE_FILES})")
+ endif()
+@@ -89,3 +121,8 @@ if(HAVE_PROTOBUF)
+ BUILD_PROTOBUF THEN "build (${Protobuf_VERSION})"
+ ELSE "${__location} (${Protobuf_VERSION})")
+ endif()
++
++if(HAVE_ABSL_STRINGS AND HAVE_ABSL_LOG)
++ list(APPEND CUSTOM_STATUS absl)
++ list(APPEND CUSTOM_STATUS_absl " abseil-cpp:" "YES (${ABSL_STRINGS_VERSION})" )
++endif()
+diff --git a/modules/dnn/CMakeLists.txt b/modules/dnn/CMakeLists.txt
+index 804b78ead2..d32007b37e 100644
+--- a/modules/dnn/CMakeLists.txt
++++ b/modules/dnn/CMakeLists.txt
+@@ -149,6 +149,15 @@ if(NOT BUILD_PROTOBUF)
+ list(APPEND include_dirs ${Protobuf_INCLUDE_DIRS})
+ endif()
+
++if(HAVE_ABSL_STRINGS)
++ list(APPEND libs ${ABSL_STRINGS_LIBRARIES})
++ list(APPEND include_dirs ${ABSL_STRTRINGS_INCLUDE_DIRS})
++endif()
++if(HAVE_ABSL_LOG)
++ list(APPEND libs ${ABSL_LOG_LIBRARIES})
++ list(APPEND include_dirs ${ABSL_LOG_INCLUDE_DIRS})
++endif()
++
+ set(sources_options "")
+
+ list(APPEND libs ${LAPACK_LIBRARIES})
+From 06a7669521d205f647d3e718322ccd153cdbbb77 Mon Sep 17 00:00:00 2001
+From: Kumataro <Kumataro@users.noreply.github.com>
+Date: Sun, 8 Oct 2023 09:39:35 +0900
+Subject: [PATCH] dnn: disable some tests for external protobuf
+
+---
+ modules/dnn/CMakeLists.txt | 5 +++++
+ modules/dnn/src/caffe/caffe_io.cpp | 24 ++++++++++++++++++++++--
+ modules/dnn/test/test_layers.cpp | 16 ++++++++++++++++
+ 3 files changed, 43 insertions(+), 2 deletions(-)
+
+diff --git a/modules/dnn/CMakeLists.txt b/modules/dnn/CMakeLists.txt
+index d32007b37e..face38465f 100644
+--- a/modules/dnn/CMakeLists.txt
++++ b/modules/dnn/CMakeLists.txt
+@@ -254,6 +254,12 @@ ocv_create_module(${libs} ${dnn_runtime_libs})
+ ocv_add_samples()
+ ocv_add_accuracy_tests(${dnn_runtime_libs})
+
++if(NOT BUILD_PROTOBUF)
++ if(TARGET opencv_test_dnn)
++ ocv_target_compile_definitions(opencv_test_dnn PRIVATE "OPENCV_DNN_EXTERNAL_PROTOBUF=1")
++ endif()
++endif()
++
+ set(perf_path "${CMAKE_CURRENT_LIST_DIR}/perf")
+ file(GLOB_RECURSE perf_srcs "${perf_path}/*.cpp")
+ file(GLOB_RECURSE perf_hdrs "${perf_path}/*.hpp" "${perf_path}/*.h")
+
+diff --git a/modules/dnn/src/caffe/caffe_io.cpp b/modules/dnn/src/caffe/caffe_io.cpp
+index ebecf95eea..ebceca84cf 100644
+--- a/modules/dnn/src/caffe/caffe_io.cpp
++++ b/modules/dnn/src/caffe/caffe_io.cpp
+@@ -1130,7 +1130,17 @@ bool ReadProtoFromTextFile(const char* filename, Message* proto) {
+ parser.AllowUnknownField(true);
+ parser.SetRecursionLimit(1000);
+ #endif
+- return parser.Parse(&input, proto);
++ const bool ret = parser.Parse(&input, proto);
++
++#ifdef OPENCV_DNN_EXTERNAL_PROTOBUF
++ if(!ret)
++ {
++ LOG(ERROR) << "Some data requires patched protobuf (available in OpenCV source tree only).";
++ CV_Error_(Error::StsError,("Some data requires patched protobuf (available in OpenCV source tree only)."));
++ }
++#endif
++
++ return ret;
+ }
+
+ bool ReadProtoFromBinaryFile(const char* filename, Message* proto) {
+@@ -1148,7 +1158,17 @@ bool ReadProtoFromTextBuffer(const char* data, size_t len, Message* proto) {
+ parser.AllowUnknownField(true);
+ parser.SetRecursionLimit(1000);
+ #endif
+- return parser.Parse(&input, proto);
++ const bool ret = parser.Parse(&input, proto);
++
++#ifdef OPENCV_DNN_EXTERNAL_PROTOBUF
++ if(!ret)
++ {
++ LOG(ERROR) << "Some data requires patched protobuf (available in OpenCV source tree only).";
++ CV_Error_(Error::StsError,("Some data requires patched protobuf (available in OpenCV source tree only)."));
++ }
++#endif
++
++ return ret;
+ }
+
+
+diff --git a/modules/dnn/test/test_layers.cpp b/modules/dnn/test/test_layers.cpp
+index 763d94b99c..a07d442d76 100644
+--- a/modules/dnn/test/test_layers.cpp
++++ b/modules/dnn/test/test_layers.cpp
+@@ -754,7 +754,11 @@ TEST_F(Layer_RNN_Test, get_set_test)
+ EXPECT_EQ(shape(outputs[1]), shape(nT, nS, nH));
+ }
+
++#ifndef OPENCV_DNN_EXTERNAL_PROTOBUF
+ TEST_P(Test_Caffe_layers, Accum)
++#else
++TEST_P(Test_Caffe_layers, DISABLED_Accum) // requires patched protobuf (available in OpenCV source tree only)
++#endif
+ {
+ if (backend == DNN_BACKEND_OPENCV && target != DNN_TARGET_CPU)
+ applyTestTag(CV_TEST_TAG_DNN_SKIP_OPENCL, CV_TEST_TAG_DNN_SKIP_OPENCL_FP16);
+@@ -778,7 +782,11 @@ TEST_P(Test_Caffe_layers, ChannelNorm)
+ testLayerUsingCaffeModels("channel_norm", false, false);
+ }
+
++#ifndef OPENCV_DNN_EXTERNAL_PROTOBUF
+ TEST_P(Test_Caffe_layers, DataAugmentation)
++#else
++TEST_P(Test_Caffe_layers, DISABLED_DataAugmentation) // requires patched protobuf (available in OpenCV source tree only)
++#endif
+ {
+ if (backend == DNN_BACKEND_OPENCV && target == DNN_TARGET_OPENCL_FP16)
+ applyTestTag(CV_TEST_TAG_DNN_SKIP_OPENCL_FP16);
+@@ -787,7 +795,11 @@ TEST_P(Test_Caffe_layers, DataAugmentation)
+ testLayerUsingCaffeModels("data_augmentation_8x6", true, false);
+ }
+
++#ifndef OPENCV_DNN_EXTERNAL_PROTOBUF
+ TEST_P(Test_Caffe_layers, Resample)
++#else
++TEST_P(Test_Caffe_layers, DISABLED_Resample) // requires patched protobuf (available in OpenCV source tree only)
++#endif
+ {
+ if (backend != DNN_BACKEND_OPENCV)
+ applyTestTag(CV_TEST_TAG_DNN_SKIP_IE_NN_BUILDER, CV_TEST_TAG_DNN_SKIP_IE_NGRAPH);
+@@ -795,7 +807,11 @@ TEST_P(Test_Caffe_layers, Resample)
+ testLayerUsingCaffeModels("nearest", false, false);
+ }
+
++#ifndef OPENCV_DNN_EXTERNAL_PROTOBUF
+ TEST_P(Test_Caffe_layers, Correlation)
++#else
++TEST_P(Test_Caffe_layers, DISABLED_Correlation) // requires patched protobuf (available in OpenCV source tree only)
++#endif
+ {
+ if (backend == DNN_BACKEND_OPENCV && target == DNN_TARGET_OPENCL_FP16)
+ applyTestTag(CV_TEST_TAG_DNN_SKIP_IE_NGRAPH, CV_TEST_TAG_DNN_SKIP_IE_NN_BUILDER,
+From 2c33798f41942aefc203183d673ce4846f32dba4 Mon Sep 17 00:00:00 2001
+From: Kumataro <Kumataro@users.noreply.github.com>
+Date: Sun, 8 Oct 2023 13:28:40 +0900
+Subject: [PATCH] use GREATER instead of GREATER_EQUAL and remove new blank
+ line at EOF
+
+---
+ cmake/OpenCVFindProtobuf.cmake | 6 ++++--
+ 1 file changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/cmake/OpenCVFindProtobuf.cmake b/cmake/OpenCVFindProtobuf.cmake
+index 9bd5c28db8..ba147526d6 100644
+--- a/cmake/OpenCVFindProtobuf.cmake
++++ b/cmake/OpenCVFindProtobuf.cmake
+@@ -71,12 +71,14 @@ endif()
+ # In Protocol Buffers v22.0 and later drops C++11 support and depends abseil-cpp.
+ # Details: https://protobuf.dev/news/2022-08-03/
+ # And if std::text_view is in abseil-cpp requests C++17 and later.
++
+ if(HAVE_PROTOBUF)
+ if("${Protobuf_VERSION}" MATCHES [[[0-9]+.([0-9]+).[0-9]+]])
+- string(COMPARE GREATER_EQUAL "${CMAKE_MATCH_1}" "22" REQUEST_ABSL)
++ string(COMPARE GREATER "${CMAKE_MATCH_1}" "21" REQUEST_ABSL) # >=22
+
+ if(REQUEST_ABSL)
+- string(COMPARE GREATER_EQUAL "${CMAKE_CXX_STANDARD}" "17" USED_AFTER_CXX17)
++ string(COMPARE GREATER "${CMAKE_CXX_STANDARD}" "16" USED_AFTER_CXX17) # >=17
++
+ if(NOT USED_AFTER_CXX17)
+ message("CMAKE_CXX_STANDARD : ${CMAKE_CXX_STANDARD}")
+ message("protobuf : ${Protobuf_VERSION}")
+From cd709eefbeedd116bf3495b42280323b932791ff Mon Sep 17 00:00:00 2001
+From: Kumataro <Kumataro@users.noreply.github.com>
+Date: Mon, 9 Oct 2023 21:51:04 +0900
+Subject: [PATCH] fix for review
+
+---
+ cmake/OpenCVFindProtobuf.cmake | 5 ----
+ modules/dnn/src/caffe/caffe_io.cpp | 24 ++----------------
+ modules/dnn/test/test_layers.cpp | 40 +++++++++++++++---------------
+ 3 files changed, 22 insertions(+), 47 deletions(-)
+
+diff --git a/cmake/OpenCVFindProtobuf.cmake b/cmake/OpenCVFindProtobuf.cmake
+index ba147526d6..2faf1010bf 100644
+--- a/cmake/OpenCVFindProtobuf.cmake
++++ b/cmake/OpenCVFindProtobuf.cmake
+@@ -123,8 +123,3 @@ if(HAVE_PROTOBUF)
+ BUILD_PROTOBUF THEN "build (${Protobuf_VERSION})"
+ ELSE "${__location} (${Protobuf_VERSION})")
+ endif()
+-
+-if(HAVE_ABSL_STRINGS AND HAVE_ABSL_LOG)
+- list(APPEND CUSTOM_STATUS absl)
+- list(APPEND CUSTOM_STATUS_absl " abseil-cpp:" "YES (${ABSL_STRINGS_VERSION})" )
+-endif()
+diff --git a/modules/dnn/src/caffe/caffe_io.cpp b/modules/dnn/src/caffe/caffe_io.cpp
+index ebceca84cf..ebecf95eea 100644
+--- a/modules/dnn/src/caffe/caffe_io.cpp
++++ b/modules/dnn/src/caffe/caffe_io.cpp
+@@ -1130,17 +1130,7 @@ bool ReadProtoFromTextFile(const char* filename, Message* proto) {
+ parser.AllowUnknownField(true);
+ parser.SetRecursionLimit(1000);
+ #endif
+- const bool ret = parser.Parse(&input, proto);
+-
+-#ifdef OPENCV_DNN_EXTERNAL_PROTOBUF
+- if(!ret)
+- {
+- LOG(ERROR) << "Some data requires patched protobuf (available in OpenCV source tree only).";
+- CV_Error_(Error::StsError,("Some data requires patched protobuf (available in OpenCV source tree only)."));
+- }
+-#endif
+-
+- return ret;
++ return parser.Parse(&input, proto);
+ }
+
+ bool ReadProtoFromBinaryFile(const char* filename, Message* proto) {
+@@ -1158,17 +1148,7 @@ bool ReadProtoFromTextBuffer(const char* data, size_t len, Message* proto) {
+ parser.AllowUnknownField(true);
+ parser.SetRecursionLimit(1000);
+ #endif
+- const bool ret = parser.Parse(&input, proto);
+-
+-#ifdef OPENCV_DNN_EXTERNAL_PROTOBUF
+- if(!ret)
+- {
+- LOG(ERROR) << "Some data requires patched protobuf (available in OpenCV source tree only).";
+- CV_Error_(Error::StsError,("Some data requires patched protobuf (available in OpenCV source tree only)."));
+- }
+-#endif
+-
+- return ret;
++ return parser.Parse(&input, proto);
+ }
+
+
+diff --git a/modules/dnn/test/test_layers.cpp b/modules/dnn/test/test_layers.cpp
+index a07d442d76..5c6fc541d7 100644
+--- a/modules/dnn/test/test_layers.cpp
++++ b/modules/dnn/test/test_layers.cpp
+@@ -754,17 +754,17 @@ TEST_F(Layer_RNN_Test, get_set_test)
+ EXPECT_EQ(shape(outputs[1]), shape(nT, nS, nH));
+ }
+
+-#ifndef OPENCV_DNN_EXTERNAL_PROTOBUF
+ TEST_P(Test_Caffe_layers, Accum)
+-#else
+-TEST_P(Test_Caffe_layers, DISABLED_Accum) // requires patched protobuf (available in OpenCV source tree only)
+-#endif
+ {
++#ifdef OPENCV_DNN_EXTERNAL_PROTOBUF
++ throw SkipTestException("Requires patched protobuf");
++#else
+ if (backend == DNN_BACKEND_OPENCV && target != DNN_TARGET_CPU)
+ applyTestTag(CV_TEST_TAG_DNN_SKIP_OPENCL, CV_TEST_TAG_DNN_SKIP_OPENCL_FP16);
+
+ testLayerUsingCaffeModels("accum", false, false, 0.0, 0.0, 2);
+ testLayerUsingCaffeModels("accum_ref", false, false, 0.0, 0.0, 2);
++#endif
+ }
+
+ TEST_P(Test_Caffe_layers, FlowWarp)
+@@ -782,42 +782,42 @@ TEST_P(Test_Caffe_layers, ChannelNorm)
+ testLayerUsingCaffeModels("channel_norm", false, false);
+ }
+
+-#ifndef OPENCV_DNN_EXTERNAL_PROTOBUF
+ TEST_P(Test_Caffe_layers, DataAugmentation)
+-#else
+-TEST_P(Test_Caffe_layers, DISABLED_DataAugmentation) // requires patched protobuf (available in OpenCV source tree only)
+-#endif
+ {
++#ifdef OPENCV_DNN_EXTERNAL_PROTOBUF
++ throw SkipTestException("Requires patched protobuf");
++#else
+ if (backend == DNN_BACKEND_OPENCV && target == DNN_TARGET_OPENCL_FP16)
+ applyTestTag(CV_TEST_TAG_DNN_SKIP_OPENCL_FP16);
+ testLayerUsingCaffeModels("data_augmentation", true, false);
+ testLayerUsingCaffeModels("data_augmentation_2x1", true, false);
+ testLayerUsingCaffeModels("data_augmentation_8x6", true, false);
++#endif
+ }
+
+-#ifndef OPENCV_DNN_EXTERNAL_PROTOBUF
+ TEST_P(Test_Caffe_layers, Resample)
+-#else
+-TEST_P(Test_Caffe_layers, DISABLED_Resample) // requires patched protobuf (available in OpenCV source tree only)
+-#endif
+ {
++#ifdef OPENCV_DNN_EXTERNAL_PROTOBUF
++ throw SkipTestException("Requires patched protobuf");
++#else
+ if (backend != DNN_BACKEND_OPENCV)
+ applyTestTag(CV_TEST_TAG_DNN_SKIP_IE_NN_BUILDER, CV_TEST_TAG_DNN_SKIP_IE_NGRAPH);
+ testLayerUsingCaffeModels("nearest_2inps", false, false, 0.0, 0.0, 2);
+ testLayerUsingCaffeModels("nearest", false, false);
++#endif
+ }
+
+-#ifndef OPENCV_DNN_EXTERNAL_PROTOBUF
+ TEST_P(Test_Caffe_layers, Correlation)
+-#else
+-TEST_P(Test_Caffe_layers, DISABLED_Correlation) // requires patched protobuf (available in OpenCV source tree only)
+-#endif
+ {
++#ifdef OPENCV_DNN_EXTERNAL_PROTOBUF
++ throw SkipTestException("Requires patched protobuf");
++#else
+ if (backend == DNN_BACKEND_OPENCV && target == DNN_TARGET_OPENCL_FP16)
+ applyTestTag(CV_TEST_TAG_DNN_SKIP_IE_NGRAPH, CV_TEST_TAG_DNN_SKIP_IE_NN_BUILDER,
+ CV_TEST_TAG_DNN_SKIP_OPENCL, CV_TEST_TAG_DNN_SKIP_OPENCL_FP16);
+ testLayerUsingCaffeModels("correlation", false, false, 0.0, 0.0, 2);
+ }
++#endif
+
+ TEST_P(Test_Caffe_layers, Convolution2Inputs)
+ {
+@@ -1644,12 +1644,11 @@ private:
+ int outWidth, outHeight, zoomFactor;
+ };
+
+-#ifndef OPENCV_DNN_EXTERNAL_PROTOBUF
+ TEST_P(Test_Caffe_layers, Interp)
+-#else
+-TEST_P(Test_Caffe_layers, DISABLED_Interp) // requires patched protobuf (available in OpenCV source tree only)
+-#endif
+ {
++#ifdef OPENCV_DNN_EXTERNAL_PROTOBUF
++ throw SkipTestException("Requires patched protobuf");
++#else
+ #if defined(INF_ENGINE_RELEASE) && INF_ENGINE_VER_MAJOR_EQ(2022010000)
+ // Cannot get memory!
+ if (backend == DNN_BACKEND_INFERENCE_ENGINE_NGRAPH && target == DNN_TARGET_CPU)
+@@ -1686,6 +1685,7 @@ TEST_P(Test_Caffe_layers, DISABLED_Interp) // requires patched protobuf (availa
+
+ // Test an implemented layer.
+ testLayerUsingCaffeModels("layer_interp", false, false);
++#endif
+ }
+
+ INSTANTIATE_TEST_CASE_P(/*nothing*/, Test_Caffe_layers, dnnBackendsAndTargets());
diff --git a/recipes-support/opencv/opencv_4.5.2.imx.bb b/recipes-support/opencv/opencv_4.6.0.imx.bb
index f84e29d7..6d13d107 100644
--- a/recipes-support/opencv/opencv_4.5.2.imx.bb
+++ b/recipes-support/opencv/opencv_4.6.0.imx.bb
@@ -3,6 +3,8 @@
# recipe. The second section customizes the recipe for i.MX.
########## meta-openembedded copy ###########
+# Upstream hash: 72dc42966be7da07f9553f75b825123b81704f0b
+# Commit https://github.com/openembedded/meta-openembedded/commit/225ce6a14a8110ab6b573b4dc9f5297a03d17e0f added
SUMMARY = "Opencv : The Open Computer Vision Library"
HOMEPAGE = "http://opencv.org/"
@@ -16,8 +18,8 @@ ARM_INSTRUCTION_SET:armv5 = "arm"
DEPENDS = "libtool swig-native bzip2 zlib glib-2.0 libwebp"
-SRCREV_opencv = "69357b1e88680658a07cffde7678a4d697469f03"
-SRCREV_contrib = "f5d7f6712d4ff229ba4f45cf79dfd11c557d56fd"
+SRCREV_opencv = "b0dc474160e389b9c9045da5db49d03ae17c6a6b"
+SRCREV_contrib = "7b77c355a8fdc97667b3fa1e7a0d37e4973fc868"
SRCREV_ipp = "a56b6ac6f030c312b2dce17430eef13aed9af274"
SRCREV_boostdesc = "34e4206aef44d50e6bbcd0ab06354b52e7466d26"
SRCREV_vgg = "fccf7cd6a4b12079f73bbfb21745f9babcd4eb1d"
@@ -45,22 +47,22 @@ IPP_MD5 = "${@ipp_md5sum(d)}"
SRCREV_FORMAT = "opencv_contrib_ipp_boostdesc_vgg"
SRC_URI = "git://github.com/opencv/opencv.git;name=opencv;branch=master;protocol=https \
- git://github.com/opencv/opencv_contrib.git;destsuffix=contrib;name=contrib;branch=master;protocol=https \
- git://github.com/opencv/opencv_3rdparty.git;branch=ippicv/master_20191018;destsuffix=ipp;name=ipp;protocol=https \
- git://github.com/opencv/opencv_3rdparty.git;branch=contrib_xfeatures2d_boostdesc_20161012;destsuffix=boostdesc;name=boostdesc;protocol=https \
- git://github.com/opencv/opencv_3rdparty.git;branch=contrib_xfeatures2d_vgg_20160317;destsuffix=vgg;name=vgg;protocol=https \
- git://github.com/opencv/opencv_3rdparty.git;branch=contrib_face_alignment_20170818;destsuffix=face;name=face;protocol=https \
- git://github.com/WeChatCV/opencv_3rdparty.git;branch=wechat_qrcode;destsuffix=wechat_qrcode;name=wechat-qrcode;protocol=https \
+ git://github.com/opencv/opencv_contrib.git;destsuffix=git/contrib;name=contrib;branch=master;protocol=https \
+ git://github.com/opencv/opencv_3rdparty.git;branch=ippicv/master_20191018;destsuffix=git/ipp;name=ipp;protocol=https \
+ git://github.com/opencv/opencv_3rdparty.git;branch=contrib_xfeatures2d_boostdesc_20161012;destsuffix=git/boostdesc;name=boostdesc;protocol=https \
+ git://github.com/opencv/opencv_3rdparty.git;branch=contrib_xfeatures2d_vgg_20160317;destsuffix=git/vgg;name=vgg;protocol=https \
+ git://github.com/opencv/opencv_3rdparty.git;branch=contrib_face_alignment_20170818;destsuffix=git/face;name=face;protocol=https \
+ git://github.com/WeChatCV/opencv_3rdparty.git;branch=wechat_qrcode;destsuffix=git/wechat_qrcode;name=wechat-qrcode;protocol=https \
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 \
- file://0001-sfm-link-with-Glog_LIBS.patch;patchdir=../contrib \
- file://0001-Use-the-one-argument-version-of-SetTotalBytesLimit.patch \
+ file://0001-Add-missing-header-for-LIBAVCODEC_VERSION_INT.patch \
+ file://fix-build-with-protobuf-v22.patch \
"
-SRC_URI:append:riscv64 = " file://0001-Use-Os-to-compile-tinyxml2.cpp.patch;patchdir=../contrib"
+SRC_URI:append:riscv64 = " file://0001-Use-Os-to-compile-tinyxml2.cpp.patch;patchdir=contrib"
S = "${WORKDIR}/git"
@@ -69,7 +71,7 @@ S = "${WORKDIR}/git"
OPENCV_DLDIR = "${WORKDIR}/downloads"
do_unpack_extra() {
- tar xzf ${WORKDIR}/ipp/ippicv/${IPP_FILENAME} -C ${WORKDIR}
+ tar xzf ${S}/ipp/ippicv/${IPP_FILENAME} -C ${S}
md5() {
# Return the MD5 of $1
@@ -84,22 +86,22 @@ do_unpack_extra() {
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
- cache wechat_qrcode ${WORKDIR}/wechat_qrcode/*.caffemodel
- cache wechat_qrcode ${WORKDIR}/wechat_qrcode/*.prototxt
+ cache xfeatures2d/boostdesc ${S}/boostdesc/*.i
+ cache xfeatures2d/vgg ${S}/vgg/*.i
+ cache data ${S}/face/*.dat
+ cache wechat_qrcode ${S}/wechat_qrcode/*.caffemodel
+ cache wechat_qrcode ${S}/wechat_qrcode/*.prototxt
}
addtask unpack_extra after do_unpack before do_patch
CMAKE_VERBOSE = "VERBOSE=1"
-EXTRA_OECMAKE = "-DOPENCV_EXTRA_MODULES_PATH=${WORKDIR}/contrib/modules \
+EXTRA_OECMAKE = "-DOPENCV_EXTRA_MODULES_PATH=${S}/contrib/modules \
-DWITH_1394=OFF \
-DENABLE_PRECOMPILED_HEADERS=OFF \
-DCMAKE_SKIP_RPATH=ON \
-DOPENCV_ICV_HASH=${IPP_MD5} \
- -DIPPROOT=${WORKDIR}/ippicv_lnx \
+ -DIPPROOT=${S}/ippicv_lnx \
-DOPENCV_GENERATE_PKGCONFIG=ON \
-DOPENCV_DOWNLOAD_PATH=${OPENCV_DLDIR} \
-DOPENCV_ALLOW_DOWNLOADS=OFF \
@@ -107,11 +109,17 @@ EXTRA_OECMAKE = "-DOPENCV_EXTRA_MODULES_PATH=${WORKDIR}/contrib/modules \
${@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)} \
"
+LDFLAGS:append:mips = " -Wl,--no-as-needed -latomic -Wl,--as-needed"
+LDFLAGS:append:riscv32 = " -Wl,--no-as-needed -latomic -Wl,--as-needed"
+
EXTRA_OECMAKE:append:x86 = " -DX86=ON"
+# disable sse4.1 and sse4.2 to fix 32bit build failure
+# https://github.com/opencv/opencv/issues/21597
+EXTRA_OECMAKE:remove:x86 = " -DENABLE_SSE41=1 -DENABLE_SSE42=1"
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)}"
+ ${@bb.utils.contains_any("LICENSE_FLAGS_ACCEPTED", "commercial_ffmpeg commercial", "libav", "", d)}"
# TBB does not build for powerpc so disable that package config
PACKAGECONFIG:remove:powerpc = "tbb"
@@ -122,7 +130,7 @@ PACKAGECONFIG:remove:libc-musl:riscv32 = "tbb"
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[dnn] = "-DBUILD_opencv_dnn=ON -DPROTOBUF_UPDATE_FILES=ON -DBUILD_PROTOBUF=OFF -DCMAKE_CXX_STANDARD=17,-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,"
@@ -147,7 +155,7 @@ 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', 'python3', 'setuptools3-base', '', d)}
inherit ${@bb.utils.contains('PACKAGECONFIG', 'python2', 'distutils-base', '', d)}
export PYTHON_CSPEC="-I${STAGING_INCDIR}/${PYTHON_DIR}"
@@ -167,10 +175,10 @@ PACKAGES += "${@bb.utils.contains('PACKAGECONFIG', 'samples', '${PN}-samples', '
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)
+ do_split_packages(d, cv_libdir, r'^lib(.*)\.so$', 'lib%s-dev', 'OpenCV %s development package', extra_depends='${PN}-dev', allow_links=True)
+ do_split_packages(d, cv_libdir, r'^lib(.*)\.la$', 'lib%s-dev', 'OpenCV %s development package', extra_depends='${PN}-dev')
+ do_split_packages(d, cv_libdir, r'^lib(.*)\.a$', 'lib%s-dev', 'OpenCV %s development package', extra_depends='${PN}-dev')
+ do_split_packages(d, cv_libdir, r'^lib(.*)\.so\.*', 'lib%s', 'OpenCV %s library', extra_depends='', allow_links=True)
pn = d.getVar('PN')
metapkg = pn + '-dev'
@@ -251,45 +259,46 @@ SUMMARY = "Opencv : The Open Computer Vision Library, i.MX Fork"
LIC_FILES_CHKSUM = "file://LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57"
# Replace the opencv URL with the fork
-SRCREV_opencv = "5423d53ae0d116ee5bbe52f8b5503f0cd8586998"
-OPENCV_SRC ?= "git://source.codeaurora.org/external/imx/opencv-imx.git;protocol=https;branch=master"
-SRCBRANCH = "4.5.2_imx"
SRC_URI:remove = "git://github.com/opencv/opencv.git;name=opencv;branch=master;protocol=https"
SRC_URI =+ "${OPENCV_SRC};branch=${SRCBRANCH};name=opencv"
+OPENCV_SRC ?= "git://github.com/nxp-imx/opencv-imx.git;protocol=https;branch=master"
+SRCBRANCH = "4.6.0_imx"
+SRCREV_opencv = "d3440df40a6e90cd1d2a1b729bcbc16aa4d42f5d"
# Add opencv_extra
-SRCREV_extra = "855c4528402e563283f86f28c6393f57eb5dcf62"
SRC_URI += " \
git://github.com/opencv/opencv_extra.git;destsuffix=extra;name=extra;branch=master;protocol=https \
file://0001-Add-smaller-version-of-download_models.py.patch;patchdir=../extra \
"
SRCREV_FORMAT:append = "_extra"
+SRCREV_extra = "936854e2b666853d6d0732a8eabc2d699f4fa3d8"
-# Add tiny-dnn
-SRC_URI[tinydnn.md5sum] = "adb1c512e09ca2c7a6faef36f9c53e59"
-SRC_URI[tinydnn.sha256sum] = "e2c61ce8c5debaa644121179e9dbdcf83f497f39de853f8dd5175846505aa18b"
+# Patch DNN example
SRC_URI += " \
- 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://OpenCV_DNN_examples.patch \
"
-PACKAGECONFIG:remove = "eigen"
-PACKAGECONFIG:append:mx8 = " dnn text"
-PACKAGECONFIG_OPENCL = ""
-PACKAGECONFIG_OPENCL:mx8 = "opencl"
-PACKAGECONFIG_OPENCL:mx8dxl = ""
-PACKAGECONFIG_OPENCL:mx8mm = ""
-PACKAGECONFIG_OPENCL:mx8mnlite = ""
-PACKAGECONFIG:append = " ${PACKAGECONFIG_OPENCL}"
+PACKAGECONFIG:remove = "eigen"
+
+PACKAGECONFIG:append:mx8-nxp-bsp = " dnn text"
+PACKAGECONFIG:append:mx9-nxp-bsp = " dnn text"
+
+PACKAGECONFIG:append = " ${PACKAGECONFIG_OPENCL}"
+PACKAGECONFIG_OPENCL = ""
+PACKAGECONFIG_OPENCL:mx8-nxp-bsp = "opencl"
+PACKAGECONFIG_OPENCL:mx8dxl-nxp-bsp = ""
+PACKAGECONFIG_OPENCL:mx8mm-nxp-bsp = ""
+PACKAGECONFIG_OPENCL:mx8mnul-nxp-bsp = ""
PACKAGECONFIG[openvx] = "-DWITH_OPENVX=ON -DOPENVX_ROOT=${STAGING_LIBDIR} -DOPENVX_LIB_CANDIDATES='OpenVX;OpenVXU',-DWITH_OPENVX=OFF,virtual/libopenvx,"
PACKAGECONFIG[qt5] = "-DWITH_QT=ON -DOE_QMAKE_PATH_EXTERNAL_HOST_BINS=${STAGING_BINDIR_NATIVE} -DCMAKE_PREFIX_PATH=${STAGING_BINDIR_NATIVE}/cmake,-DWITH_QT=OFF,qtbase qtbase-native,"
+PACKAGECONFIG[qt6] = "-DWITH_QT=ON -DQT_HOST_PATH=${RECIPE_SYSROOT_NATIVE}${prefix_native},-DWITH_QT=OFF,qtbase qtbase-native,"
PACKAGECONFIG[tests-imx] = "-DINSTALL_TESTS=ON -DOPENCV_TEST_DATA_PATH=${S}/../extra/testdata, -DINSTALL_TESTS=OFF,"
+PACKAGECONFIG[tim-vx] = "-DWITH_TIMVX=ON -DTIMVX_INSTALL_DIR=${STAGING_DIR_HOST}${libdir},-DWITH_TIMVX=OFF,tim-vx"
-do_unpack_extra:append() {
- mkdir -p ${S}/3rdparty/tinydnn/
- tar xzf ${WORKDIR}/v1.0.0a3.tar.gz -C ${S}/3rdparty/tinydnn/
-}
+# Disable cvv module in opencv_contrib as it is not yet suppported for Qt6
+# (opencv debug framework)
+EXTRA_OECMAKE:append = " -DBUILD_opencv_cvv=OFF"
do_install:append() {
ln -sf opencv4/opencv2 ${D}${includedir}/opencv2
@@ -304,6 +313,6 @@ do_install:append() {
FILES:${PN}-samples += "${datadir}/OpenCV/samples"
-COMPATIBLE_MACHINE = "(mx8)"
+COMPATIBLE_MACHINE = "(mx8-nxp-bsp|mx9-nxp-bsp)"
########## End of i.MX overrides ##########