opencv: Backport a patch to rename BlocksCompensator::feed()
PATCH 1/1 opencv: Backport a patch to rename BlocksCompensator::feed()
This avoids a clash with the base class' pure virtual method with the same name.
Signed-off-by Peter Kjellerstedt <[email protected]>
--- ...d-BlocksCompensator-feed-method-to-e.patch | 55 +++++++++++++++++++ .../recipes-support/opencv/opencv_4.12.0.bb | 1 + 2 files changed, 56 insertions(+) create mode 100644 meta-oe/recipes-support/opencv/opencv/0001-Renamed-templated-BlocksCompensator-feed-method-to-e.patch
meta-oe/recipes-support/opencv/opencv/0001-Renamed-templated-BlocksCompensator-feed-method-to-e.patch new file +55 -0
@@ -0,0 +1,55 @@ +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_4.12.0.bb +1 -0
@@ -34,6 +34,7 @@ SRC_URI = "git://github.com/opencv/opencv.git;name=opencv;branch=4.x;protocol=ht 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"