OpenCVSharp 4.5 特征检测
opencv
OpenCV: 开源计算机视觉库
项目地址:https://gitcode.com/gh_mirrors/opencv31/opencv
免费下载资源
·
用 OpenCVSharp 4.5 跑一遍 OpenCV 官方教程。
原 OpenCV 官方教程链接:OpenCV: Feature Detection
核心函数:
using System;
using OpenCvSharp;
using OpenCvSharp.XFeatures2D;
namespace ConsoleApp1
{
class tutorial47 : ITutorial
{
public void Run()
{
Mat src = Cv2.ImRead(@"I:\csharp\images\box_in_scene.png", ImreadModes.Grayscale);
if (src.Empty())
{
Console.WriteLine( "Could not open or find the image!\n");
return;
}
//-- Step 1: Detect the keypoints using SURF Detector
int minHessian = 400;
SURF detector = SURF.Create(minHessian);
KeyPoint[] keypoints = detector.Detect(src);
//-- Draw keypoints
Mat img_keypoints = new Mat();
Cv2.DrawKeypoints(src, keypoints, img_keypoints);
//-- Show detected (drawn) keypoints
Cv2.ImShow("SURF Keypoints", img_keypoints);
Cv2.WaitKey();
}
}
}
GitHub 加速计划 / opencv31 / opencv
77.38 K
55.71 K
下载
OpenCV: 开源计算机视觉库
最近提交(Master分支:2 个月前 )
c3747a68
Added Universal Windows Package build to CI. 4 天前
9b635da5 - 4 天前
更多推荐
已为社区贡献1条内容
所有评论(0)