You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
OpenCV 4 compatibility and default. OpenCV 3 compat likely broken now
Implementation notes beyond what this commit adds to the CHANGELOG:
* `drawAxis()` was replaced by `drawFrameAxes()`.
The former is available only until OpenCV <= 4.5,
while the latter is available for all 4.x.
* opencv/opencv_contrib@56d492c
* opencv/opencv_contrib@0f030dd
Copy file name to clipboardExpand all lines: opencv-extra/CHANGELOG.md
+32Lines changed: 32 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -2,6 +2,38 @@
2
2
3
3
### Changed
4
4
5
+
- OpenCV 4 requirement:
6
+
- OpenCV 3 compatibility was dropped to ease maintenance.
7
+
For example, Ubuntu 22.04 (1.5 years old as of writing) does not ship OpenCV 3.
8
+
If you want this back, please contributed it:
9
+
It will require a reasonable amount of `#if`s that can probably be added in 1 day, but would more importantly need a CI setup added so it keeps working.
10
+
- Gained a Cabal flag `enable-nonfree` to enable those modules that require the system OpenCV 4 to be compiled with the OPENCV_ENABLE_NONFREE option (most OpenCV installations lack this by default).
11
+
This means SIFT/SURF feature detection are not available by default.
12
+
Note that the authors of this Haskell package do not currently fully understand OpenCV's logic here:
13
+
On Ubuntu 22.04, OpenCV 4.5 does not include the `opencv2/xfeatures2d/nonfree.hpp` header.
14
+
But on NixOS 23.05, `opencv4` version 4.7 does include it, even though `-DOPENCV_ENABLE_NONFREE=OFF` was passed to its build, and so the code builds with the `enable-nonfree` Cabal flag in any case.
15
+
- Legacy tracker types were removed.
16
+
OpenCV has [split](https://docs.opencv.org/4.8.0/d9/df8/group__tracking.html) their API into "Tracking API" and "Legacy Tracking API.
17
+
These have incompatible `Tracker` type hierarchies:
18
+
[`cv::Tracker`](https://docs.opencv.org/4.8.0/d0/d0a/classcv_1_1Tracker.html) and
- For example, `IsRect rect C.CDouble` to `IsRect rect Int32`.
33
+
- The `TrackerFeatureType` was extended to have the `FEATURE2D` constructor carry 2 `String` fields `detectorType` and `descriptorType`.
34
+
The previous argument-less type did not really make sense, as one cannot construct a `Feature2d` tracker feature without specifying these.
35
+
This was possible in the previous OpenCV 3 API only because its docs said `The modes available now: "HAAR"` and for all other types, including `Feature2d`, it said `The modes that will be available soon`, so that likely never worked.
36
+
This change should allow to use the many more feature types from [`Feature2D`](https://docs.opencv.org/4.8.0/d0/d13/classcv_1_1Feature2D.html).
Copy file name to clipboardExpand all lines: opencv-extra/opencv-extra.cabal
+11-1Lines changed: 11 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -40,6 +40,11 @@ source-repository head
40
40
41
41
flagopencv4
42
42
description: Use OpenCV >=4.0.0
43
+
default: True
44
+
manual: True
45
+
46
+
flagenable-nonfree
47
+
description: Builds modules that only work if the system OpenCV was built with the OPENCV_ENABLE_NONFREE option (most OpenCV installations lack this by default).
0 commit comments