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
}
}
}