Skip to contentSkip to conversation

opencv: upgrade 4.12.0 -> 4.13.0

PATCH New Liu Yiding 1 participant 1 message Jan 12

lore
Share & tools
lore

Liu Yiding

author
#0 lore raw

PATCH v2 1/1 opencv: upgrade 4.12.0 -> 4.13.0

1.Changelogs
https://github.com/opencv/opencv/wiki/OpenCV-Change-Logs#version4130

2.Remove following patches as they have been merged in upstream.
27691.patch 0001-Renamed-templated-BlocksCompensator-feed-method-to-e.patch

3.After upgrading to 4.13.0, WITH_KLEIDICV is ON as default in aarch64, so build kleidicv along with openCV in aarch64.

---
 ...d-BlocksCompensator-feed-method-to-e.patch | 55 -------------------
 .../recipes-support/opencv/opencv/27691.patch | 44 ---------------
 .../{opencv_4.12.0.bb => opencv_4.13.0.bb}    | 22 ++++----
 3 files changed, 12 insertions(+), 109 deletions(-)
 delete mode 100644 meta-oe/recipes-support/opencv/opencv/0001-Renamed-templated-BlocksCompensator-feed-method-to-e.patch
 delete mode 100644 meta-oe/recipes-support/opencv/opencv/27691.patch
 rename meta-oe/recipes-support/opencv/{opencv_4.12.0.bb => opencv_4.13.0.bb} (94%)
