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 <peter.kjellerstedt@axis.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
This commit is contained in:
Peter Kjellerstedt 2025-09-24 04:03:51 +02:00 committed by Khem Raj
parent c9922073e4
commit b9fc1c079b
No known key found for this signature in database
GPG Key ID: BB053355919D3314
2 changed files with 56 additions and 0 deletions

View File

@ -0,0 +1,55 @@
From b28d9bef1d96d10e9a47d55a63d9f1443e6e3d2b Mon Sep 17 00:00:00 2001
From: Alexander Smorkalov <alexander.smorkalov@xperience.ai>
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 <peter.kjellerstedt@axis.com>
---
.../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);
}

View File

@ -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"