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
Update README for OpenCvSharp5: fix stale v4-era content
- Point macOS quick start/install at OpenCvSharp5 packages, which are
now actually published, instead of the leftover OpenCvSharp4 example
- Drop the ubuntu.*-deprecation warning: that distro-specific package
family only ever existed for OpenCvSharp4, never OpenCvSharp5
- Remove the OpenCvSharp3-*/OpenCvSharp-* legacy package mentions
- Update the native wrapper cmake generator example to VS 2026
(with a note for VS 2022), matching the CI and build script
- Fix MatExprNode -> MatExpr to match the current public type name
> ⚠️ The distro-specific `OpenCvSharp5.official.runtime.ubuntu.*` packages are **no longer maintained**. Use `OpenCvSharp5.official.runtime.linux-x64` instead.
105
-
106
-
107
104
### macOS (Intel and Apple Silicon)
108
-
Add `OpenCvSharp4` and the runtime package matching your architecture:
105
+
Add `OpenCvSharp5` and the runtime package matching your architecture:
109
106
```bash
110
107
dotnet new console -n ConsoleApp01
111
108
cd ConsoleApp01
112
-
dotnet add package OpenCvSharp4
109
+
dotnet add package OpenCvSharp5
113
110
# Intel (x64):
114
-
dotnet add package OpenCvSharp4.runtime.osx.x64
111
+
dotnet add package OpenCvSharp5.runtime.osx.x64
115
112
# Apple Silicon (arm64):
116
-
dotnet add package OpenCvSharp4.runtime.osx.arm64
113
+
dotnet add package OpenCvSharp5.runtime.osx.arm64
117
114
# --- edit Program.cs ---
118
115
dotnet run
119
116
```
@@ -156,7 +153,7 @@ using (new Window("dst image", dst))
156
153
<details>
157
154
<summary><b>Note: chained Mat arithmetic is leak-free</b></summary>
158
155
159
-
`Mat` arithmetic operators (`+`, `-`, `*`, `/`, the comparison and bitwise operators, `T()`, `Inv()`, `Mul()`, `Abs()`, `Eye`/`Zeros`/`Ones`, ...) return a purely managed, lazily-evaluated expression tree (`MatExprNode`) that holds **no** unmanaged resources. The native `cv::MatExpr` chain is built only when the expression is materialized — when it is assigned to a `Mat`, or passed where a `Mat`/`InputArray` is expected — and every native intermediate is disposed immediately during that evaluation.
156
+
`Mat` arithmetic operators (`+`, `-`, `*`, `/`, the comparison and bitwise operators, `T()`, `Inv()`, `Mul()`, `Abs()`, `Eye`/`Zeros`/`Ones`, ...) return a purely managed, lazily-evaluated expression tree (`MatExpr`) that holds **no** unmanaged resources. The native `cv::MatExpr` chain is built only when the expression is materialized — when it is assigned to a `Mat`, or passed where a `Mat`/`InputArray` is expected — and every native intermediate is disposed immediately during that evaluation.
160
157
161
158
As a result, chained expressions never leak: you only need `using` on your inputs and on the final `Mat`. The intermediate expression nodes require no disposal.
Native binding (OpenCvSharpExtern.dll / libOpenCvSharpExtern.so / libOpenCvSharpExtern.dylib) is required for OpenCvSharp to work. To use OpenCvSharp, you should add both `OpenCvSharp5` and `OpenCvSharp5.runtime.*` packages to your project. Currently, native bindings for Windows x64/ARM64, Linux x64/ARM64, macOS x64/arm64, and WebAssembly are available.
221
218
222
-
Packages named OpenCvSharp3-* and OpenCvSharp-* are deprecated.
> **Note:**`OpenCvSharp5.official.runtime.ubuntu.22.04-x64`, `ubuntu.22.04-x64.slim`, `ubuntu.24.04-x64`, and `ubuntu.24.04-x64.slim` are **deprecated**. Migrate to the portable `linux-x64` packages.
37
36
> **Note:**`OpenCvSharp5.runtime.linux-arm` has been renamed to `OpenCvSharp5.runtime.linux-arm64` to correctly reflect the ARM64 (AArch64) RID. The old package is kept as a compatibility shim that automatically pulls in the renamed package, but new projects should reference `OpenCvSharp5.runtime.linux-arm64` directly.
0 commit comments