meta-oe/recipes-support/opencv/opencv/0001-Renamed-templated-BlocksCompensator-feed-method-to-e.patch deleted +0 -55
deleted file mode 100644
index ec2bb2d100..0000000000
@@ -1,55 +0,0 @@
-From b28d9bef1d96d10e9a47d55a63d9f1443e6e3d2b Mon Sep 17 00:00:00 2001
-From: Alexander Smorkalov <[email protected]>
-Date: Mon, 8 Sep 2025 14:52:58 +0300
-Subject: [PATCH] Renamed templated BlocksCompensator::feed method to exclude
- claches with base class pure virtual method.
-
-Upstream-Status: Backport [https://github.com/opencv/opencv/commit/b28d9bef1d96d10e9a47d55a63d9f1443e6e3d2b]
-Signed-off-by: Peter Kjellerstedt <[email protected]>
----
- .../opencv2/stitching/detail/exposure_compensate.hpp        | 2 +-
- modules/stitching/src/exposure_compensate.cpp               | 6 +++---
- 2 files changed, 4 insertions(+), 4 deletions(-)
-
-diff --git a/modules/stitching/include/opencv2/stitching/detail/exposure_compensate.hpp b/modules/stitching/include/opencv2/stitching/detail/exposure_compensate.hpp
-index dea76c957b..2954f32ca3 100644
---- a/modules/stitching/include/opencv2/stitching/detail/exposure_compensate.hpp
-+++ b/modules/stitching/include/opencv2/stitching/detail/exposure_compensate.hpp
-@@ -187,7 +187,7 @@ public:
- 
- protected:
-     template<class Compensator>
--    void feed(const std::vector<Point> &corners, const std::vector<UMat> &images,
-+    void feedWithStrategy(const std::vector<Point> &corners, const std::vector<UMat> &images,
-               const std::vector<std::pair<UMat,uchar> > &masks);
- 
- private:
-diff --git a/modules/stitching/src/exposure_compensate.cpp b/modules/stitching/src/exposure_compensate.cpp
-index 59542d95ba..f7c33fa4ef 100644
---- a/modules/stitching/src/exposure_compensate.cpp
-+++ b/modules/stitching/src/exposure_compensate.cpp
-@@ -460,7 +460,7 @@ void ChannelsCompensator::setMatGains(std::vector<Mat>& umv)
- 
- 
- template<class Compensator>
--void BlocksCompensator::feed(const std::vector<Point> &corners, const std::vector<UMat> &images,
-+void BlocksCompensator::feedWithStrategy(const std::vector<Point> &corners, const std::vector<UMat> &images,
-                              const std::vector<std::pair<UMat,uchar> > &masks)
- {
-     CV_Assert(corners.size() == images.size() && images.size() == masks.size());
-@@ -605,13 +605,13 @@ void BlocksCompensator::setMatGains(std::vector<Mat>& umv)
- void BlocksGainCompensator::feed(const std::vector<Point> &corners, const std::vector<UMat> &images,
-                                  const std::vector<std::pair<UMat,uchar> > &masks)
- {
--    BlocksCompensator::feed<GainCompensator>(corners, images, masks);
-+    BlocksCompensator::feedWithStrategy<GainCompensator>(corners, images, masks);
- }
- 
- void BlocksChannelsCompensator::feed(const std::vector<Point> &corners, const std::vector<UMat> &images,
-                                      const std::vector<std::pair<UMat,uchar> > &masks)
- {
--    BlocksCompensator::feed<ChannelsCompensator>(corners, images, masks);
-+    BlocksCompensator::feedWithStrategy<ChannelsCompensator>(corners, images, masks);
- }
- 
- 
meta-oe/recipes-support/opencv/opencv/27691.patch deleted +0 -44

44 lines not on this page · raw message

meta-oe/recipes-support/opencv/opencv_4.13.0.bb renamed from meta-oe/recipes-support/opencv/opencv_4.12.0.bb +12 -10
similarity index 94%
rename from meta-oe/recipes-support/opencv/opencv_4.12.0.bb
rename to meta-oe/recipes-support/opencv/opencv_4.13.0.bb
index b8e83cd6be..3f4dc23da2 100644
@@ -10,33 +10,33 @@ ARM_INSTRUCTION_SET:armv5 = "arm"
 
 DEPENDS = "libtool swig-native bzip2 zlib glib-2.0 libwebp"
 
-SRCREV_opencv = "49486f61fb25722cbcf586b7f4320921d46fb38e"
-SRCREV_contrib = "d943e1d61c8bc556a13783e1546ee7c1a9e0b1cf"
+SRCREV_opencv = "fe38fc608f6acb8b68953438a62305d8318f4fcd"
+SRCREV_contrib = "d99ad2a188210cc35067c2e60076eed7c2442bc3"
 SRCREV_boostdesc = "34e4206aef44d50e6bbcd0ab06354b52e7466d26"
 SRCREV_vgg = "fccf7cd6a4b12079f73bbfb21745f9babcd4eb1d"
 SRCREV_face = "8afa57abc8229d611c4937165d20e2a2d9fc5a12"
 SRCREV_wechat-qrcode = "a8b69ccc738421293254aec5ddb38bd523503252"
-SRCREV_fastcv = "2265e79b3b9a8512a9c615b8c4d0244e88f45a9d"
+SRCREV_fastcv = "9e8d42b6d7e769548d70b2e5674e263b056de8b4"
+# kleidicv must match version of OpenCV
+SRCREV_kleidicv = "1e8fe7008c2292657b9689d70ea5d30db0e57767"
 
-
-SRCREV_FORMAT = "opencv_contrib_ipp_boostdesc_vgg_fastcv"
-SRC_URI = "git://github.com/opencv/opencv.git;name=opencv;branch=4.x;protocol=https \
-           git://github.com/opencv/opencv_contrib.git;destsuffix=${BB_GIT_DEFAULT_DESTSUFFIX}/contrib;name=contrib;branch=4.x;protocol=https \
+SRCREV_FORMAT = "opencv_contrib_ipp_boostdesc_vgg_fastcv_kleidicv"
+SRC_URI = "git://github.com/opencv/opencv.git;name=opencv;branch=4.x;protocol=https;tag=${PV} \
+           git://github.com/opencv/opencv_contrib.git;destsuffix=${BB_GIT_DEFAULT_DESTSUFFIX}/contrib;name=contrib;branch=4.x;protocol=https;tag=${PV} \
            git://github.com/opencv/opencv_3rdparty.git;branch=contrib_xfeatures2d_boostdesc_20161012;destsuffix=${BB_GIT_DEFAULT_DESTSUFFIX}/boostdesc;name=boostdesc;protocol=https \
            git://github.com/opencv/opencv_3rdparty.git;branch=contrib_xfeatures2d_vgg_20160317;destsuffix=${BB_GIT_DEFAULT_DESTSUFFIX}/vgg;name=vgg;protocol=https \
            git://github.com/opencv/opencv_3rdparty.git;branch=contrib_face_alignment_20170818;destsuffix=${BB_GIT_DEFAULT_DESTSUFFIX}/face;name=face;protocol=https \
            git://github.com/WeChatCV/opencv_3rdparty.git;branch=wechat_qrcode;destsuffix=${BB_GIT_DEFAULT_DESTSUFFIX}/wechat_qrcode;name=wechat-qrcode;protocol=https \
-           git://github.com/opencv/opencv_3rdparty.git;branch=fastcv/4.x_20250606;destsuffix=${BB_GIT_DEFAULT_DESTSUFFIX}/fastcv;name=fastcv;protocol=https  \
+           git://github.com/opencv/opencv_3rdparty.git;branch=fastcv/4.x_20250715;destsuffix=${BB_GIT_DEFAULT_DESTSUFFIX}/fastcv;name=fastcv;protocol=https  \
            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://0008-Do-not-embed-build-directory-in-binaries.patch \
-           file://27691.patch \
-	   file://0001-Renamed-templated-BlocksCompensator-feed-method-to-e.patch \
            "
 SRC_URI:append:riscv64 = " file://0001-Use-Os-to-compile-tinyxml2.cpp.patch;patchdir=contrib"
+SRC_URI:append:aarch64 = " git://gitlab.arm.com/kleidi/kleidicv;branch=main;destsuffix=${BB_GIT_DEFAULT_DESTSUFFIX}/3rdparty/kleidicv;name=kleidicv;protocol=https"
 
 
 # OpenCV wants to download more files during configure.  We download these in
@@ -81,10 +81,12 @@ EXTRA_OECMAKE = "-DOPENCV_EXTRA_MODULES_PATH=${S}/contrib/modules \
     ${@bb.utils.contains("TARGET_CC_ARCH", "-msse4.1", "-DCPU_DISPATCH=SSE,SSE2,SSE3,SSSE3,SSE41", "", d)} \
     ${@bb.utils.contains("TARGET_CC_ARCH", "-msse4.2", "-DCPU_DISPATCH=SSE,SSE2,SSE3,SSSE3,SSE41,SSE42", "", 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"
+EXTRA_OECMAKE:append:aarch64 = " -DKLEIDICV_SOURCE_PATH=${S}/3rdparty/kleidicv"
 
 PACKAGECONFIG ??= "python3 eigen jpeg png tiff v4l libv4l samples tbb \
     ${@bb.utils.contains_any('DISTRO_FEATURES', '${GTK3DISTROFEATURES}', 'gtk', '', d)}"
Signature · 1 line
2.43.0