Skip to content

Commit

Permalink
Merge pull request #1637 from shimat/4.9.0
Browse files Browse the repository at this point in the history
4.9.0
  • Loading branch information
shimat authored Jan 3, 2024
2 parents f0f3a52 + 6dd0fc6 commit 053cc4b
Show file tree
Hide file tree
Showing 18 changed files with 56 additions and 77 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/linux-arm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:

env:
DEBIAN_FRONTEND: noninteractive
OPENCV_VERSION: 4.8.0
OPENCV_VERSION: 4.9.0

jobs:
build:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ubuntu20.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:

env:
DEBIAN_FRONTEND: noninteractive
OPENCV_VERSION: 4.8.0
OPENCV_VERSION: 4.9.0
OPENCV_CACHE_VERSION: 1

jobs:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/wasm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:

env:
DEBIAN_FRONTEND: noninteractive
OPENCV_VERSION: 4.8.0
OPENCV_VERSION: 4.9.0
EM_VERSION: 3.1.32
EM_CACHE_FOLDER: 'emsdk-cache'

Expand Down
19 changes: 9 additions & 10 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
- main

env:
OPENCV_VERSION: 4.8.0
OPENCV_VERSION: 4.9.0

jobs:
build:
Expand All @@ -17,7 +17,7 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 1
submodules: true
Expand Down Expand Up @@ -67,7 +67,7 @@ jobs:
. ".\download_tesseract_windows.ps1"
- name: Add msbuild to PATH
uses: microsoft/[email protected]
uses: microsoft/setup-msbuild@v1.3.1

- name: Build x64
shell: cmd
Expand All @@ -77,15 +77,15 @@ jobs:
shell: cmd
run: msbuild OpenCvSharp.sln /t:build /p:configuration=Release /p:platform=x86 -maxcpucount

- name: Build ARM
shell: cmd
run: msbuild OpenCvSharp.sln /t:build /p:configuration=Release /p:platform=ARM -maxcpucount
#- name: Build ARM
# shell: cmd
# run: msbuild OpenCvSharp.sln /t:build /p:configuration=Release /p:platform=ARM -maxcpucount

