summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMax Krummenacher <max.krummenacher@toradex.com>2022-11-21 19:11:36 +0100
committergithub-actions[bot] <github-actions[bot]@users.noreply.github.com>2022-11-25 19:46:41 +0000
commitd0bd76df6c13f735433f202ec107ca42529f13b0 (patch)
tree15af260703fe7b884ee3ea7fe4b83e950a80805f
parent6b7b000f2f7cec69fc77ea7518da5940ceebc515 (diff)
downloadmeta-freescale-d0bd76df6c13f735433f202ec107ca42529f13b0.tar.gz
opencv: imx: update the i.mx fork to 4.6.0
- Pull in the 4.6.0 meta-openembedded copy plus https://lore.kernel.org/all/20221121180529.3358952-1-max.oss.09@gmail.com/ - OpenCV_DNN_examples.patch taken from meta-imx - Adapt the PREFERRED_VERSION Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com> (cherry picked from commit 5554647fa199375fb8e1aef657d5ff74ac115022)
-rw-r--r--conf/machine/include/imx-base.inc2
-rw-r--r--recipes-support/opencv/opencv/OpenCV_DNN_examples.patch26
-rw-r--r--recipes-support/opencv/opencv_4.6.0.imx.bb (renamed from recipes-support/opencv/opencv_4.5.2.imx.bb)66
3 files changed, 54 insertions, 40 deletions
diff --git a/conf/machine/include/imx-base.inc b/conf/machine/include/imx-base.inc
index b32267ce..1a3a83d4 100644
--- a/conf/machine/include/imx-base.inc
+++ b/conf/machine/include/imx-base.inc
@@ -495,7 +495,7 @@ PREFERRED_VERSION_optee-client:mx8-nxp-bsp ??= "3.17.0.imx"
495PREFERRED_VERSION_optee-test:mx8-nxp-bsp ??= "3.17.0.imx" 495PREFERRED_VERSION_optee-test:mx8-nxp-bsp ??= "3.17.0.imx"
496 496
497#Use i.MX opencv Version for mx8 497#Use i.MX opencv Version for mx8
498PREFERRED_VERSION_opencv:mx8-nxp-bsp ??= "4.5.2.imx" 498PREFERRED_VERSION_opencv:mx8-nxp-bsp ??= "4.6.0.imx"
499 499
500# Handle default kernel 500# Handle default kernel
501IMX_DEFAULT_KERNEL:imx-mainline-bsp = "linux-fslc" 501IMX_DEFAULT_KERNEL:imx-mainline-bsp = "linux-fslc"
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
31=================================================================== 31===================================================================
32--- git.orig/samples/dnn/classification.cpp 32--- git.orig/samples/dnn/classification.cpp
33+++ git/samples/dnn/classification.cpp 33+++ git/samples/dnn/classification.cpp
34@@ -11,6 +11,7 @@ std::string keys = 34@@ -12,6 +12,7 @@ std::string keys =
35 "{ help h | | Print help message. }" 35 "{ help h | | Print help message. }"
36 "{ @alias | | An alias name of model to extract preprocessing parameters from models.yml file. }" 36 "{ @alias | | An alias name of model to extract preprocessing parameters from models.yml file. }"
37 "{ zoo | models.yml | An optional path to file with preprocessing parameters }" 37 "{ zoo | models.yml | An optional path to file with preprocessing parameters }"
@@ -39,7 +39,7 @@ Index: git/samples/dnn/classification.cpp
39 "{ input i | | Path to input image or video file. Skip this argument to capture frames from a camera.}" 39 "{ input i | | Path to input image or video file. Skip this argument to capture frames from a camera.}"
40 "{ initial_width | 0 | Preprocess input image by initial resizing to a specific width.}" 40 "{ initial_width | 0 | Preprocess input image by initial resizing to a specific width.}"
41 "{ initial_height | 0 | Preprocess input image by initial resizing to a specific height.}" 41 "{ initial_height | 0 | Preprocess input image by initial resizing to a specific height.}"
42@@ -102,7 +103,7 @@ int main(int argc, char** argv) 42@@ -113,7 +114,7 @@ int main(int argc, char** argv)
43 if (parser.has("input")) 43 if (parser.has("input"))
44 cap.open(parser.get<String>("input")); 44 cap.open(parser.get<String>("input"));
45 else 45 else
@@ -48,19 +48,21 @@ Index: git/samples/dnn/classification.cpp
48 //! [Open a video file or an image file or a camera stream] 48 //! [Open a video file or an image file or a camera stream]
49 49
50 // Process frames. 50 // Process frames.
51@@ -151,13 +152,13 @@ int main(int argc, char** argv) 51@@ -195,14 +196,14 @@ int main(int argc, char** argv)
52 double freq = getTickFrequency() / 1000; 52 }
53 double t = net.getPerfProfile(layersTimes) / freq; 53 std::string label = format("Inference time of 1 round: %.2f ms", t1);
54 std::string label = format("Inference time: %.2f ms", t); 54 std::string label2 = format("Average time of 200 rounds: %.2f ms", timeRecorder.getTimeMilli()/200);
55- putText(frame, label, Point(0, 15), FONT_HERSHEY_SIMPLEX, 0.5, Scalar(0, 255, 0)); 55- putText(frame, label, Point(0, 15), FONT_HERSHEY_SIMPLEX, 0.5, Scalar(0, 255, 0));
56- putText(frame, label2, Point(0, 35), FONT_HERSHEY_SIMPLEX, 0.5, Scalar(0, 255, 0));
56+ putText(frame, label, Point(0, 20), FONT_HERSHEY_SIMPLEX, 0.8, Scalar(0, 0, 255), 2, 8, false); 57+ putText(frame, label, Point(0, 20), FONT_HERSHEY_SIMPLEX, 0.8, Scalar(0, 0, 255), 2, 8, false);
58+ putText(frame, label2, Point(0, 45), FONT_HERSHEY_SIMPLEX, 0.8, Scalar(0, 0, 255), 2, 8, false);
57 59
58 // Print predicted class. 60 // Print predicted class.
59 label = format("%s: %.4f", (classes.empty() ? format("Class #%d", classId).c_str() : 61 label = format("%s: %.4f", (classes.empty() ? format("Class #%d", classId).c_str() :
60 classes[classId].c_str()), 62 classes[classId].c_str()),
61 confidence); 63 confidence);
62- putText(frame, label, Point(0, 40), FONT_HERSHEY_SIMPLEX, 0.5, Scalar(0, 255, 0)); 64- putText(frame, label, Point(0, 55), FONT_HERSHEY_SIMPLEX, 0.5, Scalar(0, 255, 0));
63+ putText(frame, label, Point(0, 45), FONT_HERSHEY_SIMPLEX, 0.8, Scalar(0, 0, 255), 2, 8, false); 65+ putText(frame, label, Point(0, 70), FONT_HERSHEY_SIMPLEX, 0.8, Scalar(0, 0, 255), 2, 8, false);
64 66
65 imshow(kWinName, frame); 67 imshow(kWinName, frame);
66 } 68 }
@@ -68,7 +70,7 @@ Index: git/samples/dnn/object_detection.cpp
68=================================================================== 70===================================================================
69--- git.orig/samples/dnn/object_detection.cpp 71--- git.orig/samples/dnn/object_detection.cpp
70+++ git/samples/dnn/object_detection.cpp 72+++ git/samples/dnn/object_detection.cpp
71@@ -251,13 +251,13 @@ int main(int argc, char** argv) 73@@ -260,13 +260,13 @@ int main(int argc, char** argv)
72 if (predictionsQueue.counter > 1) 74 if (predictionsQueue.counter > 1)
73 { 75 {
74 std::string label = format("Camera: %.2f FPS", framesQueue.getFPS()); 76 std::string label = format("Camera: %.2f FPS", framesQueue.getFPS());
@@ -85,7 +87,7 @@ Index: git/samples/dnn/object_detection.cpp
85 } 87 }
86 imshow(kWinName, frame); 88 imshow(kWinName, frame);
87 } 89 }
88@@ -293,7 +293,7 @@ int main(int argc, char** argv) 90@@ -302,7 +302,7 @@ int main(int argc, char** argv)
89 double freq = getTickFrequency() / 1000; 91 double freq = getTickFrequency() / 1000;
90 double t = net.getPerfProfile(layersTimes) / freq; 92 double t = net.getPerfProfile(layersTimes) / freq;
91 std::string label = format("Inference time: %.2f ms", t); 93 std::string label = format("Inference time: %.2f ms", t);
@@ -94,7 +96,7 @@ Index: git/samples/dnn/object_detection.cpp
94 96
95 imshow(kWinName, frame); 97 imshow(kWinName, frame);
96 } 98 }
97@@ -462,7 +462,7 @@ void drawPred(int classId, float conf, i 99@@ -471,7 +471,7 @@ void drawPred(int classId, float conf, i
98 top = max(top, labelSize.height); 100 top = max(top, labelSize.height);
99 rectangle(frame, Point(left, top - labelSize.height), 101 rectangle(frame, Point(left, top - labelSize.height),
100 Point(left + labelSize.width, top + baseLine), Scalar::all(255), FILLED); 102 Point(left + labelSize.width, top + baseLine), Scalar::all(255), FILLED);
@@ -107,7 +109,7 @@ Index: git/samples/dnn/segmentation.cpp
107=================================================================== 109===================================================================
108--- git.orig/samples/dnn/segmentation.cpp 110--- git.orig/samples/dnn/segmentation.cpp
109+++ git/samples/dnn/segmentation.cpp 111+++ git/samples/dnn/segmentation.cpp
110@@ -157,7 +157,7 @@ int main(int argc, char** argv) 112@@ -162,7 +162,7 @@ int main(int argc, char** argv)
111 double freq = getTickFrequency() / 1000; 113 double freq = getTickFrequency() / 1000;
112 double t = net.getPerfProfile(layersTimes) / freq; 114 double t = net.getPerfProfile(layersTimes) / freq;
113 std::string label = format("Inference time: %.2f ms", t); 115 std::string label = format("Inference time: %.2f ms", t);
diff --git a/recipes-support/opencv/opencv_4.5.2.imx.bb b/recipes-support/opencv/opencv_4.6.0.imx.bb
index 331189ea..54beed06 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 @@
3# recipe. The second section customizes the recipe for i.MX. 3# recipe. The second section customizes the recipe for i.MX.
4 4
5########## meta-openembedded copy ########### 5########## meta-openembedded copy ###########
6# Upstream hash: 6b7cf95e75cbfc08cf1f6eddc7ce3f6a0a39edcf
7# plus LICENSE_FLAGS_ACCEPTED fix
6 8
7SUMMARY = "Opencv : The Open Computer Vision Library" 9SUMMARY = "Opencv : The Open Computer Vision Library"
8HOMEPAGE = "http://opencv.org/" 10HOMEPAGE = "http://opencv.org/"
@@ -16,8 +18,8 @@ ARM_INSTRUCTION_SET:armv5 = "arm"
16 18
17DEPENDS = "libtool swig-native bzip2 zlib glib-2.0 libwebp" 19DEPENDS = "libtool swig-native bzip2 zlib glib-2.0 libwebp"
18 20
19SRCREV_opencv = "69357b1e88680658a07cffde7678a4d697469f03" 21SRCREV_opencv = "b0dc474160e389b9c9045da5db49d03ae17c6a6b"
20SRCREV_contrib = "f5d7f6712d4ff229ba4f45cf79dfd11c557d56fd" 22SRCREV_contrib = "7b77c355a8fdc97667b3fa1e7a0d37e4973fc868"
21SRCREV_ipp = "a56b6ac6f030c312b2dce17430eef13aed9af274" 23SRCREV_ipp = "a56b6ac6f030c312b2dce17430eef13aed9af274"
22SRCREV_boostdesc = "34e4206aef44d50e6bbcd0ab06354b52e7466d26" 24SRCREV_boostdesc = "34e4206aef44d50e6bbcd0ab06354b52e7466d26"
23SRCREV_vgg = "fccf7cd6a4b12079f73bbfb21745f9babcd4eb1d" 25SRCREV_vgg = "fccf7cd6a4b12079f73bbfb21745f9babcd4eb1d"
@@ -45,22 +47,20 @@ IPP_MD5 = "${@ipp_md5sum(d)}"
45 47
46SRCREV_FORMAT = "opencv_contrib_ipp_boostdesc_vgg" 48SRCREV_FORMAT = "opencv_contrib_ipp_boostdesc_vgg"
47SRC_URI = "git://github.com/opencv/opencv.git;name=opencv;branch=master;protocol=https \ 49SRC_URI = "git://github.com/opencv/opencv.git;name=opencv;branch=master;protocol=https \
48 git://github.com/opencv/opencv_contrib.git;destsuffix=contrib;name=contrib;branch=master;protocol=https \ 50 git://github.com/opencv/opencv_contrib.git;destsuffix=git/contrib;name=contrib;branch=master;protocol=https \
49 git://github.com/opencv/opencv_3rdparty.git;branch=ippicv/master_20191018;destsuffix=ipp;name=ipp;protocol=https \ 51 git://github.com/opencv/opencv_3rdparty.git;branch=ippicv/master_20191018;destsuffix=git/ipp;name=ipp;protocol=https \
50 git://github.com/opencv/opencv_3rdparty.git;branch=contrib_xfeatures2d_boostdesc_20161012;destsuffix=boostdesc;name=boostdesc;protocol=https \ 52 git://github.com/opencv/opencv_3rdparty.git;branch=contrib_xfeatures2d_boostdesc_20161012;destsuffix=git/boostdesc;name=boostdesc;protocol=https \
51 git://github.com/opencv/opencv_3rdparty.git;branch=contrib_xfeatures2d_vgg_20160317;destsuffix=vgg;name=vgg;protocol=https \ 53 git://github.com/opencv/opencv_3rdparty.git;branch=contrib_xfeatures2d_vgg_20160317;destsuffix=git/vgg;name=vgg;protocol=https \
52 git://github.com/opencv/opencv_3rdparty.git;branch=contrib_face_alignment_20170818;destsuffix=face;name=face;protocol=https \ 54 git://github.com/opencv/opencv_3rdparty.git;branch=contrib_face_alignment_20170818;destsuffix=git/face;name=face;protocol=https \
53 git://github.com/WeChatCV/opencv_3rdparty.git;branch=wechat_qrcode;destsuffix=wechat_qrcode;name=wechat-qrcode;protocol=https \ 55 git://github.com/WeChatCV/opencv_3rdparty.git;branch=wechat_qrcode;destsuffix=git/wechat_qrcode;name=wechat-qrcode;protocol=https \
54 file://0001-3rdparty-ippicv-Use-pre-downloaded-ipp.patch \ 56 file://0001-3rdparty-ippicv-Use-pre-downloaded-ipp.patch \
55 file://0003-To-fix-errors-as-following.patch \ 57 file://0003-To-fix-errors-as-following.patch \
56 file://0001-Temporarliy-work-around-deprecated-ffmpeg-RAW-functi.patch \ 58 file://0001-Temporarliy-work-around-deprecated-ffmpeg-RAW-functi.patch \
57 file://0001-Dont-use-isystem.patch \ 59 file://0001-Dont-use-isystem.patch \
58 file://download.patch \ 60 file://download.patch \
59 file://0001-Make-ts-module-external.patch \ 61 file://0001-Make-ts-module-external.patch \
60 file://0001-sfm-link-with-Glog_LIBS.patch;patchdir=../contrib \
61 file://0001-Use-the-one-argument-version-of-SetTotalBytesLimit.patch \
62 " 62 "
63SRC_URI:append:riscv64 = " file://0001-Use-Os-to-compile-tinyxml2.cpp.patch;patchdir=../contrib" 63SRC_URI:append:riscv64 = " file://0001-Use-Os-to-compile-tinyxml2.cpp.patch;patchdir=contrib"
64 64
65S = "${WORKDIR}/git" 65S = "${WORKDIR}/git"
66 66
@@ -69,7 +69,7 @@ S = "${WORKDIR}/git"
69OPENCV_DLDIR = "${WORKDIR}/downloads" 69OPENCV_DLDIR = "${WORKDIR}/downloads"
70 70
71do_unpack_extra() { 71do_unpack_extra() {
72 tar xzf ${WORKDIR}/ipp/ippicv/${IPP_FILENAME} -C ${WORKDIR} 72 tar xzf ${S}/ipp/ippicv/${IPP_FILENAME} -C ${S}
73 73
74 md5() { 74 md5() {
75 # Return the MD5 of $1 75 # Return the MD5 of $1
@@ -84,22 +84,22 @@ do_unpack_extra() {
84 test -e $DEST || ln -s $F $DEST 84 test -e $DEST || ln -s $F $DEST
85 done 85 done
86 } 86 }
87 cache xfeatures2d/boostdesc ${WORKDIR}/boostdesc/*.i 87 cache xfeatures2d/boostdesc ${S}/boostdesc/*.i
88 cache xfeatures2d/vgg ${WORKDIR}/vgg/*.i 88 cache xfeatures2d/vgg ${S}/vgg/*.i
89 cache data ${WORKDIR}/face/*.dat 89 cache data ${S}/face/*.dat
90 cache wechat_qrcode ${WORKDIR}/wechat_qrcode/*.caffemodel 90 cache wechat_qrcode ${S}/wechat_qrcode/*.caffemodel
91 cache wechat_qrcode ${WORKDIR}/wechat_qrcode/*.prototxt 91 cache wechat_qrcode ${S}/wechat_qrcode/*.prototxt
92} 92}
93addtask unpack_extra after do_unpack before do_patch 93addtask unpack_extra after do_unpack before do_patch
94 94
95CMAKE_VERBOSE = "VERBOSE=1" 95CMAKE_VERBOSE = "VERBOSE=1"
96 96
97EXTRA_OECMAKE = "-DOPENCV_EXTRA_MODULES_PATH=${WORKDIR}/contrib/modules \ 97EXTRA_OECMAKE = "-DOPENCV_EXTRA_MODULES_PATH=${S}/contrib/modules \
98 -DWITH_1394=OFF \ 98 -DWITH_1394=OFF \
99 -DENABLE_PRECOMPILED_HEADERS=OFF \ 99 -DENABLE_PRECOMPILED_HEADERS=OFF \
100 -DCMAKE_SKIP_RPATH=ON \ 100 -DCMAKE_SKIP_RPATH=ON \
101 -DOPENCV_ICV_HASH=${IPP_MD5} \ 101 -DOPENCV_ICV_HASH=${IPP_MD5} \
102 -DIPPROOT=${WORKDIR}/ippicv_lnx \ 102 -DIPPROOT=${S}/ippicv_lnx \
103 -DOPENCV_GENERATE_PKGCONFIG=ON \ 103 -DOPENCV_GENERATE_PKGCONFIG=ON \
104 -DOPENCV_DOWNLOAD_PATH=${OPENCV_DLDIR} \ 104 -DOPENCV_DOWNLOAD_PATH=${OPENCV_DLDIR} \
105 -DOPENCV_ALLOW_DOWNLOADS=OFF \ 105 -DOPENCV_ALLOW_DOWNLOADS=OFF \
@@ -107,7 +107,13 @@ EXTRA_OECMAKE = "-DOPENCV_EXTRA_MODULES_PATH=${WORKDIR}/contrib/modules \
107 ${@bb.utils.contains("TARGET_CC_ARCH", "-msse4.1", "-DENABLE_SSE=1 -DENABLE_SSE2=1 -DENABLE_SSE3=1 -DENABLE_SSSE3=1 -DENABLE_SSE41=1", "", d)} \ 107 ${@bb.utils.contains("TARGET_CC_ARCH", "-msse4.1", "-DENABLE_SSE=1 -DENABLE_SSE2=1 -DENABLE_SSE3=1 -DENABLE_SSSE3=1 -DENABLE_SSE41=1", "", d)} \
108 ${@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)} \ 108 ${@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)} \
109" 109"
110LDFLAGS:append:mips = " -Wl,--no-as-needed -latomic -Wl,--as-needed"
111LDFLAGS:append:riscv32 = " -Wl,--no-as-needed -latomic -Wl,--as-needed"
112
110EXTRA_OECMAKE:append:x86 = " -DX86=ON" 113EXTRA_OECMAKE:append:x86 = " -DX86=ON"
114# disable sse4.1 and sse4.2 to fix 32bit build failure
115# https://github.com/opencv/opencv/issues/21597
116EXTRA_OECMAKE:remove:x86 = " -DENABLE_SSE41=1 -DENABLE_SSE42=1"
111 117
112PACKAGECONFIG ??= "gapi python3 eigen jpeg png tiff v4l libv4l gstreamer samples tbb gphoto2 \ 118PACKAGECONFIG ??= "gapi python3 eigen jpeg png tiff v4l libv4l gstreamer samples tbb gphoto2 \
113 ${@bb.utils.contains("DISTRO_FEATURES", "x11", "gtk", "", d)} \ 119 ${@bb.utils.contains("DISTRO_FEATURES", "x11", "gtk", "", d)} \
@@ -167,10 +173,10 @@ PACKAGES += "${@bb.utils.contains('PACKAGECONFIG', 'samples', '${PN}-samples', '
167 173
168python populate_packages:prepend () { 174python populate_packages:prepend () {
169 cv_libdir = d.expand('${libdir}') 175 cv_libdir = d.expand('${libdir}')
170 do_split_packages(d, cv_libdir, '^lib(.*)\.so$', 'lib%s-dev', 'OpenCV %s development package', extra_depends='${PN}-dev', allow_links=True) 176 do_split_packages(d, cv_libdir, r'^lib(.*)\.so$', 'lib%s-dev', 'OpenCV %s development package', extra_depends='${PN}-dev', allow_links=True)
171 do_split_packages(d, cv_libdir, '^lib(.*)\.la$', 'lib%s-dev', 'OpenCV %s development package', extra_depends='${PN}-dev') 177 do_split_packages(d, cv_libdir, r'^lib(.*)\.la$', 'lib%s-dev', 'OpenCV %s development package', extra_depends='${PN}-dev')
172 do_split_packages(d, cv_libdir, '^lib(.*)\.a$', 'lib%s-dev', 'OpenCV %s development package', extra_depends='${PN}-dev') 178 do_split_packages(d, cv_libdir, r'^lib(.*)\.a$', 'lib%s-dev', 'OpenCV %s development package', extra_depends='${PN}-dev')
173 do_split_packages(d, cv_libdir, '^lib(.*)\.so\.*', 'lib%s', 'OpenCV %s library', extra_depends='', allow_links=True) 179 do_split_packages(d, cv_libdir, r'^lib(.*)\.so\.*', 'lib%s', 'OpenCV %s library', extra_depends='', allow_links=True)
174 180
175 pn = d.getVar('PN') 181 pn = d.getVar('PN')
176 metapkg = pn + '-dev' 182 metapkg = pn + '-dev'
@@ -251,14 +257,14 @@ SUMMARY = "Opencv : The Open Computer Vision Library, i.MX Fork"
251LIC_FILES_CHKSUM = "file://LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57" 257LIC_FILES_CHKSUM = "file://LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57"
252 258
253# Replace the opencv URL with the fork 259# Replace the opencv URL with the fork
254SRCREV_opencv = "5423d53ae0d116ee5bbe52f8b5503f0cd8586998" 260SRCREV_opencv = "d3440df40a6e90cd1d2a1b729bcbc16aa4d42f5d"
255OPENCV_SRC ?= "git://source.codeaurora.org/external/imx/opencv-imx.git;protocol=https;branch=master" 261OPENCV_SRC ?= "git://github.com/nxp-imx/opencv-imx.git;protocol=https;branch=master"
256SRCBRANCH = "4.5.2_imx" 262SRCBRANCH = "4.6.0_imx"
257SRC_URI:remove = "git://github.com/opencv/opencv.git;name=opencv;branch=master;protocol=https" 263SRC_URI:remove = "git://github.com/opencv/opencv.git;name=opencv;branch=master;protocol=https"
258SRC_URI =+ "${OPENCV_SRC};branch=${SRCBRANCH};name=opencv" 264SRC_URI =+ "${OPENCV_SRC};branch=${SRCBRANCH};name=opencv"
259 265
260# Add opencv_extra 266# Add opencv_extra
261SRCREV_extra = "855c4528402e563283f86f28c6393f57eb5dcf62" 267SRCREV_extra = "936854e2b666853d6d0732a8eabc2d699f4fa3d8"
262SRC_URI += " \ 268SRC_URI += " \
263 git://github.com/opencv/opencv_extra.git;destsuffix=extra;name=extra;branch=master;protocol=https \ 269 git://github.com/opencv/opencv_extra.git;destsuffix=extra;name=extra;branch=master;protocol=https \
264 file://0001-Add-smaller-version-of-download_models.py.patch;patchdir=../extra \ 270 file://0001-Add-smaller-version-of-download_models.py.patch;patchdir=../extra \
@@ -281,7 +287,13 @@ PACKAGECONFIG:append = " ${PACKAGECONFIG_OPENCL}"
281 287
282PACKAGECONFIG[openvx] = "-DWITH_OPENVX=ON -DOPENVX_ROOT=${STAGING_LIBDIR} -DOPENVX_LIB_CANDIDATES='OpenVX;OpenVXU',-DWITH_OPENVX=OFF,virtual/libopenvx," 288PACKAGECONFIG[openvx] = "-DWITH_OPENVX=ON -DOPENVX_ROOT=${STAGING_LIBDIR} -DOPENVX_LIB_CANDIDATES='OpenVX;OpenVXU',-DWITH_OPENVX=OFF,virtual/libopenvx,"
283PACKAGECONFIG[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," 289PACKAGECONFIG[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,"
290PACKAGECONFIG[qt6] = "-DWITH_QT=ON -DQT_HOST_PATH=${RECIPE_SYSROOT_NATIVE}${prefix_native},-DWITH_QT=OFF,qtbase qtbase-native,"
284PACKAGECONFIG[tests-imx] = "-DINSTALL_TESTS=ON -DOPENCV_TEST_DATA_PATH=${S}/../extra/testdata, -DINSTALL_TESTS=OFF," 291PACKAGECONFIG[tests-imx] = "-DINSTALL_TESTS=ON -DOPENCV_TEST_DATA_PATH=${S}/../extra/testdata, -DINSTALL_TESTS=OFF,"
292PACKAGECONFIG[tim-vx] = "-DWITH_TIMVX=ON -DTIMVX_INSTALL_DIR=${STAGING_DIR_HOST}${libdir},-DWITH_TIMVX=OFF,tim-vx"
293
294# Disable cvv module in opencv_contrib as it is not yet suppported for Qt6
295# (opencv debug framework)
296EXTRA_OECMAKE:append = " -DBUILD_opencv_cvv=OFF"
285 297
286do_install:append() { 298do_install:append() {
287 ln -sf opencv4/opencv2 ${D}${includedir}/opencv2 299 ln -sf opencv4/opencv2 ${D}${includedir}/opencv2