Skip to content

Commit e0403fc

Browse files
authored
Merge pull request #1809 from shimat/docfx_renewal
Docfx renewal
2 parents d53b4d0 + 4474a6c commit e0403fc

File tree

13 files changed

+338
-73
lines changed

13 files changed

+338
-73
lines changed

.github/workflows/docfx.yml

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -22,22 +22,21 @@ jobs:
2222
with:
2323
dotnet-version: 8.0.x
2424

25-
- name: Setup MSBuild.exe
26-
uses: microsoft/setup-msbuild@v2
27-
28-
- name: DocFX
29-
shell: cmd
25+
- name: Clean build outputs
26+
shell: pwsh
3027
run: |
31-
choco install docfx -y
32-
docfx docfx\docfx.json
33-
34-
- name: Upload DocFX packages
35-
uses: actions/upload-artifact@v4
36-
with:
37-
name: docfx_site
38-
path: ${{ github.workspace }}\docfx\_site
28+
Get-ChildItem -Path . -Include bin,obj -Recurse -Directory | Remove-Item -Recurse -Force
29+
30+
- name: Install DocFX
31+
shell: pwsh
32+
run: dotnet tool install -g docfx
33+
34+
- name: Build Documentation
35+
shell: pwsh
36+
run: docfx docfx/docfx.json
3937

40-
- uses: actions/upload-pages-artifact@v3
38+
- name: Upload GitHub Pages artifact
39+
uses: actions/upload-pages-artifact@v4
4140
with:
4241
path: docfx/_site
4342

docfx/api/index.md

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,24 @@
1-
# **[OpenCvSharp](https://github.com/shimat/opencvsharp) API Reference**
1+
# OpenCvSharp API Reference
2+
3+
Browse the complete API documentation for OpenCvSharp.
4+
5+
## Namespaces
6+
7+
The API is organized into the following namespaces:
8+
9+
- **OpenCvSharp** - Core classes and fundamental types
10+
- **OpenCvSharp.Dnn** - Deep Neural Networks module
11+
- **OpenCvSharp.Features2D** - 2D Features framework
12+
- **OpenCvSharp.Face** - Face recognition
13+
- **OpenCvSharp.Flann** - Clustering and search in multi-dimensional spaces
14+
- **OpenCvSharp.ImgHash** - Image hashing algorithms
15+
- **OpenCvSharp.ML** - Machine Learning
16+
- **OpenCvSharp.Tracking** - Object tracking algorithms
17+
- **OpenCvSharp.VideoIO** - Video I/O
18+
- **OpenCvSharp.XFeatures2D** - Extra 2D features framework
19+
- **OpenCvSharp.XImgProc** - Extended image processing
20+
- **OpenCvSharp.XPhoto** - Additional photo processing algorithms
21+
22+
## Getting Started
23+
24+
See the [Introduction](../articles/intro.md) for getting started with OpenCvSharp.

docfx/articles/intro.md

Lines changed: 56 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,56 @@
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)

docfx/docfx.json

Lines changed: 26 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,15 @@
33
{
44
"src": [
55
{
6-
"files": ["**/*.csproj"],
7-
"exclude": [ "**/bin/**", "**/obj/**", "**/OpenCvSharp.DebuggerVisualizers/**" ],
6+
"files": ["OpenCvSharp/OpenCvSharp.csproj"],
87
"src": "../src"
98
}
109
],
1110
"dest": "api",
1211
"disableGitFeatures": false,
1312
"disableDefaultFilter": false,
1413
"properties": {
15-
"TargetFramework": "net6"
14+
"TargetFramework": "net8"
1615
}
1716
}
1817
],
@@ -30,39 +29,48 @@
3029
"articles/**/toc.yml",
3130
"toc.yml",
3231
"*.md",
33-
"../*.md",
32+
"../*.md"
3433
]
3534
}
3635
],
3736
"resource": [
3837
{
3938
"files": [
40-
"images/**"
41-
]
42-
}
43-
],
44-
"overwrite": [
45-
{
46-
"files": [
47-
"apidoc/**.md"
48-
],
49-
"exclude": [
50-
"obj/**",
51-
"_site/**"
39+
"images/**",
40+
"../web/img/**"
5241
]
5342
}
5443
],
5544
"dest": "_site",
45+
"globalMetadata": {
46+
"_appName": "OpenCvSharp",
47+
"_appTitle": "OpenCvSharp Documentation",
48+
"_appFooter": "OpenCvSharp - .NET wrapper for OpenCV",
49+
"_enableSearch": true,
50+
"_enableNewTab": true,
51+
"_disableContribution": false,
52+
"_gitContribute": {
53+
"repo": "https://github.com/shimat/opencvsharp",
54+
"branch": "main"
55+
},
56+
"_gitUrlPattern": "github",
57+
"pdf": false
58+
},
5659
"globalMetadataFiles": [],
5760
"fileMetadataFiles": [],
5861
"template": [
59-
"default"
62+
"default",
63+
"modern",
64+
"templates/material"
6065
],
6166
"postProcessors": [],
6267
"markdownEngineName": "markdig",
6368
"noLangKeyword": false,
6469
"keepFileLink": false,
6570
"cleanupCacheHistory": false,
66-
"disableGitFeatures": false
71+
"disableGitFeatures": false,
72+
"xref": [
73+
"https://xref.docs.microsoft.com/query?uid={uid}"
74+
]
6775
}
6876
}

docfx/index.md

Lines changed: 34 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,34 @@
1-
# **[OpenCvSharp](https://github.com/shimat/opencvsharp) API Reference**
1+
# OpenCvSharp Documentation
2+
3+
Welcome to the **OpenCvSharp** documentation!
4+
5+
OpenCvSharp is a cross-platform .NET wrapper for OpenCV, providing a rich set of APIs for computer vision and image processing.
6+
7+
## Quick Links
8+
9+
- [Introduction](articles/intro.md) - Get started with OpenCvSharp
10+
- [API Reference](api/index.md) - Complete API documentation
11+
- [GitHub Repository](https://github.com/shimat/opencvsharp) - Source code and issues
12+
13+
## Features
14+
15+
- ✅ Cross-platform support (Windows, Linux, macOS, WebAssembly)
16+
- ✅ .NET 8, 10, and later support
17+
- ✅ Comprehensive OpenCV API coverage
18+
- ✅ WPF and GDI+ extensions
19+
- ✅ NuGet packages for easy installation
20+
21+
## Installation
22+
23+
Install via NuGet:
24+
25+
```bash
26+
dotnet add package OpenCvSharp4
27+
dotnet add package OpenCvSharp4.runtime.win # For Windows
28+
```
29+
30+
## Resources
31+
32+
- [NuGet Packages](https://www.nuget.org/packages?q=opencvsharp)
33+
- [GitHub Issues](https://github.com/shimat/opencvsharp/issues)
34+
- [OpenCV Official Documentation](https://docs.opencv.org/)

0 commit comments

Comments
 (0)