- name: Install .NET
uses: actions/setup-dotnet@v3
uses: actions/setup-dotnet@v4
with:
dotnet-version: |
6.0.x
8.0.x
- name: Build net6.0
shell: cmd
Expand Down Expand Up @@ -135,7 +135,6 @@ jobs:
nuget pack nuget/OpenCvSharp4.Extensions.nuspec -OutputDirectory artifacts -Symbols -SymbolPackageFormat snupkg
nuget pack nuget/OpenCvSharp4.WpfExtensions.nuspec -OutputDirectory artifacts -Symbols -SymbolPackageFormat snupkg
nuget pack nuget/OpenCvSharp4.runtime.win.nuspec -OutputDirectory artifacts
nuget pack nuget/OpenCvSharp4.runtime.uwp.nuspec -OutputDirectory artifacts
- name: Test
shell: powershell
Expand All @@ -156,7 +155,7 @@ jobs:
dotnet run -c Release --runtime win-x64 -- "${env:GITHUB_WORKSPACE}" "${env:GITHUB_WORKSPACE}\artifacts" ${{env.OPENCV_VERSION}}
- name: Upload NuGet packages and Release packages
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: packages_windows
path: ${{ github.workspace }}\artifacts
22 changes: 3 additions & 19 deletions OpenCvSharp.sln
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.29503.13
# Visual Studio Version 17
VisualStudioVersion = 17.8.34330.188
MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{E048D213-B3B9-453F-9A41-29FDEB0D496B}"
EndProject
Expand All @@ -24,8 +24,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tool", "tool", "{A6E578C0-A
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OpenCvSharp.NupkgBetaRemover", "tool\OpenCvSharp.NupkgBetaRemover\OpenCvSharp.NupkgBetaRemover.csproj", "{CC19F9A5-01A7-4BDF-B34C-CF56F46A474A}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "uwpOpenCvSharpExtern", "src\uwpOpenCvSharpExtern\uwpOpenCvSharpExtern.vcxproj", "{BD5471E5-7B55-5192-8DA4-042B66AF71AE}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OpenCvSharp.WpfExtensions", "src\OpenCvSharp.WpfExtensions\OpenCvSharp.WpfExtensions.csproj", "{01FD66CE-F81A-4641-BE30-3CF9DE84D6D5}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OpenCvSharp.ReleaseMaker", "tool\OpenCvSharp.ReleaseMaker\OpenCvSharp.ReleaseMaker.csproj", "{1C399497-5240-439A-879A-4ACB34C409AE}"
Expand All @@ -37,7 +35,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenCvSharp.DebuggerVisualizers.Tester", "test\OpenCvSharp.DebuggerVisualizers.Tester\OpenCvSharp.DebuggerVisualizers.Tester.csproj", "{FFD602AA-0A08-40DD-8ACD-7F5A3BA51DEC}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenCvSharp.Tests.Windows", "test\OpenCvSharp.Tests.Windows\OpenCvSharp.Tests.Windows.csproj", "{36F6A125-3633-441E-9794-97EB91E50F20}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OpenCvSharp.Tests.Windows", "test\OpenCvSharp.Tests.Windows\OpenCvSharp.Tests.Windows.csproj", "{36F6A125-3633-441E-9794-97EB91E50F20}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand Down Expand Up @@ -144,19 +142,6 @@ Global
{CC19F9A5-01A7-4BDF-B34C-CF56F46A474A}.Release|x64.Build.0 = Release|Any CPU
{CC19F9A5-01A7-4BDF-B34C-CF56F46A474A}.Release|x86.ActiveCfg = Release|Any CPU
{CC19F9A5-01A7-4BDF-B34C-CF56F46A474A}.Release|x86.Build.0 = Release|Any CPU
{BD5471E5-7B55-5192-8DA4-042B66AF71AE}.Debug|Any CPU.ActiveCfg = Debug|Win32
{BD5471E5-7B55-5192-8DA4-042B66AF71AE}.Debug|ARM.ActiveCfg = Debug|ARM
{BD5471E5-7B55-5192-8DA4-042B66AF71AE}.Debug|x64.ActiveCfg = Release|x64
{BD5471E5-7B55-5192-8DA4-042B66AF71AE}.Debug|x64.Build.0 = Release|x64
{BD5471E5-7B55-5192-8DA4-042B66AF71AE}.Debug|x86.ActiveCfg = Release|Win32
{BD5471E5-7B55-5192-8DA4-042B66AF71AE}.Debug|x86.Build.0 = Release|Win32
{BD5471E5-7B55-5192-8DA4-042B66AF71AE}.Release|Any CPU.ActiveCfg = Release|Win32
{BD5471E5-7B55-5192-8DA4-042B66AF71AE}.Release|ARM.ActiveCfg = Release|ARM
{BD5471E5-7B55-5192-8DA4-042B66AF71AE}.Release|ARM.Build.0 = Release|ARM
{BD5471E5-7B55-5192-8DA4-042B66AF71AE}.Release|x64.ActiveCfg = Release|x64
{BD5471E5-7B55-5192-8DA4-042B66AF71AE}.Release|x64.Build.0 = Release|x64
{BD5471E5-7B55-5192-8DA4-042B66AF71AE}.Release|x86.ActiveCfg = Release|Win32
{BD5471E5-7B55-5192-8DA4-042B66AF71AE}.Release|x86.Build.0 = Release|Win32
{01FD66CE-F81A-4641-BE30-3CF9DE84D6D5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{01FD66CE-F81A-4641-BE30-3CF9DE84D6D5}.Debug|Any CPU.Build.0 = Debug|Any CPU
{01FD66CE-F81A-4641-BE30-3CF9DE84D6D5}.Debug|ARM.ActiveCfg = Debug|Any CPU
Expand Down Expand Up @@ -232,7 +217,6 @@ Global
{8E7279F8-F801-4672-B42F-1ED2C68B16A4} = {E048D213-B3B9-453F-9A41-29FDEB0D496B}
{4232CB4A-DFE3-46CA-9503-C5F1798BAED3} = {E048D213-B3B9-453F-9A41-29FDEB0D496B}
{CC19F9A5-01A7-4BDF-B34C-CF56F46A474A} = {A6E578C0-A34A-4CCF-A808-CBAC81CB48C0}
{BD5471E5-7B55-5192-8DA4-042B66AF71AE} = {E048D213-B3B9-453F-9A41-29FDEB0D496B}
{01FD66CE-F81A-4641-BE30-3CF9DE84D6D5} = {E048D213-B3B9-453F-9A41-29FDEB0D496B}
{1C399497-5240-439A-879A-4ACB34C409AE} = {A6E578C0-A34A-4CCF-A808-CBAC81CB48C0}
{FFD602AA-0A08-40DD-8ACD-7F5A3BA51DEC} = {1F113DD0-E292-47A5-8EFF-3FB5D0869BF3}
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,10 @@ dotnet run
If you do not use NuGet, get DLL files from the [release page](https://github.com/shimat/opencvsharp/releases).

## Target OpenCV
* [OpenCV 4.7](http://opencv.org/) with [opencv_contrib](https://github.com/opencv/opencv_contrib)
* [OpenCV 4.9.0](http://opencv.org/) with [opencv_contrib](https://github.com/opencv/opencv_contrib)

## Requirements
* [.NET Framework 4.8](http://www.microsoft.com/ja-jp/download/details.aspx?id=1639) / [.NET Core 2.0](https://www.microsoft.com/net/download) / [Mono](http://www.mono-project.com/Main_Page)
* [.NET Framework 4.8](http://www.microsoft.com/ja-jp/download/details.aspx?id=1639) / [.NET 6](https://www.microsoft.com/net/download) / .NET Standard 2.0
* (Windows) [Visual C++ 2022 Redistributable Package](https://support.microsoft.com/en-us/help/2977003/the-latest-supported-visual-c-downloads)
* (Windows Server) Media Foundation
```
Expand Down
9 changes: 3 additions & 6 deletions download_opencv_windows.ps1
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
$tag = "4.8.0.20230705"
$version = "480"
$tag = "4.9.0.20231231-beta"
$version = "490"
$uriArray = @(
"https://github.com/shimat/opencv_files/releases/download/${tag}/opencv${version}_win_x64.zip"
"https://github.com/shimat/opencv_files/releases/download/${tag}/opencv${version}_win_x86.zip"
"https://github.com/shimat/opencv_files/releases/download/${tag}/opencv${version}_uwp_x64.zip"
"https://github.com/shimat/opencv_files/releases/download/${tag}/opencv${version}_uwp_x86.zip"
"https://github.com/shimat/opencv_files/releases/download/${tag}/opencv${version}_uwp_ARM.zip"
"https://github.com/shimat/opencv_files/releases/download/${tag}/opencv${version}_win_x86.zip"
)

function Download($uri, $outFile) {
Expand Down
12 changes: 6 additions & 6 deletions nuget/OpenCvSharp4.runtime.uwp.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@
<file src="..\src\Release\uwpOpenCvSharpExtern\x64\OpenCvSharpExtern.dll" target="runtimes\win-x64\native" />
<file src="..\src\Release\uwpOpenCvSharpExtern\Win32\OpenCvSharpExtern.dll" target="runtimes\win-x86\native" />
<file src="..\src\Release\uwpOpenCvSharpExtern\ARM\OpenCvSharpExtern.dll" target="runtimes\win-arm\native" />
<file src="..\opencv_files\opencv480_uwp_x64\x64\vc17\bin\opencv_world480.dll" target="runtimes\win-x64\native" />
<file src="..\opencv_files\opencv480_uwp_x86\x86\vc17\bin\opencv_world480.dll" target="runtimes\win-x86\native" />
<file src="..\opencv_files\opencv480_uwp_arm\x86\vc17\bin\opencv_world480.dll" target="runtimes\win-arm\native" />
<file src="..\opencv_files\opencv480_uwp_x64\x64\vc17\bin\opencv_img_hash480.dll" target="runtimes\win-x64\native" />
<file src="..\opencv_files\opencv480_uwp_x86\x86\vc17\bin\opencv_img_hash480.dll" target="runtimes\win-x86\native" />
<file src="..\opencv_files\opencv480_uwp_arm\x86\vc17\bin\opencv_img_hash480.dll" target="runtimes\win-arm\native" />
<file src="..\opencv_files\opencv490_uwp_x64\x64\vc17\bin\opencv_world490.dll" target="runtimes\win-x64\native" />
<file src="..\opencv_files\opencv490_uwp_x86\x86\vc17\bin\opencv_world490.dll" target="runtimes\win-x86\native" />
<file src="..\opencv_files\opencv490_uwp_arm\x86\vc17\bin\opencv_world490.dll" target="runtimes\win-arm\native" />
<file src="..\opencv_files\opencv490_uwp_x64\x64\vc17\bin\opencv_img_hash490.dll" target="runtimes\win-x64\native" />
<file src="..\opencv_files\opencv490_uwp_x86\x86\vc17\bin\opencv_img_hash490.dll" target="runtimes\win-x86\native" />
<file src="..\opencv_files\opencv490_uwp_arm\x86\vc17\bin\opencv_img_hash490.dll" target="runtimes\win-arm\native" />
</files>
</package>
4 changes: 2 additions & 2 deletions nuget/OpenCvSharp4.runtime.win.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@
<files>
<file src="..\src\Release\x64\OpenCvSharpExtern.dll" target="runtimes\win-x64\native" />
<file src="..\src\Release\Win32\OpenCvSharpExtern.dll" target="runtimes\win-x86\native" />
<file src="..\opencv_files\opencv480_win_x64\x64\vc17\bin\opencv_videoio_ffmpeg480_64.dll" target="runtimes\win-x64\native" />
<file src="..\opencv_files\opencv480_win_x86\x86\vc17\bin\opencv_videoio_ffmpeg480.dll" target="runtimes\win-x86\native" />
<file src="..\opencv_files\opencv490_win_x64\x64\vc17\bin\opencv_videoio_ffmpeg490_64.dll" target="runtimes\win-x64\native" />
<file src="..\opencv_files\opencv490_win_x86\x86\vc17\bin\opencv_videoio_ffmpeg490.dll" target="runtimes\win-x86\native" />
<file src="OpenCvSharp4.runtime.win.props" target="build\net48\OpenCvSharp4.runtime.win.props" />
<file src="OpenCvSharp4.runtime.win.props" target="build\netstandard\OpenCvSharp4.runtime.win.props" />
<file src="OpenCvSharp4.runtime.win.props" target="build\netcoreapp\OpenCvSharp4.runtime.win.props" />
Expand Down
8 changes: 4 additions & 4 deletions nuget/OpenCvSharp4.runtime.win.props
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
<Link>dll\x86\OpenCvSharpExtern.dll</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="$(OpenCvSharp4ExternalNativeDlls)\win-x86\native\opencv_videoio_ffmpeg480.dll">
<Link>dll\x86\opencv_videoio_ffmpeg480.dll</Link>
<Content Include="$(OpenCvSharp4ExternalNativeDlls)\win-x86\native\opencv_videoio_ffmpeg490.dll">
<Link>dll\x86\opencv_videoio_ffmpeg490.dll</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
</ItemGroup>
Expand All @@ -17,8 +17,8 @@
<Link>dll\x64\OpenCvSharpExtern.dll</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="$(OpenCvSharp4ExternalNativeDlls)\win-x64\native\opencv_videoio_ffmpeg480_64.dll">
<Link>dll\x64\opencv_videoio_ffmpeg480_64.dll</Link>
<Content Include="$(OpenCvSharp4ExternalNativeDlls)\win-x64\native\opencv_videoio_ffmpeg490_64.dll">
<Link>dll\x64\opencv_videoio_ffmpeg490_64.dll</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
</ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion src/OpenCvSharp/Cv2/Cv2_calib3d.cs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public static void Rodrigues(double[] vector, out double[,] matrix, out double[,
if (vector is null)
throw new ArgumentNullException(nameof(vector));
if (vector.Length != 3)
throw new ArgumentException("vector.Length != 3");
throw new ArgumentException("Length != 3", nameof(vector));

using var vectorM = new Mat(3, 1, MatType.CV_64FC1, vector);
using var matrixM = new Mat<double>();
Expand Down
10 changes: 5 additions & 5 deletions src/OpenCvSharp/Cv2/Cv2_core.cs
Original file line number Diff line number Diff line change
Expand Up @@ -912,7 +912,7 @@ public static void Merge(Mat[] mv, Mat dst)
if (mv is null)
throw new ArgumentNullException(nameof(mv));
if (mv.Length == 0)
throw new ArgumentException("mv.Length == 0");
throw new ArgumentException("mv is empty", nameof(mv));
if (dst is null)
throw new ArgumentNullException(nameof(dst));
foreach (var m in mv)
Expand Down Expand Up @@ -985,11 +985,11 @@ public static void MixChannels(Mat[] src, Mat[] dst, int[] fromTo)
if (fromTo is null)
throw new ArgumentNullException(nameof(fromTo));
if (src.Length == 0)
throw new ArgumentException("src.Length == 0");
throw new ArgumentException("Length == 0", nameof(src));
if (dst.Length == 0)
throw new ArgumentException("dst.Length == 0");
throw new ArgumentException("Length == 0", nameof(dst));
if (fromTo.Length == 0 || fromTo.Length % 2 != 0)
throw new ArgumentException("fromTo.Length == 0");
throw new ArgumentException("Invalid length", nameof(fromTo));
var srcPtr = new IntPtr[src.Length];
var dstPtr = new IntPtr[dst.Length];
for (var i = 0; i < src.Length; i++)
Expand Down Expand Up @@ -1165,7 +1165,7 @@ public static void HConcat(IEnumerable<Mat> src, OutputArray dst)

var srcArray = src as Mat[] ?? src.ToArray();
if (srcArray.Length == 0)
throw new ArgumentException("src.Count == 0", nameof(src));
throw new ArgumentException("src is empty", nameof(src));
var srcPtr = new IntPtr[srcArray.Length];
for (var i = 0; i < srcArray.Length; i++)
{
Expand Down
2 changes: 1 addition & 1 deletion src/OpenCvSharp/Modules/core/InputArray.cs
Original file line number Diff line number Diff line change
Expand Up @@ -569,7 +569,7 @@ private static MatType EstimateType(Type t)
if (t == typeof(Point3f))
return MatType.CV_32FC3;
if (t == typeof(Point3d))
return MatType.CV_32FC3;
return MatType.CV_64FC3;
if (t == typeof(Range))
return MatType.CV_32SC2;
if (t == typeof(Rangef))
Expand Down
1 change: 0 additions & 1 deletion src/OpenCvSharp/Modules/imgproc/Enum/ColormapTypes.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,3 @@ public enum ColormapTypes
Turbo = 20,
DeepGreen = 21
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ public virtual void AddGraphSegmentation(GraphSegmentation g)
g.ThrowIfDisposed();

if (g.PtrObj is null)
throw new ArgumentException("g.PtrObj = null");
throw new ArgumentException($"PtrObj = null", nameof(g));

NativeMethods.HandleException(
NativeMethods.ximgproc_segmentation_SelectiveSearchSegmentation_addGraphSegmentation(ptr, g.PtrObj.CvPtr));
Expand Down
2 changes: 1 addition & 1 deletion src/OpenCvSharp/OpenCvSharp.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<GenerateAssemblyCompanyAttribute>false</GenerateAssemblyCompanyAttribute>
<GenerateAssemblyProductAttribute>false</GenerateAssemblyProductAttribute>
<Configurations>Debug;Release;Release-JP</Configurations>
<LangVersion>10</LangVersion>
<LangVersion>12</LangVersion>
<Nullable>enable</Nullable>
<PublishRepositoryUrl>true</PublishRepositoryUrl>
<IncludeSymbols>true</IncludeSymbols>
Expand Down
Loading

0 comments on commit 053cc4b

Please sign in to comment.