Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#349: FastFeatureDetector does not work #346

Merged
merged 4 commits into from May 5, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/OpenCvSharp/modules/features2d/FastFeatureDetector.cs
Expand Up @@ -23,9 +23,9 @@ public class FastFeatureDetector : Feature2D
/// <summary>
///
/// </summary>
protected FastFeatureDetector(IntPtr ptr)
protected FastFeatureDetector(IntPtr p)
{
ptrObj = new Ptr(ptr);
ptrObj = new Ptr(p);
ptr = ptrObj.Get();
}

Expand Down
29 changes: 29 additions & 0 deletions test/OpenCvSharp.Tests/features2d/FastFeatureDetectorTest.cs
@@ -0,0 +1,29 @@
using System;
using NUnit.Framework;

namespace OpenCvSharp.Tests.Features2D
{
// ReSharper disable once InconsistentNaming

[TestFixture]
public class FastFeatureDetectorTest : TestBase
{
[Test]
public void CreateAndDispose()
{
var surf = FastFeatureDetector.Create();
surf.Dispose();
}

[Test]
public void Detect()
{
KeyPoint[] keyPoints;
using (var gray = Image("lenna.png", 0))
using (var orb = FastFeatureDetector.Create())
keyPoints = orb.Detect(gray);

Console.WriteLine($"KeyPoint has {keyPoints.Length} items.");
}
}
}