|
1 | | -# Add your introductions here! |
| 1 | +# Introduction to OpenCvSharp |
| 2 | + |
| 3 | +OpenCvSharp is a .NET wrapper for OpenCV, one of the most popular open-source computer vision libraries. |
| 4 | + |
| 5 | +## What is OpenCvSharp? |
| 6 | + |
| 7 | +OpenCvSharp provides cross-platform .NET bindings for OpenCV, allowing you to use OpenCV's powerful computer vision and image processing capabilities in your .NET applications. |
| 8 | + |
| 9 | +## Supported Platforms |
| 10 | + |
| 11 | +- **Windows**: x64, x86, UWP |
| 12 | +- **Linux**: Ubuntu 22.04, 24.04, ARM |
| 13 | +- **macOS**: x64 |
| 14 | +- **WebAssembly**: Browser-based applications |
| 15 | + |
| 16 | +## Getting Started |
| 17 | + |
| 18 | +### Installation |
| 19 | + |
| 20 | +Install OpenCvSharp via NuGet Package Manager: |
| 21 | + |
| 22 | +```bash |
| 23 | +# Core library |
| 24 | +dotnet add package OpenCvSharp4 |
| 25 | + |
| 26 | +# Native bindings (choose one based on your platform) |
| 27 | +dotnet add package OpenCvSharp4.runtime.win # Windows |
| 28 | +dotnet add package OpenCvSharp4.runtime.ubuntu.24.04-x64 # Ubuntu 24.04 |
| 29 | +dotnet add package OpenCvSharp4.official.runtime.linux-x64 # Linux (generic) |
| 30 | +``` |
| 31 | + |
| 32 | +### Quick Example |
| 33 | + |
| 34 | +```csharp |
| 35 | +using OpenCvSharp; |
| 36 | + |
| 37 | +// Load an image |
| 38 | +using var src = Cv2.ImRead("sample.jpg"); |
| 39 | + |
| 40 | +// Convert to grayscale |
| 41 | +using var gray = new Mat(); |
| 42 | +Cv2.CvtColor(src, gray, ColorConversionCodes.BGR2GRAY); |
| 43 | + |
| 44 | +// Apply Gaussian blur |
| 45 | +using var blurred = new Mat(); |
| 46 | +Cv2.GaussianBlur(gray, blurred, new Size(5, 5), 0); |
| 47 | + |
| 48 | +// Save the result |
| 49 | +Cv2.ImWrite("output.jpg", blurred); |
| 50 | +``` |
| 51 | + |
| 52 | +## Next Steps |
| 53 | + |
| 54 | +- Explore the [API Reference](../api/index.md) for detailed documentation |
| 55 | +- Check out [sample projects](https://github.com/shimat/opencvsharp/tree/main/samples) |
| 56 | +- Join the community on [GitHub](https://github.com/shimat/opencvsharp) |
0 commit comments