1
我执行使用Emgucv 哈里斯角探测器,我已经使用这个链接如何访问兴趣点的哈里斯角点检测的C#
http://docs.opencv.org/doc/tutorials/features2d/trackingmotion/harris_detector/harris_detector.html 所以我想访问的坐标转换的代码转换为C# 那些角落或任何有关这个兴趣点的信息 如何做到这一点? 谢谢
我执行使用Emgucv 哈里斯角探测器,我已经使用这个链接如何访问兴趣点的哈里斯角点检测的C#
http://docs.opencv.org/doc/tutorials/features2d/trackingmotion/harris_detector/harris_detector.html 所以我想访问的坐标转换的代码转换为C# 那些角落或任何有关这个兴趣点的信息 如何做到这一点? 谢谢
您可以制作哈里斯角图像的阈值图像,然后遍历它。这种方式是点的强度是255你有一个角点惠特X和Y值在图像上。示例:
// create corner strength image and do Harris
m_CornerImage = new Image<Gray, float>(m_SourceImage.Size);
CvInvoke.cvCornerHarris(m_SourceImage, m_CornerImage, 3, 3, 0.01);
// create and show inverted threshold image
m_ThresholdImage = new Image<Gray, Byte>(m_SourceImage.Size);
CvInvoke.cvThreshold(m_CornerImage, m_ThresholdImage, 0.0001, 255.0, Emgu.CV.CvEnum.THRESH.CV_THRESH_BINARY_INV);
imageBox2.Image = m_ThresholdImage;
imageBox1.Image = m_CornerImage;
const double MAX_INTENSITY = 255;
int contCorners = 0;
for (int x = 0; x < m_ThresholdImage.Width; x++)
{
for (int y = 0; y < m_ThresholdImage.Height; y++)
{
Gray imagenP = m_ThresholdImage[y,x];
if (imagenP.Intensity == MAX_INTENSITY)
{
//X and Y are harris point cordenates
}
}
}