OpenCvSharp Documentation
OpenCvSharp is a cross-platform .NET wrapper for OpenCV. This site contains the official guides and API reference for installing OpenCvSharp, building your first application, and using the library safely.
Start here
- Choose an OpenCvSharp version and package
- Install OpenCvSharp
- Build your first application
- Translate OpenCV C++ or Python code
- Browse the API reference
Essential guides
- Manage native resources
- Understand InputArray, OutputArray, and in-place processing
- Control copies, native memory, and performance
- Use and benchmark OpenCL acceleration with UMat
- Diagnose common errors
- Troubleshoot native library loading
- Migrate from OpenCvSharp4 to OpenCvSharp5
.NET application guides
- Browse the OpenCvSharp and .NET guides
- Access and modify pixels
- Encode images and convert UI image types
- Process uploaded images and streams in ASP.NET Core
- Display images in .NET UI frameworks
- Read and write video
- Store matrices and parameters
OpenCV examples
- Browse the OpenCV examples
- Build an image processing pipeline
- Analyze histograms and improve contrast
- Resize, crop, rotate, and rectify images
- Create and refine masks
- Measure contours and connected components
- Detect and match local features
Supported platforms
OpenCvSharp5 targets .NET 8 or later and provides runtime packages for Windows x64 and ARM64, Linux x64 and ARM64, macOS x64 and Apple Silicon, and WebAssembly. OpenCvSharp4 remains available for applications that require .NET Framework or .NET Standard.