【问题标题】:Improving the result of harris corner detector改进harris角点检测器的结果
【发布时间】:2012-10-24 05:42:13
【问题描述】:

我一直在阅读有关特征检测的信息,并想尝试使用 harris 角检测器。我意识到这是通过调用来实现的

void cornerHarris(InputArray src, OutputArray dst, int blockSize, int ksize, double k, int borderType=BORDER_DEFAULT )

其中 dst 是包含每个像素角强度的浮点图像。

我想看到它起作用,所以我想将它应用到下图:

产生的结果是这样的:

如您所知,结果并不好。在我看来,它只是拾取了噪音,甚至没有检测到主要角落。

这是我用来在图像上打印角的代码,我使用阈值并为阈值设置任意值。

int _tmain(int argc, _TCHAR* argv[])
{

Mat img, dst, threshed;
img = imread("c:\\laptop.jpg",0);

dst = Mat::zeros(img.size(), CV_32FC1);

cornerHarris(img, dst, 2, 3, 0.04, BORDER_DEFAULT);



threshold(dst, threshed, 0.00001, 255, THRESH_BINARY_INV);

namedWindow("meh", CV_WINDOW_AUTOSIZE);
imshow("meh", threshed);
//imwrite("harris.jpg", threshed);
waitKey(0);

return 0;

If I reduce threshold the result is white with just a few black dots (detections) Increasing threshold just produces a more noisy like image.

我错过了什么吗?如何提高此功能的质量?

谢谢

【问题讨论】:

    标签: opencv feature-detection


    【解决方案1】:

    您可以尝试goodFeaturesToTrack 函数。它建立在 Harris 角点检测器之上,但过滤了我们的噪声并仅返回强角点。

    【讨论】:

    • 谢谢,这不是核心检测文档附近的任何地方,你(或一个学习者)是怎么得到这个的?
    猜你喜欢
    • 2011-04-21
    • 1970-01-01
    • 1970-01-01
    • 2018-10-22
    • 1970-01-01
    • 2023-03-18
    • 2013-08-17
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多