【发布时间】:2016-04-12 12:48:42
【问题描述】:
我正在使用哈里斯检测器进行角点特征检测。我使用以下代码在matlab中编写了程序检测图像中的特征来检测哈里斯特征
corners = detectHarrisFeatures(img, 'MinQuality', 0.0001);
S = corners.selectStrongest(100);
然后我将所有程序从 matlab 转移到 opencv
我使用以下代码检测哈里斯角点
int thresh = 70;
for( int j = 0; j < dst_norm.rows && cont < 100; j++ )
{
for( int i = 0; i < dst_norm.cols && cont < 100; i++ )
{
if((int) dst_norm.at<float>(j, i) > thresh )
{
S.at<int>(cont, 0) = i;
S.at<int>(cont, 1) = j;
I.at<int>(cont, 0) = i;
I.at<int>(cont, 1) = j;
cont = cont + 1;
}
}
}
两个程序中提取的区域不同,我发现 harris 在 matlab 中检测到的角点与 harris 在 opencv 中检测到的角点不同。
如何使两个程序检测到的角点相同?
【问题讨论】:
标签: matlab opencv image-processing computer-vision matlab-cvst