Skip to content

Commit 1fb5c3d

Browse files
committed
fixup! tooling: Update OpenCV to v4.13.0
1 parent 33573cc commit 1fb5c3d

File tree

4 files changed

+44
-6
lines changed

4 files changed

+44
-6
lines changed

oasis_tooling/config/bgslibrary/0001-Disable-imshow-calls.patch

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
1-
From 47058cd9c7f7a3bfebca8a74075eaf953d325232 Mon Sep 17 00:00:00 2001
1+
From 780fb0dc93326499de403776eb5b01cd43a4dc68 Mon Sep 17 00:00:00 2001
22
From: Garrett Brown <eigendebugger@gmail.com>
33
Date: Fri, 21 Mar 2025 21:38:12 -0700
4-
Subject: [PATCH 1/2] Disable imshow() calls
4+
Subject: [PATCH 1/3] Disable imshow() calls
55

66
---
77
CMakeLists.txt | 3 ++
88
bgslibrary/tools/PerformanceUtils.cpp | 49 ---------------------------
99
2 files changed, 3 insertions(+), 49 deletions(-)
1010

1111
diff --git a/CMakeLists.txt b/CMakeLists.txt
12-
index 4d635ff..fc2b51d 100644
12+
index 2ff5217..09a8cfe 100644
1313
--- a/CMakeLists.txt
1414
+++ b/CMakeLists.txt
1515
@@ -67,6 +67,9 @@ foreach(OUTPUTCONFIG ${CMAKE_CONFIGURATION_TYPES})

oasis_tooling/config/bgslibrary/0002-CMake-Fix-locating-libs-via-_ROOT-variables.patch

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1-
From 74fc9828431845d5e1aff3a5527a4142d8cc7a33 Mon Sep 17 00:00:00 2001
1+
From cfaca08a7d9346b07fbfd25eff451a147c98ad1d Mon Sep 17 00:00:00 2001
22
From: Garrett Brown <garrett.brown@aclima.earth>
33
Date: Wed, 24 Sep 2025 14:09:45 -0700
4-
Subject: [PATCH 2/2] CMake: Fix locating libs via *_ROOT variables
4+
Subject: [PATCH 2/3] CMake: Fix locating libs via *_ROOT variables
55

66
---
77
CMakeLists.txt | 5 +++++
88
1 file changed, 5 insertions(+)
99

1010
diff --git a/CMakeLists.txt b/CMakeLists.txt
11-
index fc2b51d..c5d5e1d 100644
11+
index 09a8cfe..744a61e 100644
1212
--- a/CMakeLists.txt
1313
+++ b/CMakeLists.txt
1414
@@ -35,6 +35,11 @@ if (POLICY CMP0042)
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
From 8d92febc7fc001c13c5b06ff7e481202c2ba1c43 Mon Sep 17 00:00:00 2001
2+
From: Garrett Brown <garrett.brown@aclima.earth>
3+
Date: Sat, 7 Feb 2026 12:07:04 -0800
4+
Subject: [PATCH 3/3] Implement OpenCV4 required apply() overload
5+
6+
---
7+
bgslibrary/algorithms/LBSP/BackgroundSubtractorLBSP.h | 9 +++++++++
8+
1 file changed, 9 insertions(+)
9+
10+
diff --git a/bgslibrary/algorithms/LBSP/BackgroundSubtractorLBSP.h b/bgslibrary/algorithms/LBSP/BackgroundSubtractorLBSP.h
11+
index 3744b8c..0bda415 100644
12+
--- a/bgslibrary/algorithms/LBSP/BackgroundSubtractorLBSP.h
13+
+++ b/bgslibrary/algorithms/LBSP/BackgroundSubtractorLBSP.h
14+
@@ -32,6 +32,15 @@ namespace bgslibrary
15+
virtual void initialize(const cv::Mat& oInitImg, const cv::Mat& oROI) = 0;
16+
//! primary model update function; the learning param is used to override the internal learning speed (ignored when <= 0)
17+
virtual void apply(cv::InputArray image, cv::OutputArray fgmask, double learningRate = 0) = 0;
18+
+ // add OpenCV4 overloaded apply that takes a knownForegroundMask
19+
+ void apply(cv::InputArray image,
20+
+ cv::InputArray knownForegroundMask,
21+
+ cv::OutputArray fgmask,
22+
+ double learningRate = -1) CV_OVERRIDE
23+
+ {
24+
+ (void)knownForegroundMask; // ignore this mask by default
25+
+ apply(image, fgmask, learningRate); // forward to existing implementation
26+
+ }
27+
//! unused, always returns nullptr
28+
//virtual cv::AlgorithmInfo* info() const;
29+
//! returns a copy of the ROI used for descriptor extraction
30+
--
31+
2.43.0
32+

oasis_tooling/scripts/depinstall_oasis_deps.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,12 @@ patch \
222222
--no-backup-if-mismatch \
223223
--directory="${OASIS_DEPENDS_SOURCE_DIRECTORY}/ros-perception/bgslibrary" \
224224
< "${CONFIG_DIRECTORY}/bgslibrary/0002-CMake-Fix-locating-libs-via-_ROOT-variables.patch"
225+
patch \
226+
-p1 \
227+
--reject-file="/dev/null" \
228+
--no-backup-if-mismatch \
229+
--directory="${OASIS_DEPENDS_SOURCE_DIRECTORY}/ros-perception/bgslibrary" \
230+
< "${CONFIG_DIRECTORY}/bgslibrary/0003-Implement-OpenCV4-required-apply-overload.patch"
225231

226232
# camera_ros
227233
echo "Patching camera_ros..."

0 commit comments

Comments
 (0)