Skip to content

Commit 3ca11c8

Browse files
committed
WarpAffine test
1 parent 9eb52b7 commit 3ca11c8

File tree

2 files changed

+28
-1
lines changed

2 files changed

+28
-1
lines changed

test/OpenCvSharp.Tests/imgproc/ImgProcTest.cs

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,33 @@ namespace OpenCvSharp.Tests.ImgProc
88
{
99
public class ImgProcTest : TestBase
1010
{
11+
[Fact]
12+
public void WarpAffine()
13+
{
14+
using var src = new Mat(new Size(1024, 768), MatType.CV_8UC4);
15+
16+
using var matrix = new Mat(new Size(3, 2), MatType.CV_64FC1);
17+
matrix.Set<double>(0, 0, 1);
18+
matrix.Set<double>(1, 1, 1);
19+
20+
using var dst = new Mat();
21+
Cv2.WarpAffine(src, dst, matrix, src.Size());
22+
}
23+
24+
// TODO
25+
[Fact(Skip = "fails with exception")]
26+
public void WarpAffineBigImage()
27+
{
28+
using var src = new Mat(new Size(8192, 10), MatType.CV_8UC4);
29+
30+
using var matrix = new Mat(new Size(3, 2), MatType.CV_64FC1);
31+
matrix.Set<double>(0, 0, 1);
32+
matrix.Set<double>(1, 1, 1);
33+
34+
using var dst = new Mat();
35+
Cv2.WarpAffine(src, dst, matrix, src.Size()); // fails with exception
36+
}
37+
1138
[Fact]
1239
public void MorphologyExErode()
1340
{

0 commit comments

Comments
 (0)